Intel SM v5 fix and updated meshcommander #7127

Signed-off-by: si458 <simonsmith5521@gmail.com>

si458 committed Apr 20, 2026 at 13:40 UTC a11e48b8f5d1b096373692dd49d6693afb932b3a
11 files changed +9239 -9022
public/commander-de.htm
+908 -888
@@ -1,8 +1,8 @@
1 -<!DOCTYPE html><html lang="de" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Verbinden 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>Getrennt</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>Systemstatus</a><p id=go14 class=nav1 onclick=go(14)><a>Remotedesktop</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Dateien</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Hardware-Informationen</a><p id=go6 class=nav1 onclick=go(6)><a>Ereignisprotokoll</a><p id=go15 class=nav1 onclick=go(15)><a>Audit-Log</a><p id=go21 class=nav1 onclick=go(21)><a>Lager</a><p id=go8 class=nav1 onclick=go(8)><a>Netzwerkeinstellungen</a><p id=go17 class=nav1 onclick=go(17)><a>Interneteinstellungen</a><p id=go16 class=nav1 onclick=go(16)><a>Sicherheitseinstellungen</a><p id=go19 class=nav1 onclick=go(19)><a>Agentenpräsenz</a><p id=go18 class=nav1 onclick=go(18)><a>Systemverteidigung</a><p id=go11 class=nav1 onclick=go(11)><a>Benutzerkonten</a><p id=go22 class=nav1 onclick=go(22)><a>Abonnements</a><p id=go23 class=nav1 onclick=go(23)><a>Weckalarme</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN Browser</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Disk Map" onclick=iderToggleDiskMap()><input type=button value="Beenden Sie die IDE-R-Sitzung" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Diskette, Blöcke sind 512 Bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CD-ROM, Blöcke sind 2048 Bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Die Firmware dieses Computers sollte aktualisiert werden.&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>Bitte überprüfen Sie hier</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>Wird geladen...</h1></div><div id=p1 style=display:none><h1>Systemstatus</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Hardware-Informationen</h1><span id=16></span></div><div id=p6 style=display:none><h1>Ereignisprotokoll</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Netzwerkeinstellungen</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Benutzerkonten</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><tbody><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=Abfrage style=margin:4px onclick=wsmanQuery()><input type=button value=klar 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=p13 style=display:none;min-width:780px><h1>Serial-over-LAN-Terminal</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Intel® AMT-Umleitungsport oder die Serial-over-LAN-Funktion sind deaktiviert<span id=26>Klicken Sie hier, um es zu aktivieren.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Remotecomputer ist nicht eingeschaltet. Klicken Sie hier, um einen Energiebefehl auszugeben.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Machtaktionen ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Starten Sie den Remote-Festplatten-Mount-Vorgang" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Starten Sie die Erfassung" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Verbinden onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Getrennt.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Schalten Sie um, was die Eingabetaste senden soll" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value="80 x 25" title="Terminalgröße umschalten" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Schalten Sie den Emulationstyp der Tasten F1 bis F10 um" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Erweiterte Ascii" title="Terminalemulationstyp umschalten" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Rücktaste<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Senden onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Einfügen disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Remotedesktop</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Intel® AMT-Umleitungsport oder die KVM-Funktion sind deaktiviert<span id=37>Klicken Sie hier, um es zu aktivieren.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Remotecomputer ist nicht eingeschaltet. Klicken Sie hier, um einen Energiebefehl auszugeben.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Nach links drehen" onclick=drotate(-1)>↺</div><div class=rb title="Drehe nach rechts" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Schalten Sie den Vollbildmodus um" onkeypress="return false" onkeydown="return false" value=Voll onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Speichern Sie einen Screenshot des Remotedesktops" onkeypress="return false" onkeydown="return false" value=Speichern... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Die Einstellungen..." title="Bearbeiten Sie die Remotedesktopeinstellungen" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Starten Sie den Remote-Festplatten-Mount-Vorgang" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Ändern Sie den Energiezustand des Remote-Computers" onkeypress="return false" onkeydown="return false" value="Machtaktionen ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Verbinden onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Getrennt.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Sieg<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L.<option value=4>Win + M.<option value=20>Win + R.<option value=23>Gewinnen + Links<option value=24>Win + Right<option value=5>Umschalt + Win + M.<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Strg-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Senden onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Strg-Alt-Entf onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Art onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Leerer Bildschirm&nbsp;</span><span id=47><input id=48 type=checkbox>Nur anschauen&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Audit-Log</h1><span id=50></span></div><div id=p16 style=display:none><h1>Sicherheitseinstellungen</h1><span id=51></span></div><div id=p17 style=display:none><h1>Interneteinstellungen</h1><span id=52></span></div><div id=p18 style=display:none><h1>Systemverteidigung</h1><span id=53></span></div><div id=p19 style=display:none><h1>Agentenpräsenz</h1><span id=54></span></div><div id=p21 style=display:none><h1>Lager</h1><span id=55></span></div><div id=p22 style=display:none><h1>Event-Abonnements</h1><span id=56></span></div><div id=p23 style=display:none><h1>Weckalarme</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Dateien</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Oben>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Wählen Sie Alle" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Umbenennen onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Löschen onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Neuer Ordner" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Hochladen onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Schnitt onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Kopieren onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Einfügen onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Aktualisierung onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Nach Name sortieren<option value=2>Nach Größe sortiert<option value=3>Nach Datum sortieren<option value=4>Mit Namen absteigen<option value=5>Nach Größe absteigen<option value=6>Abstieg nach Datum</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 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=60 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>Nutzername</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Passwort*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Kennwort bestätigen</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Lokal<option value=1>Netzwerk<option value=2>Irgendein</select><div>Genehmigung</div></div><div>Erteilte Berechtigungen</div><ul id=62 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>* Mindestens 8 Zeichen mit Groß-, Klein-, 0-9 und einem von! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></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>Warnung:</span>Einige Stromversorgungsaktionen können zu Datenverlust führen und die Desktop-, Terminal- oder Festplattenumleitungssitzungen trennen.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Zustimmungscode</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Primäre Anzeige<option value=1>Sekundäranzeige<option id=d6ThirdDisplay value=2 style=display:none>Dritte Anzeige</select><div>Zustimmungsanzeige</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Bildcodierung</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Behindert<option value=2>Automatic<option value=3>aktiviert</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Lokalen Mauszeiger anzeigen</label><br><label><input type=checkbox id=d7showcad>Zeigen Sie Strg-Alt-Entf</label><br><label><input type=checkbox id=d7limitFrameRate>Begrenzte Bildrate</label><br><label><input type=checkbox id=d7noMouseRotate>Maus nicht drehen</label><br></div><div>Andere Einstellungen</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualität</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Skalierung</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=Administrator style=float:right;width:220px><div style=height:20px>Nutzername</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Passwort</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Umleitungsport</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM-Remotedesktop</label><label style=display:block><input type=checkbox id=c17>IDE-Umleitung<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Nicht benötigt<br></label><label><input type=radio name=d10 id=c20 value=1>Nur für KVM erforderlich<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Immer erforderlich<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximal 32 Zeichen"><div title="Maximal 32 Zeichen">Profilname</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximal 32 Zeichen"><div title="Maximal 32 Zeichen">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priorität</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>Wpa psk</select><div>Authentifizierung</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Keiner</select><div>Verschlüsselung</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Länge zwischen 8 und 63 Zeichen"><div title="Länge zwischen 8 und 63 Zeichen">Passwort*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Länge zwischen 8 und 63 Zeichen"><div title="Länge zwischen 8 und 63 Zeichen">Kennwort bestätigen</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Dadurch wird der gesamte Status von Intel® AMT für diesen Computer in einer Datei gespeichert. Passwörter werden nicht gespeichert, es können jedoch einige vertrauliche Daten enthalten sein.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Behindert<br><input type=radio name=d20 id=d20b value=1>ICMP-Antwort<br><input type=radio name=d20 id=d20c value=2>RMCP-Antwort<br><input type=radio name=d20 id=d20d value=3>ICMP &amp; RMCP Antwort<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Synchronisierung der IP-Adresse des Betriebssystems</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP Adresse</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Subnetzmarke</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Tor</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Primärer DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Alternatives DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Behindert<option value=1>Deaktiviert, DHCP-Update<option value=2>aktiviert</select><div>Dynamischer DNS-Client</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Aktualisierungsintervall (Minuten)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (Sekunden)</div></div><div style=font-size:10px><br>Das Standardintervall beträgt 1440 Minuten, die Standard-TTL beträgt 900 Sekunden.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Einschalten<option value=10>Zurücksetzen<option value=5>Aus- und Wiedereinschalten<option value=8>Stromausfall<option id=d24p500 value=500>OS Wake aus dem Standby<option id=d24p501 value=501>Energiesparen des Betriebssystems<option value=999>Legen Sie die Startoptionen fest</select><div>Fernbefehl</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS-Pause</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Erzwingen Sie einen sicheren Start</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS-Setup</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Fortschrittsereignisse erzwingen</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Netzschalter sperren</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Reset-Taste sperren</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Schlaftaste sperren</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Tastatur sperren</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS-Passwort-Bypass</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS neu starten</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Sicherheitsmodus</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Verwenden Sie IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Starteinstellungen</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Keiner<option id=ForceDVDBootOption value=1>CD / DVD-Start erzwingen<option id=ForcePXEBootOption value=2>PXE-Start erzwingen<option id=ForceHDBootOption value=3>Festplattenstart erzwingen<option id=ForceDiagBootOption value=4>Diagnosestart erzwingen</select><div>Boot-Quelle</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Keiner<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Booten Sie auf Diskette<option value=1>Booten Sie auf CD-ROM</select><div>IDER-Startgerät</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Systemfehler<option id=c46 value=1>Ruhig<option id=c47 value=2>Ausführlich<option id=c48 value=3>Leerer Bildschirm</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-Passwort</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>Alarmname</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>Weckdatum (Jahr-Monat-Tag)</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>Weckzeit (Stunde: Min: Sek)</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>Intervall (Tage-Stunden-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>Alarm halten<option value=1>Nach Abschluss löschen</select></div><div style=padding-top:4px>Nach dem Aufwachen</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>aktiviert<br></label><label><input type=radio name=d26b id=c50 value=0>Behindert<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>aktiviert<br></label><label><input type=radio name=d26a id=c52 value=0>Behindert<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Stornieren style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Löschen style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="de" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Verbinden 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>Getrennt</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>Systemstatus</a><p id=go14 class=nav1 onclick=go(14)><a>Remotedesktop</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Dateien</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Hardware-Informationen</a><p id=go6 class=nav1 onclick=go(6)><a>Ereignisprotokoll</a><p id=go15 class=nav1 onclick=go(15)><a>Audit-Log</a><p id=go21 class=nav1 onclick=go(21)><a>Lager</a><p id=go8 class=nav1 onclick=go(8)><a>Netzwerkeinstellungen</a><p id=go17 class=nav1 onclick=go(17)><a>Interneteinstellungen</a><p id=go16 class=nav1 onclick=go(16)><a>Sicherheitseinstellungen</a><p id=go19 class=nav1 onclick=go(19)><a>Agentenpräsenz</a><p id=go18 class=nav1 onclick=go(18)><a>Systemverteidigung</a><p id=go11 class=nav1 onclick=go(11)><a>Benutzerkonten</a><p id=go22 class=nav1 onclick=go(22)><a>Abonnements</a><p id=go23 class=nav1 onclick=go(23)><a>Weckalarme</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN Browser</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Disk Map" onclick=iderToggleDiskMap()><input type=button value="Beenden Sie die IDE-R-Sitzung" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Diskette, Blöcke sind 512 Bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CD-ROM, Blöcke sind 2048 Bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Die Firmware dieses Computers sollte aktualisiert werden.&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>Bitte überprüfen Sie hier</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>Wird geladen...</h1></div><div id=p1 style=display:none><h1>Systemstatus</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Hardware-Informationen</h1><span id=16></span></div><div id=p6 style=display:none><h1>Ereignisprotokoll</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Netzwerkeinstellungen</h1><span id=19></span><span id=20></span><span id=21></span></div><div id=p11 style=display:none><h1>Benutzerkonten</h1><span id=22></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><tbody><tr><td><div style=padding:4px><select id=23 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=24 type=button value=Abfrage style=margin:4px onclick=wsmanQuery()><input type=button value=klar style=margin:4px onclick="QH(25, '')"><input id=c0 placeholder=Filter style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=25></div></div><div id=p13 style=display:none;min-width:780px><h1>Serial-over-LAN-Terminal</h1><br><div id=26 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Intel® AMT-Umleitungsport oder die Serial-over-LAN-Funktion sind deaktiviert<span id=27>Klicken Sie hier, um es zu aktivieren.</span></div></div><div id=28 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Remotecomputer ist nicht eingeschaltet. Klicken Sie hier, um einen Energiebefehl auszugeben.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=29></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Machtaktionen ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Starten Sie den Remote-Festplatten-Mount-Vorgang" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Starten Sie die Erfassung" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Verbinden onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=30>Getrennt.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Schalten Sie um, was die Eingabetaste senden soll" onclick="termToggleCr();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value="80 x 25" title="Terminalgröße umschalten" onclick="termToggleSize();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Schalten Sie den Emulationstyp der Tasten F1 bis F10 um" onclick="termToggleFx();Q(33).blur()"><input id=34 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Erweiterte Ascii" title="Terminalemulationstyp umschalten" onclick="termToggleType();Q(34).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Rücktaste<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Senden onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=35 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Einfügen disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=36><h1>Remotedesktop</h1><br></div><div id=37 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Intel® AMT-Umleitungsport oder die KVM-Funktion sind deaktiviert<span id=38>Klicken Sie hier, um es zu aktivieren.</span></div></div><div id=39 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Remotecomputer ist nicht eingeschaltet. Klicken Sie hier, um einen Energiebefehl auszugeben.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=40></span>&nbsp;<div class=rb title="Nach links drehen" onclick=drotate(-1)>↺</div><div class=rb title="Drehe nach rechts" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Schalten Sie den Vollbildmodus um" onkeypress="return false" onkeydown="return false" value=Voll onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Speichern Sie einen Screenshot des Remotedesktops" onkeypress="return false" onkeydown="return false" value=Speichern... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Die Einstellungen..." title="Bearbeiten Sie die Remotedesktopeinstellungen" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Starten Sie den Remote-Festplatten-Mount-Vorgang" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Ändern Sie den Energiezustand des Remote-Computers" onkeypress="return false" onkeydown="return false" value="Machtaktionen ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Verbinden onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=41>Getrennt.</span></div><tr><td id=42 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onwheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=43 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Sieg<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L.<option value=4>Win + M.<option value=20>Win + R.<option value=23>Gewinnen + Links<option value=24>Win + Right<option value=5>Umschalt + Win + M.<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Strg-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12<option value=25>Enter</select><input id=DeskWD type=button value=Senden onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=44 type=button value=Strg-Alt-Entf onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=45 type=button value=Art onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=46><input id=47 type=checkbox>Leerer Bildschirm&nbsp;</span><span id=48><input id=49 type=checkbox>Nur anschauen&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=50></span><h1>Audit-Log</h1><span id=51></span></div><div id=p16 style=display:none><h1>Sicherheitseinstellungen</h1><span id=52></span></div><div id=p17 style=display:none><h1>Interneteinstellungen</h1><span id=53></span></div><div id=p18 style=display:none><h1>Systemverteidigung</h1><span id=54></span></div><div id=p19 style=display:none><h1>Agentenpräsenz</h1><span id=55></span></div><div id=p21 style=display:none><h1>Lager</h1><span id=56></span></div><div id=p22 style=display:none><h1>Event-Abonnements</h1><span id=57></span></div><div id=p23 style=display:none><h1>Weckalarme</h1><span id=58></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Dateien</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Oben>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Wählen Sie Alle" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Umbenennen onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Löschen onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Neuer Ordner" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Hochladen onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Schnitt onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Kopieren onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Einfügen onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Aktualisierung onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Nach Name sortieren<option value=2>Nach Größe sortiert<option value=3>Nach Datum sortieren<option value=4>Mit Namen absteigen<option value=5>Nach Größe absteigen<option value=6>Abstieg nach Datum</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=59 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=60 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=61 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>Nutzername</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Passwort*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Kennwort bestätigen</div></div><div id=62><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Lokal<option value=1>Netzwerk<option value=2>Irgendein</select><div>Genehmigung</div></div><div>Erteilte Berechtigungen</div><ul id=63 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>* Mindestens 8 Zeichen mit Groß-, Klein-, 0-9 und einem von! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></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>Warnung:</span>Einige Stromversorgungsaktionen können zu Datenverlust führen und die Desktop-, Terminal- oder Festplattenumleitungssitzungen trennen.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Zustimmungscode</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Primäre Anzeige<option value=1>Sekundäranzeige<option id=d6ThirdDisplay value=2 style=display:none>Dritte Anzeige</select><div>Zustimmungsanzeige</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Bildcodierung</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Behindert<option value=2>Automatic<option value=3>aktiviert</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Lokalen Mauszeiger anzeigen</label><br><label><input type=checkbox id=d7showcad>Zeigen Sie Strg-Alt-Entf</label><br><label><input type=checkbox id=d7limitFrameRate>Begrenzte Bildrate</label><br><label><input type=checkbox id=d7noMouseRotate>Maus nicht drehen</label><br><label><input type=checkbox id=d7kvmrmw>Reverse Mouse Wheel</label><br></div><div>Andere Einstellungen</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualität</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Skalierung</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=Administrator style=float:right;width:220px><div style=height:20px>Nutzername</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Passwort</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Umleitungsport</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM-Remotedesktop</label><label style=display:block><input type=checkbox id=c17>IDE-Umleitung<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Nicht benötigt<br></label><label><input type=radio name=d10 id=c20 value=1>Nur für KVM erforderlich<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Immer erforderlich<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=64></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximal 32 Zeichen"><div title="Maximal 32 Zeichen">Profilname</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximal 32 Zeichen"><div title="Maximal 32 Zeichen">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priorität</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Authentifizierung</div></div><div style=height:26px><select id=c26 style=float:right;width:200px onclick=updateWifiDialog()><option id=65 value=4>CCMP-AES<option id=66 value=3>TKIP-RC4</select><div>Verschlüsselung</div></div><div id=c27><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Länge zwischen 8 und 63 Zeichen"><div title="Länge zwischen 8 und 63 Zeichen">Passwort*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Länge zwischen 8 und 63 Zeichen"><div title="Länge zwischen 8 und 63 Zeichen">Kennwort bestätigen</div></div></div><div id=c30 style=display:none><div id=c31 style=height:26px><select id=c32 style=float:right;width:200px onchange=updateNetAuth2Dialog(event)><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protokoll</div></div><div id=c33 style=height:26px><input id=c34 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximal 32 Zeichen"><div title="Maximal 32 Zeichen">Server Name</div></div><div id=c35 style=height:26px><select id=c36 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c37 style=height:26px><input id=c38 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c39 style=height:26px><input id=c40 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Nutzername</div></div><div id=c41 style=height:26px><input id=c42 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuth2Dialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Passwort</div></div><div id=c43 style=height:26px><input id=c44 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuth2Dialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c45 style=height:26px><input id=c46 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c47 style=height:26px><input id=c48 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c49 style=height:26px><select id=c50 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Client Certificate</div></div><div id=c51 style=height:26px><select id=c52 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Server Issuer Cert</div></div><div id=c53 style=height:26px><select id=c54 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=1>aktiviert<option value=0>Behindert</select><div>Active in S0</div></div></div></div><div id=dialog19 style=margin:auto;margin:3px>Dadurch wird der gesamte Status von Intel® AMT für diesen Computer in einer Datei gespeichert. Passwörter werden nicht gespeichert, es können jedoch einige vertrauliche Daten enthalten sein.<br><br><input id=c55 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Behindert<br><input type=radio name=d20 id=d20b value=1>ICMP-Antwort<br><input type=radio name=d20 id=d20c value=2>RMCP-Antwort<br><input type=radio name=d20 id=d20d value=3>ICMP &amp; RMCP Antwort<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=67><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Synchronisierung der IP-Adresse des Betriebssystems</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=68><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c56 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP Adresse</div></div><div style=height:26px id=69><input id=c57 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Subnetzmarke</div></div><div style=height:26px><input id=c58 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Tor</div></div><div style=height:26px><input id=c59 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Primärer DNS</div></div><div style=height:26px><input id=c60 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Alternatives DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c61 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Behindert<option value=1>Deaktiviert, DHCP-Update<option value=2>aktiviert</select><div>Dynamischer DNS-Client</div></div><div style=height:26px><input id=c62 style=float:right;width:200px><div>Aktualisierungsintervall (Minuten)</div></div><div style=height:26px><input id=c63 style=float:right;width:200px><div>TTL (Sekunden)</div></div><div style=font-size:10px><br>Das Standardintervall beträgt 1440 Minuten, die Standard-TTL beträgt 900 Sekunden.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c64 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Einschalten<option value=10>Zurücksetzen<option value=5>Aus- und Wiedereinschalten<option value=8>Stromausfall<option id=d24p500 value=500>OS Wake aus dem Standby<option id=d24p501 value=501>Energiesparen des Betriebssystems<option value=999>Legen Sie die Startoptionen fest</select><div>Fernbefehl</div></div><div style=height:80px><div id=c65 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS-Pause</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Erzwingen Sie einen sicheren Start</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS-Setup</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Fortschrittsereignisse erzwingen</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Netzschalter sperren</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Reset-Taste sperren</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Schlaftaste sperren</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Tastatur sperren</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS-Passwort-Bypass</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS neu starten</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Sicherheitsmodus</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Verwenden Sie IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Starteinstellungen</div></div><div style=height:26px><select id=c66 style=float:right;width:200px onchange=showAdvPowerDlgChange()></select><div>Boot-Quelle</div></div><div id=c67 style=height:26px><select id=c68 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Keiner<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c69 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Booten Sie auf Diskette<option value=1>Booten Sie auf CD-ROM</select><div>IDER-Startgerät</div></div><div style=height:26px><select id=c70 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Systemfehler<option id=c71 value=1>Ruhig<option id=c72 value=2>Ausführlich<option id=c73 value=3>Leerer Bildschirm</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-Passwort</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>Alarmname</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>Weckdatum (Jahr-Monat-Tag)</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>Weckzeit (Stunde: Min: Sek)</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>Intervall (Tage-Stunden-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>Alarm halten<option value=1>Nach Abschluss löschen</select></div><div style=padding-top:4px>Nach dem Aufwachen</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c74 value=2>aktiviert<br></label><label><input type=radio name=d26b id=c75 value=0>Behindert<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c76 value=1>aktiviert<br></label><label><input type=radio name=d26a id=c77 value=0>Behindert<br></label></div><div id=dialog27 style=margin:auto;margin:3px><br><div style=height:26px><select id=c78 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>Behindert<option value=1>aktiviert</select><div>aktiviert</div></div><div id=c79 style=height:26px><select id=c80 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protokoll</div></div><div id=c81 style=height:26px><input id=c82 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximal 32 Zeichen"><div title="Maximal 32 Zeichen">Server Name</div></div><div id=c83 style=height:26px><select id=c84 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c85 style=height:26px><input id=c86 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c87 style=height:26px><input id=c88 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Nutzername</div></div><div id=c89 style=height:26px><input id=c90 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuthDialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Passwort</div></div><div id=c91 style=height:26px><input id=c92 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c93 style=height:26px><input id=c94 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c95 style=height:26px><input id=c96 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c97 style=height:26px><select id=c98 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Client Certificate</div></div><div id=c99 style=height:26px><select id=c100 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Server Issuer Cert</div></div><div id=c101 style=height:26px><select id=c102 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>aktiviert<option value=1>Behindert</select><div>Active in S0</div></div><div id=c103 style=height:26px><input id=c104 style=float:right;width:200px onkeyup=updateNetAuthDialog()><div>PXE Timeout</div></div></div></div><div style=padding:10px;margin-bottom:4px><input id=c105 type=button value=Stornieren style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c106 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c107 type=button value=Löschen style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
5 -$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var g=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==g&&$jscomp.global.Object.defineProperty(b,d,g)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
5 +$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var e=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==e&&$jscomp.global.Object.defineProperty(b,d,e)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
6 String.prototype.endsWith||(String.prototype.endsWith=function(b){return-1!==this.indexOf(b,this.length-b.length)});function Q(b){return document.getElementById(b)}function QS(b){try{return Q(b).style}catch(c){}}function QE(b,c){try{Q(b).disabled=!c}catch(a){}}function QV(b,c){try{QS(b).display=c?"":"none"}catch(a){}}function QA(b,c){Q(b).innerHTML+=c}function QH(b,c){Q(b).innerHTML=c}function inputBoxFocus(b){Q(b).focus();var c=Q(b).value;Q(b).value="";Q(b).value=c}
7 function ReadShort(b,c){return(b.charCodeAt(c)<<8)+b.charCodeAt(c+1)}function ReadShortX(b,c){return(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}function ReadInt(b,c){return 16777216*b.charCodeAt(c)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadSInt(b,c){return(b.charCodeAt(c)<<24)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadIntX(b,c){return 16777216*b.charCodeAt(c+3)+(b.charCodeAt(c+2)<<16)+(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}
8 function ShortToStr(b){return String.fromCharCode(b>>8&255,b&255)}function ShortToStrX(b){return String.fromCharCode(b&255,b>>8&255)}function IntToStr(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}function IntToStrX(b){return String.fromCharCode(b&255,b>>8&255,b>>16&255,b>>24&255)}function MakeToArray(b){return b&&null!=b&&"object"!=typeof b?[b]:b}function SplitArray(b){return b.split(",")}function Clone(b){return JSON.parse(JSON.stringify(b))}
@@ -12,153 +12,153 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a,d){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(d?d:32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,u,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.floppyReady)return g.floppyReady=!0,g.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.cdromReady)return g.cdromReady=!0,g.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}g.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,u);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),g.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 -d=0;switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}g.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),u&1);return}g.SendCommandEndResponse(1,5,c,36,0);break;case 27:g.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==g.floppy||176==c&&null==g.cdrom)return g.SendCommandEndResponse(1,
18 -2,c,58,0),-1;g.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}g.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),u&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.floppy&&(d=(g.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.cdrom&&(d=(g.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);g.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),u&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,F,d);a(c,F,d,u);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);g.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return g.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?g.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -u&1):0==N&&(H?g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),u&1):g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),u&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=r;if(16==v||N&&16>v)H+=K;if(30==
22 -v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=A;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));g.SendDataToHost(c,!0,H,u&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");g.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=g.floppy?d=2:176==c&&null!=g.cdrom&&(d=2);g.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),u&1);break;case 76:g.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),g.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),g.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;F=0;160==c?null!=g.floppy&&(F=g.floppy.size>>9):null!=g.cdrom&&(F=g.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?y:R:z;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?q:l:D;break;case 26:176==c&&(H=e);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?g.SendCommandEndResponse(0,5,c,32,0):g.SendDataToHost(c,!0,H,u&1);break;case 81:g.SendDataToHost(c,!0,E,u&1);break;case 172:g.SendDataToHost(c,!0,O,u&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),g.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 -b,x,e){var c=null,y=0;160==a&&(c=g.floppy,null!=g.floppy&&(y=g.floppy.size>>9));176==a&&(c=g.cdrom,null!=g.cdrom&&(y=g.cdrom.size>>11));if(0>x||b+x>y)return g.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return g.SendCommandEndResponse(1,0,a,0,0),0;null!=c&&(g.sectorStats&&g.sectorStats(1,160==a?0:1,y,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==u?H.push({media:c,dev:a,lba:b,len:x,fr:e}):(u=c,T=a,P=b,F=x,d(e)))}function d(a){var b=F,x=P;F>g.iderinfo.readbfr&&(b=g.iderinfo.readbfr);F-=b;P+=b;var e=
26 -new FileReader;e.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));g.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(u=null,N?(g.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),u=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};e.readAsBinaryString?e.readAsBinaryString(u.slice(x,x+b)):e.readAsArrayBuffer(u.slice(x,x+b))}var g={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,q,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,q);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),q&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),q&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);e.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),q&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,F,d);a(c,F,d,q);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);e.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +q&1):0==N&&(H?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),q&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),q&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=u;if(16==v||N&&16>v)H+=K;if(30==
22 +v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=z;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));e.SendDataToHost(c,!0,H,q&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),q&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;F=0;160==c?null!=e.floppy&&(F=e.floppy.size>>9):null!=e.cdrom&&(F=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?A:R:y;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?r:l:D;break;case 26:176==c&&(H=g);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,H,q&1);break;case 81:e.SendDataToHost(c,!0,E,q&1);break;case 172:e.SendDataToHost(c,!0,O,q&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 +b,x,c){var g=null,p=0;160==a&&(g=e.floppy,null!=e.floppy&&(p=e.floppy.size>>9));176==a&&(g=e.cdrom,null!=e.cdrom&&(p=e.cdrom.size>>11));if(0>x||b+x>p)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,p,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==q?H.push({media:g,dev:a,lba:b,len:x,fr:c}):(q=g,T=a,P=b,F=x,d(c)))}function d(a){var b=F,x=P;F>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);F-=b;P+=b;var c=
26 +new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));e.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(q=null,N?(e.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),q=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(q.slice(x,x+b)):c.readAsArrayBuffer(q.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
27 iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,
28 -0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),e=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 -18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),r=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 -0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),A=String.fromCharCode(1,5,3,0),y=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),z=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);g.xxStateChange=function(a){b("IDER-StateChange",a);
31 -0==a&&g.Stop();3==a&&g.Start()};g.Start=function(){b("IDER-Start");b(g.floppy,g.cdrom);g.bytesToAmt=0;g.bytesFromAmt=0;g.inSequence=0;g.outSequence=0;H=[];g.SendCommand(64,ShortToStrX(g.rx_timeout)+ShortToStrX(g.tx_timeout)+ShortToStrX(g.heartbeat)+IntToStrX(g.version));g.sectorStats&&(g.sectorStats(0,0,g.floppy?g.floppy.size>>9:0),g.sectorStats(0,1,g.cdrom?g.cdrom.size>>11:0))};g.Stop=function(){b("IDER-Stop");g.parent.Stop()};g.ProcessData=function(a){g.bytesFromAmt+=a.length;g.acc+=a;null!=v&&
32 -v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",g.acc.length,rstr2hex(g.acc));;){a=g.ProcessDataEx();if(0==a)break;if(g.inSequence!=ReadIntX(g.acc,4)){b("ERROR: Out of sequence",g.inSequence,ReadIntX(g.acc,4));g.Stop();break}g.inSequence++;g.acc=g.acc.substring(a)}};g.SendCommand=function(a,x,e,c){null==x&&(x="");e=50<a&&1==e?2:0;c&&(e+=1);x=String.fromCharCode(a,0,0,e)+IntToStrX(g.outSequence++)+x;g.parent.xxSend(x);g.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 -"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};g.SendCommandEndResponse=function(a,b,x,e,c){a?g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,e,c),!0)};g.SendDataToHost=function(a,b,x,e){var c=e?0:x.length;1==b?g.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,e):g.SendCommand(84,
34 -String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,e)};g.SendGetDataFromHost=function(a,b){g.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};g.SendDisableEnableFeatures=function(a,b){null==b&&(b="");g.SendCommand(72,String.fromCharCode(a)+b)};g.ProcessDataEx=function(){if(8>g.acc.length)return 0;switch(g.acc.charCodeAt(0)){case 65:if(30>g.acc.length)break;var a=g.acc.charCodeAt(29);
35 -if(g.acc.length<30+a)break;g.iderinfo={};g.iderinfo.major=g.acc.charCodeAt(8);g.iderinfo.minor=g.acc.charCodeAt(9);g.iderinfo.fwmajor=g.acc.charCodeAt(10);g.iderinfo.fwminor=g.acc.charCodeAt(11);g.iderinfo.readbfr=ReadShortX(g.acc,16);g.iderinfo.writebfr=ReadShortX(g.acc,18);g.iderinfo.proto=g.acc.charCodeAt(21);g.iderinfo.iana=ReadIntX(g.acc,25);b(g.iderinfo);0!=g.iderinfo.proto&&(b("Unknown proto",g.iderinfo.proto),g.Stop());8192<g.iderinfo.readbfr&&(b("Illegal read buffer size",g.iderinfo.readbfr),
36 -g.Stop());8192<g.iderinfo.writebfr&&(b("Illegal write buffer size",g.iderinfo.writebfr),g.Stop());0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),g.Stop(),8;case 68:return g.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>g.acc.length)break;a=g.acc.charCodeAt(8);null===u?(g.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 -a));return 9;case 73:if(13>g.acc.length)break;var a=g.acc.charCodeAt(8),x=ReadIntX(g.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:g.enabled=x&2?!0:!1;b("IDER Status: "+g.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>g.acc.length)break;b("IDER: ABORT",g.acc.charCodeAt(8));
38 -return 11;case 75:return 8;case 80:if(28>g.acc.length)break;var a=g.acc.charCodeAt(14)&16?176:160,x=g.acc.charCodeAt(14),e=g.acc.substring(16,28),y=g.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(e),y,x);c(a,e,y,x);return 28;case 83:if(14>g.acc.length)break;a=ReadShortX(g.acc,9);if(g.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",g.acc[0]),g.Stop()}return 0};
39 -var H=[],N=!1,u=null,T,P,F;return g},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 -a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,g,v,n){b("SIDER-Start",a,d,g,v,n);c.host=a;c.port=d;c.user=g;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==g?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+g:"")+"&tls1only="+
41 -c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(g){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
28 +0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),r=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 +18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 +0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);
31 +0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;H=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&
32 +v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 +"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,
34 +String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);
35 +if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),
36 +e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===q?(e.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 +a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));
38 +return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),d=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),d,x);c(a,g,d,x);return 28;case 83:if(14>e.acc.length)break;a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};
39 +var H=[],N=!1,q=null,T,P,F;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 +a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+
41 +c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
42 b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);break;
43 -default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,g){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){e.socketState=2;e.socketParseState=0;e.socketAccumulator="";e.socketHeader=null;e.socketData="";
44 -for(i in e.pendingAjaxCall)e.sendRequest(e.pendingAjaxCall[i][0],e.pendingAjaxCall[i][3],e.pendingAjaxCall[i][4])}function p(a){var b=e.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(e.socketAccumulator=b+a;;){if(0==e.socketParseState){b=e.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;e.socketHeader=e.socketAccumulator.substring(0,b).split("\r\n");if(null==e.amtVersion)for(var c in e.socketHeader)0==e.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 -(e.amtVersion=e.socketHeader[c].substring(46));e.socketAccumulator=e.socketAccumulator.substring(b+4);e.socketParseState=1;e.socketData="";e.socketXHeader={Directive:e.socketHeader[0].split(" ")};for(c in e.socketHeader)0!=c&&(b=e.socketHeader[c].indexOf(":"),e.socketXHeader[e.socketHeader[c].substring(0,b).toLowerCase()]=e.socketHeader[c].substring(b+2))}if(1==e.socketParseState){b=-1;if(void 0==e.socketXHeader.connection||"close"!=e.socketXHeader.connection.toLowerCase()||void 0!=e.socketXHeader["transfer-encoding"]&&
46 -"chunked"==e.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=e.socketXHeader["content-length"]){b=parseInt(e.socketXHeader["content-length"]);if(e.socketAccumulator.length<b)break;a=e.socketAccumulator.substring(0,b);e.socketAccumulator=e.socketAccumulator.substring(b);e.socketData=a;b=0}else{var p=e.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(e.socketAccumulator.substring(0,p),16);if(isNaN(b)){e.websocket&&e.websocket.close();break}if(e.socketAccumulator.length<p+2+b+2)break;
47 -a=e.socketAccumulator.substring(p+2,p+2+b);e.socketAccumulator=e.socketAccumulator.substring(p+2+b+2);e.socketData+=a}else b=0;if(0==b){p=e.socketXHeader;b=e.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++e.authcounter){if(e.challengeParams=e.parseDigest(p["www-authenticate"]),null!=e.challengeParams.qop){b=e.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 -e.challengeParams.qop="auth-int":e.challengeParams.qop="auth"}}else p=e.pendingAjaxCall.shift(),e.authcounter=0,e.ActiveAjaxCount--,e.gotNextMessages(b,"success",{status:a},p),e.PerformNextAjax();e.socketParseState=0;e.socketHeader=null}}}}function q(a){0==e.inDataCount&&(e.tlsv1only=1-e.tlsv1only);e.socketState=0;null!=e.socket&&(e.socket.close(),e.socket=null);if(0<e.pendingAjaxCall.length){a=e.pendingAjaxCall.shift();var b=a[5];e.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var e={PendingAjax:[],
49 -ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};e.host=b;e.port=c;e.user=a;e.pass=d;e.tls=g;e.tlsv1only=0;e.inDataCount=0;e.amtVersion=null;e.digestRealmMatch=null;e.digestRealm=null;e.PerformAjax=function(a,b,c,p,d,h){e.ActiveAjaxCount<e.MaxActiveAjaxCount&&0==e.PendingAjax.length?e.PerformAjaxEx(a,b,c,d,h):1==p?e.PendingAjax.unshift([a,b,c,d,h]):e.PendingAjax.push([a,b,c,d,h])};e.PerformNextAjax=function(){if(!(e.ActiveAjaxCount>=
50 -e.MaxActiveAjaxCount||0==e.PendingAjax.length)){var a=e.PendingAjax.shift();e.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);e.PerformNextAjax()}};e.PerformAjaxEx=function(a,b,c,p,d){if(0!=e.FailAllError)e.gotNextMessagesError({status:e.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),e.ActiveAjaxCount++,e.PerformAjaxExNodeJS(a,b,c,p,d)};e.pendingAjaxCall=[];e.PerformAjaxExNodeJS=function(a,b,c,p,d){e.PerformAjaxExNodeJS2(a,
51 -b,c,p,d,5)};e.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=e.FailAllError?(e.ActiveAjaxCount--,999!=e.FailAllError&&e.gotNextMessages(null,"error",{status:0==e.FailAllError?408:e.FailAllError},[a,b,c,p,d]),e.PerformNextAjax()):(e.pendingAjaxCall.push([a,b,c,p,d,h]),0==e.socketState?e.xxConnectHttpSocket():2==e.socketState&&e.sendRequest(a,p,d))};e.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=e.challengeParams){e.digestRealm=e.challengeParams.realm;
52 -if(e.digestRealmMatch&&e.digestRealm!=e.digestRealmMatch){e.FailAllError=997;e.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(e.user+":"+e.challengeParams.realm+":"+e.pass)+":"+e.challengeParams.nonce+":"+n(e.noncecounter)+":"+d+":"+e.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==e.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+e.renderDigest({username:e.user,realm:e.challengeParams.realm,nonce:e.challengeParams.nonce,uri:b,qop:e.challengeParams.qop,
53 -response:c,nc:n(e.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+e.host+":"+e.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==e.socketState&&null!=e.socket&&e.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{e.socket.send(b.buffer)}catch(h){}}};e.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var e=b.trim().split("=");a[e[0]]=e[1].replace(RegExp('"',"g"),"");return a},{})};e.renderDigest=function(a){var b=
54 -[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,e){return b+","+("nc"==e||"qop"==e?e+"="+a[e]:e+'="'+a[e]+'"')},"").substring(1)};e.xxConnectHttpSocket=function(){e.inDataCount=0;e.socketState=1;e.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+e.host+"&port="+e.port+"&tls="+e.tls+"&tls1only="+e.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 -typeof d?"&serverauth=1&user="+a:""));e.socket.binaryType="arraybuffer";e.socket.onopen=l;e.socket.onmessage=p;e.socket.onclose=q};e.gotNextMessages=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](a,c.status,p[2])};e.gotNextMessagesError=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](e,null,{Header:{HttpError:a.status}},a.status,p[2])};e.CancelAllQueries=function(a){for(;0<e.PendingAjax.length;){var b=
56 -e.PendingAjax.shift();b[1](null,a,b[2])}null!=e.websocket&&(e.websocket.close(),e.websocket=null,e.socketState=0)};return e},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
43 +default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){g.socketState=2;g.socketParseState=0;g.socketAccumulator="";g.socketHeader=null;g.socketData="";
44 +for(i in g.pendingAjaxCall)g.sendRequest(g.pendingAjaxCall[i][0],g.pendingAjaxCall[i][3],g.pendingAjaxCall[i][4])}function p(a){var b=g.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(g.socketAccumulator=b+a;;){if(0==g.socketParseState){b=g.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;g.socketHeader=g.socketAccumulator.substring(0,b).split("\r\n");if(null==g.amtVersion)for(var c in g.socketHeader)0==g.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 +(g.amtVersion=g.socketHeader[c].substring(46));g.socketAccumulator=g.socketAccumulator.substring(b+4);g.socketParseState=1;g.socketData="";g.socketXHeader={Directive:g.socketHeader[0].split(" ")};for(c in g.socketHeader)0!=c&&(b=g.socketHeader[c].indexOf(":"),g.socketXHeader[g.socketHeader[c].substring(0,b).toLowerCase()]=g.socketHeader[c].substring(b+2))}if(1==g.socketParseState){b=-1;if(void 0==g.socketXHeader.connection||"close"!=g.socketXHeader.connection.toLowerCase()||void 0!=g.socketXHeader["transfer-encoding"]&&
46 +"chunked"==g.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=g.socketXHeader["content-length"]){b=parseInt(g.socketXHeader["content-length"]);if(g.socketAccumulator.length<b)break;a=g.socketAccumulator.substring(0,b);g.socketAccumulator=g.socketAccumulator.substring(b);g.socketData=a;b=0}else{var p=g.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(g.socketAccumulator.substring(0,p),16);if(isNaN(b)){g.websocket&&g.websocket.close();break}if(g.socketAccumulator.length<p+2+b+2)break;
47 +a=g.socketAccumulator.substring(p+2,p+2+b);g.socketAccumulator=g.socketAccumulator.substring(p+2+b+2);g.socketData+=a}else b=0;if(0==b){p=g.socketXHeader;b=g.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++g.authcounter){if(g.challengeParams=g.parseDigest(p["www-authenticate"]),null!=g.challengeParams.qop){b=g.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 +g.challengeParams.qop="auth-int":g.challengeParams.qop="auth"}}else p=g.pendingAjaxCall.shift(),g.authcounter=0,g.ActiveAjaxCount--,g.gotNextMessages(b,"success",{status:a},p),g.PerformNextAjax();g.socketParseState=0;g.socketHeader=null}}}}function r(a){0==g.inDataCount&&(g.tlsv1only=1-g.tlsv1only);g.socketState=0;null!=g.socket&&(g.socket.close(),g.socket=null);if(0<g.pendingAjaxCall.length){a=g.pendingAjaxCall.shift();var b=a[5];g.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var g={PendingAjax:[],
49 +ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};g.host=b;g.port=c;g.user=a;g.pass=d;g.tls=e;g.tlsv1only=0;g.inDataCount=0;g.amtVersion=null;g.digestRealmMatch=null;g.digestRealm=null;g.PerformAjax=function(a,b,c,p,d,h){g.ActiveAjaxCount<g.MaxActiveAjaxCount&&0==g.PendingAjax.length?g.PerformAjaxEx(a,b,c,d,h):1==p?g.PendingAjax.unshift([a,b,c,d,h]):g.PendingAjax.push([a,b,c,d,h])};g.PerformNextAjax=function(){if(!(g.ActiveAjaxCount>=
50 +g.MaxActiveAjaxCount||0==g.PendingAjax.length)){var a=g.PendingAjax.shift();g.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);g.PerformNextAjax()}};g.PerformAjaxEx=function(a,b,c,p,d){if(0!=g.FailAllError)g.gotNextMessagesError({status:g.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),g.ActiveAjaxCount++,g.PerformAjaxExNodeJS(a,b,c,p,d)};g.pendingAjaxCall=[];g.PerformAjaxExNodeJS=function(a,b,c,p,d){g.PerformAjaxExNodeJS2(a,
51 +b,c,p,d,5)};g.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=g.FailAllError?(g.ActiveAjaxCount--,999!=g.FailAllError&&g.gotNextMessages(null,"error",{status:0==g.FailAllError?408:g.FailAllError},[a,b,c,p,d]),g.PerformNextAjax()):(g.pendingAjaxCall.push([a,b,c,p,d,h]),0==g.socketState?g.xxConnectHttpSocket():2==g.socketState&&g.sendRequest(a,p,d))};g.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=g.challengeParams){g.digestRealm=g.challengeParams.realm;
52 +if(g.digestRealmMatch&&g.digestRealm!=g.digestRealmMatch){g.FailAllError=997;g.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(g.user+":"+g.challengeParams.realm+":"+g.pass)+":"+g.challengeParams.nonce+":"+n(g.noncecounter)+":"+d+":"+g.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==g.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+g.renderDigest({username:g.user,realm:g.challengeParams.realm,nonce:g.challengeParams.nonce,uri:b,qop:g.challengeParams.qop,
53 +response:c,nc:n(g.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+g.host+":"+g.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==g.socketState&&null!=g.socket&&g.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{g.socket.send(b.buffer)}catch(h){}}};g.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};g.renderDigest=function(a){var b=
54 +[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+","+("nc"==c||"qop"==c?c+"="+a[c]:c+'="'+a[c]+'"')},"").substring(1)};g.xxConnectHttpSocket=function(){g.inDataCount=0;g.socketState=1;g.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+g.host+"&port="+g.port+"&tls="+g.tls+"&tls1only="+g.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 +typeof d?"&serverauth=1&user="+a:""));g.socket.binaryType="arraybuffer";g.socket.onopen=l;g.socket.onmessage=p;g.socket.onclose=r};g.gotNextMessages=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](a,c.status,p[2])};g.gotNextMessagesError=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](g,null,{Header:{HttpError:a.status}},a.status,p[2])};g.CancelAllQueries=function(a){for(;0<g.PendingAjax.length;){var b=
56 +g.PendingAjax.shift();b[1](null,a,b[2])}null!=g.websocket&&(g.websocket.close(),g.websocket=null,g.socketState=0)};return g},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
57 function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;
58 d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?
59 d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,
60 0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):d.Stop(2);
61 -else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),e=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),q=q+(e+
62 -1),e=0,e=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(e=n[q],e=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),w="00000002:"+C+":"+e+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(q+=e.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 -p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(e.length)+e);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
61 +else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var r=0,p=n[r],l=a(new Uint8Array(n.buffer.slice(r+1,r+1+p))),r=r+(p+1),g=n[r],p=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),r=r+(g+
62 +1),g=0,g=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[r],g=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),w="00000002:"+C+":"+g+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));r=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(r+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(r)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 +p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
64 break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;
65 break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&
66 1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+
67 "/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=
68 --1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,g,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
68 +-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
69 b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b="",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";
70 var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";
71 -b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,g,v);q.PerformAjax=function(a,b,c,p,d){null==d&&(d="");q.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" '+
72 -d+"><Header><a:Action>"+a,function(a,c,e){var p=q.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(q,p.Header.ResourceURI,p,c,e)}else b(q,null,{Header:{HttpError:c}},601,e)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,h,g,l,B){var x="",A="";
73 -g="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 -B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",A='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=g&&(g="<a:ReferenceParameters><m:arg>"+g+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+
75 -"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+g+"</e:NotifyTo>"+A+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=
76 -function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 -q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=q.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var g in b)if(b.hasOwnProperty(g)&&0!==g.indexOf("__")&&0!==g.indexOf("@")&&null!=b[g]&&"function"!==typeof b[g])if("object"===typeof b[g]&&
78 -b[g].ReferenceParameters){a+="<r:"+g+"><a:Address>"+b[g].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[g].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[g].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+g+">"}else if(Array.isArray(b[g]))for(B=0;B<b[g].length;B++)a+=
79 -"<r:"+g+">"+b[g][B].toString()+"</r:"+g+">";else a+="<r:"+g+">"+b[g].toString()+"</r:"+g+">";b=a+("</r:"+h+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var h=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
80 -p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var g in b)a+="<g:"+g+">"+b[g]+"</g:"+g+">";q.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
81 -p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>",b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,
82 -h){var g="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])g+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else g+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,g,p,d,k,h)};q.ExecMethodXml=function(a,b,c,d,m,k,h){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
83 -p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>',
84 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var g=a.getElementsByTagName("Body")[0];g||(g=a.getElementsByTagName("a:Body")[0]);
86 -if(!g)return null;if(0<g.childNodes.length){k=g.childNodes[0].localName;var q=k.indexOf("_OUTPUT");-1!=q&&q==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(g.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",g,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
87 -function AmtStackCreateService(b){function c(){var a=e.GetPendingActions();C<a&&(C=a);null!=e.onProcessChanged&&w!=a&&(w=a,e.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,z,h,k){200!=z?(c(e,a,null,z,h),g(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?e.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,e,p,z){d(a,p,c,e,[],z,h,k)}):(c(e,a,null,603,h),g(1))}function d(a,b,p,h,z,E,k,m){if(200!=E)p(e,a,null,E,k),g(1);else if(null==b||"PullResponse"!=b.Header.Method)p(e,
88 -a,null,604,k),g(1);else{for(var r in b.Body.Items)if(b.Body.Items[r]instanceof Array)for(var q in b.Body.Items[r])"function"!=typeof b.Body.Items[r][q]&&z.push(b.Body.Items[r][q]);else"function"!=typeof b.Body.Items[r]&&z.push(b.Body.Items[r]);b.Body.EnumerationContext?e.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,e,A){d(a,e,p,c,z,A,k,1)}):(g(1),p(e,a,z,E,k),c())}}function g(a){e.ActiveEnumsCount-=a;e.ActiveEnumsCount>=e.MaxActiveEnumsCount||0==e.PendingEnums.length?c():(a=e.PendingEnums.shift(),
89 -e.Enum(a[0],a[1],a[2]),g(0))}function v(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]),function(b,c,p,d){null==p||200!=d?a.callback(e,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](e,null,d[2]);else e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,z){if(200!=d||"0"!=c.Body.ReturnValue)z[0](e,
90 -null,z[2]);else{var h,m,g;b=z[2];d=new Date;var r=c.Body.RecordArray;"string"===typeof r&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in r){a=null;try{a=window.atob(r[h])}catch(q){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){g={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),
91 -EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)g.EventData.push(a.charCodeAt(m));g.EntityStr=k[g.Entity];g.Desc=p(g.EventSensorType,g.EventOffset,g.EventData,g.Entity);g.EntityStr||(g.EntityStr="Unknown");b.push(g)}}if(1!=c.Body.NoMoreRecords)e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[z[0],b,z[2]]);else z[0](e,b,z[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Ung\u00fcltige Daten";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
92 -r[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
93 -64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
94 -a&&170==c[0])return"Agent Watchdog"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... gewechselt zu"+e.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Fall Eindringen";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Eine Remote-Serial-Over-LAN-Sitzung wurde eingerichtet.";if(1==c[2])return"Remote Serial Over LAN-Sitzung beendet. Die Benutzersteuerung wurde wiederhergestellt.";if(2==c[2])return"Eine Remote-IDE-Umleitungssitzung wurde eingerichtet.";
71 +b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var r={NextMessageId:1,Address:"/wsman"};r.comm=CreateWsmanComm(b,c,a,d,e,v);r.PerformAjax=function(a,b,c,p,d){null==d&&(d="");r.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" '+
72 +d+"><Header><a:Action>"+a,function(a,c,g){var p=r.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(r,p.Header.ResourceURI,p,c,g)}else b(r,null,{Header:{HttpError:c}},601,g)},c,p)};r.CancelAllQueries=function(a){r.comm.CancelAllQueries(a)};r.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};r.ExecSubscribe=function(a,b,c,d,m,k,h,e,l,B){var x="",z="";
73 +e="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 +B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=e&&(e="<a:ReferenceParameters><m:arg>"+e+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+r.Address+
75 +"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+e+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";r.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};r.ExecUnSubscribe=
76 +function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";r.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};r.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 +r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=r.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var e in b)if(b.hasOwnProperty(e)&&0!==e.indexOf("__")&&0!==e.indexOf("@")&&null!=b[e]&&"function"!==typeof b[e])if("object"===typeof b[e]&&
78 +b[e].ReferenceParameters){a+="<r:"+e+"><a:Address>"+b[e].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[e].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[e].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+e+">"}else if(Array.isArray(b[e]))for(B=0;B<b[e].length;B++)a+=
79 +"<r:"+e+">"+b[e][B].toString()+"</r:"+e+">";else a+="<r:"+e+">"+b[e].toString()+"</r:"+e+">";b=a+("</r:"+h+">")}else b="";r.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};r.ExecCreate=function(a,b,c,d,m,k){var h=r.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
80 +p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";r.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};r.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
81 +p(b)+"</Header><Body /></Envelope>";r.PerformAjax(a,c,d,m)};r.ExecGet=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>",b,c,p)};r.ExecMethod=function(a,b,c,p,d,k,
82 +h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])e+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";r.ExecMethodXml(a,b,e,p,d,k,h)};r.ExecMethodXml=function(a,b,c,d,m,k,h){r.PerformAjax(a+"/"+b+"</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
83 +p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};r.ExecEnum=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>',
84 +b,c,p)};r.ExecPull=function(a,b,c,p,d){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 +c,p,d)};r.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var e=a.getElementsByTagName("Body")[0];e||(e=a.getElementsByTagName("a:Body")[0]);
86 +if(!e)return null;if(0<e.childNodes.length){k=e.childNodes[0].localName;var r=k.indexOf("_OUTPUT");-1!=r&&r==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(e.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",e,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return r};
87 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();C<a&&(C=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,g,p,y){d(a,p,c,g,[],y,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,p,h,y,E,k,m){if(200!=E)p(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(g,
88 +a,null,604,k),e(1);else{for(var u in b.Body.Items)if(b.Body.Items[u]instanceof Array)for(var r in b.Body.Items[u])"function"!=typeof b.Body.Items[u][r]&&y.push(b.Body.Items[u][r]);else"function"!=typeof b.Body.Items[u]&&y.push(b.Body.Items[u]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,p,c,y,z,k,1)}):(e(1),p(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
89 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
90 +null,y[2]);else{var h,m,e;b=y[2];d=new Date;var u=c.Body.RecordArray;"string"===typeof u&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in u){a=null;try{a=window.atob(u[h])}catch(r){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){e={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),
91 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)e.EventData.push(a.charCodeAt(m));e.EntityStr=k[e.Entity];e.Desc=p(e.EventSensorType,e.EventOffset,e.EventData,e.Entity);e.EntityStr||(e.EntityStr="Unknown");b.push(e)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Ung\u00fcltige Daten";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("One Click Recovery: {0}",
92 +u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("One Click Recovery: {0}",h[c[2]]):format("One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&64==c[1]){if(1==
93 +c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
94 +a&&170==c[0])return"Agent Watchdog"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... gewechselt zu"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Fall Eindringen";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Eine Remote-Serial-Over-LAN-Sitzung wurde eingerichtet.";if(1==c[2])return"Remote Serial Over LAN-Sitzung beendet. Die Benutzersteuerung wurde wiederhergestellt.";if(2==c[2])return"Eine Remote-IDE-Umleitungssitzung wurde eingerichtet.";
95 if(3==c[2])return"Remote-IDE-Umleitungssitzung beendet. Die Benutzersteuerung wurde wiederhergestellt."}if(36==a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="verdrahtet"),4294967293==a?"Alle empfangenen Paketfilter wurden abgeglichen"+b+" Schnittstelle.":4294967292==a?"Alle ausgehenden Paketfilter wurden abgeglichen"+b+" Schnittstelle.":4294967290==a?"Der gef\u00e4lschte Paketfilter wurde angepasst"+b+" Schnittstelle.":"Filter"+a+" wurde auf abgestimmt"+b+" Schnittstelle.";
96 if(192==a)return 0==c[2]?"Sicherheitsrichtlinie aufgerufen. Ein Teil oder der gesamte Netzwerkverkehr (TX) wurde gestoppt.":2==c[2]?"Sicherheitsrichtlinie aufgerufen. Ein Teil oder der gesamte Netzwerkverkehr (RX) wurde gestoppt.":"Sicherheitsrichtlinie aufgerufen.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"Benutzeranforderung f\u00fcr Remoteverbindung.";if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"EAC-Fehler: Versuchen Sie, die Haltung zu ermitteln, w\u00e4hrend NAC in Intel AMT deaktiviert ist.";
97 if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"HWA-Fehler: Allgemeiner Fehler"}return 6==a?"Authentifizierung fehlgeschlagen"+(c[1]+(c[2]<<8))+" mal. Das System wird m\u00f6glicherweise angegriffen.":30==a?"Keine bootf\u00e4higen Medien":32==a?"Betriebssystemsperre oder Stromunterbrechung":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"Systemstartfehler":37==a?"Die Systemfirmware wurde gestartet (mindestens eine CPU wird ordnungsgem\u00e4\u00df ausgef\u00fchrt).":"Unbekannter Sensortyp #"+
98 -a}function q(a,b,c,p,d){if(200!=p)d[0](e,[],p);else{var h,k,m=d[1],g=new Date,r;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),
99 -b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Lokal</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM-Standardport</i>",h=5);r=ReadInt(a,h);b.Time=new Date(1E3*(r+60*g.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);r=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+r);h+=r;r=a.charCodeAt(h++);b.Ex=a.substring(h,h+r);b.ExStr=e.GetAuditLogExtendedDataStr(100*
100 -b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)e.AMT_AuditLog_ReadRecords(m.length+1,q,[d[0],m]);else d[0](e,m,p)}}var e={};e.wsman=b;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 C=0,w=0;e.GetPendingActions=function(){return 2*e.PendingEnums.length+
101 -e.ActiveEnumsCount+e.wsman.comm.PendingAjax.length+e.wsman.comm.ActiveAjaxCount+e.PendingBatchOperations};e.Subscribe=function(a,b,p,d,z,h,k,m,g,r){e.wsman.ExecSubscribe(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,y,A,z)},0,h,k,m,g,r);c()};e.UnSubscribe=function(a,b,p,d,z){e.wsman.ExecUnSubscribe(e.CompleteName(a),function(d,z,h,k){c();b(e,a,h,k,p)},0,d,z);c()};e.Get=function(a,b,p,d){e.wsman.ExecGet(e.CompleteName(a),function(d,h,k,m){c();b(e,a,k,m,p)},0,d);c()};e.Put=function(a,b,p,d,z,h){e.wsman.ExecPut(e.CompleteName(a),
102 -b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z,h);c()};e.Create=function(a,b,p,d,z){e.wsman.ExecCreate(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Delete=function(a,b,p,d,z){e.wsman.ExecDelete(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Exec=function(a,b,p,d,z,h,k){e.wsman.ExecMethod(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.ExecWithXml=function(a,b,p,d,z,h,k){e.wsman.ExecMethodXml(e.CompleteName(a),b,
103 -execArgumentsToXml(p),function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.Enum=function(b,p,d,h){e.ActiveEnumsCount<e.MaxActiveEnumsCount?(e.ActiveEnumsCount++,e.wsman.ExecEnum(e.CompleteName(b),function(e,d,y,h,k){c();a(b,y,p,d,h,k)},d,h)):e.PendingEnums.push([b,p,d,h]);c()};e.BatchEnum=function(a,b,p,d,z,h){z={_pending:b.length};e.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],g=e.Enum;"*"==m[0]&&(g=e.Get,m=m.substring(1));g(m,function(b,z,A,h,k){e.PendingBatchOperations--;
104 -c();k[2][z]={response:null==A?null:A.Body,responses:A,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(e,e,a,k[2],h,d))},[a,b,z,g==e.Get?"Get":"Enum"],h)}};e.BatchGet=function(a,b,p,e,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:e,pri:d});c()};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==a.indexOf("IPS_"))return e.pfx[2]+a};e.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&
105 -(a.Body.ReturnValueStr=e.AmtStatusToStr(a.Body.ReturnValue));return a};e.RequestPowerStateChange=function(a,b){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>',
106 -null,null,b)};e.RequestOSPowerStateChange=function(a,b){e.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
107 -null,null,b)};e.SetBootConfigRole=function(a,b){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>',
108 -a,b)};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,b){e.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
109 -k,m,g){e.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,g)};e.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){e.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};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=
110 -function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){e.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};e.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA",
111 -"DeleteAllActions",{_method_dummy:a},b)};e.AMT_AuditLog_ClearLog=function(a){e.Exec("AMT_AuditLog","ClearLog",{},a)};e.AMT_AuditLog_RequestStateChange=function(a,b,c){e.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_AuditLog_ReadRecords=function(a,b,c){e.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};e.AMT_AuditLog_SetAuditLock=function(a,b,c,p){e.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};e.AMT_AuditLog_ExportAuditLogSignature=
112 -function(a,b){e.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};e.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){e.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule",
113 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){e.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};e.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){e.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};e.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService",
114 -"GetUserAclEntryEx",{Handle:a},b,c)};e.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){e.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};e.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){e.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};e.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
115 -{Username:a,DigestPassword:b},c)};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,b,c,p){e.Exec("AMT_AuthorizationService",
116 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};e.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){e.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};e.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_EndpointAccessControlService_GetPosture=function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};e.AMT_EndpointAccessControlService_GetPostureHash=
117 -function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};e.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){e.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};e.AMT_EndpointAccessControlService_GetEacOptions=function(a){e.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};e.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
118 -PostureHashAlgorithm:b},c)};e.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};e.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};e.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){e.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};e.AMT_GeneralSettings_AMTAuthenticate=
119 -function(a,b){e.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};e.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){e.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};e.AMT_KerberosSettingData_GetCredentialCacheState=function(a){e.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};e.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){e.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
120 -b)};e.AMT_MessageLog_CancelIteration=function(a,b){e.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};e.AMT_MessageLog_RequestStateChange=function(a,b,c){e.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_MessageLog_ClearLog=function(a){e.Exec("AMT_MessageLog","ClearLog",{},a)};e.AMT_MessageLog_GetRecords=function(a,b,c,p){e.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};e.AMT_MessageLog_GetRecord=function(a,
121 -b,c){e.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};e.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){e.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};e.AMT_MessageLog_PositionToFirstRecord=function(a,b){e.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};e.AMT_MessageLog_FreezeLog=function(a,b){e.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};e.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){e.Exec("AMT_PublicKeyManagementService",
122 -"AddCRL",{Url:a,SerialNumbers:b},c)};e.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){e.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};e.AMT_PublicKeyManagementService_AddCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddKey=
123 -function(a,b){e.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};e.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};e.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};e.AMT_PublicKeyManagementService_GenerateKeyPair=
124 -function(a,b,c){e.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};e.AMT_RedirectionService_RequestStateChange=function(a,b){e.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};e.AMT_RedirectionService_TerminateSession=function(a,b){e.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};e.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,g){e.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
125 -Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},g)};e.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){e.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};e.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){e.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){e.Exec("AMT_SetupAndConfigurationService",
126 -"CommitChanges",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_Unprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};e.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
127 -e.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};e.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){e.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};e.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){e.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){e.Exec("AMT_SetupAndConfigurationService",
128 -"GetProvisioningAuditRecord",{},a)};e.AMT_SetupAndConfigurationService_GetUuid=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};e.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){e.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};e.AMT_SystemDefensePolicy_GetTimeout=
129 -function(a){e.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};e.AMT_SystemDefensePolicy_SetTimeout=function(a,b){e.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};e.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){e.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};e.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){e.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};e.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
130 -function(a,b){e.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};e.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){e.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};e.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){e.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WebUIService_RequestStateChange=function(a,b,c){e.Exec("AMT_WebUIService",
131 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
132 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};e.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};e.CIM_Account_RequestStateChange=function(a,b,c){e.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
133 -c)};e.CIM_AccountManagementService_CreateAccount=function(a,b,c){e.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};e.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){e.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};e.CIM_BootService_SetBootConfigRole=function(a,b,c){e.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};e.CIM_BootService_RequestStateChange=function(a,b,c,p){e.Exec("CIM_BootService","RequestStateChange",
134 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};e.CIM_Card_ConnectorPower=function(a,b,c){e.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};e.CIM_Card_IsCompatible=function(a,b){e.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};e.CIM_Chassis_IsCompatible=function(a,b){e.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};e.CIM_Fan_SetSpeed=function(a,b){e.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};e.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){e.Exec("CIM_KVMRedirectionSAP",
135 -"RequestStateChange",{RequestedState:a},c)};e.CIM_MediaAccessDevice_LockMedia=function(a,b){e.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};e.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){e.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_MediaAccessDevice_Reset=function(a){e.Exec("CIM_MediaAccessDevice","Reset",{},a)};e.CIM_MediaAccessDevice_EnableDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};e.CIM_MediaAccessDevice_OnlineDevice=
136 -function(a,b){e.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};e.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};e.CIM_MediaAccessDevice_SaveProperties=function(a){e.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};e.CIM_MediaAccessDevice_RestoreProperties=function(a){e.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};e.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){e.Exec("CIM_MediaAccessDevice","RequestStateChange",
137 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_PhysicalFrame_IsCompatible=function(a,b){e.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};e.CIM_PhysicalPackage_IsCompatible=function(a,b){e.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};e.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){e.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.CIM_PowerSupply_SetPowerState=function(a,
138 -b,c){e.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_PowerSupply_Reset=function(a){e.Exec("CIM_PowerSupply","Reset",{},a)};e.CIM_PowerSupply_EnableDevice=function(a,b){e.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};e.CIM_PowerSupply_OnlineDevice=function(a,b){e.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};e.CIM_PowerSupply_QuiesceDevice=function(a,b){e.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};e.CIM_PowerSupply_SaveProperties=function(a){e.Exec("CIM_PowerSupply",
139 -"SaveProperties",{},a)};e.CIM_PowerSupply_RestoreProperties=function(a){e.Exec("CIM_PowerSupply","RestoreProperties",{},a)};e.CIM_PowerSupply_RequestStateChange=function(a,b,c){e.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Processor_SetPowerState=function(a,b,c){e.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Processor_Reset=function(a){e.Exec("CIM_Processor","Reset",{},a)};e.CIM_Processor_EnableDevice=function(a,b){e.Exec("CIM_Processor",
140 -"EnableDevice",{Enabled:a},b)};e.CIM_Processor_OnlineDevice=function(a,b){e.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};e.CIM_Processor_QuiesceDevice=function(a,b){e.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Processor_SaveProperties=function(a){e.Exec("CIM_Processor","SaveProperties",{},a)};e.CIM_Processor_RestoreProperties=function(a){e.Exec("CIM_Processor","RestoreProperties",{},a)};e.CIM_Processor_RequestStateChange=function(a,b,c){e.Exec("CIM_Processor","RequestStateChange",
141 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RecordLog_ClearLog=function(a){e.Exec("CIM_RecordLog","ClearLog",{},a)};e.CIM_RecordLog_RequestStateChange=function(a,b,c){e.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RedirectionService_RequestStateChange=function(a,b,c){e.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Sensor_SetPowerState=function(a,b,c){e.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
142 -c)};e.CIM_Sensor_Reset=function(a){e.Exec("CIM_Sensor","Reset",{},a)};e.CIM_Sensor_EnableDevice=function(a,b){e.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};e.CIM_Sensor_OnlineDevice=function(a,b){e.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};e.CIM_Sensor_QuiesceDevice=function(a,b){e.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Sensor_SaveProperties=function(a){e.Exec("CIM_Sensor","SaveProperties",{},a)};e.CIM_Sensor_RestoreProperties=function(a){e.Exec("CIM_Sensor","RestoreProperties",
143 -{},a)};e.CIM_Sensor_RequestStateChange=function(a,b,c){e.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_StatisticalData_ResetSelectedStats=function(a,b){e.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};e.CIM_Watchdog_KeepAlive=function(a){e.Exec("CIM_Watchdog","KeepAlive",{},a)};e.CIM_Watchdog_SetPowerState=function(a,b,c){e.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Watchdog_Reset=function(a){e.Exec("CIM_Watchdog",
144 -"Reset",{},a)};e.CIM_Watchdog_EnableDevice=function(a,b){e.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};e.CIM_Watchdog_OnlineDevice=function(a,b){e.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};e.CIM_Watchdog_QuiesceDevice=function(a,b){e.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};e.CIM_Watchdog_SaveProperties=function(a){e.Exec("CIM_Watchdog","SaveProperties",{},a)};e.CIM_Watchdog_RestoreProperties=function(a){e.Exec("CIM_Watchdog","RestoreProperties",{},a)};e.CIM_Watchdog_RequestStateChange=
145 -function(a,b,c){e.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_WiFiPort_SetPowerState=function(a,b,c){e.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_WiFiPort_Reset=function(a){e.Exec("CIM_WiFiPort","Reset",{},a)};e.CIM_WiFiPort_EnableDevice=function(a,b){e.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};e.CIM_WiFiPort_OnlineDevice=function(a,b){e.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};e.CIM_WiFiPort_QuiesceDevice=function(a,
146 -b){e.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};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,b,c){e.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){e.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
147 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};e.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};e.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){e.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},h)};e.IPS_HostBasedSetupService_UpgradeClientToAdmin=
148 -function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};e.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){e.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};e.IPS_KVMRedirectionSettingData_TerminateSession=function(a){e.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){e.Exec("IPS_KVMRedirectionSettingData",
149 -"DataChannelRead",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){e.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};e.IPS_OptInService_StartOptIn=function(a){e.Exec("IPS_OptInService","StartOptIn",{},a)};e.IPS_OptInService_CancelOptIn=function(a){e.Exec("IPS_OptInService","CancelOptIn",{},a)};e.IPS_OptInService_SendOptInCode=function(a,b){e.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};e.IPS_OptInService_StartService=function(a){e.Exec("IPS_OptInService",
150 -"StartService",{},a)};e.IPS_OptInService_StopService=function(a){e.Exec("IPS_OptInService","StopService",{},a)};e.IPS_OptInService_RequestStateChange=function(a,b,c){e.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){e.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.IPS_ProvisioningRecordLog_RequestStateChange=
151 -function(a,b,c){e.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_ProvisioningRecordLog_ClearLog=function(a,b){e.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};e.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){e.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};e.IPS_SecIOService_RequestStateChange=function(a,b,c){e.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
152 -TimeoutPeriod:b},c)};e.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){e.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};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",
153 -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",
154 -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",
155 -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",
156 -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,b){e.AMT_MessageLog_PositionToFirstRecord(n,
157 -[a,b,[]])};var D="Nicht spezifiziert. ; Kein Systemspeicher ist physisch im System installiert. ; Kein verwendbarer Systemspeicher, der gesamte installierte Speicher hat einen nicht behebbaren Fehler. ; Nicht behebbarer Festplatten- / ATAPI / IDE-Ger\u00e4tefehler. ; Nicht behebbarer Systemplatinenfehler. ; Nicht behebbare Diskette Subsystemfehler. ; Nicht behebbarer Festplattencontrollerfehler. ; Nicht behebbarer PS / 2- oder USB-Tastaturfehler. ; Wechselmedium nicht gefunden. ; Nicht behebbarer Videocontrollerfehler. ; Kein Videoger\u00e4t erkannt. ; Firmware (BIOS) -ROM-Besch\u00e4digung erkannt. ; Nicht \u00fcbereinstimmende CPU-Spannung (Prozessoren mit derselben Versorgung haben nicht \u00fcbereinstimmende Spannungsanforderungen) ; Fehler bei der Anpassung der CPU-Geschwindigkeit".split(";"),
98 +a}function r(a,b,c,p,d){if(200!=p)d[0](g,[],p);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),
99 +b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Lokal</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM-Standardport</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*
100 +b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,r,[d[0],m]);else d[0](g,m,p)}}var g={};g.wsman=b;g.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/"];g.PendingEnums=[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var C=0,w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+
101 +g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,p,d,y,h,k,m,e,u){g.wsman.ExecSubscribe(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,A,z,y)},0,h,k,m,e,u);c()};g.UnSubscribe=function(a,b,p,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,p)},0,d,y);c()};g.Get=function(a,b,p,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,p)},0,d);c()};g.Put=function(a,b,p,d,y,h){g.wsman.ExecPut(g.CompleteName(a),
102 +b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,p,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,p,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,p,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,p,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,
103 +execArgumentsToXml(p),function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,p,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(g,d,A,h,k){c();a(b,A,p,d,h,k)},d,h)):g.PendingEnums.push([b,p,d,h]);c()};g.BatchEnum=function(a,b,p,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],e=g.Enum;"*"==m[0]&&(e=g.Get,m=m.substring(1));e(m,function(b,y,z,h,k){g.PendingBatchOperations--;
104 +c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(g,g,a,k[2],h,d))},[a,b,y,e==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,p,g,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:g,pri:d});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&
105 +(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.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>',
106 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
107 +null,null,b)};g.SetBootConfigRole=function(a,b){g.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>',
108 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
109 +k,m,e){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,e)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
110 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
111 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,p){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};g.AMT_AuditLog_ExportAuditLogSignature=
112 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule",
113 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
114 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
115 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){g.Exec("AMT_AuthorizationService",
116 +"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
117 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
118 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
119 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
120 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,p){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};g.AMT_MessageLog_GetRecord=function(a,
121 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
122 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
123 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
124 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,e){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
125 +Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},e)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
126 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
127 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
128 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
129 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
130 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
131 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){console.log(JSON.stringify({WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},null,2));g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=
132 +function(a,b,c,p,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},
133 +b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,
134 +Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,p){g.Exec("CIM_BootService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c,p,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan",
135 +"SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=
136 +function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",
137 +{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",
138 +{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply",
139 +"QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply","SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor",
140 +"Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor","EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=
141 +function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,
142 +b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=
143 +function(a){g.Exec("CIM_Sensor","RestoreProperties",{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},
144 +c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog","Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog",
145 +"RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",
146 +{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){g.Exec("IPS_HostBasedSetupService",
147 +"Setup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,
148 +DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=
149 +function(a){g.Exec("IPS_KVMRedirectionSettingData","DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};
150 +g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService","StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,
151 +Time:c,TimeoutPeriod:p},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=
152 +function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",
153 +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",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",
154 +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",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",
155 +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",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",
156 +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",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",
157 +4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,[a,b,[]])};var D="Nicht spezifiziert. ; Kein Systemspeicher ist physisch im System installiert. ; Kein verwendbarer Systemspeicher, der gesamte installierte Speicher hat einen nicht behebbaren Fehler. ; Nicht behebbarer Festplatten- / ATAPI / IDE-Ger\u00e4tefehler. ; Nicht behebbarer Systemplatinenfehler. ; Nicht behebbare Diskette Subsystemfehler. ; Nicht behebbarer Festplattencontrollerfehler. ; Nicht behebbarer PS / 2- oder USB-Tastaturfehler. ; Wechselmedium nicht gefunden. ; Nicht behebbarer Videocontrollerfehler. ; Kein Videoger\u00e4t erkannt. ; Firmware (BIOS) -ROM-Besch\u00e4digung erkannt. ; Nicht \u00fcbereinstimmende CPU-Spannung (Prozessoren mit derselben Versorgung haben nicht \u00fcbereinstimmende Spannungsanforderungen) ; Fehler bei der Anpassung der CPU-Geschwindigkeit".split(";"),
158 m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS 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(";"),
159 k="Nicht spezifiziert ; Andere ; Unbekannt ; Prozessor ; Festplatte ; Peripherieger\u00e4t ; Systemverwaltungsmodul ; Systemplatine ; Speichermodul ; Prozessormodul ; Stromversorgung ; Karte hinzuf\u00fcgen ; Frontplatine ; R\u00fcckwandplatine ; Stromversorgungsplatine ; Antriebsr\u00fcckwandplatine ; Systeminterne Erweiterung Karte ; Andere Systemplatine ; Prozessorkarte ; Netzteil ; Leistungsmodul ; Energieverwaltungskarte ; Geh\u00e4use-R\u00fcckwandplatine ; Systemgeh\u00e4use ; Untergeh\u00e4use ; Andere Geh\u00e4useplatine ; Festplattenschacht ; Peripheriefachschacht ; Ger\u00e4teschacht ; L\u00fcfterk\u00fchlung ; K\u00fchleinheit ; Kabelverbindung ; Speicherger\u00e4t ; Systemverwaltungssoftware ; BIOS ; Intel (r) ME ; Systembus ; Gruppe ; Intel (r) ME ; Externe Umgebung ; Batterie ; Verarbeitungsblatt ; Konnektivit\u00e4tsschalter ; Prozessor / Speichermodul ; E / A-Modul ; Prozessor-E / A-Modul ; Firmware des Management-Controllers ; IPMI-Kanal ; PCI-Bus ; PCI-Express-Bus ; SCSI-Bus ; SATA / SAS-Bus ; Prozessor-Front-Side-Bus".split(";");
160 -e.RealmNames=";; Umleitung ;; Hardware-Asset ; Fernbedienung ; Speicher ; Event Manager ; Speicheradministrator ; Agentenpr\u00e4senz Lokal ; Agentenpr\u00e4senz Remote ; Leistungsschalter ; Netzwerkzeit ; Allgemeine Informationen ; Firmware-Aktualisierung ; EIT ; LocalUN ; Endpunktzugriffskontrolle ; Endpunktzugriffskontrolle Admin ; Ereignisprotokollleser ; \u00dcberwachungsprotokoll ; ACL-Bereich ;;; Lokales System".split(";");e.WatchdogCurrentStates={1:"Nicht angefangen",2:"Gestoppt",4:"Laufen",
161 -8:"Abgelaufen",16:"Suspendiert"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),r=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),K={1:"",2:"HTTPS",4:"Local PBA",
160 +g.RealmNames=";; Umleitung ;; Hardware-Asset ; Fernbedienung ; Speicher ; Event Manager ; Speicheradministrator ; Agentenpr\u00e4senz Lokal ; Agentenpr\u00e4senz Remote ; Leistungsschalter ; Netzwerkzeit ; Allgemeine Informationen ; Firmware-Aktualisierung ; EIT ; LocalUN ; Endpunktzugriffskontrolle ; Endpunktzugriffskontrolle Admin ; Ereignisprotokollleser ; \u00dcberwachungsprotokoll ; ACL-Bereich ;;; Lokales System".split(";");g.WatchdogCurrentStates={1:"Nicht angefangen",2:"Gestoppt",4:"Laufen",
161 +8:"Abgelaufen",16:"Suspendiert"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),K={1:"",2:"HTTPS",4:"Local PBA",
162 8:"WinRE"},B={16:"Sicherheitsadministrator",17:"RCO",18:"Umleitungsmanager",19:"Firmware Update Manager",20:"Sicherheits\u00fcberwachungsprotokoll",21:"Netzwerkzeit",22:"Netzwerkadministration",23:"Speicherverwaltung",24:"Event Manager",25:"Leistungsschalter-Manager",26:"Agent Presence Manager",27:"Drahtlose Konfiguration",28:"EAC",29:"KVM",30:"Benutzer-Opt-In-Ereignisse",32:"Bildschirmausblendung",33:"Watchdog-Ereignisse",1600:"Bereitstellung gestartet",1601:"Bereitstellung abgeschlossen",1602:"ACL-Eintrag hinzugef\u00fcgt",
163 1603:"ACL-Eintrag ge\u00e4ndert",1604:"ACL-Eintrag entfernt",1605:"ACL-Zugriff mit ung\u00fcltigen Anmeldeinformationen",1606:"ACL-Eingangsstatus",1607:"TLS-Status ge\u00e4ndert",1608:"TLS Server Certificate Set",1609:"TLS-Serverzertifikat entfernen",1610:"TLS Trusted Root Certificate hinzugef\u00fcgt",1611:"TLS Trusted Root Certificate entfernt",1612:"TLS Preshared Key Set",1613:"Kerberos-Einstellungen ge\u00e4ndert",1614:"Kerberos-Hauptschl\u00fcssel ge\u00e4ndert",1615:"Blitzverschlei\u00dfz\u00e4hler zur\u00fcckgesetzt",
164 1616:"Netzteil ge\u00e4ndert",1617:"Stellen Sie den Realm-Authentifizierungsmodus ein",1618:"Aktualisieren Sie den Client auf den Admin-Steuerungsmodus",1619:"Unprovisioning gestartet",1700:"Power Up durchgef\u00fchrt",1701:"Power Down durchgef\u00fchrt",1702:"Aus- und Wiedereinschalten",1703:"Reset durchgef\u00fchrt",1704:"Legen Sie die Startoptionen fest",1705:"Remote graceful power down initiated",1706:"Remote graceful reset initiated",1707:"Remote Standby initiated",1708:"Remote Hiberate initiated",
@@ -166,109 +166,109 @@ e.RealmNames=";; Umleitung ;; Hardware-Asset ; Fernbedienung ; Speicher ; Event
166 2001:"Sicherheits\u00fcberpr\u00fcfungsrichtlinie ge\u00e4ndert",2002:"Sicherheits\u00fcberwachungsprotokoll deaktiviert",2003:"Sicherheits\u00fcberwachungsprotokoll aktiviert",2004:"Sicherheits\u00fcberwachungsprotokoll exportiert",2005:"Sicherheits\u00fcberwachungsprotokoll wiederhergestellt",2100:"Intel&reg; ME Zeiteinstellung",2200:"TCPIP-Parameter eingestellt",2201:"Hostname festgelegt",2202:"Domain Name Set",2203:"VLAN-Parameter eingestellt",2204:"Link Policy Set",2205:"IPv6-Parameter festgelegt",
167 2300:"Globale Speicherattribute festgelegt",2301:"Speicher EACL ge\u00e4ndert",2302:"Speicher FPACL ge\u00e4ndert",2303:"Speicherschreibvorgang",2400:"Benachrichtigung abonniert",2401:"Benachrichtigung abbestellt",2402:"Ereignisprotokoll gel\u00f6scht",2403:"Ereignisprotokoll eingefroren",2500:"CB-Filter hinzugef\u00fcgt",2501:"CB-Filter entfernt",2502:"CB-Richtlinie hinzugef\u00fcgt",2503:"CB-Richtlinie entfernt",2504:"CB-Standardrichtliniensatz",2505:"CB Heuristik Optionsset",2506:"CB Heuristics State Cleared",
168 2600:"Agent Watchdog hinzugef\u00fcgt",2601:"Agent Watchdog entfernt",2602:"Agent Watchdog-Aktionssatz",2700:"Drahtloses Profil hinzugef\u00fcgt",2701:"Drahtloses Profil entfernt",2702:"Drahtloses Profil aktualisiert",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",2800:"EAC Posture Signer SET",2801:"EAC aktiviert",2802:"EAC deaktiviert",2803:"EAC Posture State",2804:"EAC-Set-Optionen",
169 -2900:"KVM-Anmeldung aktiviert",2901:"KVM-Anmeldung deaktiviert",2902:"KVM-Passwort ge\u00e4ndert",2903:"KVM-Zustimmung erfolgreich",2904:"KVM-Zustimmung fehlgeschlagen",3E3:"\u00c4nderung der Opt-In-Richtlinie",3001:"Einwilligungscode-Ereignis senden",3002:"Starten Sie das blockierte Opt-In-Ereignis",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};e.GetAuditLogExtendedDataStr=function(a,b){if((1602==
170 -a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Ung\u00fcltiger ME-Zugriff","Ung\u00fcltiger MEBx-Zugriff"][b.charCodeAt(0)];if(1606==a){var c=["Behindert","aktiviert"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Fernbedienung"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Lokal"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?e.RealmNames[ReadInt(b,
169 +2900:"KVM-Anmeldung aktiviert",2901:"KVM-Anmeldung deaktiviert",2902:"KVM-Passwort ge\u00e4ndert",2903:"KVM-Zustimmung erfolgreich",2904:"KVM-Zustimmung fehlgeschlagen",3E3:"\u00c4nderung der Opt-In-Richtlinie",3001:"Einwilligungscode-Ereignis senden",3002:"Starten Sie das blockierte Opt-In-Ereignis",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};g.GetAuditLogExtendedDataStr=function(a,b){if((1602==
170 +a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Ung\u00fcltiger ME-Zugriff","Ung\u00fcltiger MEBx-Zugriff"][b.charCodeAt(0)];if(1606==a){var c=["Behindert","aktiviert"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Fernbedienung"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Lokal"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?g.RealmNames[ReadInt(b,
171 0)]+","+["NoAuth","Auth","Behindert"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","Lokale MEI","Lokaler WSMAN","Remote-WSAMN"][b.charCodeAt(0)]:1900==a?"Von"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" zu"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"Von"+["Keiner","KVM","Alle"][b.charCodeAt(0)]+" zu"+["Keiner","KVM","Alle"][b.charCodeAt(1)]:
172 -3001==a?["Erfolg","3 mal fehlgeschlagen"][b.charCodeAt(0)]:null};e.GetAuditLog=function(a){e.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return e}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
173 -function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",g=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+g+v+">"));return a+("</r:"+b+">")}
172 +3001==a?["Erfolg","3 mal fehlgeschlagen"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,r,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
173 +function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">";if("string"==typeof c)a+=c;else for(var v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
174 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
175 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
176 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
177 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function g(a,b){var c,p,e,d,x,h,k,m,g,q=b&&b.split("/"),w=r.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){q=q.slice(0,q.length-1);a=a.split("/");x=a.length-1;r.nodeIdCompat&&A.test(a[x])&&(a[x]=a[x].replace(A,""));a=q.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
178 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((q||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(q)for(g=q.length;0<g;--g)if(e=w[q.slice(0,g).join("/")])if(e=e[p]){d=e;h=x;break}if(d)break;!k&&l&&l[p]&&(k=l[p],m=x)}!d&&k&&(d=k,h=m);d&&(c.splice(0,h,d),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return g(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
179 -a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function e(a){return function(){return r&&r.config&&r.config[a]||{}}}var C,w,D,m,k={},h={},r={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,A=/\.js$/;D=function(a,b){var c,d=q(a),e=d[0];a=d[1];e&&(e=g(e,b),c=p(e));e?a=c&&c.normalize?c.normalize(a,n(b)):g(a,b):(a=g(a,b),d=q(a),
180 -e=d[0],a=d[1],e&&(c=p(e)));return{f:e?e+"!"+a:a,n:a,pr:e,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:e(a)}}};C=function(a,b,c,e){var x,g,A,r,q=[];g=typeof c;var w;e=e||a;if("undefined"===g||"function"===g){b=!b.length&&c.length?["require","exports","module"]:b;for(r=0;r<b.length;r+=1)if(A=D(b[r],e),g=A.f,"require"===g)q[r]=m.require(a);else if("exports"===g)q[r]=m.exports(a),
181 -w=!0;else if("module"===g)x=q[r]=m.module(a);else if(B.call(k,g)||B.call(h,g)||B.call(K,g))q[r]=p(g);else if(A.p)A.p.load(A.n,v(e,!0),l(g),{}),q[r]=k[g];else throw Error(a+" missing "+g);b=c?c.apply(k[a],q):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,e,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){r=a;r.deps&&w(r.deps,r.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
182 -typeof c&&(c=e,e=x);e?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(e.isArrayBuffer(a)||e.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
183 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var e=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)e.nextTick=process.nextTick,e.setImmediate="function"===typeof setImmediate?setImmediate:e.nextTick;else if("function"===typeof setImmediate)e.setImmediate=setImmediate,e.nextTick=function(a){return setImmediate(a)};
184 -else{e.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];e.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
185 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var d=e.setImmediate;e.setImmediate=function(e){15<Date.now()-b?(b=Date.now(),d(e)):(a.push(e),1===a.length&&p.setAttribute("a",c=!c))}}e.nextTick=e.setImmediate}})();e.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};e.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};e.isArrayBufferView=function(a){return a&&
186 -e.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};e.ByteBuffer=c;e.ByteStringBuffer=c;e.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};e.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};e.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};e.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
187 -e.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};e.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};e.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(e.encodeUtf8(a))};e.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
188 -255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
189 -8&255))};e.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};e.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};e.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
190 -e.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};e.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};e.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
191 -16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};e.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24Le=
192 -function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};e.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};e.ByteStringBuffer.prototype.getSignedInt=
193 -function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};e.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
194 -a)};e.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};e.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};e.ByteStringBuffer.prototype.copy=function(){var a=e.createBuffer(this.data);a.read=this.read;return a};e.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};e.ByteStringBuffer.prototype.clear=
195 -function(){this.data="";this.read=0;return this};e.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};e.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.ByteStringBuffer.prototype.toString=function(){return e.decodeUtf8(this.bytes())};e.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
196 -0;this.growSize=b.growSize||1024;var c=e.isArrayBuffer(a),p=e.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};e.DataBuffer.prototype.length=function(){return this.write-this.read};e.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
197 -e.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),p=new Uint8Array(this.length()+b);p.set(c);this.data=new DataView(p.buffer);return this};e.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};e.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
198 -return this};e.DataBuffer.prototype.putBytes=function(a,b){if(e.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var d=new Uint8Array(this.data.buffer,this.write);d.set(c);this.write+=p;return this}if(e.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),d=new Uint8Array(this.data.buffer),d.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof e.DataBuffer||"object"===typeof a&&"number"===
199 -typeof a.read&&"number"===typeof a.write&&e.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),d=new Uint8Array(a.data.byteLength,this.write),d.set(c),this.write+=c.byteLength,this;a instanceof e.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.hex.decode(a,c,this.write),this;if("base64"===
200 -b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=e.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=e.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
201 -b);}throw Error("Invalid parameter: "+a);};e.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};e.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};e.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};e.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
202 -e.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};e.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};e.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};e.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
203 -a,!0);this.write+=4;return this};e.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};e.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};e.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};e.DataBuffer.prototype.getInt24=
204 -function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};e.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};e.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};e.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};e.DataBuffer.prototype.getInt32Le=function(){var a=
205 -this.data.getInt32(this.read,!0);this.read+=4;return a};e.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};e.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
206 -e.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};e.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};e.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};e.DataBuffer.prototype.copy=function(){return new e.DataBuffer(this)};e.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
207 -new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};e.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};e.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};e.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
208 -this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return e.binary.raw.encode(b);if("hex"===a)return e.binary.hex.encode(b);if("base64"===a)return e.binary.base64.encode(b);if("utf8"===a)return e.text.utf8.decode(b);if("utf16"===a)return e.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};e.createBuffer=function(a,b){void 0!==a&&"utf8"===
209 -(b||"raw")&&(a=e.encodeUtf8(a));return new e.ByteBuffer(a)};e.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};e.xorBytes=function(a,b,c){for(var p="",e="",d="",h=0,k=0;0<c;--c,++h)e=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(p+=d,d="",k=0),d+=String.fromCharCode(e),++k;return p+d};e.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};e.bytesToHex=
210 -function(a){return e.createBuffer(a).toHex()};e.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var d=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];e.encode64=function(a,b){for(var c="",p="",e,d,h,k=0;k<a.length;)e=
211 -a.charCodeAt(k++),d=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,b)+"\r\n",c=c.substr(b));return p+
212 -c};e.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,p,e,h,k=0;k<a.length;)c=d[a.charCodeAt(k++)-43],p=d[a.charCodeAt(k++)-43],e=d[a.charCodeAt(k++)-43],h=d[a.charCodeAt(k++)-43],b+=String.fromCharCode(c<<2|p>>4),64!==e&&(b+=String.fromCharCode((p&15)<<4|e>>2),64!==h&&(b+=String.fromCharCode((e&3)<<6|h)));return b};e.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};e.decodeUtf8=function(a){return decodeURIComponent(escape(a))};e.binary={raw:{},hex:{},base64:{}};
213 -e.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};e.binary.raw.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(a.length));for(var e=c=c||0,d=0;d<a.length;++d)p[e++]=a.charCodeAt(d);return b?e-c:p};e.binary.hex.encode=e.bytesToHex;e.binary.hex.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var e=0,d=c;a.length&1&&(e=1,p[d++]=parseInt(a[0],16));for(;e<a.length;e+=2)p[d++]=parseInt(a.substr(e,2),16);return b?d-c:p};e.binary.base64.encode=
214 -function(a,b){for(var c="",p="",e,d,h,k=0;k<a.byteLength;)e=a[k++],d=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,
215 -b)+"\r\n",c=c.substr(b));return p+c};e.binary.base64.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var e,h,k,m,g=0,r=c;g<a.length;)e=d[a.charCodeAt(g++)-43],h=d[a.charCodeAt(g++)-43],k=d[a.charCodeAt(g++)-43],m=d[a.charCodeAt(g++)-43],p[r++]=e<<2|h>>4,64!==k&&(p[r++]=(h&15)<<4|k>>2,64!==m&&(p[r++]=(k&3)<<6|m));return b?r-c:p.subarray(0,r)};e.text={utf8:{},utf16:{}};e.text.utf8.encode=function(a,b,c){a=e.encodeUtf8(a);
216 -var p=b;p||(p=new Uint8Array(a.length));for(var d=c=c||0,h=0;h<a.length;++h)p[d++]=a.charCodeAt(h);return b?d-c:p};e.text.utf8.decode=function(a){return e.decodeUtf8(String.fromCharCode.apply(null,a))};e.text.utf16.encode=function(a,b,c){var p=b;p||(p=new Uint8Array(2*a.length));for(var e=new Uint16Array(p.buffer),d=c=c||0,h=c,k=0;k<a.length;++k)e[h++]=a.charCodeAt(k),d+=2;return b?d-c:p};e.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};e.deflate=function(a,
217 -b,c){b=e.decode64(a.deflate(e.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};e.inflate=function(a,b,c){a=a.inflate(e.encode64(b)).rval;return null===a?null:e.decode64(a)};var g=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=e.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
218 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(e.decode64(c)));return c},m=function(a,b,c,p){var e=l(a,b);null===e&&(e={});e[c]=p;g(a,b,e)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var p=l(a,b);if(null!==p&&c in p){delete p[c];c=!0;for(var e in p){c=!1;break}c&&(p=null);g(a,b,p)}},r=function(a,b){g(a,b,null)},K=function(a,b,
219 -c){var p=null;"undefined"===typeof c&&(c=["web","flash"]);var e,d=!1,h=null,k;for(k in c){e=c[k];try{if("flash"===e||"both"===e){if(null===b[0])throw Error("Flash local storage not available.");p=a.apply(this,b);d="flash"===e}if("web"===e||"both"===e)b[0]=localStorage,p=a.apply(this,b),d=!0}catch(m){h=m}if(d)break}if(!d)throw h;return p};e.setItem=function(a,b,c,p,e){K(m,arguments,e)};e.getItem=function(a,b,c,p){return K(k,arguments,p)};e.removeItem=function(a,b,c,p){K(h,arguments,p)};e.clearItems=
220 -function(a,b,c){K(r,arguments,c)};e.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;e.getQueryVariables=function(a){var b=function(a){var b=
221 -{};a=a.split("&");for(var c=0;c<a.length;c++){var p=a[c].indexOf("="),e;0<p?(e=a[c].substring(0,p),p=a[c].substring(p+1)):(e=a[c],p=null);e in b||(b[e]=[]);e in Object.prototype||null===p||b[e].push(unescape(p))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};e.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
222 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:e.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};e.makeRequest=function(a){var b=e.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var p;"undefined"===typeof a?p=b.query:(p=b.query[a])&&"undefined"!==typeof c&&(p=p[c]);return p},getQueryLast:function(a,b){var p=c.getQuery(a);return p?p[p.length-1]:b}};return c};e.makeLink=function(a,
223 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};e.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var p=0,e=b.length;p<e;){var d=b[p++];if(p==e)a[d]=c;else{var h=d in a;if(!h||h&&"object"!==typeof a[d]||h&&null===a[d])a[d]={};a=a[d]}}};e.getPath=function(a,b,c){for(var p=0,e=b.length,d=!0;d&&p<e&&"object"===typeof a&&null!==a;){var h=b[p++];(d=h in a)&&(a=a[h])}return d?a:c};e.deletePath=function(a,b){if("object"===
224 -typeof a&&null!==a)for(var c=0,p=b.length;c<p;){var e=b[c++];if(c==p)delete a[e];else{if(!(e in a)||"object"!==typeof a[e]||null===a[e])break;a=a[e]}}};e.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};e.format=function(a){var b=/%./g,c,p,e=0,d=[];for(p=0;c=b.exec(a);)switch(p=a.substring(p,b.lastIndex-2),0<p.length&&d.push(p),p=b.lastIndex,c=c[0][1],c){case "s":case "o":e<arguments.length?d.push(arguments[e++ +1]):d.push("<?>");break;case "%":d.push("%");break;default:d.push("<#"+
225 -c+"?>")}d.push(a.substring(p));return d.join("")};e.formatNumber=function(a,b,c,p){var e=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;p=void 0===p?".":p;c=0>a?"-":"";var d=parseInt(a=Math.abs(+a||0).toFixed(e),10)+"",h=3<d.length?d.length%3:0;return c+(h?d.substr(0,h)+p:"")+d.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+p)+(e?b+Math.abs(a-d).toFixed(e).slice(2):"")};e.formatSize=function(a){return a=1073741824<=a?e.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?e.formatNumber(a/1048576,2,".","")+
226 -" MiB":1024<=a?e.formatNumber(a/1024,0)+" KiB":e.formatNumber(a,0)+" bytes"};e.bytesFromIP=function(a){return-1!==a.indexOf(".")?e.bytesFromIPv4(a):-1!==a.indexOf(":")?e.bytesFromIPv6(a):null};e.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=e.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};e.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
227 -2*(8-a.length+b),p=e.createBuffer(),d=0;8>d;++d)if(a[d]&&0!==a[d].length){var h=e.hexToBytes(a[d]);2>h.length&&p.putByte(0);p.putBytes(h)}else p.fillWithByte(0,c),c=0;return p.getBytes()};e.bytesToIP=function(a){return 4===a.length?e.bytesToIPv4(a):16===a.length?e.bytesToIPv6(a):null};e.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};e.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,d=0;d<a.length;d+=
228 -2){for(var h=e.bytesToHex(a[d]+a[d+1]);"0"===h[0]&&"0"!==h;)h=h.substr(1);if("0"===h){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(h)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};e.estimateCores=function(a,b){function c(a,k,m){if(0===k){var g=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);e.cores=
229 -Math.max(1,g);URL.revokeObjectURL(h);return b(null,e.cores)}p(m,function(b,p){a.push(d(m,p));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],e=0;e<a;++e){var z=new Worker(h);z.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(z)}for(e=0;e<a;++e)c[e].postMessage(e)}function d(a,b){for(var c=[],p=0;p<a;++p)for(var e=b[p],h=c[p]=[],z=0;z<a;++z)if(p!==z){var k=b[z];(e.st>k.st&&e.st<k.et||k.st>e.st&&k.st<e.et)&&h.push(z)}return c.reduce(function(a,
230 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in e&&!a.update)return b(null,e.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return e.cores=navigator.hardwareConcurrency,b(null,e.cores);if("undefined"===typeof Worker)return e.cores=1,b(null,e.cores);if("undefined"===typeof Blob)return e.cores=2,b(null,e.cores);var h=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
231 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var q=0;q<g.length;++q)g[q](c);
232 -return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
177 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,g,x,h,k,m,e,r=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){r=r.slice(0,r.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=r.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
178 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((r||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(r)for(e=r.length;0<e;--e)if(d=w[r.slice(0,e).join("/")])if(d=d[p]){g=d;h=x;break}if(g)break;!k&&l&&l[p]&&(k=l[p],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
179 +a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function r(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var C,w,D,m,k={},h={},u={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=r(a),g=d[0];a=d[1];g&&(g=e(g,b),c=p(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=r(a),
180 +g=d[0],a=d[1],g&&(c=p(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};C=function(a,b,c,g){var x,e,z,u,r=[];e=typeof c;var w;g=g||a;if("undefined"===e||"function"===e){b=!b.length&&c.length?["require","exports","module"]:b;for(u=0;u<b.length;u+=1)if(z=D(b[u],g),e=z.f,"require"===e)r[u]=m.require(a);else if("exports"===e)r[u]=m.exports(a),
181 +w=!0;else if("module"===e)x=r[u]=m.module(a);else if(B.call(k,e)||B.call(h,e)||B.call(K,e))r[u]=p(e);else if(z.p)z.p.load(z.n,v(g,!0),l(e),{}),r[u]=k[e];else throw Error(a+" missing "+e);b=c?c.apply(k[a],r):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
182 +typeof c&&(c=g,g=x);g?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(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(b){for(var p=
183 +0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.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)};
184 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
185 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}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&&
186 +d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
187 +d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
188 +255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
189 +8&255))};d.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};d.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};d.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
190 +d.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};d.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};d.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
191 +16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};d.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24Le=
192 +function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};d.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};d.ByteStringBuffer.prototype.getSignedInt=
193 +function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
194 +a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
195 +function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
196 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
197 +d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
198 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
199 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
200 +b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
201 +b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
202 +d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
203 +a,!0);this.write+=4;return this};d.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};d.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};d.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};d.DataBuffer.prototype.getInt24=
204 +function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};d.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};d.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};d.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};d.DataBuffer.prototype.getInt32Le=function(){var a=
205 +this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};d.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
206 +d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
207 +new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
208 +this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
209 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
210 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
211 +a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
212 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
213 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
214 +function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
215 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,u=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[u++]=p<<2|g>>4,64!==h&&(d[u++]=(g&15)<<4|h>>2,64!==k&&(d[u++]=(h&3)<<6|k));return b?u-c:d.subarray(0,u)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
216 +var p=b;p||(p=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)p[y++]=a.charCodeAt(h);return b?y-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
217 +b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
218 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},K=function(a,b,
219 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){K(m,arguments,p)};d.getItem=function(a,b,c,d){return K(k,arguments,d)};d.removeItem=function(a,b,c,d){K(h,arguments,d)};d.clearItems=
220 +function(a,b,c){K(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;d.getQueryVariables=function(a){var b=function(a){var b=
221 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
222 +0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
223 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
224 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
225 +c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
226 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
227 +2*(8-a.length+b),p=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&p.putByte(0);p.putBytes(k)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,h=0;h<a.length;h+=
228 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],e=b.length;m&&e===m.end+1?(m.end=e,m.end-m.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:e,end:e})}b.push(k)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,e){if(0===m){var u=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
229 +Math.max(1,u);URL.revokeObjectURL(k);return b(null,d.cores)}p(e,function(b,d){a.push(h(e,d));c(a,m-1,e)})}function p(a,b){for(var c=[],d=[],g=0;g<a;++g){var h=new Worker(k);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(g=0;g<a;++g)c[g].postMessage(g)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],g=c[d]=[],y=0;y<a;++y)if(d!==y){var k=b[y];(p.st>k.st&&p.st<k.et||k.st>p.st&&k.st<p.et)&&g.push(y)}return c.reduce(function(a,
230 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
231 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var r=0;r<e.length;++r)e[r](c);
232 +return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
233 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
234 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
235 this.mode.start(c)};c.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()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
236 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
237 -c.defined.cipher=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
238 -4<b.length){var d=b;b=a.util.createBuffer();for(var e=0;e<d.length;++e)b.putByte(d[e])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function g(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
236 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
237 +c.defined.cipher=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
238 +4<b.length){var d=b;b=a.util.createBuffer();for(var g=0;g<d.length;++g)b.putByte(d[g])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
239 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
240 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.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);
241 this._outBlock=Array(this._ints)};w.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=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
242 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
243 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
244 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32()^this._outBlock[d],b.putInt32(this._inBlock[d]);else{var e=(this.blockSize-p)%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]);
245 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
246 -p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32(),b.putInt32(this._inBlock[d]^this._outBlock[d]);else{var e=(this.blockSize-p)%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);
247 -if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
248 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)b.putInt32(a.getInt32()^this._outBlock[d]),this._inBlock[d]=this._outBlock[d];else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(d=0;d<this._ints;++d)this._partialOutput.putInt32(a.getInt32()^
249 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
250 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var g=0;g<
251 -this._ints;++g)b.putInt32(a.getInt32()^this._outBlock[g]);else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);0<q&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
244 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
245 +if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
246 +d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
247 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
248 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
249 +this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
250 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var e=0;e<
251 +this._ints;++e)b.putInt32(a.getInt32()^this._outBlock[e]);else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);0<r&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<r&&!c)return b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
252 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
253 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.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,
254 -this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(g(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=g(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
255 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var g=0;g<this._ints;++g)b.putInt32(this._outBlock[g]^=a.getInt32());this._cipherLength+=this.blockSize}else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();
256 -for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);if(0===q||c){c?(g=p%this.blockSize,this._cipherLength+=g,this._partialOutput.truncate(this.blockSize-g)):this._cipherLength+=this.blockSize;for(g=0;g<this._ints;++g)this._outBlock[g]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),
257 -this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
258 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var e=this._aDataLength.concat(g(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,e);e=[];this.cipher.encrypt(this._j0,e);for(var q=0;q<
259 -this._ints;++q)this.tag.putInt32(this._s[q]^e[q]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],p=b.slice(0),d=0;128>d;++d)a[d/32|0]&1<<31-d%32&&(c[0]^=p[0],c[1]^=p[1],c[2]^=p[2],c[3]^=p[3]),this.pow(p,p);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,p=3;0<p;--p)b[p]=a[p]>>>1|(a[p-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
260 -[0,0,0,0],c=0;32>c;++c){var p=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=p[0];b[1]^=p[1];b[2]^=p[2];b[3]^=p[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,p=4*c,c=16*c,d=Array(c),e=0;e<c;++e){var g=[0,0,0,0];g[e/p|0]=1<<b-1<<(p-1-e%p)*b;d[e]=this.generateSubHashTable(this.multiply(g,a),b)}return d};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
261 -p=c>>>1,d=Array(c);d[p]=a.slice(0);for(var e=p>>>1;0<e;)this.pow(d[2*e],d[e]=[]),e>>=1;for(e=2;e<p;){for(var g=1;g<e;++g){var q=d[e],w=d[g];d[e+g]=[q[0]^w[0],q[1]^w[1],q[2]^w[2],q[3]^w[3]]}e*=2}d[0]=[0,0,0,0];for(e=p+1;e<c;++e)g=d[e^p],d[e]=[a[0]^g[0],a[1]^g[1],a[2]^g[2],a[3]^g[3]];return d}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=
262 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
263 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);r=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,e,g,k,q,u,b=0;256>b;++b){q=p^p<<1^p<<2^p<<3^p<<4;q=q>>8^q&255^99;h[c]=q;r[q]=c;u=a[q];e=a[c];g=a[e];k=a[g];u^=u<<24^q<<16^q<<8^q;g=(e^g^k)<<24^(c^
264 -k)<<16^(c^g^k)<<8^c^e^k;for(var w=0;4>w;++w)B[w][c]=u,x[w][q]=g,u=u<<24|u>>>8,g=g<<24|g>>>8;0===c?c=p=1:(c=e^a[a[a[e^k]]],p^=a[a[p]])}}function g(a,b){for(var c=a.slice(0),p,d=1,e=c.length,m=k*(e+6+1),q=e;q<m;++q)p=c[q-1],0===q%e?(p=h[p>>>16&255]<<24^h[p>>>8&255]<<16^h[p&255]<<8^h[p>>>24]^K[d]<<24,d++):6<e&&4===q%e&&(p=h[p>>>24]<<24^h[p>>>16&255]<<16^h[p>>>8&255]<<8^h[p&255]),c[q]=c[q-e]^p;if(b){for(var d=x[0],e=x[1],r=x[2],w=x[3],l=c.slice(0),m=c.length,q=0,F=m-k;q<m;q+=k,F-=k)if(0===q||q===m-k)l[q]=
265 -c[F],l[q+1]=c[F+3],l[q+2]=c[F+2],l[q+3]=c[F+1];else for(var B=0;B<k;++B)p=c[F+B],l[q+(3&-B)]=d[h[p>>>24]]^e[h[p>>>16&255]]^r[h[p>>>8&255]]^w[h[p&255]];c=l}return c}function w(a,b,c,p){var d=a.length/4-1,e,g,k,m,q;p?(e=x[0],g=x[1],k=x[2],m=x[3],q=r):(e=B[0],g=B[1],k=B[2],m=B[3],q=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[p?3:1]^a[1];C=b[2]^a[2];b=b[p?1:3]^a[3];for(var n=3,v=1;v<d;++v)L=e[w>>>24]^g[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=e[l>>>24]^g[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=e[C>>>24]^
266 -g[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=e[b>>>24]^g[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=q[w>>>24]<<24^q[l>>>16&255]<<16^q[C>>>8&255]<<8^q[b&255]^a[++n];c[p?3:1]=q[l>>>24]<<24^q[C>>>16&255]<<16^q[b>>>8&255]<<8^q[w&255]^a[++n];c[2]=q[C>>>24]<<24^q[b>>>16&255]<<16^q[w>>>8&255]<<8^q[l&255]^a[++n];c[p?1:3]=q[b>>>24]<<24^q[w>>>16&255]<<16^q[l>>>8&255]<<8^q[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
267 -a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;e.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!1,mode:p});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!0,mode:p});a.start(b);return a};a.aes.createDecryptionCipher=
254 +this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
255 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var e=0;e<this._ints;++e)b.putInt32(this._outBlock[e]^=a.getInt32());this._cipherLength+=this.blockSize}else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();
256 +for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(0===r||c){c?(e=p%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<r&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),
257 +this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
258 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var u=0;u<
259 +this._ints;++u)this.tag.putInt32(this._s[u]^g[u]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
260 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),g=0;g<c;++g){var e=[0,0,0,0];e[g/d|0]=1<<b-1<<(d-1-g%d)*b;p[g]=this.generateSubHashTable(this.multiply(e,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
261 +d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(p[2*g],p[g]=[]),g>>=1;for(g=2;g<d;){for(var e=1;e<g;++e){var r=p[g],w=p[e];p[g+e]=[r[0]^w[0],r[1]^w[1],r[2]^w[2],r[3]^w[3]]}g*=2}p[0]=[0,0,0,0];for(g=d+1;g<c;++g)e=p[g^d],p[g]=[a[0]^e[0],a[1]^e[1],a[2]^e[2],a[3]^e[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=
262 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
263 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,g,e,k,r,q,b=0;256>b;++b){r=p^p<<1^p<<2^p<<3^p<<4;r=r>>8^r&255^99;h[c]=r;u[r]=c;q=a[r];g=a[c];e=a[g];k=a[e];q^=q<<24^r<<16^r<<8^r;e=(g^e^k)<<24^(c^
264 +k)<<16^(c^e^k)<<8^c^g^k;for(var w=0;4>w;++w)B[w][c]=q,x[w][r]=e,q=q<<24|q>>>8,e=e<<24|e>>>8;0===c?c=p=1:(c=g^a[a[a[g^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,g=c.length,m=k*(g+6+1),r=g;r<m;++r)d=c[r-1],0===r%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^K[p]<<24,p++):6<g&&4===r%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[r]=c[r-g]^d;if(b){for(var p=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),m=c.length,r=0,F=m-k;r<m;r+=k,F-=k)if(0===r||r===m-k)l[r]=
265 +c[F],l[r+1]=c[F+3],l[r+2]=c[F+2],l[r+3]=c[F+1];else for(var B=0;B<k;++B)d=c[F+B],l[r+(3&-B)]=p[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,g,e,k,m,r;d?(g=x[0],e=x[1],k=x[2],m=x[3],r=u):(g=B[0],e=B[1],k=B[2],m=B[3],r=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[d?3:1]^a[1];C=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)L=g[w>>>24]^e[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^e[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=g[C>>>24]^
266 +e[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^e[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=r[w>>>24]<<24^r[l>>>16&255]<<16^r[C>>>8&255]<<8^r[b&255]^a[++n];c[d?3:1]=r[l>>>24]<<24^r[C>>>16&255]<<16^r[b>>>8&255]<<8^r[w&255]^a[++n];c[2]=r[C>>>24]<<24^r[b>>>16&255]<<16^r[w>>>8&255]<<8^r[l&255]^a[++n];c[d?1:3]=r[b>>>24]<<24^r[w>>>16&255]<<16^r[l>>>8&255]<<8^r[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
267 +a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;g.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
268 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
269 -c;for(var c=a.util.createBuffer(),e=0;e<d.length;++e)c.putByte(d[e])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,e=0;e<h;++e)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=g(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return g(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
270 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,r,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
271 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
269 +c;for(var c=a.util.createBuffer(),g=0;g<d.length;++g)c.putByte(d[g])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,g=0;g<h;++g)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
270 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
271 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
272 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
273 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
274 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -282,336 +282,336 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
282 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
283 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
284 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
285 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var q=0;q<g.length;++q)g[q](c);return c.oids}},
286 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
287 -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};c.create=function(b,c,d,e){if(a.util.isArray(e)){for(var h=[],g=0;g<e.length;++g)void 0!==e[g]&&h.push(e[g]);e=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(e),value:e}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,g){void 0===g&&(g=!0);
288 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,r=d(b);if(b.length()<r){if(g)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+r,m;r=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<r){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===r-(b.read-
289 -x))++x,--r}catch(A){}b.read=x}if(l)if(l=[],void 0===r)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,g))}else for(x=b.length();0<r;)l.push(c.fromDer(b,g)),r-=x-b.length(),x=b.length();else{if(void 0===r){if(g)throw Error("Non-constructed ASN.1 object of indefinite length.");r=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<r;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(r)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
290 -e=b.tagClass|b.type,g=a.util.createBuffer();if(b.composed){b.constructed?e|=32:g.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&g.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)g.putInt16(b.value.charCodeAt(h));else g.putBytes(b.value);d.putByte(e);if(127>=g.length())d.putByte(g.length()&127);else{h=g.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(g);
291 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,e,h,g,q=2;q<b.length;++q){d=!0;e=[];h=parseInt(b[q],10);do g=h&127,h>>>=7,d||(g|=128),e.push(g),d=!1;while(0<h);for(d=e.length-1;0<=d;--d)c.putByte(e[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var e=0;0<b.length();)d=b.getByte(),e<<=7,d&128?e+=d&127:(c+="."+(e+d),e=0);
292 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,e=parseInt(a.substr(4,2),10),p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,e);b.setUTCHours(p,g,q,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
293 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,e=parseInt(a.substr(6,2),10),p=parseInt(a.substr(8,2),10),g=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),x=0,l=0,y=!1;"Z"===a.charAt(a.length-1)&&(y=!0);var R=a.length-5,z=a.charAt(R);if("+"===z||"-"===z)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===z&&(l*=-1),y=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
294 -10));y?(b.setUTCFullYear(c,d,e),b.setUTCHours(p,g,q,x),b.setTime(+b+l)):(b.setFullYear(c,d,e),b.setHours(p,g,q,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
285 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var r=0;r<e.length;++r)e[r](c);return c.oids}},
286 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
287 +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};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
288 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
289 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
290 +g=b.tagClass|b.type,e=a.util.createBuffer();if(b.composed){b.constructed?g|=32:e.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&e.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)e.putInt16(b.value.charCodeAt(h));else e.putBytes(b.value);d.putByte(g);if(127>=e.length())d.putByte(e.length()&127);else{h=e.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(e);
291 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,r=2;r<b.length;++r){d=!0;g=[];h=parseInt(b[r],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
292 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),r=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(r=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(g,e,r,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
293 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),r=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
294 +10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(g,e,r,x),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(g,e,r,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
295 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
296 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,e,g){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)g&&(b.tagClass!==d.tagClass&&g.push("["+d.name+'] Expected tag class "'+d.tagClass+
297 -'", got "'+b.tagClass+'"'),b.type!==d.type&&g.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var r=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[r]&&((h=c.validate(b.value[r],d.value[l],e,g))?++r:d.value[l].optional&&(h=!0)),!h&&g&&g.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
298 -b.value.length+'"');h&&e&&(d.capture&&(e[d.capture]=b.value),d.captureAsn1&&(e[d.captureAsn1]=b))}else g&&g.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var g=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,e){var k="";d=d||0;e=e||2;0<d&&(k+="\n");for(var h="",r=0;r<d*e;++r)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
296 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
297 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
298 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
299 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
300 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
301 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",r=0;r<b.value.length;++r)void 0!==b.value[r]&&(l+=1,B+=c.prettyPrint(b.value[r],d+1,e),r+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
302 -c.Type.OCTETSTRING?(g.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:g.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
303 -c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<g.length;++q)g[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
301 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,B+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
302 +c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
303 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var r=0;r<e.length;++r)e[r](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
304 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[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];m=[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];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
305 -Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var e,p,h,g,z,E,q,l=c.length();64<=l;){p=a.h0;h=a.h1;g=a.h2;z=a.h3;for(q=0;16>q;++q)b[q]=c.getInt32Le(),e=z^h&(g^z),e=p+e+k[q]+b[q],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;32>q;++q)e=g^z&(h^g),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;48>q;++q)e=h^g^z,e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;64>q;++q)e=g^(h|~z),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;a.h0=a.h0+p|0;a.h1=a.h1+h|0;a.h2=a.h2+g|0;a.h3=
306 -a.h3+z|0;l-=64}}var g=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=g;g.create=function(){h||c();var b=null,g=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);g=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
307 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],z=m.fullMessageLength.length-1;0<=z;--z)m.fullMessageLength[z]+=q[1],q[1]=q[0]+(m.fullMessageLength[z]/4294967296>>>0),m.fullMessageLength[z]>>>=0,q[0]=q[1]/4294967296>>>0;g.putBytes(c);d(b,k,g);(2048<g.read||0===g.length())&&g.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(g.bytes());c.putBytes(l.substr(0,
308 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,q=0,z=m.fullMessageLength.length-1;0<=z;--z)h=8*m.fullMessageLength[z]+q,q=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=
309 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
310 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,A,y,w,z=d.length();64<=z;){p=a.h0;g=a.h1;q=a.h2;l=a.h3;A=a.h4;for(w=0;16>w;++w)e=d.getInt32(),b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;20>w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;32>
311 -w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;40>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;60>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g&q|l&(g^q),e=(p<<5|p>>>27)+y+A+2400959708+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;80>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>
312 -27)+y+A+3395469782+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;a.h0=a.h0+p|0;a.h1=a.h1+g|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+A|0;z-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),e=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
313 -0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,e=0;e<c;++e)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var w=g.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
314 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],A=0;A<h.fullMessageLength.length;++A)w=8*h.fullMessageLength[A+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
315 -h4:b.h4};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var g=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
316 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,y,w,z,E,O,H,C,u,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
317 -for(;64>l;++l)e=b[l-2],e=(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10,p=b[l-15],p=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,b[l]=e+b[l-7]+p+b[l-16]|0;y=a.h0;w=a.h1;z=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;u=a.h7;for(l=0;64>l;++l)e=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),g=C^O&(H^C),p=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),q=y&w|z&(y^w),e=u+e+g+n[l]+b[l],p+=q,u=C,C=H,H=O,O=E+e|0,E=z,z=w,w=y,y=e+p|0;a.h0=a.h0+y|0;a.h1=a.h1+w|0;a.h2=a.h2+z|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+u|0;v-=
318 -64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.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,
319 -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],l=!0);var b=null,d=a.util.createBuffer(),e=Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,
320 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){r.messageLength=0;r.fullMessageLength=r.messageLength64=[];for(var c=r.messageLengthSize/4,e=0;e<c;++e)r.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return r}};r.start();r.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var x=g.length;r.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=r.fullMessageLength.length-
321 -1;0<=w;--w)r.fullMessageLength[w]+=x[1],x[1]=x[0]+(r.fullMessageLength[w]/4294967296>>>0),r.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return r};r.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,r.blockLength-(r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize&r.blockLength-1)));a.util.createBuffer();for(var w,x,A=8*r.fullMessageLength[0],y=0;y<r.fullMessageLength.length;++y)w=
322 -8*r.fullMessageLength[y+1],x=w/4294967296>>>0,A+=x,l.putInt32(A>>>0),A=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return r};var g=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
323 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
324 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,k,q,z,E,l,w,C,u,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)q=b[S-2],w=q[0],q=q[1],e=((w>>>19|q<<13)^(q>>>29|w<<3)^w>>>6)>>>0,p=((w<<13|q>>>19)^(q<<3|w>>>29)^(w<<26|q>>>6))>>>0,q=b[S-15],w=q[0],q=q[1],g=((w>>>1|q<<31)^(w>>>8|q<<24)^w>>>7)>>>0,k=((w<<31|q>>>1)^(w<<24|q>>>8)^(w<<25|q>>>7))>>>0,w=b[S-7],C=b[S-
325 -16],q=p+w[1]+k+C[1],b[S][0]=e+w[0]+g+C[0]+(q/4294967296>>>0)>>>0,b[S][1]=q>>>0;w=a[0][0];C=a[0][1];u=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)e=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,q=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,p=(ba^D&(J^ba))>>>0,z=(W^V&(aa^W))>>>0,g=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
326 -E=(w&u|v&(w^u))>>>0,l=(C&n|F&(C^n))>>>0,q=G+q+z+m[S][1]+b[S][1],e=I+e+p+m[S][0]+b[S][0]+(q/4294967296>>>0)>>>0,p=q>>>0,q=k+l,g=g+E+(q/4294967296>>>0)>>>0,k=q>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,q=L+p,D=Y+e+(q/4294967296>>>0)>>>0,V=q>>>0,Y=v,L=F,v=u,F=n,u=w,n=C,q=p+k,w=e+g+(q/4294967296>>>0)>>>0,C=q>>>0;q=a[0][1]+C;a[0][0]=a[0][0]+w+(q/4294967296>>>0)>>>0;a[0][1]=q>>>0;q=a[1][1]+n;a[1][0]=a[1][0]+u+(q/4294967296>>>0)>>>0;a[1][1]=q>>>0;q=a[2][1]+F;a[2][0]=a[2][0]+v+(q/4294967296>>>0)>>>0;a[2][1]=q>>>0;
327 -q=a[3][1]+L;a[3][0]=a[3][0]+Y+(q/4294967296>>>0)>>>0;a[3][1]=q>>>0;q=a[4][1]+V;a[4][0]=a[4][0]+D+(q/4294967296>>>0)>>>0;a[4][1]=q>>>0;q=a[5][1]+aa;a[5][0]=a[5][0]+J+(q/4294967296>>>0)>>>0;a[5][1]=q>>>0;q=a[6][1]+W;a[6][0]=a[6][0]+ba+(q/4294967296>>>0)>>>0;a[6][1]=q>>>0;q=a[7][1]+G;a[7][0]=a[7][0]+I+(q/4294967296>>>0)>>>0;a[7][1]=q>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var g=a.sha384=a.sha512.sha384=a.sha512.sha384||
328 -{};g.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=g;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
305 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var p,g,h,e,y,E,r,l=c.length();64<=l;){g=a.h0;h=a.h1;e=a.h2;y=a.h3;for(r=0;16>r;++r)b[r]=c.getInt32Le(),p=y^h&(e^y),p=g+p+k[r]+b[r],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;32>r;++r)p=e^y&(h^e),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;48>r;++r)p=h^e^y,p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;64>r;++r)p=e^(h|~y),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;a.h0=a.h0+g|0;a.h1=a.h1+h|0;a.h2=a.h2+e|0;a.h3=
306 +a.h3+y|0;l-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
307 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var r=c.length;m.messageLength+=r;for(var r=[r/4294967296>>>0,r>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=r[1],r[1]=r[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,r[0]=r[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
308 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,r=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+r,r=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
309 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
310 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;r=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;32>
311 +w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&r|l&(e^r),p=(g<<5|g>>>27)+A+z+2400959708+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>
312 +27)+A+z+3395469782+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+r|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
313 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
314 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
315 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
316 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,A,w,y,E,O,H,C,q,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
317 +for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=p+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;q=a.h7;for(l=0;64>l;++l)p=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),e=C^O&(H^C),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),r=A&w|y&(A^w),p=q+p+e+n[l]+b[l],g+=r,q=C,C=H,H=O,O=E+p|0,E=y,y=w,w=A,A=p+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+q|0;v-=
318 +64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.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,
319 +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],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
320 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
321 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
322 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
323 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
324 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,k,r,y,E,l,w,C,q,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)r=b[S-2],w=r[0],r=r[1],p=((w>>>19|r<<13)^(r>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|r>>>19)^(r<<3|w>>>29)^(w<<26|r>>>6))>>>0,r=b[S-15],w=r[0],r=r[1],e=((w>>>1|r<<31)^(w>>>8|r<<24)^w>>>7)>>>0,k=((w<<31|r>>>1)^(w<<24|r>>>8)^(w<<25|r>>>7))>>>0,w=b[S-7],C=b[S-
325 +16],r=g+w[1]+k+C[1],b[S][0]=p+w[0]+e+C[0]+(r/4294967296>>>0)>>>0,b[S][1]=r>>>0;w=a[0][0];C=a[0][1];q=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)p=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,r=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(J^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
326 +E=(w&q|v&(w^q))>>>0,l=(C&n|F&(C^n))>>>0,r=G+r+y+m[S][1]+b[S][1],p=I+p+g+m[S][0]+b[S][0]+(r/4294967296>>>0)>>>0,g=r>>>0,r=k+l,e=e+E+(r/4294967296>>>0)>>>0,k=r>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,r=L+g,D=Y+p+(r/4294967296>>>0)>>>0,V=r>>>0,Y=v,L=F,v=q,F=n,q=w,n=C,r=g+k,w=p+e+(r/4294967296>>>0)>>>0,C=r>>>0;r=a[0][1]+C;a[0][0]=a[0][0]+w+(r/4294967296>>>0)>>>0;a[0][1]=r>>>0;r=a[1][1]+n;a[1][0]=a[1][0]+q+(r/4294967296>>>0)>>>0;a[1][1]=r>>>0;r=a[2][1]+F;a[2][0]=a[2][0]+v+(r/4294967296>>>0)>>>0;a[2][1]=r>>>0;
327 +r=a[3][1]+L;a[3][0]=a[3][0]+Y+(r/4294967296>>>0)>>>0;a[3][1]=r>>>0;r=a[4][1]+V;a[4][0]=a[4][0]+D+(r/4294967296>>>0)>>>0;a[4][1]=r>>>0;r=a[5][1]+aa;a[5][0]=a[5][0]+J+(r/4294967296>>>0)>>>0;a[5][1]=r>>>0;r=a[6][1]+W;a[6][0]=a[6][0]+ba+(r/4294967296>>>0)>>>0;a[6][1]=r>>>0;r=a[7][1]+G;a[7][0]=a[7][0]+I+(r/4294967296>>>0)>>>0;a[7][1]=r>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
328 +{};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
329 3609767458],[1899447441,602891725],[3049323471,3964484399],[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],
330 [1555081692,3175218132],[1996064986,2198950837],[2554220882,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,
331 106217008],[3516065817,3606008344],[3600352804,1432725776],[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],
332 [3515267271,566280711],[3940187606,3454069534],[4118630271,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]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
333 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,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,
334 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],e=null,g=a.util.createBuffer(),x=Array(80),A=0;80>A;++A)x[A]=Array(2);var y={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){y.messageLength=
335 -0;y.fullMessageLength=y.messageLength128=[];for(var b=y.messageLengthSize/4,c=0;c<b;++c)y.fullMessageLength.push(0);g=a.util.createBuffer();e=Array(d.length);for(c=0;c<d.length;++c)e[c]=d[c].slice(0);return y}};y.start();y.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;y.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=y.fullMessageLength.length-1;0<=k;--k)y.fullMessageLength[k]+=h[1],h[1]=h[0]+(y.fullMessageLength[k]/4294967296>>>0),y.fullMessageLength[k]>>>=0,h[0]=
336 -h[1]/4294967296>>>0;g.putBytes(b);c(e,x,g);(2048<g.read||0===g.length())&&g.compact();return y};y.digest=function(){var d=a.util.createBuffer();d.putBytes(g.bytes());d.putBytes(l.substr(0,y.blockLength-(y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize&y.blockLength-1)));a.util.createBuffer();for(var z,k,m=8*y.fullMessageLength[0],r=0;r<y.fullMessageLength.length;++r)z=8*y.fullMessageLength[r+1],k=z/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=z;z=Array(e.length);for(r=0;r<e.length;++r)z[r]=
337 -e[r].slice(0);c(z,x,d);d=a.util.createBuffer();k="SHA-512"===b?z.length:"SHA-384"===b?z.length-2:z.length-4;for(r=0;r<k;++r)d.putInt32(z[r][0]),r===k-1&&"SHA-512/224"===b||d.putInt32(z[r][1]);return d};return y};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
338 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
339 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md}},l=a;a=function(b,
340 -c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,g={start:function(g,m){if(null!==g)if("string"===typeof g)if(g=g.toLowerCase(),g in a.md.algorithms)b=
341 -a.md.algorithms[g].create();else throw Error('Unknown hash algorithm "'+g+'"');else b=g;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
342 -d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};g.digest=g.getMac;return g}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
343 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<g.length;++q)g[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],e=function(a,
344 -b){return" "+b},p=0;p<a.values.length;++p)d.push(a.values[p].replace(/^(\S+\r\n)/,e));b+=d.join(",")+"\r\n";d=0;a=-1;for(p=0;p<b.length;++p,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=p-a-1,a=-1,++p;else if(" "===b[p]||"\t"===b[p]||","===b[p])a=p;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var e="-----BEGIN "+b.type+"-----\r\n",g;b.procType&&(g={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
345 -e+=c(g));b.contentDomain&&(g={name:"Content-Domain",values:[b.contentDomain]},e+=c(g));b.dekInfo&&(g={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&g.values.push(b.dekInfo.parameters),e+=c(g));if(b.headers)for(g=0;g<b.headers.length;++g)e+=c(b.headers[g]);b.procType&&(e+="\r\n");e+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return e+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
346 -e=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,g=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var q={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(q);if(h[2]){for(var l=h[2].split(g),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var A=l[x];if(!/\s/.test(A[0]))break;h+=A;B=x}if(h=h.match(e)){for(var x={name:h[1],values:[]},A=h[2].split(","),y=0;y<A.length;++y)x.values.push(A[y].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
347 -"Content-Domain"!==x.name)if(q.dekInfo||"DEK-Info"!==x.name)q.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:A[0],parameters:A[1]||null}}else q.contentDomain=A[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
348 -q.procType={version:A[0],type:A[1]}}}++B}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
349 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
350 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,e){var p=32===a.length?3:9;e=3===p?e?[30,-2,-2]:[0,32,2]:e?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=b[0],q=b[1];b=(g>>>4^q)&252645135;q^=b;g^=b<<4;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(g>>>1^q)&1431655765;for(var q=q^b,g=g^b<<1,g=g<<1|g>>>31,q=q<<1|q>>>31,H=0;H<p;H+=3){for(var C=e[H+1],u=e[H+2],T=e[H];T!=C;T+=u){var P=q^a[T],F=(q>>>4|q<<28)^a[T+1];b=g;
351 -g=q;q=b^(n[P>>>24&63]|k[P>>>16&63]|r[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=g;g=q;q=b}g=g>>>1|g<<31;q=q>>>1|q<<31;b=(g>>>1^q)&1431655765;q^=b;g^=b<<1;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(g>>>4^q)&252645135;c[0]=g^b<<4;c[1]=q^b}function g(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var g=
352 -null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;e.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return g({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return g({key:a,
334 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
335 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
336 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
337 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
338 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
339 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md}},l=a;a=function(b,
340 +c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
341 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
342 +d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
343 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var r=0;r<e.length;++r)e[r](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
344 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
345 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
346 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var r={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(r);if(h[2]){for(var l=h[2].split(e),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;B=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(r.procType)if(r.contentDomain||
347 +"Content-Domain"!==x.name)if(r.dekInfo||"DEK-Info"!==x.name)r.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');r.dekInfo={algorithm:z[0],parameters:z[1]||null}}else r.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
348 +r.procType={version:z[0],type:z[1]}}}++B}if("ENCRYPTED"===r.procType&&!r.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
349 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
350 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,g){var p=32===a.length?3:9;g=3===p?g?[30,-2,-2]:[0,32,2]:g?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],r=b[1];b=(e>>>4^r)&252645135;r^=b;e^=b<<4;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(e>>>1^r)&1431655765;for(var r=r^b,e=e^b<<1,e=e<<1|e>>>31,r=r<<1|r>>>31,H=0;H<p;H+=3){for(var C=g[H+1],q=g[H+2],T=g[H];T!=C;T+=q){var P=r^a[T],F=(r>>>4|r<<28)^a[T+1];b=e;
351 +e=r;r=b^(n[P>>>24&63]|k[P>>>16&63]|u[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=e;e=r;r=b}e=e>>>1|e<<31;r=r>>>1|r<<31;b=(e>>>1^r)&1431655765;r^=b;e^=b<<1;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(e>>>4^r)&252645135;c[0]=e^b<<4;c[1]=r^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
352 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
353 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
354 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[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],
355 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],r=[0,268435456,8,268435464,0,268435456,
354 +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],
355 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],r=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
356 8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],F=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],B=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],L=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
357 1,C=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],K=0,D,W=0;W<n;W++){var I=b.getInt32(),G=b.getInt32();D=(I>>>4^G)&252645135;G^=D;I^=D<<4;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>2^G)&858993459;G^=D;I^=D<<2;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=(G>>>8^I)&16711935;I^=D;G^=D<<8;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=I<<8|G>>>20&240;for(var I=G<<24|G<<8&16711680|G>>>8&65280|G>>>24&240,G=D,S=0;S<v.length;++S){v[S]?(I=I<<2|I>>>26,G=G<<2|G>>>26):(I=I<<1|I>>>27,G=G<<1|G>>>27);
358 -var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|e[I>>>20&15]|g[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|q[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|r[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
358 +var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|g[I>>>20&15]|e[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|r[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|u[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
359 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[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,
360 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,
361 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[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,
362 8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[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],h=[256,34078976,34078720,1107296512,
363 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,
364 -524288,0,1074266112,34078976,1073742080],r=[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,
364 +524288,0,1074266112,34078976,1073742080],u=[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,
365 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[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,
366 67108866,67110912,2048,2097154],B=[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,
367 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<g.length;++q)g[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,
368 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,g;e&&!a.disableNativeCode&&(g=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,q){function l(){if(N>A)return q(null,z);n.start(null,
369 -null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();u=2;B()}function B(){if(u<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++u,a.util.setImmediate(B);z+=N<A?E:E.substr(0,y);++N;l()}"function"===typeof h&&(q=h,h=null);if(e&&!a.disableNativeCode&&g.pbkdf2&&(null===h||"object"!==typeof h)&&(4<g.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),q?4===g.pbkdf2Sync.length?g.pbkdf2(b,
370 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):g.pbkdf2(b,c,d,k,h,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===g.pbkdf2Sync.length?g.pbkdf2Sync(b,c,d,k).toString("binary"):g.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
371 -if(q)return q(b);throw b;}var A=Math.ceil(k/x),y=k-(A-1)*x,n=a.hmac.create();n.start(h,b);var z="",E,O,H;if(!q){for(var N=1;N<=A;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var u=2;u<=d;++u)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;z+=N<A?E:E.substr(0,y)}return z}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
372 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
373 -"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
374 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function g(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
375 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)e.putInt32(k[h])}catch(z){if(!("undefined"!==typeof QuotaExceededError&&z instanceof QuotaExceededError))throw z;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
376 -e.putByte(String.fromCharCode(k&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),q=0;32>q;++q)h[q]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(g(k.key,h(k.seed)));k.seed=z(g(k.key,k.seed));
377 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,q=k.plugin.formatKey,z=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var z=c(k.key,
378 -k.seed);k.generated+=z.length;q.putBytes(z);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,g(a))}catch(c){b(c)}},k.seedFileSync=g);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
367 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var r=0;r<e.length;++r)e[r](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
368 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},g="undefined"!==typeof process&&process.versions&&process.versions.node,e;g&&!a.disableNativeCode&&(e=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,r){function l(){if(N>z)return r(null,y);n.start(null,
369 +null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();q=2;B()}function B(){if(q<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++q,a.util.setImmediate(B);y+=N<z?E:E.substr(0,A);++N;l()}"function"===typeof h&&(r=h,h=null);if(g&&!a.disableNativeCode&&e.pbkdf2&&(null===h||"object"!==typeof h)&&(4<e.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),r?4===e.pbkdf2Sync.length?e.pbkdf2(b,
370 +c,d,k,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):e.pbkdf2(b,c,d,k,h,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):4===e.pbkdf2Sync.length?e.pbkdf2Sync(b,c,d,k).toString("binary"):e.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
371 +if(r)return r(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,n=a.hmac.create();n.start(h,b);var y="",E,O,H;if(!r){for(var N=1;N<=z;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var q=2;q<=d;++q)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;y+=N<z?E:E.substr(0,A)}return y}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
372 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
373 +"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,g=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(g=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
374 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function e(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var g=
375 +a.util.createBuffer();if(c)for(;g.length()<b;){var h=Math.max(1,Math.min(b-g.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)g.putInt32(k[h])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(g.length()<b)for(c=Math.floor(65536*Math.random());g.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
376 +g.putByte(String.fromCharCode(k&255));return g.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),r=0;32>r;++r)h[r]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function g(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(g)});l=e(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=r(e(k.key,h(k.seed)));k.seed=y(e(k.key,k.seed));
377 +a.util.setImmediate(g)}if(!d)return k.generateSync(b);var e=k.plugin.cipher,h=k.plugin.increment,r=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;g()};k.generateSync=function(b){var c=k.plugin.cipher,g=k.plugin.increment,e=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var r=a.util.createBuffer();r.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
378 +k.seed);k.generated+=y.length;r.putBytes(y);k.key=e(c(k.key,g(k.seed)));k.seed=h(c(k.key,k.seed))}return r.getBytes(b)};g?(k.seedFile=function(a,b){g.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return g.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,e(a))}catch(c){b(c)}},k.seedFileSync=e);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
379 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
380 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<g.length;++q)g[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
381 -0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},g=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
382 -b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,g,!1);l.putInt32(g[0]);l.putInt32(g[1]);l.putInt32(g[2]);l.putInt32(g[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
383 -process.versions.node,h=null;if("undefined"!==typeof window){var r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(h=function(a){return r.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
384 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<g.length;++q)g[q](c);
385 -return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
380 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var r=0;r<e.length;++r)e[r](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
381 +0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
382 +b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
383 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
384 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var r=0;r<e.length;++r)e[r](c);
385 +return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
386 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,
387 -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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
388 -1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var g=function(b,c,g){var k=!1,h=null,q=null,l=null,n,x,A,y,v=[];b=a.rc2.expandKey(b,c);for(A=0;64>A;A++)v.push(b.getInt16Le());g?(n=function(a){for(A=0;4>A;A++){a[A]+=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);var b=a[A],c=d[A];a[A]=b<<c&65535|(b&65535)>>16-c;y++}},x=function(a){for(A=0;4>A;A++)a[A]+=v[a[(A+3)%4]&63]}):(n=function(a){for(A=3;0<=A;A--){var b=a[A],c=d[A];a[A]=
389 -(b&65535)>>c|b<<16-c&65535;a[A]-=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);y--}},x=function(a){for(A=3;0<=A;A--)a[A]-=v[a[(A+3)%4]&63]});var z=null;return z={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();q=c||new a.util.createBuffer;l=b;z.output=q},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(A=0;4>A;A++){var c=h.getInt16Le();null!==l&&(g?c^=l.getInt16Le():l.putInt16Le(c));
390 -b.push(c&65535)}y=g?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(A=0;4>A;A++)null!==l&&(g?l.putInt16Le(b[A]):b[A]^=l.getInt16Le()),q.putInt16Le(b[A])}},finish:function(a){var b=!0;if(g)if(a)b=a(8,h,!g);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,z.update());!g&&(b=0===h.length())&&(a?b=a(8,q,!g):(a=q.length(),c=q.at(a-1),c>a?b=!1:q.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
391 -a.rc2.createEncryptionCipher=function(a,b){return g(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return g(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
392 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
393 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function g(a,b,c,d,e,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+e;e=Math.floor(h/67108864);c.data[d++]=h&67108863}return e}function l(a,b,c,d,e,p){var g=b&32767;for(b>>=15;0<=--p;){var h=this.data[a]&32767,z=this.data[a++]>>15,k=b*h+z*g,h=g*h+((k&32767)<<15)+c.data[d]+(e&1073741823);e=(h>>>30)+(k>>>15)+b*z+(e>>>30);c.data[d++]=h&1073741823}return e}function n(a,b,
394 -c,d,e,g){var p=b&16383;for(b>>=14;0<=--g;){var h=this.data[a]&16383,z=this.data[a++]>>14,k=b*h+z*p,h=p*h+((k&16383)<<14)+c.data[d]+e;e=(h>>28)+(k>>14)+b*z;c.data[d++]=h&268435455}return e}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function r(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
395 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function A(a,b){return a^b}function y(a,b){return a&~b}function R(){}function z(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
396 -navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=g,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],u;H=48;for(u=0;9>=u;++u)N[H++]=u;H=97;for(u=10;36>u;++u)N[H++]=u;H=65;for(u=10;36>u;++u)N[H++]=u;r.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};r.prototype.revert=function(a){return a};r.prototype.reduce=
397 -function(a){a.divRemTo(this.m,null,a)};r.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};r.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
387 +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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var g=b,e=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=e;128>n;n++)g.putByte(c[g.at(n-
388 +1)+g.at(n-e)&255]);g.setAt(128-l,c[g.at(128-l)&h]);for(n=127-l;0<=n;n--)g.setAt(n,c[g.at(n+1)^g.at(n+l)]);return g};var e=function(b,c,e){var k=!1,h=null,r=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
389 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();r=c||new a.util.createBuffer;l=b;y.output=r},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
390 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),r.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,r,!e):(a=r.length(),c=r.at(a-1),c>a?b=!1:r.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
391 +a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
392 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
393 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,g,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+g;g=Math.floor(h/67108864);c.data[d++]=h&67108863}return g}function l(a,b,c,d,g,e){var p=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,y=this.data[a++]>>15,k=b*h+y*p,h=p*h+((k&32767)<<15)+c.data[d]+(g&1073741823);g=(h>>>30)+(k>>>15)+b*y+(g>>>30);c.data[d++]=h&1073741823}return g}function n(a,b,
394 +c,d,g,e){var p=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,y=this.data[a++]>>14,k=b*h+y*p,h=p*h+((k&16383)<<14)+c.data[d]+g;g=(h>>28)+(k>>14)+b*y;c.data[d++]=h&268435455}return g}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
395 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
396 +navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=e,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],q;H=48;for(q=0;9>=q;++q)N[H++]=q;H=97;for(q=10;36>q;++q)N[H++]=q;H=65;for(q=10;36>q;++q)N[H++]=q;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
397 +function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
398 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
399 -c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var e=a.length,p=!1,g=0;0<=--e;){var h=8==d?a[e]&255:m(a,e);0>h?"-"==a.charAt(e)&&(p=!0):(p=!1,0==g?this.data[this.t++]=h:g+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-g)-1)<<g,this.data[this.t++]=
400 -h>>this.DB-g):this.data[this.t-1]|=h<<g,g+=d,g>=this.DB&&(g-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<g&&(this.data[this.t-1]|=(1<<this.DB-g)-1<<g));this.clamp();p&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
401 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,e=(1<<d)-1,g=Math.floor(a/this.DB),p=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+g+1]=this.data[h]>>d|p,p=(this.data[h]&e)<<c;for(h=g-1;0<=h;--h)b.data[h]=0;b.data[g]=p;b.t=this.t+g+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,e=this.DB-d,g=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var p=
402 -c+1;p<this.t;++p)b.data[p-c-1]|=(this.data[p]&g)<<e,b.data[p-c]=this.data[p]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&g)<<e);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
403 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),e=a.abs(),g=d.t;for(b.t=g+e.t;0<=--g;)b.data[g]=0;for(g=0;g<e.t;++g)b.data[g+d.t]=d.am(0,e.data[g],b,g,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
404 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,g){var p=a.abs();if(!(0>=p.t)){var z=this.abs();if(z.t<p.t)null!=b&&b.fromInt(0),null!=g&&this.copyTo(g);else{null==g&&(g=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),z.lShiftTo(l,g)):(p.copyTo(k),z.copyTo(g));p=k.t;z=k.data[p-1];if(0!=z){var E=z*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),u=this.FV/E,E=(1<<this.F1)/E,y=1<<this.F2,r=g.t,x=r-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=g.compareTo(w)&&
405 -(g.data[g.t++]=1,g.subTo(w,g));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=g.data[--r]==z?this.DM:Math.floor(g.data[r]*u+(g.data[r-1]+y)*E);if((g.data[r]+=k.am(0,O,g,x,0,p))<O)for(k.dlShiftTo(x,w),g.subTo(w,g);g.data[r]<--O;)g.subTo(w,g)}null!=b&&(g.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));g.t=p;g.clamp();0<l&&g.rShiftTo(l,g);0>m&&c.ZERO.subTo(g,g)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
406 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var g=d(),p=d(),z=b.convert(this),k=h(a)-1;for(z.copyTo(g);0<=--k;)if(b.sqrTo(g,p),0<(a&1<<k))b.mulTo(p,z,g);else var m=g,g=p,p=m;return b.revert(g)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
399 +c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var g=a.length,e=!1,p=0;0<=--g;){var h=8==d?a[g]&255:m(a,g);0>h?"-"==a.charAt(g)&&(e=!0):(e=!1,0==p?this.data[this.t++]=h:p+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-p)-1)<<p,this.data[this.t++]=
400 +h>>this.DB-p):this.data[this.t-1]|=h<<p,p+=d,p>=this.DB&&(p-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<p&&(this.data[this.t-1]|=(1<<this.DB-p)-1<<p));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
401 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,g=(1<<d)-1,p=Math.floor(a/this.DB),e=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+p+1]=this.data[h]>>d|e,e=(this.data[h]&g)<<c;for(h=p-1;0<=h;--h)b.data[h]=0;b.data[p]=e;b.t=this.t+p+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,g=this.DB-d,p=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var e=
402 +c+1;e<this.t;++e)b.data[e-c-1]|=(this.data[e]&p)<<g,b.data[e-c]=this.data[e]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&p)<<g);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,g=Math.min(a.t,this.t);c<g;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
403 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),g=a.abs(),e=d.t;for(b.t=e+g.t;0<=--e;)b.data[e]=0;for(e=0;e<g.t;++e)b.data[e+d.t]=d.am(0,g.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
404 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,e){var p=a.abs();if(!(0>=p.t)){var y=this.abs();if(y.t<p.t)null!=b&&b.fromInt(0),null!=e&&this.copyTo(e);else{null==e&&(e=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),y.lShiftTo(l,e)):(p.copyTo(k),y.copyTo(e));p=k.t;y=k.data[p-1];if(0!=y){var E=y*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),q=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=e.t,x=u-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=e.compareTo(w)&&
405 +(e.data[e.t++]=1,e.subTo(w,e));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=e.data[--u]==y?this.DM:Math.floor(e.data[u]*q+(e.data[u-1]+A)*E);if((e.data[u]+=k.am(0,O,e,x,0,p))<O)for(k.dlShiftTo(x,w),e.subTo(w,e);e.data[u]<--O;)e.subTo(w,e)}null!=b&&(e.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));e.t=p;e.clamp();0<l&&e.rShiftTo(l,e);0>m&&c.ZERO.subTo(e,e)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
406 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var e=d(),p=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(e);0<=--k;)if(b.sqrTo(e,p),0<(a&1<<k))b.mulTo(p,y,e);else var l=e,e=p,p=l;return b.revert(e)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
407 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 b=(1<<a)-1,c,d=!1,e="",g=this.t,p=this.DB-g*this.DB%a;if(0<g--)for(p<this.DB&&0<(c=this.data[g]>>p)&&(d=!0,e="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=g;)p<a?(c=(this.data[g]&(1<<p)-1)<<a-p,c|=this.data[--g]>>(p+=this.DB-a)):(c=this.data[g]>>(p-=a)&b,0>=p&&(p+=this.DB,--g)),0<c&&(d=!0),d&&(e+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?e:"0"};c.prototype.negate=function(){var a=
408 d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
409 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new r(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=z;R.prototype.revert=z;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
409 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
410 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)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var T=[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,
411 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],P=67108864/T[T.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
412 -b),c=k(b),g=d(),p=d(),h="";for(this.divRemTo(c,g,p);0<g.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,g.divRemTo(c,g,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,z=0;z<a.length;++z){var k=m(a,z);0>k?"-"==a.charAt(z)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
412 +b),c=k(b),e=d(),p=d(),h="";for(this.divRemTo(c,e,p);0<e.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,e.divRemTo(c,e,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
413 this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var e=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<e?d[0]&(1<<e)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,e,g=Math.min(a.t,this.t);for(d=
414 0;d<g;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){e=a.s&this.DM;for(d=g;d<this.t;++d)c.data[d]=b(this.data[d],e);c.t=this.t}else{e=this.s&this.DM;for(d=g;d<a.t;++d)c.data[d]=b(e,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
415 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
416 0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var e;for(e=c.t-this.t;d<e;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(e=Math.min(a.t,b);d<e;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
417 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var z=1;z++<d&&0!=
417 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var y=1;y++<d&&0!=
418 p.compareTo(b);)if(p=p.modPowInt(2,this),0==p.compareTo(c.ONE))return!1;if(0!=p.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.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]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
419 function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,e=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[e++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==e&&
420 -(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,A,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
421 -y,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
420 +(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
421 +A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
422 0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,e=0;0!=d;)d&=d-1,++e;a+=e}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
423 -y)};c.prototype.flipBit=function(a){return this.changeBit(a,A)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
424 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),g,p=k(1),z;if(0>=c)return p;g=18>c?1:48>c?3:144>c?4:768>c?5:6;z=8>c?new r(b):b.isEven()?new E(b):new v(b);var m=[],l=3,q=g-1,u=(1<<g)-1;m[1]=z.convert(this);if(1<g)for(c=d(),z.sqrTo(m[1],c);l<=u;)m[l]=d(),z.mulTo(c,m[l-2],m[l]),l+=2;for(var y=a.t-1,x,w=!0,O=d(),c=h(a.data[y])-1;0<=y;){c>=q?x=a.data[y]>>c-q&u:(x=(a.data[y]&(1<<c+1)-1)<<q-c,0<y&&(x|=a.data[y-1]>>this.DB+c-q));for(l=g;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--y);
425 -if(w)m[x].copyTo(p),w=!1;else{for(;1<l;)z.sqrTo(p,O),z.sqrTo(O,p),l-=2;0<l?z.sqrTo(p,O):(l=p,p=O,O=l);z.mulTo(O,m[x],p)}for(;0<=y&&0==(a.data[y]&1<<c);)z.sqrTo(p,O),l=p,p=O,O=l,0>--c&&(c=this.DB-1,--y)}return z.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),g=k(1),p=k(0),h=k(0),z=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(g.isEven()&&p.isEven()||(g.addTo(this,g),p.subTo(a,p)),g.rShiftTo(1,
426 -g)):p.isEven()||p.subTo(a,p),p.rShiftTo(1,p);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&z.isEven()||(h.addTo(this,h),z.subTo(a,z)),h.rShiftTo(1,h)):z.isEven()||z.subTo(a,z),z.rShiftTo(1,z);0<=d.compareTo(e)?(d.subTo(e,d),b&&g.subTo(h,g),p.subTo(z,p)):(e.subTo(d,e),b&&h.subTo(g,h),z.subTo(p,z))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=z.compareTo(a))return z.subtract(a);if(0>z.signum())z.addTo(a,z);else return z;return 0>z.signum()?z.add(a):z};c.prototype.pow=function(a){return this.exp(a,
423 +A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
424 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),e,p=k(1),y;if(0>=c)return p;e=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var l=[],m=3,r=e-1,q=(1<<e)-1;l[1]=y.convert(this);if(1<e)for(c=d(),y.sqrTo(l[1],c);m<=q;)l[m]=d(),y.mulTo(c,l[m-2],l[m]),m+=2;for(var A=a.t-1,x,w=!0,O=d(),c=h(a.data[A])-1;0<=A;){c>=r?x=a.data[A]>>c-r&q:(x=(a.data[A]&(1<<c+1)-1)<<r-c,0<A&&(x|=a.data[A-1]>>this.DB+c-r));for(m=e;0==(x&1);)x>>=1,--m;0>(c-=m)&&(c+=this.DB,--A);
425 +if(w)l[x].copyTo(p),w=!1;else{for(;1<m;)y.sqrTo(p,O),y.sqrTo(O,p),m-=2;0<m?y.sqrTo(p,O):(m=p,p=O,O=m);y.mulTo(O,l[x],p)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(p,O),m=p,p=O,O=m,0>--c&&(c=this.DB-1,--A)}return y.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),p=k(1),g=k(0),h=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(p.isEven()&&g.isEven()||(p.addTo(this,p),g.subTo(a,g)),p.rShiftTo(1,
426 +p)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&y.isEven()||(h.addTo(this,h),y.subTo(a,y)),h.rShiftTo(1,h)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(e)?(d.subTo(e,d),b&&p.subTo(h,p),g.subTo(y,g)):(e.subTo(d,e),b&&h.subTo(p,h),y.subTo(g,y))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
427 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
428 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
429 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<g.length;++l)g[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
428 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
429 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<e.length;++l)e[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
430 0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var l=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+l);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
431 v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
432 v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
433 2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
434 -0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs1}},
435 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?g(a,b,p,h):d(a,b,p,h)}function d(b,c,g,k){var m=l(b,c),z=0,q=n(m.bitLength());"millerRabinTests"in
436 -g&&(q=g.millerRabinTests);var r=10;"maxBlockTime"in g&&(r=g.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(q))return k(null,m);m.dAddOffset(h[z++%8],0)}while(0>r||+new Date-v<r);a.util.setImmediate(function(){d(b,c,g,k)})}function g(b,c,h,m){function q(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}z.bitLength()>b&&(z=l(b,c));h=z.toString(16);e.target.postMessage({hex:h,workLoad:r});
437 -z.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var z=l(b,c),E=h.workers,r=h.workLoad||100,n=30*r/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;q()});q()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(r).byteValue(),0);return c}
438 -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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],r=new k(null);r.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
439 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
440 -0;l<g.length;++l)g[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
434 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
435 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?e(a,b,p,h):d(a,b,p,h)}function d(b,c,e,k){var m=l(b,c),y=0,r=n(m.bitLength());"millerRabinTests"in
436 +e&&(r=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(r))return k(null,m);m.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,m){function r(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}y.bitLength()>b&&(y=l(b,c));h=y.toString(16);e.target.postMessage({hex:h,workLoad:u});
437 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;r()});r()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
438 +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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
439 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
440 +0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
441 Error("Message is too long for PKCS#1 v1.5 padding."),g.length=b.length,g.max=d-11,g;g.putByte(0);g.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var h=0;h<d;++h)g.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),h=0;h<d;++h)e=l.charCodeAt(h),0===e?++k:g.putByte(e);d=k}g.putByte(0);g.putBytes(b);return g}function d(b,c,e,g){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var h=b.getByte(),k=b.getByte();if(0!==h||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
442 -typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function g(b,c,d){function e(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
443 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var g=b.p;b.p=b.q;b.q=g}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,e()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,e()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
444 -(g=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,g,b.p,b.q,g.mod(b.p1),g.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);e()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
445 -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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,r=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
442 +typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
443 +b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,r,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
444 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var r={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(r.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
445 +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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
446 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},B={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
447 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
448 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
449 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},A=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
450 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},y=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
449 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
450 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
451 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
452 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
453 -b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,g,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
454 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,g).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,g):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
453 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
454 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,e):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
455 c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:g,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},g=+new Date,p,k=0;null===a.keys&&
456 -(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(r[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
456 +(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
457 null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(p=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,p,a.p,a.q,
458 p.mod(a.p1),p.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});p=+new Date;k+=p-g;g=p}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
459 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var e=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(e,0),e.keys;g(e,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,g){var l={n:b,e:g,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
459 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var g=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(g,0),g.keys;e(g,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
460 b,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+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
461 -l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,g,k,l,m,q,r){var x={n:b,e:c,d:g,p:k,q:l,dP:m,dQ:q,qInv:r,decrypt:function(b,c,g){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,g)}};else if(-1!==["RAW","NONE",
462 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:y},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
461 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,l,m,r,u){var x={n:b,e:c,d:e,p:k,q:l,dP:m,dQ:r,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
462 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
463 [k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,B,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
464 -c.errors=d,c;var e,g,l,q,y,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();y=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
465 -16),new m(e,16),new m(g,16),new m(l,16),new m(q,16),new m(y,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
466 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,A,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
464 +c.errors=d,c;var e,g,l,r,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();r=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
465 +16),new m(e,16),new m(g,16),new m(l,16),new m(r,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
466 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
467 c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
468 -!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||
469 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<g.length;++l)g[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
470 -b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var g=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encryptionOid"},
471 -{name:"AlgorithmIdentifier.parameters",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
472 -tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:g.Class.UNIVERSAL,
473 -type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"salt"},
474 -{name:"pkcs-12PbeParams.iterations",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var e=a.random.getBytesSync(d.saltSize),h=d.count,k=g.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var z,q;switch(d.algorithm){case "aes128":z=m=16;d=n["aes128-CBC"];q=a.aes.createEncryptionCipher;break;case "aes192":m=24;
475 -z=16;d=n["aes192-CBC"];q=a.aes.createEncryptionCipher;break;case "aes256":m=32;z=16;d=n["aes256-CBC"];q=a.aes.createEncryptionCipher;break;case "des":z=m=8;d=n.desCBC;q=a.des.createEncryptionCipher;break;default:throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;}var v=a.pkcs5.pbkdf2(c,e,h,m);c=a.random.getBytesSync(z);h=q(v);h.start(c);h.update(g.toDer(b));h.finish();b=h.output.getBytes();e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,
476 -g.Type.OID,!1,g.oidToDer(n.pkcs5PBES2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n.pkcs5PBKDF2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(d).getBytes()),g.create(g.Class.UNIVERSAL,
477 -g.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(e),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(g.toDer(b)),h.finish(),b=h.output.getBytes(),e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,
478 -!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]);else throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[e,g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,e={},h=[];if(!g.validate(b,m,e,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=g.derToOid(e.encryptionOid);
479 -h=l.pbe.getCipher(h,e.encryptionParams,c);e=a.util.createBuffer(e.encryptedData);h.update(e);h.finish()&&(d=g.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:g.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
480 -b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return g.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var e,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
481 -h=24;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
482 -e.substr(0,8),h);c=k(c);c.start(e);c.update(g.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(e).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,e=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==e.type&&"PRIVATE KEY"!==e.type&&"RSA PRIVATE KEY"!==e.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".'),
483 -d.headerType=d,d;if(e.procType&&"ENCRYPTED"===e.procType.type){var h,k;switch(e.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
484 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+e.dekInfo.algorithm+'".'),d.algorithm=e.dekInfo.algorithm,d;}var m=a.util.hexToBytes(e.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(e.body));if(k.finish())d=k.output.getBytes();else return d}else d=
485 -e.body;d="ENCRYPTED PRIVATE KEY"===e.type?l.decryptPrivateKeyInfo(g.fromDer(d),c):g.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,q=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var u=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,q);
486 -var C=q*Math.ceil(u/q);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%u));C=q*Math.ceil(b/q);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<q;l++)D.putByte(C.at(l%m));var Y=Math.ceil(u/q)+Math.ceil(b/q),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(q)),
468 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
469 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
470 +b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
471 +{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"}]},k={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",
472 +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,
473 +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"}]}]},h={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"},
474 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var g=a.random.getBytesSync(d.saltSize),h=d.count,k=e.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,r;switch(d.algorithm){case "aes128":y=m=16;d=n["aes128-CBC"];r=a.aes.createEncryptionCipher;break;case "aes192":m=24;
475 +y=16;d=n["aes192-CBC"];r=a.aes.createEncryptionCipher;break;case "aes256":m=32;y=16;d=n["aes256-CBC"];r=a.aes.createEncryptionCipher;break;case "des":y=m=8;d=n.desCBC;r=a.des.createEncryptionCipher;break;default:throw g=Error("Cannot encrypt private key. Unknown encryption algorithm."),g.algorithm=d.algorithm,g;}var v=a.pkcs5.pbkdf2(c,g,h,m);c=a.random.getBytesSync(y);h=r(v);h.start(c);h.update(e.toDer(b));h.finish();b=h.output.getBytes();g=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
476 +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,
477 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(g),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(e.toDer(b)),h.finish(),b=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,
478 +!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,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,g={},h=[];if(!e.validate(b,m,g,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=e.derToOid(g.encryptionOid);
479 +h=l.pbe.getCipher(h,g.encryptionParams,c);g=a.util.createBuffer(g.encryptedData);h.update(g);h.finish()&&(d=e.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
480 +b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var g,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
481 +h=24;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
482 +g.substr(0,8),h);c=k(c);c.start(g);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(g).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,g=a.pem.decode(b)[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".'),
483 +d.headerType=d,d;if(g.procType&&"ENCRYPTED"===g.procType.type){var h,k;switch(g.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
484 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+g.dekInfo.algorithm+'".'),d.algorithm=g.dekInfo.algorithm,d;}var m=a.util.hexToBytes(g.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(g.body));if(k.finish())d=k.output.getBytes();else return d}else d=
485 +g.body;d="ENCRYPTED PRIVATE KEY"===g.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,r=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var q=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,r);
486 +var C=r*Math.ceil(q/r);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%q));C=r*Math.ceil(b/r);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<r;l++)D.putByte(C.at(l%m));var Y=Math.ceil(q/r)+Math.ceil(b/r),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(r)),
487 V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);L.putBuffer(ea)}v=L;n.putBuffer(C)}n.truncate(n.length()-g);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
488 -"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var e={};b=[];if(!g.validate(c,k,e,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=g.derToOid(e.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=g.derToOid(e.encOid);if(b!==l.oids["aes128-CBC"]&&
489 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=e.kdfSalt;var m=a.util.createBuffer(e.kdfIterationCount),m=m.getInt(m.length()<<3),q;switch(l.oids[b]){case "aes128-CBC":q=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":q=24;h=a.aes.createDecryptionCipher;break;
490 -case "aes256-CBC":q=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":q=24;h=a.des.createDecryptionCipher;break;case "desCBC":q=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,q);e=e.encIv;h=h(b);h.start(e);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var e={},k=[];if(!g.validate(c,h,e,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(e.salt),e=a.util.createBuffer(e.iterations),
491 -e=e.getInt(e.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,e,m);d=l.pbe.generatePkcs12Key(d,k,2,e,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
492 -typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
493 -0;l<g.length;++l)g[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
494 -a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var g={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
488 +"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var g={};b=[];if(!e.validate(c,k,g,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=e.derToOid(g.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=e.derToOid(g.encOid);if(b!==l.oids["aes128-CBC"]&&
489 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=g.kdfSalt;var m=a.util.createBuffer(g.kdfIterationCount),m=m.getInt(m.length()<<3),r;switch(l.oids[b]){case "aes128-CBC":r=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":r=24;h=a.aes.createDecryptionCipher;break;
490 +case "aes256-CBC":r=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":r=24;h=a.des.createDecryptionCipher;break;case "desCBC":r=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,r);g=g.encIv;h=h(b);h.start(g);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
491 +g=g.getInt(g.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,g,m);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
492 +typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
493 +0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
494 +a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
495 tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",
496 -tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(g)};d.encryptedDataValidator={name:"EncryptedData",
497 -tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(g)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
496 +tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(e)};d.encryptedDataValidator={name:"EncryptedData",
497 +tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(e)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
498 captureAsn1:"digestAlgorithms"},a,{name:"SignedData.Certificates",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,capture:"signerInfos",optional:!0,value:[{name:"SignerInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:c.Class.UNIVERSAL,
499 type:c.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
500 value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,
501 constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]}]}]};d.recipientInfoValidator={name:"RecipientInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,
502 constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
503 -value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
504 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
505 -["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var g=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());g.putBuffer(b.digest())}g.truncate(g.length()-d);return g.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
506 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
507 -Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
508 -{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
509 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,g=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,x=Math.ceil(v/8),A=b.digest().getBytes();
510 -if(x<g+m+2)throw Error("Message is too long to encrypt.");var y;y=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(A);n.putBytes(y);c.start();c.update(n.getBytes());A=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-g-2);n.putByte(1);n.putBytes(y);var R=n.getBytes(),z=x-g-1,E=d.generate(A,z);y="";for(n=0;n<z;n++)y+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;y=String.fromCharCode(y.charCodeAt(0)&~v)+y.substr(1);
511 -return y+A+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<g+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-g-1,v=k.substr(0,n);k=k.substr(n,g);var y=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&y))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),z="";for(q=0;q<n;q++)z+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
512 -z=String.fromCharCode(z.charCodeAt(0)&~y)+z.substr(1);l=l-g-m-2;for(q=0;q<l;q++)if(0!==z.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==z.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=z.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,
513 -module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
503 +value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
504 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
505 +["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var e=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());e.putBuffer(b.digest())}e.truncate(e.length()-d);return e.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
506 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
507 +Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
508 +{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
509 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,r){var n,v=r-1,x=Math.ceil(v/8),z=b.digest().getBytes();
510 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
511 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var r;r=l-1;l=Math.ceil(r/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-r&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(r=0;r<n;r++)y+=String.fromCharCode(v.charCodeAt(r)^R.charCodeAt(r));
512 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(r=0;r<l;r++)if(0!==y.charCodeAt(r))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
513 +module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
514 ["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
515 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function g(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
516 -v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===r.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
515 +var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
516 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
517 typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
518 (e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
519 -"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in r?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
519 +"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
520 d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
521 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
522 -d.extension=b,d;return b}function n(a,b){switch(a){case r["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
522 +d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
523 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
524 !1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
525 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},r=h.oids,v={};v.CN=r.commonName;v.commonName="CN";v.C=r.countryName;v.countryName="C";v.L=r.localityName;v.localityName="L";v.ST=r.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=r.organizationName;v.organizationName="O";v.OU=r.organizationalUnitName;v.organizationalUnitName="OU";v.E=r.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
525 +h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
526 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
527 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
528 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
529 {name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},B,{name:"Certificate.TBSCertificate.issuerUniqueID",
530 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
531 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
532 -{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},A={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
532 +{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
533 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
534 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
535 -tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},y={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
535 +tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
536 tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},B,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
537 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
538 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in r&&(g.name=r[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
539 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in r&&(p.name=r[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===r.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==r["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:r.sha1},mgf:{algorithmOid:r.mgf1,hash:{algorithmOid:r.sha1}},
540 -saltLength:20});c={};a=[];if(!k.validate(b,A,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
538 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
539 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
540 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
541 b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
542 return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
543 body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
544 break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
545 c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
546 -null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){g([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){g(a);
547 -b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){g(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
548 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
549 -e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in r)switch(r[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
550 -e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case r.sha1WithRSAEncryption:l=void 0;break;case r["RSASSA-PSS"]:d=r[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=r[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
551 -e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=r[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
552 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=r.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
553 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,x,e,l))throw e=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),e.errors=l,e;if("string"!==typeof e.certSignature){for(var l="\x00",m=0;m<e.certSignature.length;++m)l+=k.toDer(e.certSignature[m]).getBytes();e.certSignature=l}var l=k.derToOid(e.publicKeyOid),y=h.createCertificate();y.version=e.certVersion?e.certVersion.charCodeAt(0):
554 -0;m=a.util.createBuffer(e.certSerialNumber);y.serialNumber=m.toHex();y.signatureOid=a.asn1.derToOid(e.certSignatureOid);y.signatureParameters=R(y.signatureOid,e.certSignatureParams,!0);y.siginfo.algorithmOid=a.asn1.derToOid(e.certinfoSignatureOid);y.siginfo.parameters=R(y.siginfo.algorithmOid,e.certinfoSignatureParams,!1);m=a.util.createBuffer(e.certSignature);++m.read;y.signature=m.getBytes();m=[];void 0!==e.certValidity1UTCTime&&m.push(k.utcTimeToDate(e.certValidity1UTCTime));void 0!==e.certValidity2GeneralizedTime&&
555 -m.push(k.generalizedTimeToDate(e.certValidity2GeneralizedTime));void 0!==e.certValidity3UTCTime&&m.push(k.utcTimeToDate(e.certValidity3UTCTime));void 0!==e.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(e.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
556 -y.validity.notBefore=m[0];y.validity.notAfter=m[1];y.tbsCertificate=e.tbsCertificate;if(d){y.md=null;if(y.signatureOid in r)switch(l=r[y.signatureOid],l){case "sha1WithRSAEncryption":y.md=a.md.sha1.create();break;case "md5WithRSAEncryption":y.md=a.md.md5.create();break;case "sha256WithRSAEncryption":y.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":y.md=a.md.sha512.create();break;case "RSASSA-PSS":y.md=a.md.sha256.create()}if(null===y.md)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
557 -e.signatureOid=y.signatureOid,e;m=k.toDer(y.tbsCertificate);y.md.update(m.getBytes())}m=a.md.sha1.create();y.issuer.getField=function(a){return c(y.issuer,a)};y.issuer.addField=function(a){g([a]);y.issuer.attributes.push(a)};y.issuer.attributes=h.RDNAttributesAsArray(e.certIssuer,m);e.certIssuerUniqueId&&(y.issuer.uniqueId=e.certIssuerUniqueId);y.issuer.hash=m.digest().toHex();m=a.md.sha1.create();y.subject.getField=function(a){return c(y.subject,a)};y.subject.addField=function(a){g([a]);y.subject.attributes.push(a)};
558 -y.subject.attributes=h.RDNAttributesAsArray(e.certSubject,m);e.certSubjectUniqueId&&(y.subject.uniqueId=e.certSubjectUniqueId);y.subject.hash=m.digest().toHex();y.extensions=e.certExtensions?h.certificateExtensionsFromAsn1(e.certExtensions):[];l===h.oids.rsaEncryption&&(y.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo));return y};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
559 -return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in r)if(c.name=r[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
546 +null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
547 +b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
548 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
549 +e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
550 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
551 +e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
552 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
553 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),q=h.createCertificate();q.version=g.certVersion?g.certVersion.charCodeAt(0):
554 +0;m=a.util.createBuffer(g.certSerialNumber);q.serialNumber=m.toHex();q.signatureOid=a.asn1.derToOid(g.certSignatureOid);q.signatureParameters=R(q.signatureOid,g.certSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;q.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
555 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
556 +q.validity.notBefore=m[0];q.validity.notAfter=m[1];q.tbsCertificate=g.tbsCertificate;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===q.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
557 +g.signatureOid=q.signatureOid,g;m=k.toDer(q.tbsCertificate);q.md.update(m.getBytes())}m=a.md.sha1.create();q.issuer.getField=function(a){return c(q.issuer,a)};q.issuer.addField=function(a){e([a]);q.issuer.attributes.push(a)};q.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(q.issuer.uniqueId=g.certIssuerUniqueId);q.issuer.hash=m.digest().toHex();m=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};
558 +q.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(q.subject.uniqueId=g.certSubjectUniqueId);q.subject.hash=m.digest().toHex();q.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return q};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
559 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
560 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
561 -k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in r?c[r[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
562 -g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,y,e,l))throw e=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),e.errors=l,e;if("string"!==typeof e.csrSignature){for(var l=
563 -"\x00",m=0;m<e.csrSignature.length;++m)l+=k.toDer(e.csrSignature[m]).getBytes();e.csrSignature=l}l=k.derToOid(e.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var u=h.createCertificationRequest();u.version=e.csrVersion?e.csrVersion.charCodeAt(0):0;u.signatureOid=a.asn1.derToOid(e.csrSignatureOid);u.signatureParameters=R(u.signatureOid,e.csrSignatureParams,!0);u.siginfo.algorithmOid=a.asn1.derToOid(e.csrSignatureOid);u.siginfo.parameters=R(u.siginfo.algorithmOid,
564 -e.csrSignatureParams,!1);l=a.util.createBuffer(e.csrSignature);++l.read;u.signature=l.getBytes();u.certificationRequestInfo=e.certificationRequestInfo;if(d){u.md=null;if(u.signatureOid in r)switch(l=r[u.signatureOid],l){case "sha1WithRSAEncryption":u.md=a.md.sha1.create();break;case "md5WithRSAEncryption":u.md=a.md.md5.create();break;case "sha256WithRSAEncryption":u.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":u.md=a.md.sha512.create();break;case "RSASSA-PSS":u.md=a.md.sha256.create()}if(null===
565 -u.md)throw e=Error("Could not compute certification request digest. Unknown signature OID."),e.signatureOid=u.signatureOid,e;l=k.toDer(u.certificationRequestInfo);u.md.update(l.getBytes())}l=a.md.sha1.create();u.subject.getField=function(a){return c(u.subject,a)};u.subject.addField=function(a){g([a]);u.subject.attributes.push(a)};u.subject.attributes=h.RDNAttributesAsArray(e.certificationRequestInfoSubject,l);u.subject.hash=l.digest().toHex();u.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo);
566 -u.getAttribute=function(a){return c(u,a)};u.addAttribute=function(a){g([a]);u.attributes.push(a)};u.attributes=h.CRIAttributesAsArray(e.certificationRequestInfoAttributes||[]);return u};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
567 -null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){g([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){g(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){g(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
568 -e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in r)switch(r[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
569 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case r["RSASSA-PSS"]:c=r[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=r[b.signatureParameters.mgf.algorithmOid];
570 -if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=r[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
561 +k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
562 +g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
563 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var q=h.createCertificationRequest();q.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;q.signatureOid=a.asn1.derToOid(g.csrSignatureOid);q.signatureParameters=R(q.signatureOid,g.csrSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,
564 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;q.signature=l.getBytes();q.certificationRequestInfo=g.certificationRequestInfo;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===
565 +q.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=q.signatureOid,g;l=k.toDer(q.certificationRequestInfo);q.md.update(l.getBytes())}l=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};q.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);q.subject.hash=l.digest().toHex();q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
566 +q.getAttribute=function(a){return c(q,a)};q.addAttribute=function(a){e([a]);q.attributes.push(a)};q.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return q};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
567 +null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
568 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
569 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
570 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
571 h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
572 k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
573 !1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
574 return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
575 return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
576 -h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return g.certs[b.hash]||
577 -null}var g={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in g.certs?(c=g.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):g.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
578 -for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)g.addCertificate(b[l]);return g};h.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"};
579 -h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var q=c.shift(),y=null,r=!1;if(g<q.validity.notBefore||g>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:g};if(null===k){y=c[0]||b.getIssuer(q);null===y&&q.isIssuer(q)&&(r=!0,y=q);if(y){var n=y;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){y=n.shift();
580 -try{x=y.verify(q)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||y&&!r||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&y&&!q.isIssuer(y)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<q.extensions.length;++x){var w=q.extensions[x];!w.critical||w.name in n||(k=
581 -{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||y&&!r)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
582 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
583 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
584 -c.defined.x509=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
585 -[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function g(b,c,h,q){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
586 -for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],r,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},u=null,u=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(u.tagClass!==m.Class.UNIVERSAL||u.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");u=d(u).value;break;case k.oids.encryptedData:var A=q,x={},B=[];if(!m.validate(u,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
587 -b.errors=B,b;u=m.derToOid(x.contentType);if(u!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=u,b;u=m.derToOid(x.encAlgorithm);u=k.pbe.getCipher(u,x.encParameter,A);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);u.update(x);if(!u.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");u=u.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
588 -l(u,h,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var q,r,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
589 -k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:q=A;r=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
590 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(x,q,g,h))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=h,a;r()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
591 -a.pkcs12||{},r={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
592 -r,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
576 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
577 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
578 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.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"};
579 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var r=c.shift(),A=null,u=!1;if(g<r.validity.notBefore||g>r.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:r.validity.notBefore,notAfter:r.validity.notAfter,now:g};if(null===k){A=c[0]||b.getIssuer(r);null===A&&r.isIssuer(r)&&(u=!0,A=r);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
580 +try{x=A.verify(r)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(r)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&A&&!r.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<r.extensions.length;++x){var w=r.extensions[x];!w.critical||w.name in n||(k=
581 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=r.getExtension("basicConstraints"),r=r.getExtension("keyUsage"),null!==r&&(r.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
582 +null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==r&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));r=null===k?!0:k.error;l=d?d(r,m,e):r;if(!0===l)k=null;else{!0===r&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
583 +if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
584 +c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
585 +[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,r){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
586 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},q=null,q=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(q.tagClass!==m.Class.UNIVERSAL||q.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");q=d(q).value;break;case k.oids.encryptedData:var z=r,x={},B=[];if(!m.validate(q,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
587 +b.errors=B,b;q=m.derToOid(x.contentType);if(q!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=q,b;q=m.derToOid(x.encAlgorithm);q=k.pbe.getCipher(q,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);q.update(x);if(!q.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");q=q.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
588 +l(q,h,r);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var r,u,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
589 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:r=z;u=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
590 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==r&&!m.validate(x,r,g,h))throw a=Error("Cannot read PKCS#12 "+r.name),a.errors=h,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
591 +a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
592 +u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
593 tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},B={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
594 value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
595 -capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},A={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
596 -h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var r={};if(!m.validate(b,v,r,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:r.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
597 -(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==r.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=r.version.charCodeAt(0),l;if(m.derToOid(r.contentType)!==k.oids.data)throw l=
598 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(r.contentType),l;b=r.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(r.mac){var w=null,A=0,u=m.derToOid(r.macAlgorithm);switch(u){case k.oids.sha1:w=a.md.sha1.create();A=20;break;case k.oids.sha256:w=a.md.sha256.create();A=32;break;case k.oids.sha384:w=a.md.sha384.create();A=48;break;case k.oids.sha512:w=a.md.sha512.create();
599 -A=64;break;case k.oids.md5:w=a.md.md5.create(),A=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+u);var u=new a.util.ByteBuffer(r.macSalt),B="macIterations"in r?parseInt(a.util.bytesToHex(r.macIterations),16):1,A=h.generateKey(n,u,3,B,A,w),u=a.hmac.create();u.start(w,A);u.update(b.value);if(u.getMac().getBytes()!==r.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}g(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
600 -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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(q)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);q=[];null!==
601 -g&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
602 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));g=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],n=0;n<q.length;++n){c=q[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
603 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
595 +capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
596 +h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
597 +(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
598 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var w=null,z=0,q=m.derToOid(u.macAlgorithm);switch(q){case k.oids.sha1:w=a.md.sha1.create();z=20;break;case k.oids.sha256:w=a.md.sha256.create();z=32;break;case k.oids.sha384:w=a.md.sha384.create();z=48;break;case k.oids.sha512:w=a.md.sha512.create();
599 +z=64;break;case k.oids.md5:w=a.md.md5.create(),z=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+q);var q=new a.util.ByteBuffer(u.macSalt),B="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,z=h.generateKey(n,q,3,B,z,w),q=a.hmac.create();q.start(w,z);q.update(b.value);if(q.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
600 +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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var r=a.util.isArray(c)?c[0]:c;"string"===typeof r&&(r=k.certificateFromPem(r));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(r)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);r=[];null!==
601 +g&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
602 +0<r.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,r));g=[];r=[];null!==c&&(r=a.util.isArray(c)?c:[c]);for(var u=[],n=0;n<r.length;++n){c=r[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
603 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);u.push(c)}0<u.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,u),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
604 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
605 [m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var v;e.useMac&&(g=a.md.sha1.create(),v=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,v,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),v=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
606 !0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,v.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
607 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
608 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
609 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var g=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
610 -g.headerType=b.type;throw g;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,g){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:g})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
611 -typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
607 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
608 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
609 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
610 +e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
611 +typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
612 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var g=a.util.createBuffer(),h=b.length>>1,l=h+(b.length&1),k=b.substr(0,l),l=b.substr(h,l);b=a.util.createBuffer();h=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);h.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
613 -for(var q=0;q<m;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
614 -a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},g=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
613 +for(var r=0;r<m;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(r=0;r<c;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
614 +a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
615 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
616 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
617 certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};m.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};m.CipherSuites={};m.getCipherSuite=function(a){var b=null,c;for(c in m.CipherSuites){var d=m.CipherSuites[c];if(d.id[0]===a.charCodeAt(0)&&d.id[1]===a.charCodeAt(1)){b=d;break}}return b};
@@ -622,41 +622,41 @@ send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protoco
622 b.session.compressionMethod=g?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.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,
623 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
624 (a.expect=B,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
625 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:z,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
625 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
626 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
627 !1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
628 -l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:z:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:z)):b.error(b,{message:e?"No server certificate provided.":
629 -"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=r;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
628 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
629 +"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
630 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
631 try{var g=b.session.sp;g.pre_master_secret=d.decrypt(c);var h=b.session.clientHelloVersion;if(h.major!==g.pre_master_secret.charCodeAt(0)||h.minor!==g.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){g.pre_master_secret=a.random.getBytes(48)}b.expect=O;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
632 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
633 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(g){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=O;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
634 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
635 -return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=y;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
635 +return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
636 data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=B;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
637 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:H;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var g=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
638 e.putBuffer(b.session.sha1.digest());var h=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,h?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(g);b.session.sha1.update(g);if(b.session.resuming&&h||!b.session.resuming&&!h)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
639 -data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?A:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
639 +data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?z:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
640 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
641 "Bad certificate.";break;case m.Alert.Description.unsupported_certificate:d="Unsupported certificate.";break;case m.Alert.Description.certificate_revoked:d="Certificate revoked.";break;case m.Alert.Description.certificate_expired:d="Certificate expired.";break;case m.Alert.Description.certificate_unknown:d="Certificate unknown.";break;case m.Alert.Description.illegal_parameter:d="Illegal parameter.";break;case m.Alert.Description.unknown_ca:d="Unknown certificate authority.";break;case m.Alert.Description.access_denied:d=
642 "Access denied.";break;case m.Alert.Description.decode_error:d="Decode error.";break;case m.Alert.Description.decrypt_error:d="Decrypt error.";break;case m.Alert.Description.export_restriction:d="Export restriction.";break;case m.Alert.Description.protocol_version:d="Unsupported protocol version.";break;case m.Alert.Description.insufficient_security:d="Insufficient security.";break;case m.Alert.Description.internal_error:d="Internal error.";break;case m.Alert.Description.user_canceled:d="User canceled.";
643 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt24();if(g>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var h=d.bytes(g+
644 4);d.read+=4;e in J[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(h),b.session.sha1.update(h)),J[b.entity][b.expect][e](b,c,g)):
645 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt16(),d=d.getBytes(g);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||g>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
646 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,r=3,v=4,B=5,x=6,A=7,y=8,R=1,z=2,E=3,O=4,H=5,N=6,u=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];ea[m.ConnectionEnd.server]=[[u,P,F,u,L],[u,
647 -P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[u,u,m.handleServerHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,P,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,L,u,u,u,u,u,u],
648 -[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];J[m.ConnectionEnd.server]=[[u,m.handleClientHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,P,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleClientKeyExchange,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleCertificateVerify,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,
649 -u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
646 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,B=5,x=6,z=7,A=8,R=1,y=2,E=3,O=4,H=5,N=6,q=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];ea[m.ConnectionEnd.server]=[[q,P,F,q,L],[q,
647 +P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[q,q,m.handleServerHello,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,P,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,L,q,q,q,q,q,q],
648 +[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q]];J[m.ConnectionEnd.server]=[[q,m.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,P,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.handleClientKeyExchange,q,q,q,q],[q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,m.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,
649 +q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[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]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
650 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};g&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
651 cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
652 a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
653 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=g;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
653 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
654 }return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
655 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
656 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
655 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var r=a.util.createBuffer();
656 +n(r,2,k);n(l,2,r);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
657 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var g=
658 -null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(q.bytes(),!1));
659 -var y=a.util.createBuffer();n(y,3,q);e.putBuffer(y)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
658 +null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var r=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(r.bytes(),!1));
659 +var u=a.util.createBuffer();n(u,3,r);e.putBuffer(u)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(q){return b.error(b,{message:"Could not send certificate list.",cause:q,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
660 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
661 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(g){b.error(b,{message:"Could not get private key.",cause:g,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
662 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var g=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(g))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -678,199 +678,199 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_versio
678 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_message}})),c.record.ready=!0));c=b}if(!h.fail&&null!==h.record&&h.record.ready)if(b=h.record,d=b.type-m.ContentType.change_cipher_spec,e=ea[h.entity][h.expect],d in e)e[d](h,b);else m.handleUnexpected(h,b)}return c};h.prepare=function(b){m.queue(h,m.createRecord(h,{type:m.ContentType.application_data,data:a.util.createBuffer(b)}));return m.flush(h)};h.prepareHeartbeatRequest=function(b,c){b instanceof a.util.ByteBuffer&&
679 (b=b.bytes());"undefined"===typeof c&&(c=b.length);h.expectedHeartbeatPayload=b;m.queue(h,m.createRecord(h,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_request,b,c)}));return m.flush(h)};h.close=function(a){if(!h.fail&&h.sessionCache&&h.session){var b={id:h.session.id,version:h.session.version,sp:h.session.sp};b.sp.keys=null;h.sessionCache.setSession(b.id,b)}if(h.open){h.open=!1;h.input.clear();if(h.isConnected||h.handshaking)h.isConnected=h.handshaking=!1,
680 m.queue(h,m.createAlert(h,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(h);h.closed(h)}h.reset(a)};return h};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
681 -return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<g.length;++l)g[l](c);return c.tls}},
682 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,g,l){g=g.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
683 -g?l.keys.server_write_key:l.keys.client_write_key),iv:g?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",g?l.keys.client_write_key:l.keys.server_write_key),iv:g?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var e=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
684 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(g)&&(b.fragment=k.output,b.length=b.fragment.length(),e=!0);return e}function g(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
685 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,q=a.random.getBytesSync(g),y=e.output.length();y>=g?(b.fragment=e.output.getBytes(y-g),q=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
686 -b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;y=a.hmac.create();y.start("SHA1",e);y.update(q);q=y.digest().getBytes();y.start(null,null);y.update(g);g=y.digest().getBytes();return q===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
681 +return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
682 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
683 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
684 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
685 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,r=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),r=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
686 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(r);r=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return r===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
687 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
688 -20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<g.length;++l)g[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
689 -typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
690 -a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
691 -function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<g.length;++l)g[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
692 -(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<q;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var g=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(g.getBytesSync(h)),
693 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));h-=q.length;0<h&&(q=a.util.fillString(String.fromCharCode(0),h)+q);h=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:h,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
694 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<g.length;++l)g[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
695 -"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],g=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var g=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):g<=c[m.level].index&&
688 +20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
689 +typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
690 +a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
691 +function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
692 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,r=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<r;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),r;do r=(new d(a.util.bytesToHex(e.getBytesSync(h)),
693 +16)).mod(c.n);while(r.equals(d.ZERO));r=a.util.hexToBytes(r.toString(16));h-=r.length;0<h&&(r=a.util.fillString(String.fromCharCode(0),h)+r);h=c.encrypt(r,"NONE");r=b.generate(r,l);return{encapsulation:h,key:r}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
694 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
695 +"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
696 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
697 a.log.logMessage({timestamp:new Date,level:b,category:c,message:d,arguments:e})}})(n[l]);a.log.makeLogger=function(b){b={flags:0,f:b};a.log.setLevel(b,"none");return b};a.log.setLevel=function(b,c){var d=!1;if(b&&!(b.flags&a.log.LEVEL_LOCKED))for(var e=0;e<a.log.levels.length;++e)if(c==a.log.levels[e]){b.level=c;d=!0;break}return d};a.log.lock=function(b,c){b.flags="undefined"===typeof c||c?b.flags|a.log.LEVEL_LOCKED:b.flags&~a.log.LEVEL_LOCKED};a.log.addLogger=function(a){d.push(a)};if("undefined"!==
698 -typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},g=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else g=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};g=a.log.makeLogger(g);a.log.setLevel(g,"debug");a.log.addLogger(g)}else console={log:function(){}};
699 -null!==g&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(g,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(g));a.log.consoleLogger=g}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
700 -c.defined.log=!0;for(var l=0;l<g.length;++l)g[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!r.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
701 -b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:r.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
702 -r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.encryptedContent.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]),r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function g(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
703 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.digestAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(r.create(r.Class.UNIVERSAL,
704 -r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.signatureAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]));c.value.push(r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=r.create(r.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
705 -r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?r.utcTimeToDate(e):r.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?r.create(r.Class.UNIVERSAL,r.Type.UTCTIME,!1,r.dateToUtcTime(e)):
706 -r.create(r.Class.UNIVERSAL,r.Type.GENERALIZEDTIME,!1,r.dateToGeneralizedTime(e))}return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[c])])}function m(b){return[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,
707 -r.Type.OCTETSTRING,!1,b.parameter.getBytes())]),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!r.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(r.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
708 -0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:r.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
698 +typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},e=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else e=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};e=a.log.makeLogger(e);a.log.setLevel(e,"debug");a.log.addLogger(e)}else console={log:function(){}};
699 +null!==e&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(e,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(e));a.log.consoleLogger=e}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
700 +c.defined.log=!0;for(var l=0;l<e.length;++l)e[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!u.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
701 +b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:u.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
702 +u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.encryptedContent.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]),u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function e(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
703 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.digestAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(u.create(u.Class.UNIVERSAL,
704 +u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.signatureAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]));c.value.push(u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=u.create(u.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
705 +u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?u.utcTimeToDate(e):u.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?u.create(u.Class.UNIVERSAL,u.Type.UTCTIME,!1,u.dateToUtcTime(e)):
706 +u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
707 +u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
708 +0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
709 c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
710 -break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var r=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
711 -b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=r.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:r.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!r.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=r.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
710 +break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
711 +b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
712 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
713 -c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
714 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.signerInfos));return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),
713 +c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
714 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
715 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
716 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
717 -signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(r.create(r.Class.CONTEXT_SPECIFIC,
718 -0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(g).getBytes()),r.create(r.Class.UNIVERSAL,
719 -r.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=r.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=r.toDer(d);h.getByte();r.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
720 -}else{e.authenticatedAttributesAsn1=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=r.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
716 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var r=c[m];if(!l&&r.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&r.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
717 +signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
718 +0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
719 +u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
720 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var r=e.authenticatedAttributes[m];r.type===a.pki.oids.messageDigest?r.value=c[e.digestAlgorithm].digest():r.type!==a.pki.oids.signingTime||r.value||(r.value=k);h.value.push(n(r));e.authenticatedAttributesAsn1.value.push(n(r))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
721 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
722 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,
723 -!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,g(b.recipients)),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
722 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
723 +!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
724 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
725 }h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
726 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
727 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
728 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
729 -Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function g(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
730 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=g(w.bytes()),b.truncate(b.length()-
731 -x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(g("\x00\x00\x00\x00",l)),x.putBuffer(g("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=g("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
732 -h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,g){g=g||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+g};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
733 -function(b,g){g=g||{};var l=g.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===g.encoding)return l=l.toHex(),g.delimiter?l.match(/.{2}/g).join(g.delimiter):l;if("binary"===g.encoding)return l.getBytes();if(g.encoding)throw Error('Unknown encoding "'+g.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
734 -(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<g.length;++l)g[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
735 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var g={};a.debug.set("forge.task","queues",g);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
728 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
729 +Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
730 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
731 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
732 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
733 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
734 +(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
735 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
736 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
737 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
738 -this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",g)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
738 +this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
739 (c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
740 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
741 this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
742 a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
743 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in g?0===g[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):g[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(g[b.type].shift(),0===g[b.type].length?delete g[b.type]:g[b.type][0].start()):a.log.error("forge.task",
744 -"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in g?g[a.type].push(b):(g[b.type]=[b],m(b))};a.task.cancel=function(a){a in g&&(g[a]=[g[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
745 -a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<g.length;++l)g[l](c);return c.task}},
746 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
747 -return}var g,v=function(a,b){b.exports=function(b){var c=g.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){g="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
743 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
744 +"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
745 +a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
746 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
747 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
748 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});
749 -function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var g=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),g=g.substring(0,g.length-24),v=0;v<c.length;v++)if(g===c[v].DERKey||g==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
750 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),g=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(g,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
751 -var e=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,e,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,g){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,g)}
752 -function amtcert_createCertificate(b,c,a,d,g){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
753 -value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==g?g={name:"extKeyUsage",serverAuth:!0}:g.name="extKeyUsage",
754 -n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},g,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
755 -function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,g=b.length;d<g;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
749 +function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),e=e.substring(0,e.length-24),v=0;v<c.length;v++)if(e===c[v].DERKey||e==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
750 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),r=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(r).getBytes();
751 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
752 +function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
753 +value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
754 +n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
755 +function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,e=b.length;d<e;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
756 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
757 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
758 -require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var g="";a.on("data",function(a){null!=g&&(g+=a.toString("binary"));5E5<g.length&&(g=null)});a.on("end",function(){certUrlCache[b]={data:btoa(g),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,g)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
759 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,e,k,m,q){var r=a[b++];q={};var u=0,B=0;if(0==r){if(2==h.bpp)for(e=0;e<m;e++)n(a[b++]+(a[b++]<<8),e);else for(e=0;e<m;e++)v(a[b++],e);g(h.spare,c,d)}else if(1==r)h.graymode?(r=a[b++],h.lowcolor&&(r<<=4),h.canvas.fillStyle="rgb("+r+","+r+","+r+")"):(r=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(r&224)+","+((r&28)<<3)+","+D((r&3)<<6):(r>>8&248)+","+(r>>3&252)+","+
760 -((r&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,e,k);else if(1<r&&17>r){k=4;B=15;if(2==h.bpp){for(e=0;e<r;e++)q[e]=a[b++]+(a[b++]<<8);2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)n(q[r>>e&B],u++)}else{for(e=0;e<r;e++)q[e]=a[b++];2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)v(q[r>>e&B],u++)}g(h.spare,c,d)}else if(128==r){if(2==h.bpp)for(;u<m&&b<a.byteLength;){r=a[b++]+(a[b++]<<8);B=1;do B+=e=a[b++];while(255==e);if(0==
761 -h.rotation)p(r,u,B),u+=B;else for(;0<=--B;)n(r,u++)}else for(;u<m&&b<a.byteLength;){r=a[b++];B=1;do B+=e=a[b++];while(255==e);if(0==h.rotation)l(r,u,B),u+=B;else for(;0<=--B;)v(r,u++)}g(h.spare,c,d)}else if(129<r){if(2==h.bpp)for(e=0;e<r-128;e++)q[e]=a[b++]+(a[b++]<<8);else for(e=0;e<r-128;e++)q[e]=a[b++];for(;u<m&&b<a.byteLength;){B=1;e=a[b++];r=q[e%128];if(127<e){do B+=e=a[b++];while(255==e)}if(0==h.rotation)2==h.bpp?p(r,u,B):l(r,u,B),u+=B;else if(2==h.bpp)for(;0<=--B;)n(r,u++);else for(;0<=--B;)v(r,
762 -u++)}g(h.spare,c,d)}}function g(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
758 +require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
759 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,r){var u=a[b++];r={};var q=0,B=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
760 +((u&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;B=15;if(2==h.bpp){for(g=0;g<u;g++)r[g]=a[b++]+(a[b++]<<8);2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(r[u>>g&B],q++)}else{for(g=0;g<u;g++)r[g]=a[b++];2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(r[u>>g&B],q++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;q<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);B=1;do B+=g=a[b++];while(255==g);if(0==
761 +h.rotation)p(u,q,B),q+=B;else for(;0<=--B;)n(u,q++)}else for(;q<m&&b<a.byteLength;){u=a[b++];B=1;do B+=g=a[b++];while(255==g);if(0==h.rotation)l(u,q,B),q+=B;else for(;0<=--B;)v(u,q++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)r[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)r[g]=a[b++];for(;q<m&&b<a.byteLength;){B=1;g=a[b++];u=r[g%128];if(127<g){do B+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?p(u,q,B):l(u,q,B),q+=B;else if(2==h.bpp)for(;0<=--B;)n(u,q++);else for(;0<=--B;)v(u,
762 +q++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
763 h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
764 b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
765 -1]=e,h.spare.data[b+2]=a,b+=4}function q(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function e(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
766 -2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):r[c.code];
767 -null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
768 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
769 -0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
770 -h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var e=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)e=12,h.state=1,h.parent&&delete h.parent.connectTime,
771 -h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)e=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){e=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;e=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
765 +1]=e,h.spare.data[b+2]=a,b+=4}function r(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
766 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];null!=c&&h.sendkey(c,
767 +a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);173==c&&(d=45);186==c&&
768 +(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=0;h.spareh2=0;
769 +h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=h.rwidth=
770 +h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
771 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
772 h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
773 0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
774 -50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);e=4;break;case 2:e=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)e=0;else if(b=l.getUint32(4)+8,c.byteLength<b)e=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
774 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
775 0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
776 -h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}e=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),e=l.getUint16(4),q=l.getUint16(6),p=e*q,r=l.getUint32(8);if(17>r){if(1>e||64<e||1>q||
777 -64<q)return console.log("Invalid tile size ("+e+","+q+"), disconnecting."),h.Stop();if(h.sparew!=e||h.spareh!=q){h.sparew=h.sparew2=e;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=e;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==r){h.canvas.canvas.width=h.rwidth=h.width=e;h.canvas.canvas.height=h.rheight=
778 -h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));e=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==r){r=12;e=12+p*h.bpp;if(h.acc.byteLength<e)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(r,!0),w),r+=2;else for(w=0;w<p;w++)v(h.acc[r++],w);g(h.spare,b,c)}else if(16==r){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
779 -16+w)break;r=16;if(5<w&&0==h.acc[r]&&l.getUint16(r+1,!0)==w-5)d(h.acc,r+5,b,c,e,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(r,r+w-0)))),0<l.length){for(var r=l,N=new Uint8Array(r.length),u=0,C=r.length;u<C;++u)N[u]=r.charCodeAt(u);d(N,0,b,c,e,q,p,l.length)}else console.log("Invalid deflate data");e=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==e)break;h.acc=e!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(e)):
776 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),r=l.getUint16(6),p=g*r,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>r||
777 +64<r)return console.log("Invalid tile size ("+g+","+r+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=r){h.sparew=h.sparew2=g;h.spareh=h.spareh2=r;if(1==h.rotation||3==h.rotation)h.sparew2=r,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
778 +h.height=r;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
779 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,r,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,N=new Uint8Array(u.length),q=0,C=u.length;q<C;++q)N[q]=u.charCodeAt(q);d(N,0,b,c,g,r,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
780 null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
781 function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
782 -h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,C(0,0),w(0,0));h.width=h.canvas.canvas.width;
783 -h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var r={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
783 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
784 NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
785 F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
786 h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
787 h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var K=!1,B=!1;h.GrabMouseInput=function(){if(1!=K){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;K=!0}};h.UnGrabMouseInput=function(){if(0!=K){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;K=!1}};h.GrabKeyInput=function(){1!=B&&(document.onkeyup=
788 h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,B=!0)};h.UnGrabKeyInput=function(){0!=B&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,B=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
789 0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){h.ReverseMouseWheel&&(b*=-1);var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/
790 -Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,g=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-g[0])*d;h.my=(event.pageY-g[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=q(h.mx,h.my),h.my=e(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
790 +Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=r(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
791 h.mNagleTimer=null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=
792 -0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;
793 -a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,g="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?g:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");
794 -a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&
795 -a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var g=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<g&&0!=a.State)for(a.PendingOperations.push([g,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];
796 -if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&
797 -255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),g=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),n=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,n,b,e,g,n,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);
798 -a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();
799 -if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,e=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,
800 -4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),e=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+
801 -q+" Y="+e);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,e);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,e);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,
802 -4));break;case 11:c=0;q={};e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<e)for(c=((b.charCodeAt(6+2*e)&255)<<8)+(b.charCodeAt(7+2*e)&255),n=0;n<e;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,
803 -4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);g=v[b];d&&(a.CanvasId.style.cursor=g)}return w+D}}};a.MouseButton=
804 -{NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,
805 -Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?
806 -d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,
807 -a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,
808 -67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,g;for(g in a.TouchArray)g==b?e=c:1==a.TouchArray[g].f?(e=65542,a.TouchArray[g].f=3):e=2==a.TouchArray[g].f?262144:131078,d+=String.fromCharCode(g)+a.intToStr(e)+a.shortToStr(a.TouchArray[g].x)+a.shortToStr(a.TouchArray[g].y),2==a.TouchArray[g].f&&
809 -delete a.TouchArray[g];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,g=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-g[0])*e,d=(c.pageY-
810 -g[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var n=g=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?g=a.MouseButton.LEFT:2==c.which?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT:c.button&&(0==c.button?g=a.MouseButton.LEFT:1==c.button?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?n=-120*c.detail:c.wheelDelta&&(n=3*c.wheelDelta));var v="",v=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,
811 -a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,n/256&255,n&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?g:2*g&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(v),a.Alternate=1):a.Alternate=0:a.send(v)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",
812 -b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,
813 -a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&
814 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&
815 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&
816 -(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&
817 -a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};
818 -a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,g=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]=
819 -{x:e,y:g});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
820 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<
821 -b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/
822 -a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=
823 -a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
824 -null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=
825 -null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;
826 -if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||
827 -3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,
828 -0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};
829 -a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;
830 -d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var g=new FileReader,v=!1,n=[];g.readAsBinaryString?g.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:g.readAsBinaryString(new Blob([n.shift()]))}:g.readAsArrayBuffer&&(g.onloadend=function(a){d.xxOnSocketData(a.target.result);
831 -0==n.length?v=!1:g.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(g.readAsBinaryString)v=!0,g.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,g.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=
832 -function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=
833 -a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");
834 -d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(u[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<
835 -b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){y[m][D]=a;A[m][D]=(e<<6)+(C<<12)+q}function g(){for(var a=(e<<6)+(C<<12)+q,b=D;b<l.width;b++)y[m][b]=" ",A[m][b]=a}function v(a){for(var b=(e<<6)+(C<<12)+q,c=0;c<l.width;c++)y[a][c]=" ",A[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)y[b]=y[b+a],A[b]=A[b+a];for(b=E[1]-a+1;b<=
836 -E[1];b++)for(y[b]=[],A[b]=[],a=0;a<l.width;a++)y[b][a]=" ",A[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,e=7,C=0,w=!0,D=0,m=0,k=0,h=0,r=0,K=[],B=0,x=0,A=[],y=[],R=!1,z=!0,E,O=!1,H=[],
837 -N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){y[c]=[];A[c]=[];for(var d=0;d<l.width;d++)y[c][d]=" ",A[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=
838 -decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(r){case 0:switch(n){case 27:r=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":r=2;break;case "(":r=4;break;case ")":r=5;break;case "]":r=6;break;case "=":O=!0;r=0;break;case ">":O=!1;r=0;break;case "7":k=D;h=m;r=0;break;case "8":D=k;m=h;r=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var u=0;u<l.width;u++)y[n][u]=y[n-1][u],A[n][u]=A[n-1][u];for(n=
839 -E[0]+1-1;n>E[0]-1;n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;r=0;break;default:console.log("unknown terminal short code",p),r=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,u=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(z=!1);break;case "h":25==n[0]&&(z=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==u&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==
840 -u&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==u&&(0==n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==u&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==u&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==u&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==u&&(p=n[0]);for(J=D;J<l.width-p;J++)y[m][J]=y[m][J+p],A[m][J]=A[m][J+p];for(J=l.width-p;J<l.width;J++)y[m][J]=" ",A[m][J]=448;break;case "L":J=1;1==u&&(J=n[0]);0==J&&(J=1);
841 -for(n=E[1];n>=m+J;n--)y[n]=y[n-J],A[n]=A[n-J];for(n=m;n<m+J;n++)for(y[n]=[],A[n]=[],p=0;p<l.width;p++)y[n][p]=" ",A[n][p]=448;break;case "J":if(1==u&&2==n[0])l.TermClear((C<<12)+(e<<6)),m=D=0,H=[];else if(0==u||1==u&&0==n[0])for(g(),J=m+1;J<l.height;J++)v(J);else if(1==u&&1==n[0])for(g(),J=0;J<m-1;J++)v(J);break;case "H":2==u?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<u;J++)n[J]&&0!=n[J]?1==n[J]?
842 -8>e&&(e+=8):2==n[J]||22==n[J]?8<=e&&(e-=8):7==n[J]?q=2:27==n[J]?q=0:30<=n[J]&&37>=n[J]?(p=8<=e,e=n[J]-30,p&&8>=e&&(e+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?e=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,e=7,q=0);break;case "K":if(0!=u&&(1!=u||n[0]&&0!=n[0])){if(1==u)if(1==n[0])for(n=(e<<6)+(C<<12)+q,u=0;u<D;u++)y[m][u]=" ",A[m][u]=n;else 2==n[0]&&v(m)}else g();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==u&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-
843 -1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=E[1]);break;case "S":p=1;1==u&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "M":p=1;1==u&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "T":p=1;1==u&&(p=n[0]);for(n=E[1];n>E[0]+
844 -p;n--)for(u=0;u<l.width;u++)y[n][u]=y[n-p][u],A[n][u]=A[n-p][u];for(n=E[0]+p;n>E[0];n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "X":p=1;J=D;R=m;for(1==u&&(p=n[0]);0<p&&R<l.height;)y[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}r=0}break;case 4:r=0;break;case 5:r=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(u=parseInt(n[0]),(0==u||2==u)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,
845 -l.title=n[1]);r=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var u=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
846 -9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,
847 -9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)y[b][c]=" ",A[b][c]=a;H=[]};l.TermResetScreen=function(){q=0;e=7;C=0;w=z=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);
848 -N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};
849 -l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,
850 -79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,
851 -91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;
852 -var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
853 -a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=A[b][h],D==h&&m==b&&z&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=y[b][h],d){case "&":a+="&amp;";
792 +0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=
793 +700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
794 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
795 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
796 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
797 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
798 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
799 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,r=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
800 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),r=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+r+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
801 +a.ProcessPictureMsg(c,r,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(r,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;r={};g=((b.charCodeAt(4)&255)<<8)+
802 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);r[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,r,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
803 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
804 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
805 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&
806 +7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==
807 +a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&
808 +a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+
809 +a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
810 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
811 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
812 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
813 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
814 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
815 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
816 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
817 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
818 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
819 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
820 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
821 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
822 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
823 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
824 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
825 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
826 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
827 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
828 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
829 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
830 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
831 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
832 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
833 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
834 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(q[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
835 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(C<<12)+r}function e(){for(var a=(g<<6)+(C<<12)+r,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(C<<12)+r,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
836 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),r=0,g=7,C=0,w=!0,D=0,m=0,k=0,h=0,u=0,K=[],B=0,x=0,z=[],A=[],R=!1,y=!0,E,O=!1,H=[],N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
837 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=
838 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":O=!0;u=0;break;case ">":O=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var q=0;q<l.width;q++)A[n][q]=A[n-1][q],z[n][q]=z[n-1][q];for(n=E[0]+1-1;n>E[0]-1;n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;u=0;break;
839 +default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,q=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==q&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==q&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==q&&(0==
840 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==q&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==q&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==q&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==q&&(p=n[0]);for(J=D;J<l.width-p;J++)A[m][J]=A[m][J+p],z[m][J]=z[m][J+p];for(J=l.width-p;J<l.width;J++)A[m][J]=" ",z[m][J]=448;break;case "L":J=1;1==q&&(J=n[0]);0==J&&(J=1);for(n=E[1];n>=m+J;n--)A[n]=A[n-J],z[n]=z[n-J];for(n=m;n<m+J;n++)for(A[n]=[],
841 +z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==q&&2==n[0])l.TermClear((C<<12)+(g<<6)),m=D=0,H=[];else if(0==q||1==q&&0==n[0])for(e(),J=m+1;J<l.height;J++)v(J);else if(1==q&&1==n[0])for(e(),J=0;J<m-1;J++)v(J);break;case "H":2==q?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<q;J++)n[J]&&0!=n[J]?1==n[J]?8>g&&(g+=8):2==n[J]||22==n[J]?8<=g&&(g-=8):7==n[J]?r=2:27==n[J]?r=0:30<=n[J]&&
842 +37>=n[J]?(p=8<=g,g=n[J]-30,p&&8>=g&&(g+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?g=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,g=7,r=0);break;case "K":if(0!=q&&(1!=q||n[0]&&0!=n[0])){if(1==q)if(1==n[0])for(n=(g<<6)+(C<<12)+r,q=0;q<D;q++)A[m][q]=" ",z[m][q]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==q&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
843 +E[1]);break;case "S":p=1;1==q&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "M":p=1;1==q&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "T":p=1;1==q&&(p=n[0]);for(n=E[1];n>E[0]+p;n--)for(q=0;q<l.width;q++)A[n][q]=A[n-p][q],z[n][q]=z[n-p][q];for(n=
844 +E[0]+p;n>E[0];n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "X":p=1;J=D;R=m;for(1==q&&(p=n[0]);0<p&&R<l.height;)A[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(q=parseInt(n[0]),(0==q||2==q)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=
845 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var q=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
846 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
847 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;H=[]};l.TermResetScreen=function(){r=0;g=7;C=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
848 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
849 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
850 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
851 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
852 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
853 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
854 break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<H.length&&(H=H.slice(H.length-800));c=H.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
855 l.Init();return l},ZLIB=ZLIB||{};
856 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
857 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
858 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,x,A,B,D,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=A=1;15>=p;p++)if(A<<=1,A-=M[p],0>A)return-1;if(0<A&&(0==
859 -b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(q=0;q<n;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=r,fa=K,ga=ca=0,U=-1}q=D=0;p=d;S=c;n=w;x=0;W=-1;B=1<<w;I=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[q]<U?G.val=e[q]:e[q]>U?(G.op=fa[ga+e[q]],G.val=Z[ca+e[q]]):G.op=96;A=1<<p-x;d=C=1<<n;do C-=A,m[S+(D>>>x)+C]=G;while(0!=C);for(A=1<<p-1;D&A;)A>>>=1;
860 -0!=A?(D&=A-1,D+=A):D=0;q++;if(0==--M[p]){if(p==v)break;p=g[l+e[q]]}if(p>w&&(D&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(A=1<<n;n+x<v;){A-=M[n+x];if(0>=A)break;n++;A<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=D&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=D&&(m[S+D]={op:64,bits:p-x,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function g(){var a;this.total=this.check=
858 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,r,v,w,x,z,D,B,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(r=0;r<n;r++)M[g[l+r]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
859 +b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(r=0;r<n;r++)0!=g[l+r]&&(e[x[g[l+r]]++]=r);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=u,fa=K,ga=ca=0,U=-1}r=B=0;p=d;S=c;n=w;x=0;W=-1;D=1<<w;I=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[r]<U?G.val=e[r]:e[r]>U?(G.op=fa[ga+e[r]],G.val=Z[ca+e[r]]):G.op=96;z=1<<p-x;d=C=1<<n;do C-=z,m[S+(B>>>x)+C]=G;while(0!=C);for(z=1<<p-1;B&z;)z>>>=1;
860 +0!=z?(B&=z-1,B+=z):B=0;r++;if(0==--M[p]){if(p==v)break;p=g[l+e[r]]}if(p>w&&(B&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(z=1<<n;n+x<v;){z-=M[n+x];if(0>=z)break;n++;z<<=1}D+=1<<n;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:p-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
861 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
862 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function e(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function C(a,b){return a.hold&
863 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
862 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function r(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!r(a))return!1;return!0}function C(a,b){return a.hold&
863 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
864 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
865 -e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new g;ZLIB.inflateReset(b,
866 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,g,h,k,r,u=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);g={};n(a,g);h=g.have;k=g.left;
867 -P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!e(g,16))break a;if(d.wrap&2&&35615==g.hold){d.check=a.checksum_function(0,null,0,0);v(a,g.hold);p(g);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(g,8)<<8)+(g.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(g,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(g,4);u=C(g,4)+8;if(0==d.wbits)d.wbits=u;else if(u>d.wbits){a.msg="invalid window size";d.mode=
868 -29;break}d.dmax=1<<u;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=g.hold&512?9:11;p(g);break;case 1:if(!e(g,16))break a;d.flags=g.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=g.hold>>>8&1);d.flags&512&&v(a,g.hold);p(g);d.mode=2;case 2:if(!e(g,32))break a;null!==d.head&&(d.head.time=g.hold);d.flags&512&&(r=g.hold,a.state.check=a.checksum_function(a.state.check,
869 -[r&255,r>>>8&255,r>>>16&255,r>>>24&255],0,4));p(g);d.mode=3;case 3:if(!e(g,16))break a;null!==d.head&&(d.head.xflags=g.hold&255,d.head.os=g.hold>>>8);d.flags&512&&v(a,g.hold);p(g);d.mode=4;case 4:if(d.flags&1024){if(!e(g,16))break a;d.length=g.hold;null!==d.head&&(d.head.extra_len=g.hold);d.flags&512&&v(a,g.hold);p(g);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(r=d.length,r>g.have&&(r=g.have),r&&(null!==d.head&&null!==d.head.extra&&(u=d.head.extra_len-
870 -d.length,d.head.extra+=a.input_data.substring(g.next,g.next+(u+r>d.head.extra_max?d.head.extra_max-u:r))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r)),g.have-=r,g.next+=r,d.length-=r),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==g.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");r=0;do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=u,d.length++)}while(r<g.have);d.flags&
871 -512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==g.have)break a;r=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=u,d.length++)}while(r<g.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=
872 -r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!e(g,16))break a;if(g.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(g)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!e(g,32))break a;a.adler=d.check=m(g.hold);p(g);d.mode=10;case 10:if(0==d.havedict)return l(g),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
873 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(g);d.mode=26;break}if(!e(g,3))break a;d.last=C(g,1);w(g,1);switch(C(g,2)){case 0:d.mode=13;break;case 1:r=d;u=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
865 +e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
866 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,q=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
867 +P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);q=C(e,4)+8;if(0==d.wbits)d.wbits=q;else if(q>d.wbits){a.msg="invalid window size";d.mode=
868 +29;break}d.dmax=1<<q;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
869 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(q=d.head.extra_len-
870 +d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(q+u>d.head.extra_max?d.head.extra_max-q:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=q,d.length++)}while(u<e.have);d.flags&
871 +512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=q,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
872 +u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
873 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=C(e,1);w(e,1);switch(C(e,2)){case 0:d.mode=13;break;case 1:u=d;q=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
874 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
875 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
876 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -893,28 +893,28 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
893 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
894 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
895 {op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
896 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);r.lencode=0;r.distcode=512;for(u=0;512>u;u++)r.codes[u]=B[u];for(u=0;32>u;u++)r.codes[u+512]=x[u];r.lenbits=9;r.distbits=5;
897 -d.mode=19;if(c==ZLIB.Z_TREES){w(g,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(g,2);break;case 13:D(g);if(!e(g,32))break a;if((g.hold&65535)!=(g.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=g.hold&65535;p(g);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(r=d.length){r>g.have&&(r=g.have);r>g.left&&(r=g.left);if(0==r)break a;a.output_data+=a.input_data.substring(g.next,g.next+r);a.next_out+=r;g.have-=
898 -r;g.next+=r;g.left-=r;d.length-=r;break}d.mode=11;break;case 16:if(!e(g,14))break a;d.nlen=C(g,5)+257;w(g,5);d.ndist=C(g,5)+1;w(g,5);d.ncode=C(g,4)+4;w(g,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!e(g,3))break a;r=C(g,3);d.lens[A[d.have++]]=r;w(g,3)}for(;19>d.have;)d.lens[A[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
899 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(16>r.val)w(g,r.bits),d.lens[d.have++]=r.val;else{if(16==r.val){if(!e(g,r.bits+2))break a;w(g,r.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}u=d.lens[d.have-1];r=3+C(g,2);w(g,2)}else if(17==r.val){if(!e(g,r.bits+3))break a;w(g,r.bits);u=0;r=3+C(g,3);w(g,3)}else{if(!e(g,r.bits+7))break a;w(g,r.bits);u=0;r=11+C(g,7);w(g,7)}if(d.have+r>d.nlen+d.ndist){a.msg=
900 -"invalid bit length repeat";d.mode=29;break}for(;r--;)d.lens[d.have++]=u}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=g.have&&258<=g.left){l(g);r=a;var F=K=u=void 0,Y=void 0,L=void 0,
901 -ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,u=r.state,K=r.input_data,F=r.next_in,Y=F+r.avail_in-5,L=r.next_out,ea=L-(k-r.avail_out),V=L+(r.avail_out-257),J=u.wsize,aa=u.whave,ba=u.wnext,W=u.window,I=u.hold,G=u.bits,S=u.codes,Z=u.lencode,ca=u.distcode,fa=(1<<u.lenbits)-1,ga=(1<<u.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
902 -G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)r.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
903 -u.sane){r.msg="invalid distance too far back";u.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,r.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)r.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);r.output_data+=r.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),X-=3;X&&(r.output_data+=r.output_data.charAt(U++),
904 -1<X&&(r.output_data+=r.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{r.msg="invalid distance code";u.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?u.mode=11:(r.msg="invalid literal/length code",u.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;r.next_in=F;r.next_out=L;r.avail_in=F<Y?5+(Y-F):5-(F-Y);r.avail_out=L<V?257+(V-L):257-(L-V);u.hold=I;u.bits=G;n(a,g);11==d.mode&&(d.back=-1);
905 -break}for(d.back=0;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(r.op&&0==(r.op&240)){for(u=r;;){r=d.codes[d.lencode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;d.length=r.val;if(0==r.op){d.mode=25;break}if(r.op&32){d.back=-1;d.mode=11;break}if(r.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=r.op&15;d.mode=21;case 21:if(d.extra){if(!e(g,d.extra))break a;
906 -d.length+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){r=d.codes[d.distcode+C(g,d.distbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(0==(r.op&240)){for(u=r;;){r=d.codes[d.distcode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;if(r.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=r.val;d.extra=r.op&15;d.mode=23;case 23:if(d.extra){if(!e(g,d.extra))break a;
907 -d.offset+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==g.left)break a;r=k-g.left;if(d.offset>r){r=d.offset-r;if(r>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}r>d.wnext?(r-=d.wnext,u=d.wsize-r):u=d.wnext-r;K=-1;r>d.length&&(r=d.length)}else u=-1,K=a.next_out-d.offset,r=d.length;r>g.left&&(r=g.left);g.left-=r;d.length-=r;if(0<=u)a.output_data+=d.window.substring(u,u+r),a.next_out+=r;else{a.next_out+=r;do a.output_data+=a.output_data.charAt(K++);while(--r)}0==
908 -d.length&&(d.mode=20);break;case 25:if(0==g.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;g.left--;d.mode=20;break;case 26:if(d.wrap){if(!e(g,32))break a;k-=g.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=g.left;if((d.flags?g.hold:m(g.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(g)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!e(g,32))break a;if(g.hold!=(d.total&4294967295)){a.msg="incorrect length check";
909 -d.mode=29;break}p(g)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(g);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))g=a.state,r=a.output_data.length,null===g.window&&(g.window=""),0==g.wsize&&(g.wsize=1<<g.wbits),g.window=r>=g.wsize?a.output_data.substring(r-g.wsize):g.whave+r<g.wsize?g.window+a.output_data:g.window.substring(g.whave-(g.wsize-r))+a.output_data,g.whave=g.window.length,
910 -g.wnext=g.whave<g.wsize?g.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
896 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(q=0;512>q;q++)u.codes[q]=B[q];for(q=0;32>q;q++)u.codes[q+512]=x[q];u.lenbits=9;u.distbits=5;
897 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
898 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=C(e,5)+257;w(e,5);d.ndist=C(e,5)+1;w(e,5);d.ncode=C(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=C(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
899 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}q=d.lens[d.have-1];u=3+C(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);q=0;u=3+C(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);q=0;u=11+C(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
900 +"invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=q}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var F=K=q=void 0,Y=void 0,L=void 0,
901 +ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,q=u.state,K=u.input_data,F=u.next_in,Y=F+u.avail_in-5,L=u.next_out,ea=L-(k-u.avail_out),V=L+(u.avail_out-257),J=q.wsize,aa=q.whave,ba=q.wnext,W=q.window,I=q.hold,G=q.bits,S=q.codes,Z=q.lencode,ca=q.distcode,fa=(1<<q.lenbits)-1,ga=(1<<q.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
902 +G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)u.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
903 +q.sane){u.msg="invalid distance too far back";q.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)u.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);u.output_data+=u.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),X-=3;X&&(u.output_data+=u.output_data.charAt(U++),
904 +1<X&&(u.output_data+=u.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{u.msg="invalid distance code";q.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?q.mode=11:(u.msg="invalid literal/length code",q.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;u.next_in=F;u.next_out=L;u.avail_in=F<Y?5+(Y-F):5-(F-Y);u.avail_out=L<V?257+(V-L):257-(L-V);q.hold=I;q.bits=G;n(a,e);11==d.mode&&(d.back=-1);
905 +break}for(d.back=0;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(u.op&&0==(u.op&240)){for(q=u;;){u=d.codes[d.lencode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
906 +d.length+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+C(e,d.distbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(0==(u.op&240)){for(q=u;;){u=d.codes[d.distcode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
907 +d.offset+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,q=d.wsize-u):q=d.wnext-u;K=-1;u>d.length&&(u=d.length)}else q=-1,K=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=q)a.output_data+=d.window.substring(q,q+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(K++);while(--u)}0==
908 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
909 +d.mode=29;break}p(e)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
910 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
911 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
912 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
913 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
914 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
915 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;a%=65521;n%=65521}return a|n<<16}function c(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b[c],65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),
916 a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b[c++],n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=
917 -a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,g,v){return"string"===typeof d?b(a,d,g,v):c(a,d,g,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
917 +a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,e,v){return"string"===typeof d?b(a,d,e,v):c(a,d,e,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
918 65521);131042<=v&&(v-=131042);65521<=v&&(v-=65521);return c|v<<16}})();"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-crc32.js");
919 (function(){function b(a,b){var c,n=0;for(c=0;b;)b&1&&(c^=a[n]),b>>=1,n++;return c}function c(a,c){var v;for(v=0;32>v;v++)a[v]=b(c,c[v])}var a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,
920 3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,
@@ -923,32 +923,32 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
923 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
924 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
925 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
926 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,g,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^g}})();
927 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),g=b.webkitRequestFileSystem,v=b.requestFileSystem||g||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
928 -b.chrome?c():setTimeout(c,500)},q=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(g){n(g)}}},e=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},C=function(n,m,k){k||(n=e(n));var h=this;k=n.type;var r=!1,w,B,x=function(){q(h,["writestart","progress","write","writeend"])},A=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
929 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(r||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},y=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},z;h.readyState=h.INIT;m||(m="download");if(a)w=
930 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(z=n.slice||n.webkitSlice,n=z.call(n,0,n.size,"application/octet-stream"),r=!0);g&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||g)B=b;v?(l+=n.size,v(b.TEMPORARY,l,y(function(a){a.root.getDirectory("saved",C,y(function(a){var b=function(){a.getFile(m,C,y(function(a){a.createWriter(y(function(b){b.onwriteend=
931 -function(b){B.location.href=a.toURL();h.readyState=h.DONE;q(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&A()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),A)}),A)};a.getFile(m,{create:!1},y(function(a){a.remove();b()}),y(function(a){a.code===a.NOT_FOUND_ERR?b():A()}))}),A)}),A)):A()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
932 -b,c){c||(a=e(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
926 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,r;if(0>=v)return a;p=Array(32);r=Array(32);r[0]=3988292384;for(n=l=1;32>n;n++)r[n]=l,l<<=1;c(p,r);c(r,p);do{c(p,r);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(r,p);v&1&&(a=b(r,a));v>>=1}while(0!=v);return a^e}})();
927 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
928 +b.chrome?c():setTimeout(c,500)},r=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(g){n(g)}}},g=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},C=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){r(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
929 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
930 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",C,A(function(a){var b=function(){a.getFile(m,C,A(function(a){a.createWriter(A(function(b){b.onwriteend=
931 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;r(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
932 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;r(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
933 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
934 -var version="0.9.3",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
934 +var version="0.9.7",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
935 null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Wird geladen...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetAuth NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
936 StatusStrs=["Getrennt","Anschlie\u00dfen ...","Installieren...","In Verbindung gebracht"],t,t2,rsepass=null;
937 -function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
938 -applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
939 -haltEvent,!1);document.addEventListener("dragleave",haltEvent,!1);document.addEventListener("drop",documentFileSelectHandler,!1);Q("p16").addEventListener("dragover",haltEvent,!1);Q("p16").addEventListener("dragleave",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",
940 -p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
937 +function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(23).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
938 +urlvars.kvmenc&&(c=parseInt(urlvars.kvmenc),"number"==typeof c&&(desktopsettings.encflags=c));urlvars.kvmdec&&(c=parseInt(urlvars.kvmdec),"number"==typeof c&&(desktopsettings.decimationMode=c));applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(34).value=terminalEmulations[terminal.m.terminalEmulation];Q(31).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",
939 +haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);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",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);
940 +document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
941 function documentFileSelectHandler(b){haltEvent(b);for(var c=!0,a=0;a<b.dataTransfer.files.length;a++)0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".img")&&0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".iso")&&(c=!1);1==c&&null!=b.dataTransfer&&0<currentView&&100>currentView&&(1==b.dataTransfer.files.length||2==b.dataTransfer.files.length)?(a=c=null,b.dataTransfer.files[0].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[0]),b.dataTransfer.files[0].name.toLowerCase().endsWith(".img")&&
942 (c=b.dataTransfer.files[0]),2==b.dataTransfer.files.length&&(b.dataTransfer.files[1].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[1]),b.dataTransfer.files[1].name.toLowerCase().endsWith(".img")&&(c=b.dataTransfer.files[1])),null==c&&null==a||iderStart3(c,a,1)):null!=b.dataTransfer&&1==b.dataTransfer.files.length&&(c=b.dataTransfer.files[0].name.toLowerCase(),21==currentView&&UploadToStorage(b.dataTransfer.files[0],c))}
943 function connectButtonfunction(){wsstack&&0!=wsstack.socketState?disconnect():meshcentral2credCallback()}function connectButtonfunctionEx(){currentMeshNode=parent.getCurrentNode();connect(currentMeshNode._id,16992,null,null,0);Q("xconnectbutton1").value="Trennen"}function getCurrentMeshNode(){return currentMeshNode}function setConnectionState(b){QE("xconnectbutton1",b);0==b&&disconnect()}function setFrameHeight(b){}function setAuthCallback(b){meshcentral2credCallback=b}
944 function setUrlVar(b,c){urlvars||(urlvars={});urlvars[b]=c}function cleanup(){c3.value="Starten Sie die Erfassung";terminal.m.capture&&delete terminal.m.capture;terminal.Stop();desktop.disconnectCode=0;desktop.Stop()}
945 -function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
946 -function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
947 -function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
948 -function connect(b,c,a,d,g,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,g);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(28,"");QH(39,"");amtversion=amtversionmin=amtFirstPull=
949 -0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(21,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(49,"");
950 -QH(50,LoadingHtml);xxCertificates=null;QH(51,LoadingHtml);QH(24,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(52,LoadingHtml);QH(54,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
951 -!1;QH(53,LoadingHtml);QE(43,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(48,!1),Q(48).checked=!0);QE(44,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
945 +function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
946 +function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
947 +function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
948 +function connect(b,c,a,d,e,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,e);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(29,"");QH(40,"");amtversion=amtversionmin=amtFirstPull=
949 +0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(22,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(50,"");
950 +QH(51,LoadingHtml);xxCertificates=null;QH(52,LoadingHtml);QH(25,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(53,LoadingHtml);QH(55,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
951 +!1;QH(54,LoadingHtml);QE(44,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(49,!1),Q(49).checked=!0);QE(45,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
952 function disconnect(){null!=desktopPollTimer&&(clearInterval(desktopPollTimer),desktopPollTimer=null);fullscreen&&deskToggleFull();iderStop();StopDefenseStatsTimer();dialogclose(0);amtstack&&(amtstack.onProcessChanged=null,amtstack.CancelAllQueries(999),amtstack=null);cleanup();wsstack=null;delete amtstack;onProcessChanged(0,1);go(101);Q("xconnectbutton1").value="Verbinden";QH(5,"Getrennt");go(100)}
953 function onProcessChanged(b,c){QS(3).width=100*b/c+"%";0==b&&refreshButtons(!0);0==b&&amtstack&&(0<amtversion&&0==(amtFirstPull&64)?(amtFirstPull|=64,PullPowerPolicy(),subscriptionsFilters=null,PullEventSubscriptions(),PullWatchdog(),5<amtversion&&(PullCertificates(),PullRemoteAccess())):0==(amtFirstPull&1)?PullHardware():0==(amtFirstPull&16)?PullEventLog():0==(amtFirstPull&32)&&PullAuditLog())}
954 function checkAmtVersion(b){var c=b.split(".");b=parseInt(c[0]);var a=parseInt(c[1]),c=parseInt(c[2]),c=1E3*a+c,d=0;5>=b||12<=b?d=1:6==b&&2061<=c?d=1:7==b&&1091<=c?d=1:8==b&&1071<=c?d=1:9==b?5>a&&1041<=c?d=1:5061<=c&&(d=1):10==b&&55<=c?d=1:11==b&&(5>a&&25<=c?d=1:6027<=c&&(d=1));return 0==d}
@@ -957,36 +957,36 @@ function processSystemVersion(b,c,a,d){if(200==d||400==d){if(200==d){amtlogicale
957 1==urlvars.sol&&(go(13),connectTerminal())}else errcheck(d,b)}var refreshButtonsState=!0;function refreshButtons(b){if(refreshButtonsState!=b){refreshButtonsState=b;for(var c=0,a=document.getElementsByTagName("input");c<a.length;c++)"refreshbtn"==a[c].name&&(a[c].disabled=!b)}}
958 function PullPowerState(){amtstack&&0==amtstack.GetPendingActions()&&amtsysstate&&amtsysstate.CIM_ServiceAvailableToElement&&amtstack.Enum("CIM_ServiceAvailableToElement",function(b,c,a,d){200==d&&(amtsysstate.CIM_ServiceAvailableToElement.responses=a,9<amtversion&&null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?
959 amtstack.Get("IPS_PowerManagementService",function(a,b,c,d){200==d&&(amtsysstate.IPS_PowerManagementService.response=c.Body,updateSystemStatus())}):updateSystemStatus())})}
960 -function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c=["CIM_ServiceAvailableToElement","*AMT_GeneralSettings","AMT_EthernetPortSettings","*AMT_RedirectionService","CIM_ElementSettingData"];5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");15<amtversion&&1==amtstack.wsman.comm.xtls&&
961 -c.push("*CIM_BootService");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
960 +function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c="CIM_ServiceAvailableToElement *AMT_GeneralSettings AMT_EthernetPortSettings *AMT_RedirectionService CIM_ElementSettingData *AMT_BootCapabilities".split(" ");5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");
961 +15<amtversion&&c.push("*CIM_BootService");2<amtversion&&c.push("*AMT_8021XProfile");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
962 function processSystemStatus(b,c,a,d){if(void 0==a.IPS_ScreenConfigurationService||400==a.IPS_ScreenConfigurationService.status)a.IPS_ScreenConfigurationService=null;if(void 0==a.IPS_KVMRedirectionSettingData||400==a.IPS_KVMRedirectionSettingData.status)a.IPS_KVMRedirectionSettingData=null;if(void 0==a.CIM_KVMRedirectionSAP||400==a.CIM_KVMRedirectionSAP.status)a.CIM_KVMRedirectionSAP=null;if(void 0==a.IPS_OptInService||400==a.IPS_OptInService.status)a.IPS_OptInService=null;void 0!=a.AMT_RedirectionService&&
963 -200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var g in a)null!=a[g]&&a[g].status>d&&(d=a[g].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"Uhr synchronisieren",3,syncClockEx,"Intel AMT Uhr mit diesem Computer synchronisieren?")}
963 +200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var e in a)null!=a[e]&&a[e].status>d&&(d=a[e].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"Uhr synchronisieren",3,syncClockEx,"Intel AMT Uhr mit diesem Computer synchronisieren?")}
964 function syncClockEx(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(b,c,a,d){200!=d?messagebox("","Zeit konnte nicht eingestellt werden, Status ="+d):0!=a.Body.ReturnValue?messagebox("","Zeit konnte nicht eingestellt werden, Fehler: "+a.Body.ReturnValueStr):(b=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(a.Body.Ta0,b,b,function(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}))})}
965 var DMTFPowerStates=";;Ein;Leichter Schlaf;Tiefschlaf;Aus- und Wiedereinschalten (Soft off);Aus - Schwer;Ruhezustand (Aus weich);Weich aus;Aus- und Wiedereinschalten (Aus-hart);Hauptbus zur\u00fcckgesetzt;Diagnose-Interrupt (NMI);Unzutreffend;Aus - Weich anmutig;Aus - Schwer anmutig;Master-Bus zur\u00fcckgesetzt anmutig;Aus- und Wiedereinschalten (Aus - Weich anmutig);Aus- und Wiedereinschalten (Aus - Hart anmutig);Diagnoseunterbrechung (INIT)".split(";");
966 -function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),g="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Unbekannt</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Ein"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
967 -3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", Eingesteckt",", Batteriebetrieben"][v.PowerSource]);d+=TableEntry("Leistung",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Keiner</i>":EscapeHtml(c);d+=TableEntry("Name & Domain",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?
966 +function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Unbekannt</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Ein"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
967 +3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(29,n),QH(40,n));v.PowerSource&&(n+=[", Eingesteckt",", Batteriebetrieben"][v.PowerSource]);d+=TableEntry("Leistung",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Keiner</i>":EscapeHtml(c);d+=TableEntry("Name & Domain",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?
968 d+=TableEntry("System ID",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("System ID",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" aktiviert im Admin Control Mode (ACM)",4==l.ProvisioningMode&&(n=" aktiviert im Client Control Mode (CCM)",b=9));d+=TableEntry("Intel&reg; ME","v"+getItem(amtlogicalelements,
969 -"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
970 -q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),e=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),e=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
971 -p&&(g+=", Umleitungsport");q&&(g+=", Serial-over-LAN");n&&(g+=", IDE-Redirect");e&&(g+=", KVM");""==g&&(g=" Keiner");d+=TableEntry("Aktive Funktionen",addLinkConditional(g.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,g="Prim\u00e4re Anzeige",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(g=["Prim\u00e4re Anzeige","Sekund\u00e4ranzeige",
972 -"3. Anzeige"][n.DefaultScreen]),g='<span title="'+format("Die Standardfernanzeige ist {0}",g.toLowerCase())+'">'+g+"</span>",1==n.Is5900PortEnabled&&(g+=", Port 5900 aktiviert"),1==n.OptInPolicy&&(g+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"Sekunden Opt-In":"zweite Anmeldung")),g+=","+n.SessionTimeout+" Minute"+(0<n.SessionTimeout?"s":"")+" Session-Timeout",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&
973 -1))&&(g+=", Ausblenden erlaubt"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Remotedesktop",addLinkConditional(g,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!e);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(g="Unbekannter Zustand",p=amtsysstate.IPS_OptInService.response.OptInRequired,
974 -0==p&&(g="Nicht ben\u00f6tigt"),1==p&&(g="Nur f\u00fcr KVM erforderlich"),4294967295==p&&(g="Immer erforderlich"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(g=addLinkConditional(g,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Zustimmung des Benutzers",g));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(g={0:"Unbekannt",1:"Andere",2:"aktiviert",3:"Behindert",4:"Herunterfahren",5:"Unzutreffend",6:"Aktiviert aber offline",
975 -7:"Im Test",8:"Aufgeschoben",9:"Ruhe",10:"Beginnend",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(g[32768]="OCR & RPE Disabled",g[32769]="OCR Enabled, RPE Disabled"),n=g[amtsysstate.CIM_BootService.response.EnabledState]?g[amtsysstate.CIM_BootService.response.EnabledState]:"Unbekannt",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var g=
976 -amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)if(g[C].SettingData&&1==g[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==g[C].SettingData.ReferenceParameters.ResourceURI)for(p=g[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("Energiepolitik",addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',
977 -xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Terminzeit",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));g=AddRefreshButton("PullSystemStatus()")+" ";g+=AddButton("Machtaktionen ...","showPowerActionDlg()")+" ";g+=AddButton("Sicherer Staat...","saveEntireAmtState()")+" ";d+=TableEnd(g);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
978 -QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" Das \u00c4ndern der Netzwerkeinstellungen kann dazu f\u00fchren, dass diese Seite nicht mehr verf\u00fcgbar ist.");d=d+"<br><h2>Allgemeine Einstellungen</h2>"+TableStart();g="";"<i>Keiner</i>"!=c&&(1==v.SharedFQDN&&(g=", mit dem Betriebssystem geteilt"),0==v.SharedFQDN&&(g=", anders als OS"));d+=TableEntry("Name & Domain",
979 -addLinkConditional(c+g,"showEditNameDlg(1)",xxAccountAdminName));c="Behindert";1==v.DDNSUpdateEnabled?c="Jeweils aktiviert"+v.DDNSPeriodicUpdateInterval+" Minuten ist TTL"+v.DDNSTTL+" Protokoll":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Update per DHCP-Server");d+=TableEntry("Dynamisches DNS",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||
980 -1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Drahtlose Schnittstelle":"Kabelgebundene Schnittstelle")+"</h2>";d+=TableStart();d+=TableEntry("Verbindungsstatus",1==c.LinkIsUp?"Link ist aktiv":"Link ist ausgefallen");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);g=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&g.push("S0 / AC"),14==c.LinkPolicy[C]&&g.push("Sx / AC"),16==c.LinkPolicy[C]&&g.push("S0 / DC"),224==c.LinkPolicy[C]&&
981 -g.push("Sx / DC");0==g.length&&g.push("");d+=TableEntry("Link-Richtlinie",addLinkConditional(0==g.length?"Nicht verf\u00fcgbar":"Verf\u00fcgbar in: "+g.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("MAC-Adresse",c.MACAddress));amtwirelessif==a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("Zustand",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),
969 +"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(28,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(39,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
970 +r=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
971 +p&&(e+=", Umleitungsport");r&&(e+=", Serial-over-LAN");n&&(e+=", IDE-Redirect");g&&(e+=", KVM");""==e&&(e=" Keiner");d+=TableEntry("Aktive Funktionen",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Prim\u00e4re Anzeige",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Prim\u00e4re Anzeige","Sekund\u00e4ranzeige",
972 +"3. Anzeige"][n.DefaultScreen]),e='<span title="'+format("Die Standardfernanzeige ist {0}",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+=", Port 5900 aktiviert"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"Sekunden Opt-In":"zweite Anmeldung")),e+=","+n.SessionTimeout+" Minute"+(0<n.SessionTimeout?"s":"")+" Session-Timeout",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&
973 +1))&&(e+=", Ausblenden erlaubt"),QV(46,n),Q(47).checked=!1):QV(46,!1),d+=TableEntry("Remotedesktop",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(26,!p||!r);QV(27,xxAccountAdminName);QV(37,!p||!g);QV(38,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="Unbekannter Zustand",p=amtsysstate.IPS_OptInService.response.OptInRequired,
974 +0==p&&(e="Nicht ben\u00f6tigt"),1==p&&(e="Nur f\u00fcr KVM erforderlich"),4294967295==p&&(e="Immer erforderlich"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Zustimmung des Benutzers",e));null!=amtsysstate.AMT_BootCapabilities.response.PlatformErase&&0<amtsysstate.AMT_BootCapabilities.response.PlatformErase&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e=
975 +{0:"Unbekannt",1:"Andere",2:"aktiviert",3:"Behindert",4:"Herunterfahren",5:"Unzutreffend",6:"Aktiviert aber offline",7:"Im Test",8:"Aufgeschoben",9:"Ruhe",10:"Beginnend",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:"Unbekannt",d+=TableEntry("Boot Features",
976 +addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)if(e[C].SettingData&&1==e[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[C].SettingData.ReferenceParameters.ResourceURI)for(p=e[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,r=0;r<AmtSystemPowerSchemes.length;r++)AmtSystemPowerSchemes[r].SchemeGUID==p&&(d+=TableEntry("Energiepolitik",
977 +addLinkConditional(AmtSystemPowerSchemes[r].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Terminzeit",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("Machtaktionen ...","showPowerActionDlg()")+" ";e+=AddButton("Sicherer Staat...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
978 +QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" Das \u00c4ndern der Netzwerkeinstellungen kann dazu f\u00fchren, dass diese Seite nicht mehr verf\u00fcgbar ist.");d=d+"<br><h2>Allgemeine Einstellungen</h2>"+TableStart();e="";"<i>Keiner</i>"!=c&&(1==v.SharedFQDN&&(e=", mit dem Betriebssystem geteilt"),0==v.SharedFQDN&&(e=", anders als OS"));d+=TableEntry("Name & Domain",
979 +addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));c="Behindert";1==v.DDNSUpdateEnabled?c="Jeweils aktiviert"+v.DDNSPeriodicUpdateInterval+" Minuten ist TTL"+v.DDNSTTL+" Protokoll":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Update per DHCP-Server");d+=TableEntry("Dynamisches DNS",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||
980 +1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Drahtlose Schnittstelle":"Kabelgebundene Schnittstelle")+"</h2>";d+=TableStart();d+=TableEntry("Verbindungsstatus",1==c.LinkIsUp?"Link ist aktiv":"Link ist ausgefallen");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);e=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&e.push("S0 / AC"),14==c.LinkPolicy[C]&&e.push("Sx / AC"),16==c.LinkPolicy[C]&&e.push("S0 / DC"),224==c.LinkPolicy[C]&&
981 +e.push("Sx / DC");0==e.length&&e.push("");d+=TableEntry("Link-Richtlinie",addLinkConditional(0==e.length?"Nicht verf\u00fcgbar":"Verf\u00fcgbar in: "+e.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("MAC-Adresse",c.MACAddress));amtwirelessif==a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("Zustand",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),
982 s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("Radio State",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>Keiner</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?
983 -"aktiviert":"Behindert","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"aktiviert":"Behindert","showUefiWifiCoExDlg()",
984 -xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Antworten Sie auf Ping",addLinkConditional(["Behindert","ICMP-Antwort","RMCP-Antwort","ICMP & RMCP Antwort"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),g=1==c.DHCPEnabled?"Automatisch mit DHCP-Server":"Statische IP-Adresse",1==c.IpSyncEnabled&&(g+=", IP sync with OS"),d+=TableEntry("IPv4-Status",addLinkConditional(g,"showIPSetupDlg()",
985 -xxAccountAdminName)));d+=TableEntry("IPv4-Adresse",isIpAddress(c.IPAddress,"Keiner"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4-Gateway / Maske",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Keiner")));g=c.PrimaryDNS;isIpAddress(g)&&(c.SecondaryDNS&&(g+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4-Domainnamenserver",g));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="Behindert",w,g=amtsysstate.CIM_ElementSettingData.responses,
986 -C=0;C<g.length;C++)g[C].SettingData&&g[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==g[C].IsCurrent);1==w&&(p=(g=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Aktivierte, automatische und manuelle Adressen":"Aktiviert, Automatische Adressen");d+=TableEntry("IPv6-Status",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&
987 -0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("IPv6-Adresse",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6-Adresse","Keiner");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6-Standardrouter",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(g=
988 -c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(g+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6-Domainnamenserver",g))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}
989 -function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
983 +"aktiviert":"Behindert","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"aktiviert":"Behindert","showUefiWifiCoExDlg()",
984 +xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Antworten Sie auf Ping",addLinkConditional(["Behindert","ICMP-Antwort","RMCP-Antwort","ICMP & RMCP Antwort"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-FAST/TLS".split(" "),p="Behindert",amtsysstate.AMT_8021XProfile.responses.Body.Enabled&&
985 +(p="Aktiviert,"+e[amtsysstate.AMT_8021XProfile.responses.Body.AuthenticationProtocol]),d+=TableEntry("802.1x",addLinkConditional(p,"editNetAuthProfile()",xxAccountAdminName)),e=1==c.DHCPEnabled?"Automatisch mit DHCP-Server":"Statische IP-Adresse",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("IPv4-Status",addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("IPv4-Adresse",isIpAddress(c.IPAddress,"Keiner"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4-Gateway / Maske",
986 +c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Keiner")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4-Domainnamenserver",e));if(5<amtversion&&200==amtsysstate.IPS_IPv6PortSettings.status){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="Behindert",w,e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)e[C].SettingData&&e[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[C].IsCurrent);
987 +1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Aktivierte, automatische und manuelle Adressen":"Aktiviert, Automatische Adressen");d+=TableEntry("IPv6-Status",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&
988 +(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("IPv6-Adresse",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6-Adresse","Keiner");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6-Standardrouter",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6-Domainnamenserver",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&
989 +0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
990 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
991 "")+">Available in S0/DC - Powered on & on battery</label><br>";a+="<label><input type=checkbox id=d11p4 value=224 "+(0<=c.LinkPolicy.indexOf(224)?"checked":"")+">Available in Sx/DC - Sleeping & on battery</label><br>";setDialogMode(11,"Link-Richtlinie",3,showLinkPolicyDlgEx,a,b)}}
992 function showLinkPolicyDlgEx(b,c){var a=Clone(amtsysstate.AMT_EthernetPortSettings.responses[c]);a.DHCPEnabled&&(delete a.IPAddress,delete a.SubnetMask,delete a.DefaultGateway,delete a.PrimaryDNS,delete a.SecondaryDNS);a.LinkPolicy=[];Q("d11p1").checked&&a.LinkPolicy.push(1);Q("d11p2").checked&&a.LinkPolicy.push(14);Q("d11p3").checked&&a.LinkPolicy.push(16);Q("d11p4").checked&&a.LinkPolicy.push(224);amtstack.Put("AMT_EthernetPortSettings",a,showLinkPolicyDlgExDone,0,1,a)}
@@ -995,30 +995,30 @@ function showAuthCsme(){if(!xxdialogMode){var b;b="<div style=margin-top:8px>Int
995 for(var c in amtstack.amtauth.Certificates){var a=amtstack.amtauth.Certificates[c];b+="<tr><td style=width:32px;vertical-align:top><img src=images-commander/cert1.png height=32 width=32 />";b+="<td style=padding-bottom:6px><b>"+EscapeHtml(a.subject.getField("CN").value)+(!0===a.xTrusted?", <span style=color:#080>Vertrauensw\u00fcrdige</span>":"")+"</b><br />";a.subject.getField("OU")&&(b+=EscapeHtml(a.subject.getField("OU").value)+"<br />");b+=amtstack.amtauth.CertificatesDer[c].length+" Bytes,<a style=cursor:pointer;color:blue onclick=downloadAuthCert("+
996 c+")>Herunterladen</a>";a.xCrl&&(b+="<br />CRL "+a.xCrl.length+" Bytes,<a style=cursor:pointer;color:blue onclick=downloadCertCrl("+c+")>Herunterladen</a>")}setDialogMode(11,"Authentic CSME",1,null,b+"</table><div>")}}function downloadCertCrl(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.Certificates[b].xCrl),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".crl")}
997 function downloadAuthCert(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.CertificatesDer[b]),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".cer")}var IntelAmtEntireState,IntelAmtEntireStateCalls;
998 -function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c30.value="amtstate"+b+".json";setDialogMode(19,"Speichern Sie den gesamten Intel&reg; AMT-Status",3,saveEntireAmtStateOk)}}
999 -function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(60,"Fetching entire state, please wait...");setDialogMode(1,"Speichern Sie den gesamten Intel&reg; AMT-Status",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
1000 -function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c30.value))}
998 +function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c55.value="amtstate"+b+".json";setDialogMode(19,"Speichern Sie den gesamten Intel&reg; AMT-Status",3,saveEntireAmtStateOk)}}
999 +function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(61,"Fetching entire state, please wait...");setDialogMode(1,"Speichern Sie den gesamten Intel&reg; AMT-Status",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
1000 +function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c55.value))}
1001 function showDesktopSettingsDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_KVMRedirectionSettingData.response,c;c="<div style=text-align:left><div style=height:26px;margin-top:4px><select id=subddisplay style=float:right;width:200px><option value=0>Prim\u00e4re Anzeige</option><option value=1>Sekund\u00e4ranzeige</option>";9<amtversion&&(c+="<option value=2>3. Anzeige</option>");c+='</select><div style=padding-top:4px>Standardanzeige</div></div><div style=height:26px;margin-top:4px><input id=subsessiontimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>Sitzungszeitlimit (Minuten)</div></div>';
1002 1==b.OptInPolicy&&(c+='<div style=height:26px;margin-top:4px><input id=suboptintimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>Opt-In-Zeitlimit (Sekunden)</div></div>');c+="<div style=height:26px;margin-top:4px><select id=subdlegacy style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>Deaktiviert, empfohlen</option><option value=1>Aktiviert, Legacy-KVM-Viewer</option></select><div style=padding-top:4px>Port 5900</div></div>";
1003 c+="<div style=height:26px;margin-top:4px id=subspassx><input id=subspass type=password autocomplete=off style=float:right;width:200px maxlength=8 onkeyup=showDesktopSettingsDlgUpdate()><div style=padding-top:4px>5900 Passwort (8 Zeichen)</div></div>";9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(c+='<div style=height:26px;margin-top:4px><select id=subsb style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>Behindert</option><option value=1>aktiviert</option></select><div style=padding-top:4px title="Diese Funktion wird nicht oft unterst\u00fctzt">Bildschirmausblendung</div></div>');
1004 c+="</div>";setDialogMode(11,"Remotedesktopeinstellungen",3,showDesktopSettingsDlgOk,c);Q("subddisplay").value=b.DefaultScreen;Q("subsessiontimeout").value=b.SessionTimeout;1==b.OptInPolicy&&(Q("suboptintimeout").value=b.OptInPolicyTimeout);Q("subdlegacy").value=1==b.Is5900PortEnabled?1:0;9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(Q("subsb").value=amtsysstate.IPS_ScreenConfigurationService.response.EnabledState);showDesktopSettingsDlgUpdate()}}
1005 -function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c54",b)}
1005 +function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c106",b)}
1006 function showDesktopSettingsDlgOk(){var b=Clone(amtsysstate.IPS_KVMRedirectionSettingData.response);b.DefaultScreen=Q("subddisplay").value;b.SessionTimeout=Q("subsessiontimeout").value;b.Is5900PortEnabled=1==Q("subdlegacy").value;1==b.OptInPolicy&&(b.OptInPolicyTimeout=Q("suboptintimeout").value);1==b.Is5900PortEnabled&&(b.RFBPassword=Q("subspass").value);amtstack.Put("IPS_KVMRedirectionSettingData",b,showDesktopSettingsDlgOk2);b=Clone(amtsysstate.IPS_ScreenConfigurationService.response);b.EnabledState=
1007 parseInt(Q("subsb").value);amtstack.Put("IPS_ScreenConfigurationService",b,showDesktopSettingsDlgOk3)}function showDesktopSettingsDlgOk2(b,c,a,d){200==d?PullSystemStatus():messagebox("Remotedesktopeinstellungen",format("Fehler {0}, Werte k\u00f6nnen nicht festgelegt werden.",d))}
1008 function showDesktopSettingsDlgOk3(b,c,a,d){200!=d?messagebox("Error",format("Das Ausblenden des Bildschirms konnte nicht festgelegt werden. Das Ausblenden wird auf diesem System m\u00f6glicherweise nicht unterst\u00fctzt ({0}).",d)):amtstack.Get("IPS_ScreenConfigurationService",function(a,b,c,d){200==d&&(amtsysstate.IPS_ScreenConfigurationService.response=c.Body,updateSystemStatus())},0,1)}
1009 function PullEventLog(b){1==b&&xxdialogMode||(amtFirstPull|=16,amtstack.Enum("AMT_MessageLog",processMessageLog0),amtstack.GetMessageLog(processMessageLog1))}var processMessageLog0responses=null;
1010 function processMessageLog0(b,c,a,d){200==d&&(d&&QV("go6",!0),a&&(processMessageLog0responses=a),b="",c="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>",null!=processMessageLog0responses&&(b=1==processMessageLog0responses[0].IsFrozen?AddButton("Protokoll einfrieren","FreezeLog(0)"):AddButton("Protokoll einfrieren","FreezeLog(1)")),c+=TableEnd('<div style=float:right><input id=eventFilter placeholder="Filter" style=margin:4px onkeyup=eventFilter()>&nbsp;</div><div>&nbsp;'+
1011 AddRefreshButton("PullEventLog(1)")+AddButton("Protokoll l\u00f6schen","ClearLog()")+AddButton("Speichern...","SaveEventLog()")+b),QH(17,c+"<br>"))}function SaveEventLog(){xxdialogMode||null==eventmessages||SaveJsonFile("IntelAmtEventlog","events","Intel AMT Event Log",eventmessages)}var eventmessages=null;
1012 -function processMessageLog1(b,c){eventmessages=c;var a,d=0,g;g="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>Quelle</b><td class=r1><b>Beschreibung</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);g+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1013 -a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}g+=TableEnd(0==d?"&nbsp;":"");QH(18,g+"<br>");processMessageLog0()}
1014 -function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(60,"Ereignisprotokoll l\u00f6schen?"),setDialogMode(1,"Ereignisprotokoll",3,ClearLogEx))}function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("Ereignisprotokoll","Fehler beim L\u00f6schen, Fehler: "+d):PullEventLog()})}
1015 -function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("Zeit",c.Time.toLocaleString());a+=addHtmlValue("Quelle",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("Beschreibung",c.Desc);a+=MoreStart();a+=addHtmlValue("Ger\u00e4teadresse",c.DeviceAddress);a+=addHtmlValue("Entit\u00e4t",c.Entity);a+=addHtmlValue("Entit\u00e4tsinstanz",c.EntityInstance);var d="",g;for(g in c.EventData)0<d.length&&(d+=","),d+=c.EventData[g];a+=addHtmlValue("Daten",
1012 +function processMessageLog1(b,c){eventmessages=c;var a,d=0,e;e="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>Quelle</b><td class=r1><b>Beschreibung</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);e+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1013 +a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}e+=TableEnd(0==d?"&nbsp;":"");QH(18,e+"<br>");processMessageLog0()}
1014 +function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(61,"Ereignisprotokoll l\u00f6schen?"),setDialogMode(1,"Ereignisprotokoll",3,ClearLogEx))}function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("Ereignisprotokoll","Fehler beim L\u00f6schen, Fehler: "+d):PullEventLog()})}
1015 +function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("Zeit",c.Time.toLocaleString());a+=addHtmlValue("Quelle",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("Beschreibung",c.Desc);a+=MoreStart();a+=addHtmlValue("Ger\u00e4teadresse",c.DeviceAddress);a+=addHtmlValue("Entit\u00e4t",c.Entity);a+=addHtmlValue("Entit\u00e4tsinstanz",c.EntityInstance);var d="",e;for(e in c.EventData)0<d.length&&(d+=","),d+=c.EventData[e];a+=addHtmlValue("Daten",
1016 d);a+=addHtmlValue("Offset",c.EventOffset);a+=addHtmlValue("Sensorart",c.EventSensorType);a+=addHtmlValue("Schwere",c.EventSeverity);a+=addHtmlValue("Quelle Typ",c.EventSourceType);a+=addHtmlValue("Art",c.EventType);a+=addHtmlValue("Sensornummer",c.SensorNumber);a+=MoreEnd();a+="</div>";messagebox(format("Ereignis # {0} Details",b+1),a)}}
1017 function eventFilter(){var b=Q("eventFilter").value.toLowerCase(),c;for(c in eventmessages)QV("xamtevent"+c,""==b||0<=eventmessages[c].Desc.toLowerCase().indexOf(b)||0<=eventmessages[c].EntityStr.toLowerCase().indexOf(b))}var subscriptionsFilters=null,subscriptionsListeners=null;
1018 function PullEventSubscriptions(){null==subscriptionsFilters&&amtstack.Enum("CIM_FilterCollection",processEventSubscriptions0);amtstack.BatchEnum(null,["CIM_ListenerDestination","CIM_FilterCollectionSubscription"],processEventSubscriptions1)}function processEventSubscriptions0(b,c,a,d){408!=d&&400!=d&&(d&&errcheck(d,b)||(subscriptionsFilters=a))}
1019 -function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Event-Abonnenten verwalten.<br><br>";for(var g in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[g].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[g],
1020 -b+='<div class=itemBar onclick="showSubscriptionDetails('+g+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>Keine Abonnements gefunden.</i></div><br>");g="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(g+=AddButton("Neues Abonnement","newSubscriptionButton()"));b+="<br><td class=r1>"+
1021 -TableEnd(g+"</div>");QH(56,b)}}var subscriptionDeliveryModes={2:"dr\u00fccken",3:"Dr\u00fccken Sie mit ACK",4:"Veranstaltungen",5:"ziehen"};
1019 +function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Event-Abonnenten verwalten.<br><br>";for(var e in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[e].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[e],
1020 +b+='<div class=itemBar onclick="showSubscriptionDetails('+e+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>Keine Abonnements gefunden.</i></div><br>");e="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(e+=AddButton("Neues Abonnement","newSubscriptionButton()"));b+="<br><td class=r1>"+
1021 +TableEnd(e+"</div>");QH(57,b)}}var subscriptionDeliveryModes={2:"dr\u00fccken",3:"Dr\u00fccken Sie mit ACK",4:"Veranstaltungen",5:"ziehen"};
1022 function showSubscriptionDetails(b){if(!xxdialogMode){var c=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[b].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),a=subscriptionsListeners.CIM_ListenerDestination.responses[b],d;d="<div style=text-align:left>"+addHtmlValue("Ziel",a.Destination);d+=addHtmlValue("Filter",c);d+=addHtmlValue("Liefermodus",subscriptionDeliveryModes[a.DeliveryMode]);setDialogMode(11,"Abonnement"+(b+1),xxAccountAdminName?5:1,deleteSubscriptionButton,
1023 d+"</div>",b)}}
1024 function deleteSubscriptionButton(b,c){2==b&&amtstack.UnSubscribe("CIM_FilterCollectionSubscription",PullEventSubscriptions,null,1,{Filter:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_FilterCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+subscriptionsListeners.CIM_FilterCollectionSubscription.responses[c].Filter.ReferenceParameters.SelectorSet.Selector.Value+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference>",
@@ -1026,92 +1026,92 @@ Handler:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/a
1026 function newSubscriptionButton(){if(!xxdialogMode&&null!=subscriptionsFilters){var b;b="<div style=height:26px;margin-top:4px><select id=subtype style=float:right;width:260px><option value=Push>dr\u00fccken</option><option value=PushWithAck>Dr\u00fccken Sie mit ACK</option></select><div style=padding-top:4px>Art</div></div><div style=height:26px;margin-top:4px><select id=subfilter style=float:right;width:260px>";for(var c in subscriptionsFilters)b+='<option value="'+subscriptionsFilters[c].InstanceID+
1027 '">'+subscriptionsFilters[c].CollectionName.substring(13)+"</option>";b+="</select><div style=padding-top:4px>Filter</div></div>";b+='<div style=height:26px;margin-top:4px><input id=suburl style=float:right;width:260px maxlength=253 onkeyup=newSubscriptionUpdate() value="http://"><div style=padding-top:4px>URL</div></div>';b+="<div style=height:26px;margin-top:4px><select id=subauth style=float:right;width:260px onchange=newSubscriptionUpdate()><option value=0>Keiner</option><option value=1>Verdauen</option></select><div style=padding-top:4px>Authentifizierung</div></div>";
1028 b+="<div style=height:26px;margin-top:4px id=subxuser><input id=subuser style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>Nutzername</div></div>";b+="<div style=height:26px;margin-top:4px id=subxpass><input id=subpass style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>Passwort</div></div>";b+="<div style=height:26px;margin-top:4px><input id=subargs style=float:right;width:260px maxlength=128><div style=padding-top:4px>Argumente</div></div>";
1029 -setDialogMode(11,"Event-Abonnement hinzuf\u00fcgen",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c54",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1029 +setDialogMode(11,"Event-Abonnement hinzuf\u00fcgen",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c106",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1030 function newSubscriptionButtonOk(){var b=0==Q("subuser").value.length?void 0:Q("subuser").value,c=0==Q("subpass").value.length?void 0:Q("subpass").value;amtstack.Subscribe("CIM_FilterCollection",Q("subtype").value,Q("suburl").value,newSubscriptionButtonOk2,null,1,{InstanceID:Q("subfilter").value},0<Q("subargs").value.length?Q("subargs").value:null,b,c)}function newSubscriptionButtonOk2(b,c,a,d){200==d&&PullEventSubscriptions()}
1031 function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AMT_AuditLog",processAuditLog0))}var auditLog=null,auditLogEnabledStates="Unbekannt;Andere;aktiviert;Behindert;Herunterfahren;Unzutreffend;Aktiviert aber offline;Im Test;Aufgeschoben;Ruhe;Beginnend".split(";");
1032 -function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Behindert":"aktiviert",c&2&&(b+=", Gesperrt"),c&4&&(b+=", Fast voll"),c&8&&(b+=", Voll"),c&16&&(b+=", Kein Schl\u00fcssel"),c="<h1>\u00dcberwachungsprotokolleinstellungen</h1>"+TableStart(),c+=TableEntry("Zustand",b),c+=TableEntry("Lager",a[0].CurrentNumberOfRecords+" Aufzeichnungen),"+a[0].PercentageFree+"% kostenlos"),c+=TableEntry("Richtlinie \u00fcberschreiben",2==a[0].OverwritePolicy?"Wraps wenn voll":"\u00dcberschreibt nie"),
1033 -c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1034 -function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filter" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Speichern...","SaveAuditLog()")+AddButton("Protokoll l\u00f6schen","ClearAuditLog()"))+"<br>");if(0==c.length)d="Es wurden keine \u00dcberwachungsprotokollereignisse gefunden.";else{var g=
1035 -0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Zeit</b><td class=r1 style=width:260px><b>Initiator</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;g++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+
1036 -a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==g?"&nbsp;":"")+"<br>"}QH(50,d)}
1037 -function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Intel AMT Audit Log",auditLog)}function ClearAuditLog(b){QH(60,"\u00dcberwachungsprotokoll l\u00f6schen?");setDialogMode(1,"Audit-Log",3,ClearAuditLogEx)}
1032 +function processAuditLog0(b,c,a,d){200==d&&a&&0<a.length&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Behindert":"aktiviert",c&2&&(b+=", Gesperrt"),c&4&&(b+=", Fast voll"),c&8&&(b+=", Voll"),c&16&&(b+=", Kein Schl\u00fcssel"),c="<h1>\u00dcberwachungsprotokolleinstellungen</h1>"+TableStart(),c+=TableEntry("Zustand",b),c+=TableEntry("Lager",a[0].CurrentNumberOfRecords+" Aufzeichnungen),"+a[0].PercentageFree+"% kostenlos"),c+=TableEntry("Richtlinie \u00fcberschreiben",2==a[0].OverwritePolicy?"Wraps wenn voll":
1033 +"\u00dcberschreibt nie"),c+=TableEnd(),QH(50,c),amtstack.GetAuditLog(processAuditLog1))}
1034 +function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filter" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Speichern...","SaveAuditLog()")+AddButton("Protokoll l\u00f6schen","ClearAuditLog()"))+"<br>");if(0==c.length)d="Es wurden keine \u00dcberwachungsprotokollereignisse gefunden.";else{var e=
1035 +0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Zeit</b><td class=r1 style=width:260px><b>Initiator</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+
1036 +a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(51,d)}
1037 +function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Intel AMT Audit Log",auditLog)}function ClearAuditLog(b){QH(61,"\u00dcberwachungsprotokoll l\u00f6schen?");setDialogMode(1,"Audit-Log",3,ClearAuditLogEx)}
1038 function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("Audit-Log","Error: "+d)}
1039 -function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Zeit",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Initiator",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Adresse",a.NetAddress));d+=addHtmlValue("Anwendung",a.AuditApp);d+=addHtmlValue("Veranstaltung",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Erweiterte Daten",a.ExStr);else if(0<a.Ex.length){var g="";for(c in a.Ex)0<g.length&&(g+=","),g+=a.Ex.charCodeAt(c);""!=
1040 -g&&(d+=addHtmlValue("Datenwerte",g));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("Datenzeichenfolge",a.Ex.substring(2)))}messagebox("Audit Event #"+(b+1)+" Einzelheiten",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1039 +function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Zeit",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Initiator",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Adresse",a.NetAddress));d+=addHtmlValue("Anwendung",a.AuditApp);d+=addHtmlValue("Veranstaltung",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Erweiterte Daten",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=","),e+=a.Ex.charCodeAt(c);""!=
1040 +e&&(d+=addHtmlValue("Datenwerte",e));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("Datenzeichenfolge",a.Ex.substring(2)))}messagebox("Audit Event #"+(b+1)+" Einzelheiten",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1041 function PullCertificates(){amtstack.BatchEnum(null,["AMT_PublicKeyCertificate","AMT_PublicPrivateKeyPair","AMT_TLSSettingData","AMT_TLSCredentialContext"],processCerts1)}
1042 -function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var g in xxCertificates)xxCertificates[g].InstanceID==b&&(xxTlsCurrentCert=
1043 -g)}for(g in xxCertificates)xxCertificates[g].TrustedRootCertficate=1==xxCertificates[g].TrustedRootCertficate,xxCertificates[g].X509Certificate=window.atob(xxCertificates[g].X509Certificate),xxCertificates[g].XIssuer=parseCertName(xxCertificates[g].Issuer),xxCertificates[g].XSubject=parseCertName(xxCertificates[g].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1042 +function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var e in xxCertificates)xxCertificates[e].InstanceID==b&&(xxTlsCurrentCert=
1043 +e)}for(e in xxCertificates)xxCertificates[e].TrustedRootCertficate=1==xxCertificates[e].TrustedRootCertficate,xxCertificates[e].X509Certificate=window.atob(xxCertificates[e].X509Certificate),xxCertificates[e].XIssuer=parseCertName(xxCertificates[e].Issuer),xxCertificates[e].XSubject=parseCertName(xxCertificates[e].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1044 function parseCertName(b){var c={},a=b.split(","),d;for(d in a)b=a[d].indexOf("="),c[a[d].substring(0,b)]=a[d].substring(b+1);return c}
1045 function getTlsSecurityState(b){if(0==xxTlsSettings[b].Enabled)return"Behindert";var c=(1==xxTlsSettings[b].MutualAuthentication?"TLS mit gegenseitiger Authentifizierung":"Serverauthentifizierung TLS")+(1==xxTlsSettings[b].AcceptNonSecureConnections?" und Nicht-TLS":"");1==xxTlsSettings[b].MutualAuthentication&&xxTlsSettings[b].TrustedCN&&(b=MakeToArray(xxTlsSettings[b].TrustedCN),0<b.length&&(c+=", "+(1<b.length?"Trusted names":"Trusted name")+": "+b.join(", ")+"."));return c}
1046 function updateCertificates(){if(null!=xxCertificates){var b="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,c=1-b,a=TableStart(),a=a+TableEntry("Remote-TLS-Sicherheit",addLinkConditional(getTlsSecurityState(c),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEntry("Lokale TLS-Sicherheit",addLinkConditional(getTlsSecurityState(b),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEnd(),a=a+("<br>"+TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Verwalten Sie Intel&reg; AMT-Zertifikate f\u00fcr diesen Computer.<br><br>");
1047 if(0==xxCertificates.length&&0==xxCertPrivateKeys.length)a+="<div style=padding-left:15px><br><i>Keine Zertifikate gefunden.</i></div><br>";else{for(var d in xxCertificates)b="",xxCertificates[d].TrustedRootCertficate&&(b=", Vertrauensw\u00fcrdige Wurzel"),xxCertificates[d].XPrivateKey&&(b=", Privat Schl\u00fcssel"),d==xxTlsCurrentCert&&(b+=", TLS-Zertifikat"),a+="<div class=itemBar onclick=showCertDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(xxCertificates[d].XSubject.CN)+"</b><i>"+
1048 -b+"</i></div></div>";for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>Nicht zugewiesenes privates Schl\u00fcsselpaar #"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("Zertifikat hinzuf\u00fcgen ...","addCertButton()")+AddButton("Zertifikat ausstellen ...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(51,a)}}
1048 +b+"</i></div></div>";for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>Nicht zugewiesenes privates Schl\u00fcsselpaar #"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("Zertifikat hinzuf\u00fcgen ...","addCertButton()")+AddButton("Zertifikat ausstellen ...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(52,a)}}
1049 function showKeyPairDetails(b){setDialogMode(11,"Schl\u00fcsselpaar #"+b,5,function(c){2==c&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertPrivateKeys[b].InstanceID},PullCertificates,0,1)},"Dies ist ein \u00f6ffentliches / privates Zertifikatschl\u00fcsselpaar, das zu keinem Zertifikat geh\u00f6rt. Dieser Eintrag sollte vor\u00fcbergehend sein.")}
1050 var xxCertSubjectNames={CN:"Gemeinsamen Namen",O:"Organisation",OU:"Organisationseinheit",S:"Staat / Provinz",ST:"Staat / Provinz",L:"Lokalit\u00e4t",C:"Land",SN:"Nachname",GN:"Vorname"};
1051 function showCertDetails(b){if(!xxdialogMode){var c=xxCertificates[b],a;a="<br>"+addHtmlValue("Zertifikat",c.X509Certificate.length+" Bytes,<a style=cursor:pointer;color:blue onclick=downloadCert("+b+")>Herunterladen</a>");a+=addHtmlValue("Vertrauensw\u00fcrdige Wurzel",c.TrustedRootCertficate?"Ja":"Nein");0==c.TrustedRootCertficate&&c.XPrivateKey&&(a+=addHtmlValue("Privat Schl\u00fcssel","Vorhanden"));a+='<br><div style="border-bottom:1px solid gray"><i>Zertifikat Betreff</i></div><br>';for(var d in c.XSubject)c.XSubject[d]&&
1052 (a+=addHtmlValue(xxCertSubjectNames[d]?xxCertSubjectNames[d]:d,EscapeHtml(c.XSubject[d])));a+='<br><div style="border-bottom:1px solid gray"><i>Ausstellerzertifikat</i></div><br>';for(d in c.XIssuer)c.XIssuer[d]&&(a+=addHtmlValue(xxCertSubjectNames[d]?xxCertSubjectNames[d]:d,EscapeHtml(c.XIssuer[d])));setDialogMode(11,"Zertifikat -"+EscapeHtml(c.XSubject.CN),5,function(a){2==a&&(xxCertificates[b].XPrivateKey&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertificates[b].XPrivateKey.InstanceID},
1053 function(){},0,1),amtstack.Delete("AMT_PublicKeyCertificate",xxCertificates[b],certificateRemoved,0,1))},a)}}function downloadCert(b){saveAs(data2blob(xxCertificates[b].X509Certificate),xxCertificates[b].XSubject.CN+".cer")}function cert_FileSelectHandler(b){haltEvent(b);1==b.dataTransfer.files.length&&(b.dataTransfer.files[0].name.toLowerCase().endsWith(".p12")?issueCertButton(b.dataTransfer.files):addCertButton(b.dataTransfer.files))}var xxDragDropCertFiles=null;
1054 function addCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen onchange=addCertButtonUpdate() type=file style=float:right;width:260px accept=".cer,.pem">',xxDragDropCertFiles&&(b='<input style=float:right;width:260px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b="<div style=height:10px></div>"+("<div style=height:26px;margin-top:4px>"+b+"<div style=padding-top:4px>Zertifikatdatei</div></div>")+"<div style=height:26px;margin-top:4px><select id=certtype style=float:right;width:260px><option value=1>Vertrauensw\u00fcrdiges Stammzertifikat</option><option value=0>Kettenzertifikat</option></select><div style=padding-top:4px>Art des Zertifikats</div></div>",
1055 -setDialogMode(11,"Zertifikat hinzuf\u00fcgen",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c54",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1055 +setDialogMode(11,"Zertifikat hinzuf\u00fcgen",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c106",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1056 function addCertButtonOk2(b){b=b.target.result;var c=b.indexOf("-----BEGIN CERTIFICATE-----");0<=c?(b=b.substring(c+27),c=b.indexOf("-----END CERTIFICATE-----"),0<=c&&(b=b.substring(0,c)),b=b.replace(/\r\n/g,"")):b=btoa(b);1==getSelectElement("certtype").value?amtstack.AMT_PublicKeyManagementService_AddTrustedRootCertificate(b,certificateAdded):amtstack.AMT_PublicKeyManagementService_AddCertificate(b,certificateAdded)}
1057 function issueCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen type=file style=float:right;width:230px onchange=issueCertButtonUpdate() accept=".p12">',xxDragDropCertFiles&&(b='<input style=float:right;width:230px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b=""+("<div styleheight:26px;margin-top:14px>"+b+"<div style=padding-top:4px>Certificate file</div></div>")+"<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certopenpass type=password autocomplete=off style=float:right;width:230px><div style=padding-top:4px>Zertifikat Passwort</div></div>",
1058 b+='<br><div style="border-bottom:1px solid gray"><i>Intel&reg; AMT-Zertifikat</i></div>',b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certcn style=float:right;width:230px><div style=padding-top:4px>Gemeinsamen Namen</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certo style=float:right;width:230px><div style=padding-top:4px>Organisation</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certst style=float:right;width:230px><div style=padding-top:4px>Staat / Provinz</div></div>",
1059 b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certc style=float:right;width:230px><div style=padding-top:4px>Land</div></div>",b+='<div>Zertifikatsverwendung</div><ul 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">',b+="<li><label><input type=checkbox id=d11_cu4 checked>TLS-Server (HTTPS)</label></li>",b+="<li><label><input type=checkbox id=d11_cu5>TLS-Client (HTTPS)</label></li>",
1060 b+="<li><label><input type=checkbox id=d11_cu6>E-Mail-Schutz</label></li>",b+="<li><label><input type=checkbox id=d11_cu7>Codesignatur</label></li>",b+="<li><label><input type=checkbox id=d11_cu8>Zeitstempel</label></li>",b+="</ul>",setDialogMode(11,"Zertifikat ausstellen",3,issueCertButtonOk,b),issueCertButtonUpdate())}
1061 -function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c54",c)}
1061 +function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c106",c)}
1062 function issueCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length?(b=new FileReader,b.onload=issueCertButtonOk2,b.readAsBinaryString(c[0])):issueCertButtonOk3(null)}function issueCertButtonOk2(b){0==amtcert_loadP12File(b.target.result,Q("certopenpass").value,issueCertButtonOk3)&&messagebox("Zertifikat ausstellen","Zertifikat kann nicht entschl\u00fcsselt / entschl\u00fcsselt werden.")}
1063 function issueCertButtonOk3(b,c,a){xxCaPrivateKey=b;xxCaSubjectAttributes=c;amtstack.AMT_PublicKeyManagementService_GenerateKeyPair(0,2048,GenerateKeyPairResponse)}
1064 function GenerateKeyPairResponse(b,c,a,d){200!=d?messagebox("Zertifikat ausstellen","Schl\u00fcsselpaar konnte nicht generiert werden. Status: "+d):0!=a.Body.ReturnValue?messagebox("Zertifikat ausstellen","Schl\u00fcsselpaar konnte nicht generiert werden."+a.Body.ReturnValueStr):amtstack.Enum("AMT_PublicPrivateKeyPair",GenerateKeyPairResponse2,a.Body.KeyPair.ReferenceParameters.SelectorSet.Selector.Value)}
1065 -function GenerateKeyPairResponse2(b,c,a,d,g){if(200!=d)messagebox("Zertifikat ausstellen","Schl\u00fcsselpaar konnte nicht generiert werden. Status: "+d);else{b=null;for(var v in a)a[v].InstanceID==g&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};g={CN:"Nicht vertrauensw\u00fcrdiges Stammzertifikat"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in g={},xxCaSubjectAttributes)g[xxCaSubjectAttributes[v].shortName]=
1066 -xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,g,v);null==v?messagebox("Zertifikat ausstellen","Zertifikat kann nicht signiert werden."):(v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,
1065 +function GenerateKeyPairResponse2(b,c,a,d,e){if(200!=d)messagebox("Zertifikat ausstellen","Schl\u00fcsselpaar konnte nicht generiert werden. Status: "+d);else{b=null;for(var v in a)a[v].InstanceID==e&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};e={CN:"Nicht vertrauensw\u00fcrdiges Stammzertifikat"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in e={},xxCaSubjectAttributes)e[xxCaSubjectAttributes[v].shortName]=
1066 +xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,e,v);null==v?messagebox("Zertifikat ausstellen","Zertifikat kann nicht signiert werden."):(v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,
1067 v.length-25),GenerateKeyPairResponse4))}}function GenerateKeyPairResponse4(b,c,a,d){200!=d?messagebox("Zertifikat ausstellen","Schl\u00fcsselpaar konnte nicht generiert werden. Status: "+d):PullCertificates()}function certificateAdded(b,c,a,d){200!=d||0!=a.Body.ReturnValue?messagebox("Zertifikat hinzuf\u00fcgen","Zertifikat kann nicht hinzugef\u00fcgt werden, Fehler"+(200!=d?d:a.Body.ReturnValueStr)):PullCertificates()}
1068 function certificateRemoved(b,c,a,d){200!=d?messagebox("Zertifikat entfernen","Zertifikat kann nicht entfernt werden, Fehler"+d):PullCertificates()}function getInputElement(b){var c=document.getElementsByTagName("input");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}function getSelectElement(b){var c=document.getElementsByTagName("select");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}
1069 -function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>Kein Zertifikat, TLS deaktiviert</option>";for(var c in xxCertificates)0!=xxCertificates[c].TrustedRootCertficate||!xxCertificates[c].XPrivateKey||null!=xxTlsCurrentCert&&xxTlsCurrentCert!=c||(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>Zertifikat</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1069 +function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>Kein Zertifikat, TLS deaktiviert</option>";for(var c in xxCertificates)0==xxCertificates[c].TrustedRootCertficate&&xxCertificates[c].XPrivateKey&&(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>Zertifikat</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1070 b+="<option value=2>Mutual-auth TLS only</option><option value=3>Mutual-auth, non-TLS allowed</option>";b+='</select><div style=padding-top:4px>Security</div></div><div style=height:26px id=d11rcn title="Durch Kommas getrennte Liste der gebr\u00e4uchlichen Zertifikatsnamen, die eine Remoteverbindung herstellen d\u00fcrfen."><input id=d11_rcn style=float:right;width:260px onkeyup=showSetTlsSecurityDlgUpdate() placeholder="name1, name2"><div style=padding-top:4px>Remote CN\'s</div></div>';setDialogMode(11,
1071 "TLS-Einstellungen",3,showSetTlsSecurityDlgOk,b);if(0==xxTLSCredentialContext.length||0==xxTlsSettings[0].Enabled||0==xxTlsSettings[1].Enabled)getSelectElement("tlscert").value=-1;else for(c in b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value,xxCertificates)xxCertificates[c].InstanceID==b&&(getSelectElement("tlscert").value=c);c=1-("Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1);getSelectElement("tlsremote").value=(1==xxTlsSettings[c].MutualAuthentication?
1072 -2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c54",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1072 +2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c106",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1073 function showSetTlsSecurityDlgOk(){var b=getSelectElement("tlscert").value,c=getSelectElement("tlsremote").value,a=Clone(xxTlsSettings);setTlsSecurityPendingCalls=0;setTlsSecurityDeleteCredentialContext=null;if(-1!=b){if(0<xxTLSCredentialContext.length){var d=Clone(xxTLSCredentialContext[0]);d.ElementInContext.ReferenceParameters.SelectorSet.Selector.Value=xxCertificates[b].InstanceID;amtstack.Put("AMT_TLSCredentialContext",d,setTlsSecurityResponse,0,1)}else amtstack.Create("AMT_TLSCredentialContext",
1074 {ElementInContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[b].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",ElementProvidingContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_TLSProtocolEndpointCollection")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters>'},
1075 -setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,g=1-d;a[g].Enabled=-1!=b;a[g].MutualAuthentication=2<=c;a[g].AcceptNonSecureConnections=1==c%2;a[g].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1075 +setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,e=1-d;a[e].Enabled=-1!=b;a[e].MutualAuthentication=2<=c;a[e].AcceptNonSecureConnections=1==c%2;a[e].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1076 b,c,d){200!=d?messagebox("","Zeit konnte nicht eingestellt werden, Status ="+d):0!=c.Body.ReturnValue?messagebox("","Zeit konnte nicht eingestellt werden, Fehler: "+c.Body.ReturnValueStr):(a=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(c.Body.Ta0,a,a,function(){setTlsSecurityResponse()}))}));setTlsSecurityPendingCalls+=2;amtstack.Put("AMT_TLSSettingData",a[0],setTlsSecurityResponse,0,1,a[0]);amtstack.Put("AMT_TLSSettingData",a[1],setTlsSecurityResponse,
1077 0,1,a[1]);statusbox("TLS-Einstellungen","Neue Sicherheitseinstellungen anwenden ...")}function splitDomains(b){b=b.split(",");if(0!=b.length){for(var c in b)if(b[c]=b[c].trim(),0<=b[c].indexOf(" ")||0==b[c].length)return;if(!(4<b.length))return b}}
1078 function setTlsSecurityResponse(b,c,a,d){if(b){if(200!=d){messagebox("","Fehler beim Festlegen der TLS-Sicherheit, status ="+d);return}if(a.Body.ReturnValueStr&&!methodcheck(a))return}0==--setTlsSecurityPendingCalls&&amtstack.AMT_SetupAndConfigurationService_CommitChanges(null,setTlsSecurityResponse2)}
1079 function setTlsSecurityResponse2(b,c,a,d){200!=d?messagebox("","Fehler beim Festlegen der TLS-Sicherheit, status ="+d):0!=a.Body.ReturnValue?messagebox("","Fehler beim Festlegen der TLS-Sicherheit, Fehler: "+a.Body.ReturnValueStr):setTimeout(setTlsSecurityResponse3,2E3)}
1080 function setTlsSecurityResponse3(){null!=setTlsSecurityDeleteCredentialContext&&amtstack.Delete("AMT_TLSCredentialContext",setTlsSecurityDeleteCredentialContext,function(){});PullCertificates();setDialogMode();amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}var xxWatchdog=null;
1081 function PullWatchdog(){amtstack.BatchEnum(null,["*AMT_AgentPresenceCapabilities","AMT_AgentPresenceWatchdog","AMT_AgentPresenceWatchdogAction","AMT_StateTransitionCondition","CIM_ConcreteDependency"],PullWatchdogResponse)}
1082 -function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var g in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[g],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1082 +function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var e in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[e],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1083 "@Name","PolicyConditionName").Value,d=getItem(xxWatchdog.AMT_AgentPresenceWatchdog.responses,"DeviceID",d),a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,"PolicyConditionName",a),d.transitions||(d.transitions=[]),d.transitions.push(a)),c&&"AMT_StateTransitionCondition"==c.Value&&(a=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyConditionName").Value,b=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyActionName").Value,a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,
1084 "PolicyConditionName",a),b=getItem(xxWatchdog.AMT_AgentPresenceWatchdogAction.responses,"PolicyActionName",b),a.actions||(a.actions=[]),a.actions.push(b));updateWatchdog();QV("go19",!0)}}var watchdogEnabledStates="Unbekannt;Andere;aktiviert;Behindert;Herunterfahren;Unzutreffend;Aktiviert aber offline;Im Test;Aufgeschoben;Ruhe;Beginnend".split(";"),watchdogMonitoredEntity="Unbekannt;Andere;Betriebssystem;Startvorgang des Betriebssystems;Prozess zum Herunterfahren des Betriebssystems;Firmware-Startvorgang;BIOS-Startvorgang;Anwendung;Serviceprozessor".split(";");
1085 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("Maximale Wachhunde",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" Aufpasser");b+=TableEntry("Maximale Gesamtaktionen",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" Aktionen");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Verwalten Sie Intel&reg; AMT-Agenten-Anwesenheits-Watchdogs.<br><br>";if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||
1086 0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>Kein Agent Presence Watchdog gefunden.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="Aktion hinzuf\u00fcgen ..." onclick=addWatchdogAction(event,'+
1087 -c+")>";a.transitions&&(b+='<input type=button style=float:right value="Aktionen l\u00f6schen ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",g;for(g in a.transitions){var v=a.transitions[g];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : Zu protokollierendes Ereignis")}""!=
1088 -d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Watchdog hinzuf\u00fcgen ...","AddWatchdog()"));b+="<br>";QH(54,b)}}function getWatchdogTransitionStr(b){if(31==b)return"Jeder Staat";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1087 +c+")>";a.transitions&&(b+='<input type=button style=float:right value="Aktionen l\u00f6schen ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : Zu protokollierendes Ereignis")}""!=
1088 +d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Watchdog hinzuf\u00fcgen ...","AddWatchdog()"));b+="<br>";QH(55,b)}}function getWatchdogTransitionStr(b){if(31==b)return"Jeder Staat";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1089 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("Beschreibung",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("\u00dcberwachte Entit\u00e4t",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("Aktuellen Zustand",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("Aktivierter Status",watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("Startintervall",
1090 b.StartupInterval+" Sekunde (n)");c+=addHtmlValue("Timeout-Intervall",b.TimeoutInterval+" Sekunde (n)");setDialogMode(11,format("Wachhund {0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
1091 function AddWatchdog(){var b;b="<div style=height:26px;margin-top:4px><input id=wgname style=float:right;width:240px maxlength=16 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Name</div></div>"+('<div style=height:26px;margin-top:4px><input id=wgguid style=float:right;width:240px maxlength=36 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px title="Generieren Sie eine zuf\u00e4llige Ger\u00e4te-ID">'+addLink("Ger\u00e4te ID","GenerateWatchdogGuid()")+"</div></div>");b+="<div style=height:26px;margin-top:4px><input id=wgstart style=float:right;width:240px maxlength=8 placeholder=3600 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Start (Sekunden)</div></div>";
1092 b+="<div style=height:26px;margin-top:4px><input id=wgtimeout style=float:right;width:240px maxlength=8 placeholder=60 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Zeit\u00fcberschreitung (Sekunden)</div></div>";setDialogMode(11,"Watchdog hinzuf\u00fcgen",3,AddWatchdogOk,b);AddWatchdogUpdate()}function GenerateWatchdogGuid(){var b,c="";for(b=0;16>b;b++)c+=String.fromCharCode(random(255));Q("wgguid").value=guidToStr(rstr2hex(c));AddWatchdogUpdate()}
1093 -function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var g=a.charCodeAt(d);45!=g&&(48<=g&&57>=g||97<=g&&102>=g?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1093 +function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var e=a.charCodeAt(d);45!=e&&(48<=e&&57>=e||97<=e&&102>=e?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1094 function AddWatchdogOk(){var b=Q("wgtimeout").value,c=Q("wgstart").value;""==b&&(b=60);""==c&&(c=3600);b={CreationClassName:0,DeviceID:btoa(hex2rstr(guidToStr(Q("wgguid").value.replace(/-/g,"")).replace(/-/g,""))),StartupInterval:c,SystemCreationClassName:0,SystemName:0,TimeoutInterval:b,MonitoredEntityDescription:Q("wgname").value};amtstack.Create("AMT_AgentPresenceWatchdog",b,AddWatchdogOk2)}
1095 function AddWatchdogOk2(b,c,a,d){200!=d?messagebox("Wachhund","Watchdog kann nicht hinzugef\u00fcgt werden, Fehler #"+d):PullWatchdog()}
1096 function addWatchdogAction(b,c){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d;d="<table><td style=width:180px>Von<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsa"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";d+="<td>Zu<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsb"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";setDialogMode(11,"Watchdog-Aktion hinzuf\u00fcgen",
1097 3,addWatchdogActionOk,d+"</table><br>Aktion ausf\u00fchren<br><input id=wgsevent type=checkbox checked onclick=addWatchdogActionUpdate()>In das Ereignisprotokoll schreiben<br />",a);addWatchdogActionUpdate();haltEvent(b)}function addWatchdogActionUpdate(){var b=0,c=0,a;for(a in amtstack.WatchdogCurrentStates)1==Q("wgsa"+a).checked&&(b+=parseInt(a)),1==Q("wgsb"+a).checked&&(c+=parseInt(a));QE("dlgOkButton",0<b&&0<c&&1==Q("wgsevent").checked)}
1098 -function addWatchdogActionOk(b,c){var a=0,d=0,g;for(g in amtstack.WatchdogCurrentStates)1==Q("wgsa"+g).checked&&(a+=parseInt(g)),1==Q("wgsb"+g).checked&&(d+=parseInt(g));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Watchdog-Aktion","Watchdog-Aktion kann nicht hinzugef\u00fcgt werden, Fehler #"+d):PullWatchdog()}
1098 +function addWatchdogActionOk(b,c){var a=0,d=0,e;for(e in amtstack.WatchdogCurrentStates)1==Q("wgsa"+e).checked&&(a+=parseInt(e)),1==Q("wgsb"+e).checked&&(d+=parseInt(e));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Watchdog-Aktion","Watchdog-Aktion kann nicht hinzugef\u00fcgt werden, Fehler #"+d):PullWatchdog()}
1099 function deleteWatchdogActions(b,c){setDialogMode(11,"Watchdog-Aktionen l\u00f6schen",3,deleteWatchdogActionsOk,"Alle Aktionen f\u00fcr diesen Watchdog l\u00f6schen?",xxWatchdog.AMT_AgentPresenceWatchdog.responses[c]);haltEvent(b)}function deleteWatchdogActionsOk(b,c){amtstack.AMT_AgentPresenceWatchdog_DeleteAllActions(deleteWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
1100 function deleteWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Watchdog-Aktion","Watchdog-Aktionen k\u00f6nnen nicht entfernt werden, Fehler #"+d):PullWatchdog()}
1101 var xxSystemDefense=null,xxSystemDefenceLinkedPolicy={},xxUpdatingDefenseStats=!1,xxFilterStatistics=[{},{}],xxFilterStatisticsTimer=null,xxFilterStatisticsTimerActive=!1,xxSystemDefenceFilterEthernetTypes={2048:"Alle IP-Pakete",2054:"Alle ARP-Pakete"},xxSystemDefenceFilterIPTypes={4:"IPv4",6:"IPv6"},xxSystemDefenceFilterDesc={0:"Erlaube, z\u00e4hle",1:"Drop, Count",2:"Bewertungslimit",3:"erm\u00f6glichen",4:"Fallen"},xxSystemDefenceFilters={HdrProtocolID:1,HdrDestAddress:2,HdrDestMask:2,HdrSrcAddress:2,
1102 HdrSrcMask:2,HdrSrcPortStart:1,HdrSrcPortEnd:1,HdrDestPortStart:1,HdrDestPortEnd:1,HdrSrcAddressEndOfRange:2,"HdrDestAddressEndOfRange ":2,TCPFlagsOn:3,TCPFlagsOff:3};function PullSystemDefense(){amtFirstPull|=4;amtstack.BatchEnum(null,["AMT_SystemDefensePolicy","AMT_NetworkPortSystemDefensePolicy","AMT_Hdr8021Filter","AMT_IPHeadersFilter","AMT_NetworkFilter"],PullSystemDefenseResponse)}
1103 function PullSystemDefenseResponse(b,c,a,d){200==d&&(xxSystemDefense=a,updateSystemDefense(),QV("go18",!0),urlvars.norefresh&&UpdateDefenseStats())}
1104 function updateSystemDefense(){if(null!=xxSystemDefense){var b="";xxSystemDefenceLinkedPolicy={};for(var c in xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses){var a=xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses[c],d=+getItem(a.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value.substring(27),a=getItem(xxSystemDefense.AMT_SystemDefensePolicy.responses,"InstanceID",a.Dependent.ReferenceParameters.SelectorSet.Selector.Value);xxSystemDefenceLinkedPolicy[d]=
1105 -a}b+=TableStart();c="<i>Keiner</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("Standardrichtlinie f\u00fcr Kabel",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],g;for(g in a)d=a[g],d=1==d?d+" Paket":d+" Pakete",b+=TableEntry((0==c?"Verdrahtet":"Kabellos")+g,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>Verwalten von Intel&reg; AMT-Systemverteidigungsrichtlinien.<br><br>";
1105 +a}b+=TableStart();c="<i>Keiner</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("Standardrichtlinie f\u00fcr Kabel",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],e;for(e in a)d=a[e],d=1==d?d+" Paket":d+" Pakete",b+=TableEntry((0==c?"Verdrahtet":"Kabellos")+e,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>Verwalten von Intel&reg; AMT-Systemverteidigungsrichtlinien.<br><br>";
1106 if(0==xxSystemDefense.AMT_SystemDefensePolicy.responses.length)b+="<div style=padding-left:15px><i>Keine Systemverteidigungsrichtlinien gefunden.</i></div><br>";else for(c in xxSystemDefense.AMT_SystemDefensePolicy.responses)a=xxSystemDefense.AMT_SystemDefensePolicy.responses[c],d="",a.FilterCreationHandles&&(a.FilterCreationHandles=MakeToArray(a.FilterCreationHandles),d=a.FilterCreationHandles.length,d=", "+d+" filter"+(1<d?"s":"")),b+="<div class=itemBar onclick=showPolicyDetails("+c+")><div style=padding-top:3px><b>"+
1107 EscapeHtml(a.PolicyName)+"</b>"+d+"</div></div>";b+="<tr><td class=r1 style=padding-left:15px><br>Verwalten Sie Intel&reg; AMT-Systemschutzfilter.<br><br>";if(0==xxSystemDefense.AMT_Hdr8021Filter.responses.length&&0==xxSystemDefense.AMT_IPHeadersFilter.responses.length)b+="<div style=padding-left:15px><i>Es wurden keine Systemverteidigungsfilter gefunden.</i></div><br>";else{for(c in xxSystemDefense.AMT_Hdr8021Filter.responses)a=xxSystemDefense.AMT_Hdr8021Filter.responses[c],(d=xxSystemDefenceFilterEthernetTypes[a.HdrProtocolID8021])||
1108 (d="Alle Ethernet-Protokoll"+a.HdrProtocolID8021),d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile],2==a.FilterProfile&&(d+=" beim"+a.FilterProfileData+" Paket / Sek"),1==a.ActionEventOnMatch&&(d+=", Ereignis beim Spiel"),b+="<div class=itemBar onclick=showFilterDetails(0,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>";for(c in xxSystemDefense.AMT_IPHeadersFilter.responses){a=xxSystemDefense.AMT_IPHeadersFilter.responses[c];
1109 -(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="Alle Ethernet-Protokoll"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" beim"+a.FilterProfileData+" Paket / Sek");1==a.ActionEventOnMatch&&(d+=", Ereignis beim Spiel");var v=0;for(g in xxSystemDefenceFilters)a[g]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+
1110 -"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("Filter hinzuf\u00fcgen ...","AddDefenseFilter()")+AddButton("Richtlinie hinzuf\u00fcgen ...","AddDefensePolicy()"));QH(53,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}
1109 +(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="Alle Ethernet-Protokoll"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" beim"+a.FilterProfileData+" Paket / Sek");1==a.ActionEventOnMatch&&(d+=", Ereignis beim Spiel");var v=0;for(e in xxSystemDefenceFilters)a[e]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+
1110 +"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("Filter hinzuf\u00fcgen ...","AddDefenseFilter()")+AddButton("Richtlinie hinzuf\u00fcgen ...","AddDefensePolicy()"));QH(54,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}
1111 function StopDefenseStatsTimer(){null!=xxFilterStatisticsTimer&&(clearInterval(xxFilterStatisticsTimer),xxFilterStatisticsTimer=null);xxFilterStatisticsTimerActive=!1}
1112 function UpdateDefenseStats(b){if(b||1!=xxFilterStatisticsTimerActive)xxFilterStatisticsTimerActive=!0,b=b?b:0,xxSystemDefenceLinkedPolicy[b]?amtstack.AMT_SystemDefensePolicy_UpdateStatistics('<a:Address></a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+b+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",!1,UpdateDefenseStats2,b,0,{InstanceID:xxSystemDefenceLinkedPolicy[b].InstanceID}):
1113 -(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,g){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,g):StopDefenseStatsTimer()}
1114 -function UpdateDefenseStats3(b,c,a,d,g){b=0;if(200==d){xxFilterStatistics[g]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[g][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1113 +(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,e){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,e):StopDefenseStatsTimer()}
1114 +function UpdateDefenseStats3(b,c,a,d,e){b=0;if(200==d){xxFilterStatistics[e]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[e][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1115 function changeDefaultPolicy(b){if(!xxdialogMode){var c;c="<div style=height:26px;margin-top:4px><select id=policySelection style=float:right;width:266px><option value=-1>Keiner";for(var a in xxSystemDefense.AMT_SystemDefensePolicy.responses)c+="<option value="+a+(xxSystemDefenceLinkedPolicy[b]&&xxSystemDefense.AMT_SystemDefensePolicy.responses[a].InstanceID==xxSystemDefenceLinkedPolicy[b].InstanceID?" selected":"")+">"+xxSystemDefense.AMT_SystemDefensePolicy.responses[a].PolicyName;setDialogMode(11,
1116 "Standard-Systemverteidigungsrichtlinie",3,changeDefaultPolicyOk,c+"</select><div style=padding-top:4px>Standardrichtlinie</div></div>",b)}}
1117 function changeDefaultPolicyOk(b,c){var a=Q("policySelection").value,d=xxSystemDefenceLinkedPolicy[c];d&&amtstack.Delete("AMT_NetworkPortSystemDefensePolicy",'<w:SelectorSet><w:Selector Name="Antecedent"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">CIM_EthernetPort</w:Selector><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+c+
@@ -1124,118 +1124,135 @@ function AddDefenseFilter(){if(!xxdialogMode){var b;b="<div style=height:26px;ma
1124 b+="<div style=height:26px;margin-top:4px id=filterdatadiv><input id=filterdata style=float:right;width:260px maxlength=8 onkeyup=AddDefenseFilterUpdate()><div style=padding-top:4px>Pakete / Sekunde</div></div>";b+="<div style=height:26px;margin-top:4px><select id=filteraction style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=false>Nichts tun<option value=1>Ereignis beim Spiel</select><div style=padding-top:4px>Ereignisprotokoll</div></div>";setDialogMode(11,"Systemverteidigungsfilter hinzuf\u00fcgen",
1125 3,AddDefenseFilterOk,b);AddDefenseFilterUpdate()}}
1126 function AddDefenseFilterOk(){if(1>=Q("filtertype").value){var b=0==Q("filtertype").value?2048:2054,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrProtocolID8021:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value};2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_Hdr8021Filter",c,AddDefenseFilterOk2)}else{var b=2==Q("filtertype").value?
1127 -4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var g=a[d].indexOf("="),v=a[d].substring(0,g),g=a[d].substring(g+1),n=xxSystemDefenceFilters[v];n||(v="Hdr"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(g=g.split("."),4==g.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(g[0]),
1128 -parseInt(g[1]),parseInt(g[2]),parseInt(g[3]))))):c[v]=g)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c54",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1127 +4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var e=a[d].indexOf("="),v=a[d].substring(0,e),e=a[d].substring(e+1),n=xxSystemDefenceFilters[v];n||(v="Hdr"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(e=e.split("."),4==e.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(e[0]),
1128 +parseInt(e[1]),parseInt(e[2]),parseInt(e[3]))))):c[v]=e)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c106",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1129 function AddDefenseFilterOk2(b,c,a,d){200!=d?messagebox("Systemverteidigungsfilter hinzuf\u00fcgen","Filter kann nicht hinzugef\u00fcgt werden, Fehler #"+d):PullSystemDefense()}
1130 -function showFilterDetails(b,c){if(!xxdialogMode){var a,d,g,v;0==b?(v="AMT_Hdr8021Filter",g="Ethernet-Verkehr",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="Alle Ethernet-Protokoll"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",g="IP-Verkehr",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="Alle IP-Protokoll"+d.HdrIPVersion));var n;n=""+addHtmlValue("Name",EscapeHtml(d.Name));n+=addHtmlValue("Art",g);n+=addHtmlValue("Passender Verkehr",
1131 -a);n+=addHtmlValue("Richtung",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,g=d[l],b=xxSystemDefenceFilters[l],2==b&&4==g.length&&(g=hex2rstr(g),g=g.charCodeAt(0)+"."+g.charCodeAt(1)+"."+g.charCodeAt(2)+"."+g.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("Filter"+a,g));n+=addHtmlValue("Ereignis beim Spiel",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,"Ethernet Filter #"+d.InstanceID,5,showFilterDetailsOk,
1130 +function showFilterDetails(b,c){if(!xxdialogMode){var a,d,e,v;0==b?(v="AMT_Hdr8021Filter",e="Ethernet-Verkehr",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="Alle Ethernet-Protokoll"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",e="IP-Verkehr",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="Alle IP-Protokoll"+d.HdrIPVersion));var n;n=""+addHtmlValue("Name",EscapeHtml(d.Name));n+=addHtmlValue("Art",e);n+=addHtmlValue("Passender Verkehr",
1131 +a);n+=addHtmlValue("Richtung",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,e=d[l],b=xxSystemDefenceFilters[l],2==b&&4==e.length&&(e=hex2rstr(e),e=e.charCodeAt(0)+"."+e.charCodeAt(1)+"."+e.charCodeAt(2)+"."+e.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("Filter"+a,e));n+=addHtmlValue("Ereignis beim Spiel",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,"Ethernet Filter #"+d.InstanceID,5,showFilterDetailsOk,
1132 n,[v,d])}}function showFilterDetailsOk(b,c){2==b&&amtstack.Delete(c[0],c[1],deleteDefenseFilter)}function deleteDefenseFilter(b,c,a,d){200!=d?messagebox("Filter entfernen","Filter kann nicht entfernt werden. Stellen Sie sicher, dass er nicht verwendet wird."):PullSystemDefense()}var xxAddDefensePolicyFilters;
1133 function AddDefensePolicy(){if(!xxdialogMode){xxAddDefensePolicyFilters=[];var b;b='<div style=height:26px;margin-top:4px><input id=policyname title="<policy name>:<policy precedence number>" style=float:right;width:260px maxlength=16 onkeyup=AddDefensePolicyUpdate()><div style=padding-top:4px>Name</div></div><div style=height:26px;margin-top:4px><select id=policytx title="Standardaktion f\u00fcr ausgehenden Datenverkehr" style=float:right;width:133px><option value=0>Allow<option value=1>Fallen<option value=2>Erlaube, z\u00e4hle<option value=3>Drop, Count<option value=4>Zulassen, Z\u00e4hlen, Ereignis<option value=5>Drop, Count, Event</select><select id=policyrx style=float:right;width:133px title="Standardaktion f\u00fcr eingehenden Datenverkehr"><option value=0>erm\u00f6glichen<option value=1>Fallen<option value=2>Erlaube, z\u00e4hle<option value=3>Drop, Count<option value=4>Zulassen, Z\u00e4hlen, Ereignis<option value=5>Drop, Count, Event</select><div style=padding-top:4px>Standard TX / RX</div></div>';b+=
1134 "<div id=policyFilters></div>";if(0<xxSystemDefense.AMT_Hdr8021Filter.responses.length||0<xxSystemDefense.AMT_IPHeadersFilter.responses.length){b+="<div style=height:26px;margin-top:4px><div style=float:right><select id=xfilter style=width:186px>";for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];b+="<option value="+a.InstanceID+">"+a.Name}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],
1135 b+="<option value="+a.InstanceID+">"+a.Name;b+="</select><input id=addFilterButton type=button value=Add style=width:80px onclick=addFilterButton()></div><div style=padding-top:4px>Filter hinzuf\u00fcgen</div></div>"}setDialogMode(11,"Systemverteidigungsrichtlinie hinzuf\u00fcgen",3,AddDefensePolicyOk,b);AddDefensePolicyUpdate()}}function addFilterButton(){0<=xxAddDefensePolicyFilters.indexOf(Q("xfilter").value)||(xxAddDefensePolicyFilters.push(Q("xfilter").value),AddDefensePolicyUpdate())}
1136 function removeFilterButton(b){xxAddDefensePolicyFilters.splice(b,1);AddDefensePolicyUpdate()}
1137 -function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c54",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>Diese Richtlinie enth\u00e4lt keine Filter.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Entfernen","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+GetFilterById(xxAddDefensePolicyFilters[c]).Name+
1137 +function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c106",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>Diese Richtlinie enth\u00e4lt keine Filter.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Entfernen","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+GetFilterById(xxAddDefensePolicyFilters[c]).Name+
1138 "</b></div></div>";QH("policyFilters",b)}}function GetFilterById(b){for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];if(a.InstanceID==b)return a}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)if(a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],a.InstanceID==b)return a}
1139 function AddDefensePolicyOk(){var b=Q("policytx").value,c=Q("policyrx").value,a=0,d=Q("policyname").value.split(":");2==d.length&&(a=parseInt(d[1]));b={"InstanceID ":0,PolicyName:d[0],PolicyPrecedence:a,TxDefaultCount:1<b,TxDefaultDrop:1==b%2,TxDefaultMatchEvent:3<b,RxDefaultCount:1<c,RxDefaultDrop:1==c%2,RxDefaultMatchEvent:3<c};0<xxAddDefensePolicyFilters.length&&(b.FilterCreationHandles=xxAddDefensePolicyFilters);amtstack.Create("AMT_SystemDefensePolicy",b,AddDefensePolicyOk2)}
1140 function AddDefensePolicyOk2(b,c,a,d){200!=d?messagebox("Systemverteidigungsrichtlinie hinzuf\u00fcgen","Richtlinie kann nicht hinzugef\u00fcgt werden, Fehler #"+d):PullSystemDefense()}
1141 function showPolicyDetails(b){if(!xxdialogMode){var c=xxSystemDefense.AMT_SystemDefensePolicy.responses[b],a;a=""+addHtmlValue("Name",EscapeHtml(c.PolicyName));0!=c.PolicyPrecedence&&(a+=addHtmlValue("Vorrang",c.PolicyPrecedence));var d=1==c.TxDefaultDrop?"Fallen":"erm\u00f6glichen";1==c.TxDefaultCount&&(d+=", Anzahl");1==c.TxDefaultMatchEvent&&(d+=", Veranstaltung");a+=addHtmlValue("Standard-TX-Aktion",d);d=1==c.RxDefaultDrop?"Drop":"Allow";1==c.RxDefaultCount&&(d+=", Count");1==c.RxDefaultMatchEvent&&
1142 (d+=", Event");a+=addHtmlValue("Standard-Empfangsaktion",d);if(c.FilterCreationHandles)for(b in c.FilterCreationHandles)a+=addHtmlValue("Filter #"+(+b+1),GetFilterById(c.FilterCreationHandles[b]).Name);setDialogMode(11,format("Richtlinie #",c.InstanceID.substring(20)),5,showPolicyDetailsOk,a,c)}}function showPolicyDetailsOk(b,c){2==b&&amtstack.Delete("AMT_SystemDefensePolicy",c,deleteDefensePolicy)}
1143 -function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("Richtlinie entfernen","Richtlinie kann nicht entfernt werden. Stellen Sie sicher, dass sie nicht verwendet wird."):PullSystemDefense()}var xxWireless;function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService *AMT_BootCapabilities".split(" "),processWireless)}
1144 -function wifiRefresh(){xxdialogMode||PullWireless()}var xxWifiState={3:"Behindert",32768:"Aktiviert in S0",32769:"Aktiviert in S0, Sx / AC"},xxRadioState={2:"Ein, Verbunden",3:"aus",6:"Ein, Nicht verbunden"},xxWifiAuthenticationMethod={1:"Andere",2:"\u00d6ffnen",3:"Gemeinsamer Schl\u00fcssel",4:"Wpa psk",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE"},xxWifiEncryptionMethod={1:"Andere",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"Keiner"};
1143 +function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("Richtlinie entfernen","Richtlinie kann nicht entfernt werden. Stellen Sie sicher, dass sie nicht verwendet wird."):PullSystemDefense()}var xxWireless;function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService CIM_IEEE8021xSettings".split(" "),processWireless)}
1144 +function wifiRefresh(){xxdialogMode||PullWireless()}var xxWifiState={3:"Behindert",32768:"Aktiviert in S0",32769:"Aktiviert in S0, Sx / AC"},xxRadioState={2:"Ein, Verbunden",3:"aus",6:"Ein, Nicht verbunden"},xxWifiAuthenticationMethod={1:"Andere",2:"\u00d6ffnen",3:"Gemeinsamer Schl\u00fcssel",4:"Wpa psk",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE IEEE 802.1x",32769:"WPA3 OWE IEEE 802.1x"},xxWifiEncryptionMethod={1:"Andere",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"Keiner"};
1145 function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1146 -function showWirelessInfo(){if(xxWireless){var b,c,a="",d,g;if(xxWireless.CIM_WiFiPortCapabilities.response){g="<br><h2>Drahtlose Profile</h2>"+TableStart2();g+="<tr><td class=r2 style=padding-left:15px><br>Drahtlose Profile, die Intel&reg; AMT f\u00fcr die Netzwerkkonnektivit\u00e4t verwendet.<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b&&(g+="<div class=itemBar onclick=showWifiDetails("+
1147 -c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+" &nbsp; ",xxAccountAdminName&&(g+=AddButton2("Entfernen",'wifiRemoveButton("'+c+'")')),g+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>",a++);0==a&&(g+="<i>Keine drahtlosen Profile vorhanden</i><br>");g+="<br><td class=r2>";g=xxAccountAdminName?g+TableEnd(AddButton("Neues Profil","showWifiNewProfile()")):g+TableEnd("");
1148 -QH(20,g+"<br>")}}}function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"Drahtloser Zustand",3,wifiStateDlg,b)}}
1146 +function showWirelessInfo(){if(xxWireless){var b,c,a="",d,e;if(xxWireless.CIM_WiFiPortCapabilities.response){e="<br><h2>Drahtlose Profile</h2>"+TableStart2();e+="<tr><td class=r2 style=padding-left:15px><br>Drahtlose Profile, die Intel&reg; AMT f\u00fcr die Netzwerkkonnektivit\u00e4t verwendet.<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)if(d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b){var v="",n=null,l="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");
1147 +if(xxWireless.CIM_IEEE8021xSettings.responses)for(var p in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[p].ElementName==d.ElementName&&(n=xxWireless.CIM_IEEE8021xSettings.responses[p]);n&&(v=", "+l[n.AuthenticationProtocol]);e+="<div class=itemBar onclick=showWifiDetails("+c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+v+" &nbsp; ";xxAccountAdminName&&
1148 +(e+=AddButton2("Entfernen",'wifiRemoveButton("'+c+'")'));e+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>";a++}0==a&&(e+="<i>Keine drahtlosen Profile vorhanden</i><br>");e+="<br><td class=r2>";e=xxAccountAdminName?e+TableEnd(AddButton("Neues Profil","showWifiNewProfile()")):e+TableEnd("");QH(20,e+"<br>")}}}
1149 +function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"Drahtloser Zustand",3,wifiStateDlg,b)}}
1150 function wifiStateDlg(){amtstack.CIM_WiFiPort_RequestStateChange(document.querySelector("input[name=d11]:checked").value,null,function(){amtstack.Get("CIM_WiFiPort",function(b,c,a,d){200==d&&(xxWireless.CIM_WiFiPort.response=a.Body,showWirelessInfo())})})}
1151 function showWifiSyncDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d11 id=wl0 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">Behindert</label><br>");b+="<label><input type=radio name=d11 id=wl0 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">aktiviert</label><br>";setDialogMode(11,"Local Profile Sync",3,showWifiSyncDlgEx,b)}}
1151 -function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,g){200==g&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1152 +function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,e){200==e&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1153 function showUefiWifiCoExDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d12 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Disabled</label><br>");b+="<label><input type=radio name=d12 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Enabled</label><br>";setDialogMode(11,"UEFI Wifi CoEx Profile Sharing",3,UefiWifiCoExDlg,b)}}
1153 -function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,g){200==g&&PullWireless()})}
1154 -function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("Profilname",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",b.SSID);c+=addHtmlValue("Authentifizierung",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("Verschl\u00fcsselung",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("Priorit\u00e4t",b.Priority);messagebox("Drahtloses Profil",c+"</div>")}}
1155 -function wifiRemoveButton(b){xxdialogMode||(QH(60,format('WLAN-Profil entfernen "{0}"?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"Drahtloses Profil",3,function(){removeWifiButtonEx(b)}))}function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1156 -function removeWifiEntryResponse(b,c,a,d,g){methodcheck(a)||amtstack.Enum("CIM_WiFiEndpointSettings",function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c,showWirelessInfo())})}
1157 -function showWifiNewProfile(){if(!xxdialogMode){var b="";for(i=1;256>i;i++){var c=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==i&&(c=0);c&&(b+="<option value="+i+">"+i)}QH("c24",b);QV("c26",13<amtversion);c25.value=6;c27.value=4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"Drahtloses Profil hinzuf\u00fcgen",3,function(){addWifiProfile()});
1158 -updateWifiDialog()}}
1159 -function addWifiProfile(){amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},{__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c27.value,SSID:c23.value,Priority:c24.value,PSKPassPhrase:c28.value},
1160 -null,null,null,removeWifiEntryResponse)}
1161 -function updateWifiDialog(){var b=!0,c=c25.value,a=c27.value;QV(66,4>c);QV(65,3<c);QV(64,3<c);QV(67,4>c);4>c&&(3==a||4==a)&&(c27.value=2);3<c&&(2==a||5==a)&&(c27.value=3);32768==c&&(c27.value=4);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);QE("c54",1==b&&0<c22.value.length&&0<c23.value.length&&7<c28.value.length&&
1162 -c28.value==c29.value)}function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1154 +function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,e){200==e&&PullWireless()})}
1155 +function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("Profilname",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",EscapeHtml(b.SSID));c+=addHtmlValue("Authentifizierung",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("Verschl\u00fcsselung",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("Priorit\u00e4t",b.Priority);var a=null,d="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");
1156 +if(xxWireless.CIM_IEEE8021xSettings.responses)for(var e in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[e].ElementName==b.ElementName&&(a=xxWireless.CIM_IEEE8021xSettings.responses[e]);a&&(c=c+'<div style="width:100%;border-bottom:1px solid #000;margin-bottom:5px;margin-top:5px">802.11x</div>'+addHtmlValue("Authentifizierung",d[a.AuthenticationProtocol]),a.Domain&&(c+=addHtmlValue("Domain",EscapeHtml(a.Domain))),a.Username&&(c+=addHtmlValue("Nutzername",EscapeHtml(a.Username))));
1157 +c+="</div>";messagebox("Drahtloses Profil",c)}}function wifiRemoveButton(b){xxdialogMode||(QH(61,format('WLAN-Profil entfernen "{0}"?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"Drahtloses Profil",3,function(){removeWifiButtonEx(b)}))}function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1158 +function removeWifiEntryResponse(b,c,a,d,e){methodcheck(a)||amtstack.BatchEnum("",["CIM_WiFiEndpointSettings","CIM_IEEE8021xSettings"],function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c.CIM_WiFiEndpointSettings.responses,xxWireless.CIM_IEEE8021xSettings.responses=c.CIM_IEEE8021xSettings.responses,showWirelessInfo())})}
1159 +function showWifiNewProfile(){if(!xxdialogMode){for(var b="",c=1;256>c;c++){var a=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==c&&(a=0);a&&(b+="<option value="+c+">"+c)}QH("c24",b);var b="<option value=-1>"+EscapeHtml("Keiner")+"</option>",a="<option value=-1>"+EscapeHtml("Keiner")+"</option>",c;for(c in xxCertificates)xxCertificates[c].TrustedRootCertficate?a+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+
1160 +"</option>":xxCertificates[c].XPrivateKey&&(b+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+"</option>");QH("c50",b);QH("c52",a);c="<option value=32769>WPA3 OWE IEEE 802.1x</option><option value=32768>WPA3 SAE IEEE 802.1x</option>";c+="<option value=7>WPA2 IEEE 802.1x</option>";c+="<option value=5>WPA IEEE 802.1x</option>";c+="<option value=6>WPA2 PSK</option>";c+="<option value=4>Wpa psk</option>";QH("c25",c);c25.value=6;c26.value=
1161 +4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"Drahtloses Profil hinzuf\u00fcgen",3,function(){addWifiProfile()});updateWifiDialog()}}
1162 +function addWifiProfile(){var b,c,a,d={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c26.value,SSID:c23.value,Priority:c24.value};if(4==c25.value||6==c25.value)d.PSKPassPhrase=c28.value;if(5==c25.value||7==c25.value||32768==c25.value||
1163 +32769==c25.value)b={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_IEEE8021xSettings"),ElementName:"8021x-"+c22.value,InstanceID:"8021x-"+c22.value,ActiveInS0:1==Q("c54").value,AuthenticationProtocol:Q("c32").value},""!=Q("c44").value&&(b.RoamingIdentity=Q("c44").value),""!=Q("c34").value&&(b.ServerCertificateName=Q("c34").value,b.ServerCertificateNameComparison=Q("c36").value),
1164 +""!=Q("c40").value&&(b.Username=Q("c40").value),""!=Q("c42").value&&(b.Password=Q("c42").value),""!=Q("c38").value&&(b.Domain=Q("c38").value),3<Q("c32").value&&(b.ProtectedAccessCredential=Q("c46").value,b.PACPassword=Q("c48").value),0<=parseInt(Q("c50").value)&&(c='<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">'+
1165 +xxCertificates[parseInt(Q("c50").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>"),0<=parseInt(Q("c52").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">'+
1166 +xxCertificates[parseInt(Q("c52").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>");console.log("wifiepsettinginput",JSON.stringify(d,null,2));console.log("netAuthProfile",JSON.stringify(b,null,2));console.log("netAuthSettingsClientCert",c);console.log("netAuthSettingsServerCaCert",a);amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},d,b,c,a,removeWifiEntryResponse)}
1167 +function updateWifiDialog(){var b=!0,c=c25.value,a=c26.value;4>c&&(3==a||4==a)&&(c26.value=2);3<c&&(2==a||5==a)&&(c26.value=3);if(32768==c||32769==c)c26.value=4;QV("c27",4==c||6==c);QV("c30",5==c||7==c||32768==c||32769==c);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);0==c22.value.length&&0==c23.value.length&&(b=!1);4!=c&&6!=c||
1168 +!(8>c28.value.length||63<c28.value.length||c28.value!=c29.value)||(b=!1);QE("c106",b);updateNetAuthDialog()}function updateNetAuth2Dialog(){QV("c35",""!=Q("c33").value);QV("c45",3<Q("c32").value);QV("c47",3<Q("c32").value)}
1169 +function editNetAuthProfile(){if(!xxdialogMode){var b="<option value=-1>"+EscapeHtml("Keiner")+"</option>",c="<option value=-1>"+EscapeHtml("Keiner")+"</option>",a;for(a in xxCertificates)xxCertificates[a].TrustedRootCertficate?c+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>":xxCertificates[a].XPrivateKey&&(b+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>");QH("c98",b);QH("c100",c);b=amtsysstate.AMT_8021XProfile.responses.Body;
1170 +Q("c78").value=b.Enabled?1:0;Q("c102").value=b.ActiveInS0?1:0;Q("c104").value=b.PxeTimeout;if(b.Enabled){Q("c80").value=b.AuthenticationProtocol;Q("c92").value=b.RoamingIdentity?b.RoamingIdentity:"";Q("c82").value=b.ServerCertificateName?b.ServerCertificateName:"";Q("c84").value=b.ServerCertificateNameComparison?b.ServerCertificateNameComparison:0;Q("c88").value=b.Username?b.Username:
1171 +"";Q("c90").value=b.Password?b.Password:"";Q("c86").value=b.Domain?b.Domain:"";Q("c94").value=b.ProtectedAccessCredential?b.ProtectedAccessCredential:"";Q("c96").value=b.PACPassword?b.PACPassword:"";var d=c=-1;b.ServerCertificateIssuer&&(c=b.ServerCertificateIssuer.ReferenceParameters.SelectorSet.Selector.Value);b.ClientCertificate&&(d=b.ClientCertificate.ReferenceParameters.SelectorSet.Selector.Value);for(a in xxCertificates)xxCertificates[a].InstanceID==
1172 +c&&(Q("c100").value=a),xxCertificates[a].InstanceID==d&&(Q("c98").value=a)}setDialogMode(27,"802.1x Profile",3,function(){setNetAuthProfile()});updateNetAuthDialog()}}
1173 +function updateNetAuthDialog(){QV("c79",1==Q("c78").value);QV("c81",1==Q("c78").value);QV("c83",1==Q("c78").value&&""!=Q("c82").value);QV("c85",1==Q("c78").value);QV("c87",1==Q("c78").value);QV("c89",1==Q("c78").value);QV("c91",1==Q("c78").value);QV("c93",1==Q("c78").value&&
1174 +3<Q("c80").value);QV("c95",1==Q("c78").value&&3<Q("c80").value);QV("c97",1==Q("c78").value);QV("c99",1==Q("c78").value);QV("c101",1==Q("c78").value);QV("c103",1==Q("c78").value)}
1175 +function setNetAuthProfile(){var b=Clone(amtsysstate.AMT_8021XProfile.responses.Body);b.Enabled=1==Q("c78").value;b.Enabled&&(b.ActiveInS0=1==Q("c102").value,b.AuthenticationProtocol=Q("c80").value,""!=Q("c92").value?b.RoamingIdentity=Q("c92").value:delete b.RoamingIdentity,""!=Q("c82").value?(b.ServerCertificateName=Q("c82").value,b.ServerCertificateNameComparison=Q("c84").value):
1176 +(delete b.ServerCertificateName,delete b.ServerCertificateNameComparison),""!=Q("c88").value?b.Username=Q("c88").value:delete b.Username,""!=Q("c90").value?b.Password=Q("c90").value:delete b.Password,""!=Q("c86").value?b.Domain=Q("c86").value:delete b.Domain,3<Q("c80").value?(b.ProtectedAccessCredential=Q("c94").value,b.PACPassword=Q("c96").value):(delete b.ProtectedAccessCredential,delete b.PACPassword),
1177 +0<=parseInt(Q("c98").value)?b.ClientCertificate="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c98").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ClientCertificate,0<=parseInt(Q("c100").value)?b.ServerCertificateIssuer="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+
1178 +amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c100").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ServerCertificateIssuer,b.PxeTimeout=Q("c104").value);amtstack.Put("AMT_8021XProfile",b,setNetAuthProfileEx)}
1179 +function setNetAuthProfileEx(b,c,a,d){200==d?(amtsysstate.AMT_8021XProfile.responses.Body=amtsysstate.AMT_8021XProfile.response=a.Body,updateSystemStatus()):a.Header.WsmanError?messagebox("802.1x Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("802.1x Error","Error, Status = "+d)}
1180 +function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1181 var DMTFCPUStatus="Unbekannt;aktiviert;Vom Benutzer deaktiviert;Vom BIOS deaktiviert (POST-Fehler);Leerlauf;Andere".split(";"),DMTFMemType="Unbekannt;Andere;DRAM;Synchroner DRAM;Cache-DRAM;EDO;EDRAM;VRAM;SRAM;RAM;Rom;Blitz;EEPROM;FEPROM;EPROM;CDRAM;3DRAM;SDRAM;SGRAM;RDRAM;DDR;DDR-2;BRAM;FB-DIMM;DDR3;FBD2;DDR4;LPDDR;LPDDR2;LPDDR3;LPDDR4".split(";"),DMTFMemFormFactor=";Andere;Unbekannt;SIMM;SCHLUCK;Chip;TAUCHEN;ZIP;Propriet\u00e4re Karte;DIMM;TSOP;Reihe von Chips;RIMM;SODIMM;SRIMM;FB-DIM".split(";"),
1182 DMTFProcFamilly={191:"Intel&reg; Core &trade; 2 Duo Prozessor",192:"Intel&reg; Core &trade; 2 Solo Prozessor",193:"Intel&reg; Core &trade; 2 Extreme Prozessor",194:"Intel&reg; Core &trade; 2 Quad-Prozessor",195:"Intel&reg; Core &trade; 2 Extreme Mobilprozessor",196:"Intel&reg; Core &trade; 2 Duo Mobilprozessor",197:"Intel&reg; Core &trade; 2 Solo Mobilprozessor",198:"Intel&reg; Core &trade; i7-Prozessor",199:"Dual-Core Intel&reg; Celeron&reg; Prozessor"},HardwareInventory;
1165 -function processHardware(b,c,a,d){if(200==d){var g;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("Speichern...","SaveHardwareLog()")+" Hardwareinformationen werden beim Systemstart erfasst.");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>Plattform</h2>"+FullTable({Computermodell:c.Model,Hersteller:c.Manufacturer,
1183 +function processHardware(b,c,a,d){if(200==d){var e;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("Speichern...","SaveHardwareLog()")+" Hardwareinformationen werden beim Systemstart erfasst.");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>Plattform</h2>"+FullTable({Computermodell:c.Model,Hersteller:c.Manufacturer,
1184 "Ausf\u00fchrung":c.Version,Ordnungsnummer:c.SerialNumber,"System ID":guidToStr(a.CIM_SystemPackaging.responses[0].PlatformGUID).toLowerCase()},"");b+="<br><h2>Fu\u00dfleiste</h2>";b+=FullTable({Hersteller:d.Manufacturer,Produktname:d.Model,"Ausf\u00fchrung":d.Version,Ordnungsnummer:d.SerialNumber,"Asset-Tag":d.Tag,"Austauschbar?":1==d.CanBeFRUed?"Yes":"No"},"");b+="<br><h2>BIOS</h2>";b+=FullTable({"Verk\u00e4ufer":a.CIM_BIOSElement.response.Manufacturer,"Ausf\u00fchrung":v,"Ver\u00f6ffentlichungsdatum":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",
1167 -{timeZone:"UTC"})},"");b+="<br>";for(g in a.CIM_Processor.responses)c=a.CIM_Processor.responses[g],d=a.CIM_Chip.responses[g],b+="<h2>Prozessor "+(parseInt(g)+1)+"</h2>",b+=FullTable({Hersteller:trademarks(d.Manufacturer),Familie:DMTFProcFamilly[c.Family],"Ausf\u00fchrung":trademarks(d.Version),"Maximale Sockelgeschwindigkeit":c.MaxClockSpeed+" MHz",Status:DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(g in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[g],b+="<h2>Speichermodul "+(+g+
1168 -1)+"</h2>",b+=FullTable({"Bank Label":c.BankLabel,Hersteller:c.Manufacturer,Ordnungsnummer:c.SerialNumber,"Gr\u00f6\u00dfe":parseInt(c.Capacity/1048576)+" MB",Formfaktor:DMTFMemFormFactor[c.FormFactor],Art:DMTFMemType[c.MemoryType],"Asset-Tag":c.Tag,Artikelnummer:c.PartNumber},"");b+="<br>";for(g in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[g],d=a.CIM_PhysicalPackage.responses[+g+1],b+="<h2>Speichermedium "+(parseInt(g)+1)+"</h2>",b+=FullTable({Modell:d.Model,Ordnungsnummer:""==
1169 -d.SerialNumber?"Unknown":d.SerialNumber,"Gr\u00f6\u00dfe":parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" MB"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(g in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[g].PackageType&&(c=a.CIM_PhysicalPackage.responses[g]);null!=c&&(b+="<h2>Battery</h2>",g=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,Hersteller:c.Manufacturer,"Manufacture date":g,Ordnungsnummer:c.SerialNumber,
1185 +{timeZone:"UTC"})},"");b+="<br>";for(e in a.CIM_Processor.responses)c=a.CIM_Processor.responses[e],d=a.CIM_Chip.responses[e],b+="<h2>Prozessor "+(parseInt(e)+1)+"</h2>",b+=FullTable({Hersteller:trademarks(d.Manufacturer),Familie:DMTFProcFamilly[c.Family],"Ausf\u00fchrung":trademarks(d.Version),"Maximale Sockelgeschwindigkeit":c.MaxClockSpeed+" MHz",Status:DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(e in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[e],b+="<h2>Speichermodul "+(+e+
1186 +1)+"</h2>",b+=FullTable({"Bank Label":c.BankLabel,Hersteller:c.Manufacturer,Ordnungsnummer:c.SerialNumber,"Gr\u00f6\u00dfe":parseInt(c.Capacity/1048576)+" MB",Formfaktor:DMTFMemFormFactor[c.FormFactor],Art:DMTFMemType[c.MemoryType],"Asset-Tag":c.Tag,Artikelnummer:c.PartNumber},"");b+="<br>";for(e in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[e],d=a.CIM_PhysicalPackage.responses[+e+1],b+="<h2>Speichermedium "+(parseInt(e)+1)+"</h2>",b+=FullTable({Modell:d.Model,Ordnungsnummer:""==
1187 +d.SerialNumber?"Unknown":d.SerialNumber,"Gr\u00f6\u00dfe":parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" MB"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(e in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[e].PackageType&&(c=a.CIM_PhysicalPackage.responses[e]);null!=c&&(b+="<h2>Battery</h2>",e=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,Hersteller:c.Manufacturer,"Manufacture date":e,Ordnungsnummer:c.SerialNumber,
1188 Art:"Andere;Unbekannt;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],"Design capacity":a.CIM_Battery.response.DesignCapacity+" mWatt-hours","Design voltage":a.CIM_Battery.response.DesignVoltage+" mVolts"},c.OtherIdentifyingInfo&&(a["Other Info"]=c.OtherIdentifyingInfo),b+=FullTable(a,""))}b+="<br>";QH(16,b);updateSystemStatus()}}
1189 function SaveHardwareLog(){!xxdialogMode&&HardwareInventory&&SaveJsonFile("IntelAmtHardware","hardware","Intel AMT Hardware-Informationen",HardwareInventory)}var AmtSystemPowerSchemes=null;function PullPowerPolicy(){amtstack.Enum("AMT_SystemPowerScheme",powerPolicyResponse)}function powerPolicyResponse(b,c,a,d){AmtSystemPowerSchemes=a;updateSystemStatus()}
1190 function showPowerPolicyDlg(b){if(!xxdialogMode){for(var c="",a=0;a<AmtSystemPowerSchemes.length;a++)c+='<input type=radio name=powerpolicy value="'+AmtSystemPowerSchemes[a].InstanceID+'" '+(AmtSystemPowerSchemes[a].SchemeGUID==b?" checked":"")+">"+AmtSystemPowerSchemes[a].Description+"<br>";setDialogMode(11,"Intel&reg; AMT-Stromversorgungsrichtlinie",3,showPowerPolicyDlgOk,c)}}
1191 function showPowerPolicyDlgOk(){for(var b=null,c=0,a=document.getElementsByTagName("input");c<a.length;c++)"powerpolicy"==a[c].name&&a[c].checked&&(b=a[c].value);amtstack.AMT_SystemPowerScheme_SetPowerScheme(showPowerPolicyDlgOkDone,b)}function showPowerPolicyDlgOkDone(b,c,a,d){200==d&&PullSystemStatus()}var xxAccountAdminName,xxAccountRealmInfo,xxAccountEnabledInfo={},xxAccountFetch,showHiddenAccounts=!1;
1192 function PullUserInfo(){xxAccountFetch=1;delete xxAccountAdminName;xxAccountRealmInfo={};amtstack.AMT_AuthorizationService_GetAdminAclEntry(getAdminAclEntryResponse);amtstack.AMT_AuthorizationService_EnumerateUserAclEntries(1,enumerateUserAclEntriesResponse)}function getAdminAclEntryResponse(b,c,a,d){200==d&&(xxAccountRealmInfo[-1]={AccessPermission:999,DigestUsername:a.Body.Username,Realms:null},xxAccountAdminName=a.Body.Username,updateAccounts())}
1175 -function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var g in a.Body.Handles)b=a.Body.Handles[g],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1176 -function getUserAclEntryExResponse(b,c,a,d,g){xxAccountFetch--;200==d&&(a.Body.Handle=g,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[g]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,g){200==d&&(xxAccountEnabledInfo[g]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,g){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(g,getAclEnabledStateResponse,g))}
1177 -function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>Verwalten Sie die Intel&reg; AMT-Benutzerkonten f\u00fcr diesen Computer.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,g=!1,v=0;a.DigestUsername?(d=a.DigestUsername,g="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!g){var n="";if(999!=
1178 -a.AccessPermission){2==v&&(n+="Behindert,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Bereiche[c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="Wirtschaftspr\u00fcfer,");n=0<=a.Realms.indexOf(3)?n+"Administrator":1==l?n+"1 Reich":n+(l+" Bereiche")}else n+="Administrator",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!g&&xxAccountAdminName&&
1193 +function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var e in a.Body.Handles)b=a.Body.Handles[e],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1194 +function getUserAclEntryExResponse(b,c,a,d,e){xxAccountFetch--;200==d&&(a.Body.Handle=e,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[e]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,e){200==d&&(xxAccountEnabledInfo[e]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,e){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(e,getAclEnabledStateResponse,e))}
1195 +function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>Verwalten Sie die Intel&reg; AMT-Benutzerkonten f\u00fcr diesen Computer.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,e=!1,v=0;a.DigestUsername?(d=a.DigestUsername,e="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!e){var n="";if(999!=
1196 +a.AccessPermission){2==v&&(n+="Behindert,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Bereiche[c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="Wirtschaftspr\u00fcfer,");n=0<=a.Realms.indexOf(3)?n+"Administrator":1==l?n+"1 Reich":n+(l+" Bereiche")}else n+="Administrator",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!e&&xxAccountAdminName&&
1197 (b+=" "+AddButton2("Bearbeiten...","changeAccountButton(event,"+a.Handle+")"));b+='</div><div style=padding-top:3px;width:330px;float:left;overflow-x:hidden title="'+d+'"><b>'+d+"</b></div><div style=padding-top:3px>"+n+"</div></div>"}}c='<div style=float:right;margin-right:8px><a title="Versteckte Konten umschalten" style=color:gray;cursor:pointer onclick=toggleAccountButton()>'+(showHiddenAccounts?"&#x25B2;":"&#x25BC;")+"</a></div><div>&nbsp;"+AddRefreshButton("xxAccountFetch=999;PullUserInfo()");
1180 -xxAccountAdminName&&(c+=AddButton("Neues Konto","newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1198 +xxAccountAdminName&&(c+=AddButton("Neues Konto","newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(22,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1199 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"Konto bearbeiten",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1200 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"Neues Konto",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1183 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,g=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Kontofehler","Ung\u00fcltige Parameter");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1184 -l,n,g,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,g,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}
1185 -function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Administrator</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1186 -function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["Nur lokal","Nur Netzwerk","Alle (lokal & Netzwerk)"];
1187 -function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,g=c.DigestUsername;g||(g=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("Name",g);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("Zustand",1==xxAccountEnabledInfo[b].Enabled?"aktiviert":"Behindert"));if(g==xxAccountAdminName)a+=addHtmlValue("Genehmigung","Administrator");else{var a=a+addHtmlValue("Genehmigung",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v="Administrator",
1188 -0<=c.Realms.indexOf(20)&&(v+=", Wirtschaftspr\u00fcfer");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="Keiner");a+=addHtmlValue("Bereiche","")+"<b>"+v+"</b>"}messagebox("Konto"+g,a+"</div>")}}
1189 -function wsmanQuery(){QH(24,"");var b=getSelectedOptions(Q(22)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(23,!1),c&&0<c.length&&amtstack.BatchEnum("Browser",c,browserResponse,null,!0))}
1190 -function browserResponse(b,c,a,d){QE(23,!0);b="";for(var g in a)c=a[g],b+="<h2>"+g+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(Leeren)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>Error #"+c.status+"</div>"),b+="</div><br>";QH(24,b)}
1201 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Kontofehler","Ung\u00fcltige Parameter");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1202 +l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1203 +function updateRealms(b){QV(62,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Administrator</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(63,c)}}
1204 +function updateAccountDialog(){var b=!0;if("none"!=Q(62).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c106",b)}var xxUserPermissions=["Nur lokal","Nur Netzwerk","Alle (lokal & Netzwerk)"];
1205 +function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,e=c.DigestUsername;e||(e=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("Name",e);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("Zustand",1==xxAccountEnabledInfo[b].Enabled?"aktiviert":"Behindert"));if(e==xxAccountAdminName)a+=addHtmlValue("Genehmigung","Administrator");else{var a=a+addHtmlValue("Genehmigung",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v="Administrator",
1206 +0<=c.Realms.indexOf(20)&&(v+=", Wirtschaftspr\u00fcfer");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="Keiner");a+=addHtmlValue("Bereiche","")+"<b>"+v+"</b>"}messagebox("Konto"+e,a+"</div>")}}
1207 +function wsmanQuery(){QH(25,"");var b=getSelectedOptions(Q(23)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(24,!1),c&&0<c.length&&amtstack.BatchEnum("Browser",c,browserResponse,null,!0))}
1208 +function browserResponse(b,c,a,d){QE(24,!0);b="";for(var e in a)c=a[e],b+="<h2>"+e+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(Leeren)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>Error #"+c.status+"</div>"),b+="</div><br>";QH(25,b)}
1209 function wsmanFilter(){var b=c0.value.toLowerCase(),c;for(c in AllWsman)QV("WSB-"+AllWsman[c],""==b||0<=AllWsman[c].toLowerCase().indexOf(b))}function connectTerminal(){terminal&&(0==terminal.State?(terminal.tlsv1only=amtstack.wsman.comm.tlsv1only,terminal.Start(currentMeshNode._id,16994,"*","*",0)):terminal.Stop())}
1192 -function onTerminalStateChange(b,c){c4.value=0==c?"Verbinden":"Trennen";Q(29).textContent=StatusStrs[c];QE(34,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection of not supported.");
1193 -break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(31).value="100x30",terminal.m.Init(100,30)):(Q(31).value="80x25",terminal.m.Init(80,25))}
1194 -var terminalEmulations=["UTF8-Terminal","Erweitertes ASCII","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(33).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(32).value=["Intel (F10 = ESC + [OM)","Alternative (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1195 -function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(30).value="LF",terminal.m.lineFeed="\n"):(Q(30).value="CR + LF",terminal.m.lineFeed="\r\n")}
1210 +function onTerminalStateChange(b,c){c4.value=0==c?"Verbinden":"Trennen";Q(30).textContent=StatusStrs[c];QE(35,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection is not supported.");
1211 +break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(32).value="100x30",terminal.m.Init(100,30)):(Q(32).value="80x25",terminal.m.Init(80,25))}
1212 +var terminalEmulations=["UTF8-Terminal","Erweitertes ASCII","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(34).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(33).value=["Intel (F10 = ESC + [OM)","Alternative (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1213 +function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(31).value="LF",terminal.m.lineFeed="\n"):(Q(31).value="CR + LF",terminal.m.lineFeed="\r\n")}
1214 function terminalCaptureToggle(b){if(!xxdialogMode)if(void 0==terminal.m.capture)terminal.m.capture="",c3.value="Beenden Sie die Erfassung";else{if(0<terminal.m.capture.length){b="TerminalCapture";var c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);saveAs(data2blob(terminal.m.capture),
1215 b+".txt")}delete terminal.m.capture;c3.value="Starten Sie die Erfassung"}}function terminal_FileSelectHandler(b){haltEvent(b);if(3==terminal.State&&null!=b.dataTransfer&&1==b.dataTransfer.files.length){var c=new FileReader;c.onload=terminal_onSetupBinRead;c.readAsText(b.dataTransfer.files[0])}}function terminal_onSetupBinRead(b){d3pastetextarea.value=b.target.result;setDialogMode(3,"Einf\u00fcgen",3,termPaste)}var desktopScreenInfo=null,desktopPollTimer=null,webRtcDesktop=null;
1216 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1217 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1200 -function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1201 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1218 +function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&(null==amtsysstate||null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&null!=amtsysstate.IPS_OptInService.response&&0!=amtsysstate.IPS_OptInService.response.OptInRequired)?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&
1219 +null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1220 0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1221 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("Datenkanal",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1222 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1223 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
1224 "\r\n"},webRtcDesktop.webrtc.oniceconnectionstatechange=function(){null==webRtcDesktop||null==webRtcDesktop.webrtc||"disconnected"!=webRtcDesktop.webrtc.iceConnectionState&&"failed"!=webRtcDesktop.webrtc.iceConnectionState||webRtcDesktopReset()},webRtcDesktop.webrtc.createOffer(function(a){webRtcDesktop.webrtcoffer=a;webRtcDesktop.webrtc.setLocalDescription(a,function(){},webRtcDesktopReset)},webRtcDesktopReset,{mandatory:{OfferToReceiveAudio:!1,OfferToReceiveVideo:!1}})):"answer"==a.action&&null!=
1207 -webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=
1208 -setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(42).innerHTML="")}
1225 +webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.m.ReverseMouseWheel=desktopsettings.reverseMouseWheel,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),
1226 +PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(43).innerHTML="")}
1227 function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(desktopScreenInfo=a.IPS_ScreenSettingData.responses.Body,desktopScreenInfo.KVMRSD=a.IPS_KVMRedirectionSettingData.responses.Body,UpdateDesktopDisplayInfo())}
1210 -function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1228 +function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(43).innerHTML=b+"&nbsp;":Q(43).innerHTML=""}
1229 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1212 -function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Verbinden":"Trennen";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Remotedesktop","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Remotedesktop","The device indicated that this type of connection of not supported."):5E4==b.disconnectCode?
1213 -messagebox("Remotedesktop","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("Remotedesktop","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;case 3:12<=
1214 -amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1215 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Remotedesktopeinstellungen",3,showDesktopSettingsChanged))}
1216 -function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1217 -1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1218 -function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1219 -15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1230 +function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Verbinden":"Trennen";var d=3==c&&!urlvars.kvmviewonly;QE(44,d);QE("deskkeys",d);QE("DeskWD",d);QE(45,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Remotedesktop","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Remotedesktop","The device indicated that this type of connection is not supported."):5E4==b.disconnectCode?
1231 +messagebox("Remotedesktop","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?a=null!=b.connectTime&&b.connectTime+5E3<Date.now():50002==b.disconnectCode&&messagebox("Remotedesktop","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",
1232 +ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(41).textContent=StatusStrs[desktop.State]+b}
1233 +function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Remotedesktopeinstellungen",3,showDesktopSettingsChanged))}
1234 +function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.reverseMouseWheel=d7kvmrmw.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();
1235 +desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1236 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;d7kvmrmw.checked=desktopsettings.reverseMouseWheel;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",
1237 +12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1238 c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1221 -QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1222 -function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1223 -"8px"),center()))}
1224 -function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"Remote-Tastatureingabe",3,showDeskTypeEx,'<div>Geben Sie Text ein und klicken Sie auf OK, um ihn per Fernzugriff \u00fcber eine US-englische Tastatur einzugeben. Stellen Sie sicher, dass sich der Remote-Cursor an der richtigen Position befindet, bevor Sie fortfahren.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1239 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(44,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1240 +function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1!=urlvars.kvmonly&&disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(36,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding="8px"),center()))}
1241 +function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(45).blur(),setDialogMode(11,"Remote-Tastatureingabe",3,showDeskTypeEx,'<div>Geben Sie Text ein und klicken Sie auf OK, um ihn per Fernzugriff \u00fcber eine US-englische Tastatur einzugeben. Stellen Sie sicher, dass sich der Remote-Cursor an der richtigen Position befindet, bevor Sie fortfahren.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1242 var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
1226 -function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(48).checked||desktop.m.sendcad()}
1243 +function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(49).checked||desktop.m.sendcad()}
1244 var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511,0]],2:[[65511,1],[65362,1],[65362,0],[65511,0]],3:[[65511,1],[108,1],[108,0],[65511,0]],4:[[65511,1],[109,1],[109,0],[65511,0]],5:[[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]],6:[[65470,1],[65470,0]],7:[[65471,1],[65471,0]],8:[[65472,1],[65472,0]],9:[[65473,1],[65473,0]],10:[[65474,1],[65474,0]],11:[[65475,1],[65475,0]],12:[[65476,1],[65476,0]],13:[[65477,1],[65477,0]],14:[[65478,1],[65478,0]],15:[[65479,
1228 -1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]]};
1229 -function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1245 +1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]],25:[[65293,1],[65293,0]]};
1246 +function deskSendKeys(){if(!Q(49).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1247 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1231 -function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1232 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1248 +function dmousedown(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1249 +function dmousemove(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1250 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1251 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1252 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1236 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Wurzel</a>",g=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in g)""!=g[v]&&p24filetreelocation.push(g[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var g=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1237 -70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),e="";null!=l.d&&(e=new Date(l.d),e=e.getMonth()+1+"/"+e.getDate()+"/"+e.getFullYear()+" "+e.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1238 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(g+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+e+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1253 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Wurzel</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,r;r=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1254 +70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1255 +encodeURIComponent(l.nx)+'")>'+r+"</a></span></div>":(w=r,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+r+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1256 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1257 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1258 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1245,8 +1262,8 @@ function p24setActions(){if(null==p24filetree)QE("p24DeleteFileButton",!1),QE("p
1262 function p24createfolder(){setDialogMode(11,"Neuer Ordner",3,p24createfolderEx,"<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% />");focusTextBox("p24renameinput");p24fileNameCheck()}function p24createfolderEx(){p24files.sendCtrlMsg(JSON.stringify({action:"mkdir",reqid:1,path:p24filetreelocation.join("/")+"/"+Q("p24renameinput").value}));p24folderup(999)}
1263 function p24deletefile(){var b=p24getFileSelCount();setDialogMode(11,"L\u00f6schen",3,p24deletefileEx,1<b?"Delete "+b+" selected items?":"Delete selected item?")}function p24deletefileEx(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);p24files.sendCtrlMsg(JSON.stringify({action:"rm",reqid:1,path:p24filetreelocation.join("/"),delfiles:b}));p24folderup(999)}
1264 function p24renamefile(){for(var b,c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&(b=p24filetree.dir[c[a].value].n);setDialogMode(11,"Umbenennen",3,p24renamefileEx,'<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% value="'+b+'" />',{action:"rename",path:p24filetreelocation.join("/"),oldname:b});focusTextBox("p24renameinput");p24fileNameCheck()}
1248 -function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c54",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1249 -function p24uploadFile(){setDialogMode(11,"Datei hochladen",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c54",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1265 +function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c106",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1266 +function p24uploadFile(){setDialogMode(11,"Datei hochladen",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c106",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1267 function p24copyFile(b){var c=document.getElementsByName("fd");p24clipboard=[];p24clipboardCut=b;p24clipboardFolder=p24targetpath;for(b=0;b<c.length;b++)c[b].checked&&"3"==c[b].attributes.file.value&&p24clipboard.push(p24filetree.dir[c[b].value].n);p24updateClipview()}
1268 function p24pasteFile(){var b="";null!=p24clipboard&&0<p24clipboard.length&&(b="Confim "+(0==p24clipboardCut?"copy":"move")+" of "+p24clipboard.length+" entrie"+(1<p24clipboard.length?"s":"")+" to this location?");setDialogMode(11,"Einf\u00fcgen",3,p24pasteFileEx,b)}
1269 function p24pasteFileEx(){p24files.sendCtrlMsg(JSON.stringify({action:0==p24clipboardCut?"copy":"move",reqid:1,scpath:p24clipboardFolder,dspath:p24targetpath,names:p24clipboard}));p24folderup(999);1==p24clipboardCut&&(p24clipboardFolder=p24clipboard=null,p24clipboardCut=0,p24updateClipview())}
@@ -1270,35 +1287,35 @@ else{var b=null,c=null;1==Q("floppyImageInput").files.length&&(b=Q("floppyImageI
1287 function iderStart3(b,c,a){iderStop();ider=CreateAmtRedirect(CreateAmtRemoteIder());ider.onStateChanged=onIderStateChange;ider.m.floppy=b;ider.m.cdrom=c;ider.m.iderStart=a;ider.m.sectorStats=iderSectorStats;ider.tlsv1only=amtstack.wsman.comm.tlsv1only;ider.Start(currentMeshNode._id,16994,"*","*",0);QV("IDERDiskMapButton",!0)}
1288 function iderStop(){ider&&(ider.m.Stop(),ider.onStateChanged=null,ider.m.onDialogPrompt=null,delete ider);iderTimer&&(clearInterval(iderTimer),delete iderTimer);iderToggleDiskMap(!1)}function onIderStateChange(b,c){QE("c2",3!=c);QE("c8",3!=c);QE("c1",3!=c);QE("c7",3!=c);QV(9,3==c);center();3==c?(urlvars.norefresh||(iderTimer=setInterval(onIderTimer,500)),onIderTimer()):iderTimer&&(clearInterval(iderTimer),delete iderTimer)}
1289 function onIderTimer(){ider.m.Update&&ider.m.Update();-1==ider.m.bytesFromAmt?iderStop():QH(10,"<b>"+(ider.m.server?"Server":"")+"IDE-R-Sitzung </ b>, verbunden,"+ider.m.bytesFromAmt+" im,"+ider.m.bytesToAmt+" aus.")}var heatMapWidth=600,heatMapDividor={};
1273 -function iderSectorStats(b,c,a,d,g){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CD-ROM </ b>, Bl\u00f6cke sind {0} Bytes.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> Diskette </ b>, Bl\u00f6cke sind {0} Bytes.",512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;g/=c;if(0==b)v.height=
1274 -6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+g;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1290 +function iderSectorStats(b,c,a,d,e){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CD-ROM </ b>, Bl\u00f6cke sind {0} Bytes.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> Diskette </ b>, Bl\u00f6cke sind {0} Bytes.",512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;e/=c;if(0==b)v.height=
1291 +6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+e;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1292 function iderToggleDiskMap(b){var c="none"!=QS("iderHeatmap").display;null==b&&(b=!c);xxdialogMode&&(b=!1);QS("iderHeatmap").display=b?"":"none"}function onIderDialogPrompt(b,c,a){iderCodeBlock&&(document.body.removeChild(iderCodeBlock),delete iderCodeBlock);c.js&&(b=document.createElement("script"),b.text=c.js,iderCodeBlock=document.body.appendChild(b));setDialogMode(11,"Speicherumleitung",a?a:3,onIderDialogPromptOk,c.html)}
1293 function onIderDialogPromptOk(b){1==b?window.iderServerCall?ider.m.dialogPrompt(window.iderServerCall()):ider.m.dialogPrompt():iderStop()}function iderServerStart(){xxdialogMode||(iderStop(),ider=CreateAmtRemoteServerIder(),null!=ider&&(ider.onStateChanged=onIderStateChange,ider.m.sectorStats=iderSectorStats,ider.m.onDialogPrompt=onIderDialogPrompt,ider.tlsv1only=amtstack.wsman.comm.tlsv1only,ider.Start(currentMeshNode._id,16994,"*","*",0)))}
1294 var xxRemoteAccess=null,xxEnvironementDetection=null,xxCiraServers=null,xxUserInitiatedCira=null,xxUserInitiatedEnabledState={32768:"Behindert",32769:"BIOS aktiviert",32770:"Betriebssystem aktivieren",32771:"BIOS & OS aktiviert"},xxRemoteAccessCredentiaLinks=null,xxMPSUserPass=null,xxPolicies=null;
1295 function PullRemoteAccess(){var b="*AMT_EnvironmentDetectionSettingData AMT_ManagementPresenceRemoteSAP AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule *AMT_UserInitiatedConnectionService AMT_MPSUsernamePassword".split(" ");11<amtversion&&b.push("*IPS_HTTPProxyService","IPS_HTTPProxyAccessPoint");amtstack.BatchEnum(null,b,processRemote1)}
1279 -function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var g in a)200!=a[g].status&&(d=a[g].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1280 -MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(g in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[g],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1296 +function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var e in a)200!=a[e].status&&(d=a[e].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1297 +MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(e in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[e],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1298 "@Name","Name").Value)),b.MpsType=c.MpsType,c=getItem(c.PolicySet.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyRuleName").Value.split(" ")[0],xxPolicies[c].push(b);updateRemoteAccess()}}
1299 function updateRemoteAccess(){if(null!=xxEnvironementDetection){var b,c="Behindert",a=xxRemoteAccess.IPS_HTTPProxyService&&xxRemoteAccess.IPS_HTTPProxyAccessPoint;xxEnvironementDetection.DetectionStrings&&0<xxEnvironementDetection.DetectionStrings.length&&(c="Aktiviert,"+xxEnvironementDetection.DetectionStrings.length+" "+(1<xxEnvironementDetection.DetectionStrings.length?"domains":"domain"));b=""+TableStart();b+=TableEntry("Umgebungserkennung",addLink(c,"editEnvironmentDetection()"));b+=TableEntry("Benutzerinitiierungsoptionen",
1300 addLinkConditional(xxUserInitiatedEnabledState[xxUserInitiatedCira.EnabledState],"editUserInitiatedCira()",xxAccountAdminName));c="<i>Keiner</i>";if(0<xxPolicies.User.length){var c="",d;for(d in xxPolicies.User)0<c.length&&(c+=", "),c+=xxPolicies.User[d].AccessInfo,1==xxPolicies.User[d].MpsType&&(c+=" (CILA)")}b+=TableEntry("Vom Benutzer initiierte Verbindung",addLinkConditional(c,'editMpsPolicy("User")',xxAccountAdminName));c="<i>Keiner</i>";if(0<xxPolicies.Alert.length)for(d in c="",xxPolicies.Alert)0<
1284 -c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("Alarm initiierte Verbindung",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>Keiner</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var g=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName","Periodisch");
1285 -if(g){var v=atob(g.ExtendedData);0==ReadInt(v,0)&&(c+=format("alle {0} Sekunden",ReadInt(v,4)));1==ReadInt(v,0)&&(g=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+g+":"+v+" daily")}b+=TableEntry("Periodische Verbindung",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Verwalten von Intel&reg; AMT-Remoteverwaltungsservern.<br><br>";if(0==xxCiraServers.length)b+="<div style=padding-left:15px><br><i>Keine Remote-Server gefunden.</i></div><br>";
1301 +c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("Alarm initiierte Verbindung",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>Keiner</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var e=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName","Periodisch");
1302 +if(e){var v=atob(e.ExtendedData);0==ReadInt(v,0)&&(c+=format("alle {0} Sekunden",ReadInt(v,4)));1==ReadInt(v,0)&&(e=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+e+":"+v+" daily")}b+=TableEntry("Periodische Verbindung",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Verwalten von Intel&reg; AMT-Remoteverwaltungsservern.<br><br>";if(0==xxCiraServers.length)b+="<div style=padding-left:15px><br><i>Keine Remote-Server gefunden.</i></div><br>";
1303 else for(d in xxCiraServers)c=":"+xxCiraServers[d].Port,xxCiraServers[d].CN&&(c+=", "+xxCiraServers[d].CN),b+="<div class=itemBar onclick=showServerDetails("+d+")><div style=padding-top:3px><b>"+xxCiraServers[d].AccessInfo+"</b>"+EscapeHtml(c)+"</div></div>";if(a)if(b+="<br>Verwalten von HTTP-Proxys, die f\u00fcr Verwaltungsverbindungen verwendet werden.<br><br>",c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses,0==c.length)b+="<div style=padding-left:15px><br><i>Keine Proxys konfiguriert.</i></div><br>";
1287 -else for(d in c)b+="<div class=itemBar onclick=showProxyDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(c[d].AccessInfo)+":"+c[d].Port+"</b> / "+EscapeHtml(c[d].NetworkDnsSuffix)+"</div></div>";d="";xxAccountAdminName&&(d=AddButton("Server hinzuf\u00fcgen...","AddRemoteAccessServer()"),a&&(d+=AddButton("Proxy hinzuf\u00fcgen ...","AddRemoteAccessProxy()")));b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+d);QH(52,b)}}var xxEditMpsPolicyType;
1288 -function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="Benutzer initiiert");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(Keiner)",g;for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[g].Name?" selected":"")+">"+
1289 -xxCiraServers[g].AccessInfo;c+="</select><div>Prim\u00e4rserver</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Extern<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA - Intern</select><div>Prim\u00e4rer MPS-Typ</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";
1290 -c+="<option value=-1>(Keiner)";for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[g].Name?" selected":"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>Sekund\u00e4rserver</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Extern<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA - Intern</select><div>Sekund\u00e4rer MPS-Typ</div></div>")}g=
1291 -0;d&&(g=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+g+">";c+="<div>Tunnellebensdauer (Sekunden)</div></div>";"Periodic"==b&&(a=0,g=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),g=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),g+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">Periodisch, Zeitintervall<option value=1"+
1292 -(1==a?" selected":"")+">Tageszeit einmal am Tag",c+="</select><div>Ausl\u00f6sertyp</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+g+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0} Verbindung",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1293 -function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c54",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1304 +else for(d in c)b+="<div class=itemBar onclick=showProxyDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(c[d].AccessInfo)+":"+c[d].Port+"</b> / "+EscapeHtml(c[d].NetworkDnsSuffix)+"</div></div>";d="";xxAccountAdminName&&(d=AddButton("Server hinzuf\u00fcgen...","AddRemoteAccessServer()"),a&&(d+=AddButton("Proxy hinzuf\u00fcgen ...","AddRemoteAccessProxy()")));b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+d);QH(53,b)}}var xxEditMpsPolicyType;
1305 +function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="Benutzer initiiert");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(Keiner)",e;for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[e].Name?" selected":"")+">"+
1306 +xxCiraServers[e].AccessInfo;c+="</select><div>Prim\u00e4rserver</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Extern<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA - Intern</select><div>Prim\u00e4rer MPS-Typ</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";
1307 +c+="<option value=-1>(Keiner)";for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[e].Name?" selected":"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>Sekund\u00e4rserver</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Extern<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA - Intern</select><div>Sekund\u00e4rer MPS-Typ</div></div>")}e=
1308 +0;d&&(e=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+e+">";c+="<div>Tunnellebensdauer (Sekunden)</div></div>";"Periodic"==b&&(a=0,e=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),e=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),e+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">Periodisch, Zeitintervall<option value=1"+
1309 +(1==a?" selected":"")+">Tageszeit einmal am Tag",c+="</select><div>Ausl\u00f6sertyp</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+e+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0} Verbindung",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1310 +function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c106",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1311 -1!=Q("d2server1").value),QH("ttypelabel",0==Q("d2ttype").value?"Ausl\u00f6seintervall (Sekunden)":"Tageszeit (HH: MM)"),QE("d2ttype",-1!=Q("d2server1").value));QE("d2lifetime",-1!=Q("d2server1").value);b&&(QE("d2server1cira",-1<Q("d2server1").value),1<xxCiraServers.length&&QE("d2server2cira",-1<Q("d2server1").value&&-1<Q("d2server2").value))}
1312 function editMpsPolicyOk(){var b=xxEditMpsPolicyType;"User"==b&&(b="User Initiated");getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",b)?amtstack.Delete("AMT_RemoteAccessPolicyRule",{PolicyRuleName:b},editMpsPolicyOk2):editMpsPolicyOk2()}
1296 -function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var g,v;0<=Q("d2server1").value&&(g='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1313 +function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var e,v;0<=Q("d2server1").value&&(e='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1314 xxCiraServers[Q("d2server1").value].Name+"</Selector></SelectorSet></ReferenceParameters>");0<=Q("d2server1").value&&1<xxCiraServers.length&&0<=Q("d2server2").value&&(v='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1298 -xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?g&&(0==Q("d2server1cira").value?d.push(g):n.push(g),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):g&&(d.push(g),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1315 +xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?e&&(0==Q("d2server1cira").value?d.push(e):n.push(e),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):e&&(d.push(e),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1316 function editEnvironmentDetection(b){1!=b&&(editEnvironmentDetectionTmp=xxEnvironementDetection.DetectionStrings?Clone(xxEnvironementDetection.DetectionStrings):[]);var c="";xxAccountAdminName&&(c+="Geben Sie bis zu 5 Intranet-Domain-Suffixe ein. Befindet sich der Computer au\u00dferhalb dieser Dom\u00e4nen, werden die lokalen Intel&reg; AMT-Ports geschlossen und Remote-Serververbindungen sind aktiv.<br><br>");0==editEnvironmentDetectionTmp.length&&(c+="<i>Keine Intranet-Dom\u00e4nen, Umgebungserkennung deaktiviert.</i><br>");
1317 for(var a in editEnvironmentDetectionTmp)c+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Entfernen","editEnvironmentDetectionRemove("+a+")")+'</div><div style=padding-top:3px;max-width:260px;overflow:hidden title="'+editEnvironmentDetectionTmp[a]+'"><b>'+editEnvironmentDetectionTmp[a]+"</b></div></div>";xxAccountAdminName&&5>editEnvironmentDetectionTmp.length&&(c+="<br><input id=edInput placeholder=intranet.org style=width:276px onkeyup=edInputChg() maxlength=63><input type=button id=edAdd value=Add style=width:80px;margin-left:5px onclick=editEnvironmentDetectionAdd()>");
1301 -1==b?QH(63,c):setDialogMode(11,"Umgebungserkennung",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1318 +1==b?QH(64,c):setDialogMode(11,"Umgebungserkennung",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1319 function editEnvironmentDetectionDlg2(b,c,a,d){200!=d?messagebox("Umgebungserkennung",format("Server konnte nicht hinzugef\u00fcgt werden, Status {0}",d)):a.Body.ReturnValue&&0!=a.Body.ReturnValue?messagebox("Umgebungserkennung",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}function edInputChg(){5>editEnvironmentDetectionTmp.length&&QE("edAdd",0<Q("edInput").value.length)}
1320 function editEnvironmentDetectionAdd(){editEnvironmentDetectionTmp.push(Q("edInput").value);editEnvironmentDetection(1)}function editEnvironmentDetectionRemove(b){editEnvironmentDetectionTmp.splice(b,1);editEnvironmentDetection(1)}
1321 function editUserInitiatedCira(){if(!xxdialogMode){var b="",c;for(c in xxUserInitiatedEnabledState)b+="<input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxUserInitiatedCira.EnabledState==c?"checked":"")+">"+xxUserInitiatedEnabledState[c]+"<br>";setDialogMode(11,"Vom Benutzer initiierter Tunnel",3,editUserInitiatedCiraDlg,b)}}
@@ -1311,7 +1328,7 @@ function showProxyDetails(b){var c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.respo
1328 function showProxyDetailsOk(b,c){var a=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses[c];2==b&&amtstack.Delete("IPS_HTTPProxyAccessPoint",{Name:a.Name},showProxyDetailsOk2)}function showProxyDetailsOk2(b,c,a,d){408==d?messagebox("Entfernen des HTTP-Proxys","HTTP-Proxy kann nicht entfernt werden, Zugriff verweigert."):PullRemoteAccess()}
1329 function AddRemoteAccessProxy(){var b;b='<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessProxyUpdate()><option value=2>Hostname FQDN<option value=3>IPv4-Adresse<option value=4>IPv6-Adresse</select><div>Verbindungstyp</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>Hafen</div></div>';b+=
1330 "<div style=height:26px><input id=d2domain style=float:right;width:200px maxlength=191 onkeyup=AddRemoteAccessProxyUpdate()><div>DNS-Suffix</div></div>";setDialogMode(11,"HTTP-Proxy hinzuf\u00fcgen",3,AddRemoteAccessProxyOk,b);AddRemoteAccessProxyUpdate()}
1314 -function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c54",b);QH("d2typespan",["","","FQDN / Hostname","IPv4-Adresse","IPv6-Adresse"][Q("d2type").value])}function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
1331 +function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c106",b);QH("d2typespan",["","","FQDN / Hostname","IPv4-Adresse","IPv6-Adresse"][Q("d2type").value])}function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
1332 function AddRemoteAccessProxyOk2(b,c,a,d){200!=d?messagebox("Proxyserver hinzuf\u00fcgen","Proxy, Status konnte nicht hinzugef\u00fcgt werden"+d):0!=a.Body.ReturnValue?messagebox("Proxyserver hinzuf\u00fcgen",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1333 function AddRemoteAccessServer(){var b=[],c;for(c in xxCertificates)xxCertificates[c].XPrivateKey&&b.push(xxCertificates[c]);var a;a="<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()><option value=201>Hostname FQDN<option value=3>IPv4-Adresse</select><div>Verbindungstyp</div></div><div style=height:26px><input id=d2name style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div id=d2lname></div></div>";a+='<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>';
1334 a+="<div style=height:26px id=d2ucn><input id=d2cn style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Allgemeiner Name des Servers</div></div>";a+="<div style=height:26px><select id=d2auth style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()>";0<b.length&&(a+="<option value=1>Zertifikat");a+="<option value=2>Benutzername Passwort</select><div>Authentifizierungsart</div></div>";a+="<span id=d2utype>";a+="<div style=height:26px><input id=d2user style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Nutzername</div></div>";
@@ -1321,85 +1338,88 @@ function AddRemoteAccessServerOk(){var b,c,a,d;1==Q("d2auth").value?b='<Address
1338 "</Selector></SelectorSet></ReferenceParameters>":(c=Q("d2user").value,a=Q("d2pass").value);0<Q("d2cn").value.length&&(d=Q("d2cn").value);amtstack.AMT_RemoteAccessService_AddMpServer(Q("d2name").value,Q("d2type").value,Q("d2port").value,Q("d2auth").value,b,c,a,d,AddRemoteAccessServerOk2)}
1339 function AddRemoteAccessServerOk2(b,c,a,d){200!=d?messagebox("Internet Server hinzuf\u00fcgen",format("Server konnte nicht hinzugef\u00fcgt werden, Status {0}",d)):0!=a.Body.ReturnValue?messagebox("Internet Server hinzuf\u00fcgen",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1340 function AddRemoteAccessServerUpdate(){var b=0!=Q("d2name").value.length;3==Q("d2type").value&&1==b&&(b=0!=Q("d2cn").value.length);2==Q("d2auth").value&&1==b&&(b=0!=Q("d2user").value.length&&passwordcheck(Q("d2pass").value));if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;if(-1!=Q("d2name").value.indexOf(":")||3==Q("d2type").value&&-1!=Q("d2cn").value.indexOf(":"))b=!1;QH("d2lname",201==Q("d2type").value?"Hostname":"IPv4-Adresse");QV("d2utype",2==Q("d2auth").value);QV("d2ucn",
1324 -3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c54",b)}
1341 +3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c106",b)}
1342 function showEditNameDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_GeneralSettings.response.HostName,a=amtsysstate.AMT_GeneralSettings.response.DomainName;null!=a&&0<a.length&&(c+="."+a);c='<br><div style=height:26px><input id=d11name value="'+c+'" style=float:right;width:200px><div>Name & Domain</div></div>';1==b&&(b=1==amtsysstate.AMT_GeneralSettings.response.SharedFQDN,c+="<div style=height:26px><select id=d11fqdn style=float:right;width:200px><option value=true "+(b?"selected":"")+'>Geteilt, genau wie das Betriebssystem<option value="false" '+
1343 (b?"":"selected")+">Engagiert, anders als das Betriebssystem</select><div>Namensfreigabe</div></div>");setDialogMode(11,"Computername",3,editNameDlgOk,c)}}
1344 function editNameDlgOk(){var b=Q("d11name").value,c=b.indexOf("."),a="";0<=c&&(a=b.substring(c+1),b=b.substring(0,c));c=Clone(amtsysstate.AMT_GeneralSettings.response);c.HostName=b;c.DomainName=a;Q("d11fqdn")&&(c.SharedFQDN=d11fqdn.value);amtstack.Put("AMT_GeneralSettings",c,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}function computerNameGet(b,c,a,d){200==d&&(amtsysstate.AMT_GeneralSettings.response=a.Body,updateSystemStatus())}
1328 -function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c36.value=c;c37.value=b.DDNSPeriodicUpdateInterval;c38.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"Dynamischer DNS-Client",3,showEditDnsDlgOk)}}
1329 -function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c36.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c36.value?!0:!1;2==c36.value&&(b.DDNSPeriodicUpdateInterval=c37.value,b.DDNSTTL=c38.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1330 -function showEditDnsDlgChange(){QE("c37",2==c36.value);QE("c38",2==c36.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"Intel&reg; AMT-Funktionen",3,featuresDlgOk))}
1331 -function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,g){200!=g?messagebox("Error","RedirectionService, RequestStateChange-Fehler"+g):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,g){200!=g?messagebox("Error","KVMRedirectionSAP, RequestStateChange-Fehler"+
1332 -g):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("Error","RedirectionService PUT-Fehler"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1333 -function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c49.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c50.checked=!c49.checked),c51.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c52.checked=!c51.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1345 +function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c61.value=c;c62.value=b.DDNSPeriodicUpdateInterval;c63.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"Dynamischer DNS-Client",3,showEditDnsDlgOk)}}
1346 +function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c61.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c61.value?!0:!1;2==c61.value&&(b.DDNSPeriodicUpdateInterval=c62.value,b.DDNSTTL=c63.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1347 +function showEditDnsDlgChange(){QE("c62",2==c61.value);QE("c63",2==c61.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"Intel&reg; AMT-Funktionen",3,featuresDlgOk))}
1348 +function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,e){200!=e?messagebox("Error","RedirectionService, RequestStateChange-Fehler"+e):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,e){200!=e?messagebox("Error","KVMRedirectionSAP, RequestStateChange-Fehler"+
1349 +e):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("Error","RedirectionService PUT-Fehler"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1350 +function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c74.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c75.checked=!c74.checked),c76.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c77.checked=!c76.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1351 function showEnableBootServiceDlgOk(){var b=32768+parseInt(document.querySelector("input[name=d26a]:checked").value);15<amtversion&&(b+=parseInt(document.querySelector("input[name=d26b]:checked").value));amtstack.CIM_BootService_RequestStateChange(b,null,showEnableBootServiceDlgResponse,b)}
1335 -function showEnableBootServiceDlgResponse(b,c,a,d,g){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,g),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1336 -function showEnableBootServiceDlgResponse2(b,c,a,d,g){200==d&&a.Body.EnabledState!=g&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"Zustimmung des Benutzers",3,consentDlgOk)}}
1352 +function showEnableBootServiceDlgResponse(b,c,a,d,e){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,e),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1353 +function showEnableBootServiceDlgResponse2(b,c,a,d,e){200==d&&a.Body.EnabledState!=e&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"Zustimmung des Benutzers",3,consentDlgOk)}}
1354 function consentDlgOk(){amtsysstate.IPS_OptInService.response.OptInRequired=document.querySelector("input[name=d10]:checked").value;amtstack.Put("IPS_OptInService",amtsysstate.IPS_OptInService.response,function(){amtstack.Get("IPS_OptInService",consentGet,0,1)},0,1)}function consentGet(b,c,a,d){200==d&&PullSystemStatus()}var ipv6addrtype="Lokale Adresse verkn\u00fcpfen;Lokale Netzwerkadresse;Globale Adresse;Benutzer konfiguriert;Nicht erlaubt;DAD in Bearbeitung;g\u00fcltig;veraltet;bevorzugt / veraltet;abgelaufen;Kollision;nicht erlaubt".split(";");
1355 function showIPv6AddrDlg(b,c){if(!xxdialogMode){var a=TableStart();t=c.split(",");for(var d=0;d<t.length;d+=3)a+=TableEntry("<b>"+t[d]+"</b><br><span style=font-size:10px>"+ipv6addrtype[t[d+1]]+","+ipv6addrtype[+t[d+2]+5]+"</span>","");setDialogMode(11,0==b?"IPv6-Adressen f\u00fcr die kabelgebundene Schnittstelle":"IPv6-Adressen f\u00fcr die drahtlose Schnittstelle",1,null,a+TableEnd())}}
1339 -function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(69,0==b);QV(70,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 deaktiviert");QH("d21l1","IPv6 aktiviert, automatisch");QH("d21l2","IPv6-f\u00e4hig, automatisch + manuelle Adresse");d21o0.checked=!c;d21o1.checked=c&&!ipv6manual;
1340 -d21o2.checked=c&&ipv6manual;c31.value=isIpAddress(a.IPv6Address,"");c33.value=isIpAddress(a.DefaultRouter,"");c34.value=isIpAddress(a.PrimaryDNS,"");c35.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"IPv6-Unterst\u00fctzung f\u00fcr kabelgebundene Schnittstelle":"IPv6-Unterst\u00fctzung f\u00fcr drahtlose Schnittstellen",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1341 -function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c31.value?"::":c31.value.toLocaleLowerCase(),a.DefaultRouter=""==c33.value?"::":c33.value.toLocaleLowerCase(),
1342 -a.PrimaryDNS=""==c34.value?"::":c34.value.toLocaleLowerCase(),a.SecondaryDNS=""==c35.value?"::":c35.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1343 -"CreationClassName").Value,g=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1344 -d+'</w:Selector><w:Selector Name="DeviceID">'+g+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1345 -b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",g=Clone(c[a]);g.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",g,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv6-Unterst\u00fctzung",format("IPv6-Status kann nicht festgelegt werden, Fehler {0}",d))}
1356 +function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(68,0==b);QV(69,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 deaktiviert");QH("d21l1","IPv6 aktiviert, automatisch");QH("d21l2","IPv6-f\u00e4hig, automatisch + manuelle Adresse");d21o0.checked=!c;d21o1.checked=c&&!ipv6manual;
1357 +d21o2.checked=c&&ipv6manual;c56.value=isIpAddress(a.IPv6Address,"");c58.value=isIpAddress(a.DefaultRouter,"");c59.value=isIpAddress(a.PrimaryDNS,"");c60.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"IPv6-Unterst\u00fctzung f\u00fcr kabelgebundene Schnittstelle":"IPv6-Unterst\u00fctzung f\u00fcr drahtlose Schnittstellen",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1358 +function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c56.value?"::":c56.value.toLocaleLowerCase(),a.DefaultRouter=""==c58.value?"::":c58.value.toLocaleLowerCase(),
1359 +a.PrimaryDNS=""==c59.value?"::":c59.value.toLocaleLowerCase(),a.SecondaryDNS=""==c60.value?"::":c60.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1360 +"CreationClassName").Value,e=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1361 +d+'</w:Selector><w:Selector Name="DeviceID">'+e+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1362 +b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",e=Clone(c[a]);e.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",e,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv6-Unterst\u00fctzung",format("IPv6-Status kann nicht festgelegt werden, Fehler {0}",d))}
1363 function showPingActionDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,b=(1==b.PingResponseEnabled)+((1==b.RmcpPingResponseEnabled)<<1);d20a.checked=0==b;d20b.checked=1==b;d20c.checked=2==b;d20d.checked=3==b;setDialogMode(20,"Intel&reg; AMT Ping-Antwort",3,showPingActionDlgOk)}}
1364 function showPingActionDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response),c=document.querySelector("input[name=d20]:checked").value;b.PingResponseEnabled=0!=(c&1);b.RmcpPingResponseEnabled=0!=(c&2);amtstack.Put("AMT_GeneralSettings",b,PullSystemStatus,0,1)}
1348 -function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(68,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(69,!0);QV(70,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","Automatische Konfiguration \u00fcber den DHCP-Server");QH("d21l2","Statische Konfiguration mit den folgenden IPv4-Einstellungen");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=!d21o1.checked;c31.value=
1349 -isIpAddress(b.IPAddress,"");c32.value=isIpAddress(b.SubnetMask,"");c33.value=isIpAddress(b.DefaultGateway,"");c34.value=isIpAddress(b.PrimaryDNS,"");c35.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"IPv4-Einstellungen",3,showIPSetupDlgOk)}}
1350 -function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6-f\u00e4hig, automatisch + manuelle Adresse"==Q("d21l2").innerHTML&&2>c31.value.split(":").length&&(b=!1);QE("c54",b);c31.disabled=c32.disabled=c33.disabled=c34.disabled=c35.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1351 -function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c31.value,b.SubnetMask=c32.value,b.DefaultGateway=c33.value,""!=c34.value&&(b.PrimaryDNS=c34.value),""!=c35.value&&
1352 -(b.SecondaryDNS=c35.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv4-Einstellungen",format("Netzwerkparameter k\u00f6nnen nicht eingestellt werden, Fehler {0}",d))}amtPowerBootCapabilities=null;
1365 +function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(67,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(68,!0);QV(69,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","Automatische Konfiguration \u00fcber den DHCP-Server");QH("d21l2","Statische Konfiguration mit den folgenden IPv4-Einstellungen");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=!d21o1.checked;c56.value=
1366 +isIpAddress(b.IPAddress,"");c57.value=isIpAddress(b.SubnetMask,"");c58.value=isIpAddress(b.DefaultGateway,"");c59.value=isIpAddress(b.PrimaryDNS,"");c60.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"IPv4-Einstellungen",3,showIPSetupDlgOk)}}
1367 +function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6-f\u00e4hig, automatisch + manuelle Adresse"==Q("d21l2").innerHTML&&2>c56.value.split(":").length&&(b=!1);QE("c106",b);c56.disabled=c57.disabled=c58.disabled=c59.disabled=c60.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1368 +function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c56.value,b.SubnetMask=c57.value,b.DefaultGateway=c58.value,""!=c59.value&&(b.PrimaryDNS=c59.value),""!=c60.value&&
1369 +(b.SecondaryDNS=c60.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv4-Einstellungen",format("Netzwerkparameter k\u00f6nnen nicht eingestellt werden, Fehler {0}",d))}amtPowerBootCapabilities=null;
1370 function showPowerActionDlg(){xxdialogMode||(statusbox("Power-Aktionen","Funktionen \u00fcberpr\u00fcfen ..."),amtstack.Get("AMT_BootCapabilities",powerActionResponse00,0,1))}
1354 -function powerActionResponse00(b,c,a,d){if(200==d){b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(g){}amtPowerBootCapabilities=a.Body;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","Einschalten",2);b&1&&(addOption("d5actionSelect","Zur\u00fccksetzen",10),addOption("d5actionSelect","Aus- und Wiedereinschalten",5),addOption("d5actionSelect","Stromausfall",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect","Schalten Sie die Diagnose ein",
1355 -300),b&1&&addOption("d5actionSelect","Auf Diagnose zur\u00fccksetzen",301));9<amtversion&&b&1&&(addOption("d5actionSelect","OS Wake aus dem Standby",500),addOption("d5actionSelect","Energiesparen des Betriebssystems",501),addOption("d5actionSelect","Soft-Off",12),addOption("d5actionSelect","Soft-Reset",14),addOption("d5actionSelect","Schlaf",4),addOption("d5actionSelect","\u00dcberwintern",7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&addOption("d5actionSelect","Schalten Sie das BIOS ein",100),
1356 -b&1&&addOption("d5actionSelect","Auf BIOS zur\u00fccksetzen",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","Schalten Sie das Ger\u00e4t zum sicheren L\u00f6schen ein",104),b&1&&addOption("d5actionSelect","Zum sicheren L\u00f6schen zur\u00fccksetzen",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(b&2&&addOption("d5actionSelect",
1357 -"Power up to Platform Erase",106),b&1&&addOption("d5actionSelect","Reset to Platform Erase",107));b&1&&addOption("d5actionSelect","Auf IDE-R-Diskette zur\u00fccksetzen",200);b&2&&addOption("d5actionSelect","Schalten Sie die IDE-R-Diskette ein",201);b&1&&addOption("d5actionSelect","Auf IDE-R-CD-ROM zur\u00fccksetzen",202);b&2&&addOption("d5actionSelect","Schalten Sie die IDE-R-CD-ROM ein",203);b&1&&addOption("d5actionSelect","Auf PXE zur\u00fccksetzen",400);b&2&&addOption("d5actionSelect","Schalten Sie PXE ein",
1358 -401);addOption("d5actionSelect","Benutzerdefinierte Aktion ...",999);5<amtversion&&addOption("d5actionSelect","Zustimmung des Benutzers ...",998);setDialogMode(5,"Power-Aktionen",3,powerActionDlgCheck)}else messagebox("Power Action",format("Systemfunktionen k\u00f6nnen nicht abgerufen werden, Fehler {0}",d))}
1359 -function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"Power-Aktion abgeschlossen."):QH(60,format("Power Action Fehler # {0}.",g));setDialogMode(1,"Power Action",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Ausf\u00fchrung von Intel&reg; Remote Secure Erase best\u00e4tigen?<br>Geben Sie bei Bedarf das Kennwort zum sicheren L\u00f6schen ein.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Passwort</div></div><br><div style=color:red><b> WARNUNG: </ b> Dadurch werden Daten auf dem Remote-System gel\u00f6scht.</div>",
1371 +function showPowerActionDlg(){if(!xxdialogMode){var b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(c){}amtPowerBootCapabilities=amtsysstate.AMT_BootCapabilities.response;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","Einschalten",2);b&1&&(addOption("d5actionSelect","Zur\u00fccksetzen",10),addOption("d5actionSelect","Aus- und Wiedereinschalten",5),addOption("d5actionSelect","Stromausfall",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&
1372 +addOption("d5actionSelect","Schalten Sie die Diagnose ein",300),b&1&&addOption("d5actionSelect","Auf Diagnose zur\u00fccksetzen",301));9<amtversion&&b&1&&(addOption("d5actionSelect","OS Wake aus dem Standby",500),addOption("d5actionSelect","Energiesparen des Betriebssystems",501),addOption("d5actionSelect","Soft-Off",12),addOption("d5actionSelect","Soft-Reset",14),addOption("d5actionSelect","Schlaf",4),addOption("d5actionSelect","\u00dcberwintern",7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&
1373 +addOption("d5actionSelect","Schalten Sie das BIOS ein",100),b&1&&addOption("d5actionSelect","Auf BIOS zur\u00fccksetzen",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","Schalten Sie das Ger\u00e4t zum sicheren L\u00f6schen ein",104),b&1&&addOption("d5actionSelect","Zum sicheren L\u00f6schen zur\u00fccksetzen",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&
1374 +2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",106),b&1&&addOption("d5actionSelect","Reset to Platform Erase",107));b&1&&addOption("d5actionSelect","Auf IDE-R-Diskette zur\u00fccksetzen",200);b&2&&addOption("d5actionSelect","Schalten Sie die IDE-R-Diskette ein",201);b&1&&addOption("d5actionSelect","Auf IDE-R-CD-ROM zur\u00fccksetzen",202);b&2&&addOption("d5actionSelect","Schalten Sie die IDE-R-CD-ROM ein",203);b&1&&addOption("d5actionSelect","Auf PXE zur\u00fccksetzen",400);b&2&&
1375 +addOption("d5actionSelect","Schalten Sie PXE ein",401);addOption("d5actionSelect","Benutzerdefinierte Aktion ...",999);5<amtversion&&addOption("d5actionSelect","Zustimmung des Benutzers ...",998);setDialogMode(5,"Power-Aktionen",3,powerActionDlgCheck)}}
1376 +function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"Power-Aktion abgeschlossen."):QH(61,format("Power Action Fehler # {0}.",e));setDialogMode(1,"Power Action",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Ausf\u00fchrung von Intel&reg; Remote Secure Erase best\u00e4tigen?<br>Geben Sie bei Bedarf das Kennwort zum sicheren L\u00f6schen ein.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Passwort</div></div><br><div style=color:red><b> WARNUNG: </ b> Dadurch werden Daten auf dem Remote-System gel\u00f6scht.</div>",
1377 rsepass=1,setDialogMode(11,"Power-Aktionen",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1361 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> WARNUNG: </ b> Dadurch werden Daten auf dem Remote-System gel\u00f6scht.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");
1362 -d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password",
1363 -"<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Power-Aktionen",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1364 -function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,g=[1,2,6,25,26,31],v;for(v in g)d&1<<g[v]&&Q("rpef"+g[v]).checked&&(a+=1<<g[v]);d=makeUefiBootParam(1,a,4);g=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),g++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),g++);platfromEraseTLV={tlv:btoa(d),tlvlen:g};c?(statusbox("Power Action","Status pr\u00fcfen ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1378 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> WARNUNG: </ b> Dadurch werden Daten auf dem Remote-System gel\u00f6scht.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&8&&a.push("<label><input id=rpef3 type=checkbox onchange=powerActionDlgRPEValidate()>Verify Storage Erase</label>");
1379 +d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&65536&&a.push("<label><input id=rpef16 type=checkbox onchange=powerActionDlgRPEValidate()>OEM Custom Action</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&
1380 +-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");0<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+
1381 +addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpeeomdata style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("OEM Data (HEX)","<input id=rpeoemdatax style=width:210px maxlength=256 type=input>")+"</div>";setDialogMode(11,"Power-Aktionen",3,powerActionDlgRPEEx,c,b);QE("c106",!1)}
1382 +function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,3,6,16,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QV("rpeeomdata",b&65536);QE("c106",b)}var platfromEraseTLV=null;
1383 +function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,3,6,16,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);a&65536&&""!=Q("rpeoemdatax").value&&(d+=makeUefiBootParam(20,hex2rstr(Q("rpeoemdatax").value),null,11),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("Power Action","Status pr\u00fcfen ..."),
1384 +amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1385 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("Power Action","Status pr\u00fcfen ...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=!1);13!=currentView&&
1386 10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
1367 -function showAdvPowerDlg(){try{Q("c39").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1387 +function showAdvPowerDlg(){try{Q("c64").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1388 QV("ForceHDBootOption",1==amtPowerBootCapabilities.ForceHardDriveBoot);QV("ForcePXEBootOption",1==amtPowerBootCapabilities.ForcePXEBoot);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);QV("d24dSerialOverLan",1==amtPowerBootCapabilities.SOL);
1389 QV("d24dSecureErase",1==amtPowerBootCapabilities.SecureErase);QV("d24dPlatformErase",null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&0!=(amtsysstate.CIM_BootService.response.EnabledState&2));QV("d24dFirmwareReset",1==amtPowerBootCapabilities.ConfigurationDataReset);QV("d24dLockSleepButton",1==amtPowerBootCapabilities.SleepButtonLock);QV("d24dUserPasswordBypass",1==amtPowerBootCapabilities.UserPasswordBypass);
1370 -QV("c46",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c47",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c48",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);setDialogMode(24,"Benutzerdefinierte Power-Aktion",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}
1371 -function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c39").value&&600>Q("c39").value;QE("c41",!b);QE("c43",!b);QE("idd_d24IDERBootDevice",!b);QE("c45",!b);QE("idd_d24RSEPass",!b);QE("c54",!0)}
1372 -function showAdvPowerDlgOk(){var b=Q("c39").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"Power-Aktion abgeschlossen."):QH(60,format("Power Action Fehler # {0}.",g));setDialogMode(1,"Power Action",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c39").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=Q("d24BiosSecureBoot").checked,
1373 -AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c43").value,AvdPowerDlg.FirmwareVerbosity=Q("c45").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c44").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked,AvdPowerDlg.LockSleepButton=Q("d24LockSleepButton").checked,
1390 +QV("c71",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c72",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c73",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);QH("c66",'<option value=0>None</option><option id="ForceDVDBootOption" value=1>Force CD/DVD Boot</option><option id="ForcePXEBootOption" value=2>Force PXE Boot</option><option id="ForceHDBootOption" value=3>Force Hard Disk Boot</option><option id="ForceDiagBootOption" value=4>Force Diagnostic Boot</option>');
1391 +setDialogMode(24,"Benutzerdefinierte Power-Aktion",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c64").value&&600>Q("c64").value;QE("c66",!b);QE("c68",!b);QE("idd_d24IDERBootDevice",!b);QE("c70",!b);QE("idd_d24RSEPass",!b);QE("c106",!0)}
1392 +function showAdvPowerDlgOk(){var b=Q("c64").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"Power-Aktion abgeschlossen."):QH(61,format("Power Action Fehler # {0}.",e));setDialogMode(1,"Power Action",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c64").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=Q("d24BiosSecureBoot").checked,
1393 +AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c68").value,AvdPowerDlg.FirmwareVerbosity=Q("c70").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c69").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked,AvdPowerDlg.LockSleepButton=Q("d24LockSleepButton").checked,
1394 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,AvdPowerDlg.PlatformErase=Q("d24PlatformErase").checked,AvdPowerDlg.FirmwareReset=Q("d24FirmwareReset").checked,!0===AvdPowerDlg.SecureErase&&0<Q("d24rsepass").value.length&&(AvdPowerDlg.RSEPassword=
1395 Q("d24rsepass").value),!0===AvdPowerDlg.PlatformErase?powerActionDlgRPE(!0):(statusbox("Power Action","Status pr\u00fcfen ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)))}
1376 -function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("Power Action",format("Fehler # {0}",d)):4294967295==a.Body.OptInRequired&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(d6ConsentText.value="",setDialogMode(6,"Zustimmung des Benutzers",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("Power Action","Opt-In starten ..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):connectDesktopConsent?
1377 -(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Zustimmung des Benutzers","Benutzereinwilligung nicht erforderlich."):(statusbox("Power Action","Starteinstellungen abrufen ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1396 +function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("Power Action",format("Fehler # {0}",d)):(4294967295==a.Body.OptInRequired||connectDesktopConsent&&0!=a.Body.OptInRequired)&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(amtstack.IPS_OptInService_CancelOptIn(null),d6ConsentText.value="",setDialogMode(6,"Zustimmung des Benutzers",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("Power Action","Opt-In starten ..."),
1397 +amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Zustimmung des Benutzers","Benutzereinwilligung nicht erforderlich."):(statusbox("Power Action","Starteinstellungen abrufen ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1398 function powerActionResponseC1(b,c,a,d){200!=d?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("Power Action",format("Error #",d)):0!=a.Body.ReturnValue?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("Benutzerzustimmungsfehler",a.Body.ReturnValueStr.replace(/_/g," ")):(d6ConsentText.value="",setDialogMode(6,"Zustimmung des Benutzers",11,powerActionSendConsent),checkConsentDisplay(),consentChanged(),amtstack.Enum("CIM_ServiceAvailableToElement",function(a,
1399 b,c,d){errcheck(d,a)||(amtsysstate.CIM_ServiceAvailableToElement.responses=c,updateSystemStatus(),null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState&&amtstack.RequestPowerStateChange(2,function(a,b,c,d){}))}))}
1380 -function powerActionSendConsent(b){0==b?amtstack.IPS_OptInService_CancelOptIn(function(){}):(statusbox("Power Action","Benutzereinwilligung senden ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1400 +function powerActionSendConsent(b){console.log("powerActionSendConsent",b);0==b?(amtstack.IPS_OptInService_CancelOptIn(function(){}),connectDesktopConsent=!1,desktop.Stop()):(statusbox("Power Action","Benutzereinwilligung senden ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1401 function powerActionResponseC2(b,c,a,d){200!=d?messagebox("Power Action",format("Fehler # {0}",d)):0!=a.Body.ReturnValue?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Zustimmung des Benutzers","Benutzereinwilligung erfolgreich."):(statusbox("Power Action","Status pr\u00fcfen ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1382 -function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("Power Action",format("Fehler # {0}",d));else{b=d5actionSelect.value;var g=a.Body;g.ConfigurationDataReset=!1;delete g.WinREBootEnabled;delete g.UEFILocalPBABootEnabled;delete g.UEFIHTTPSBootEnabled;delete g.SecureBootControlEnabled;delete g.BootguardStatus;delete g.OptionsCleared;delete g.BIOSLastStatus;delete g.UefiBootParametersArray;delete g.RPEEnabled;999==b?(g.BIOSPause=AvdPowerDlg.BIOSPause,g.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1383 -g.BIOSSetup=AvdPowerDlg.BIOSSetup,g.BootMediaIndex=AvdPowerDlg.BootMediaIndex,g.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,g.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,g.IDERBootDevice=AvdPowerDlg.IDERBootDevice,g.LockKeyboard=AvdPowerDlg.LockKeyboard,g.LockPowerButton=AvdPowerDlg.LockPowerButton,g.LockResetButton=AvdPowerDlg.LockResetButton,g.LockSleepButton=AvdPowerDlg.LockSleepButton,g.ReflashBIOS=AvdPowerDlg.ReflashBIOS,g.UseIDER=AvdPowerDlg.UseIDER,g.UseSOL=AvdPowerDlg.UseSOL,
1384 -g.UseSafeMode=AvdPowerDlg.UseSafeMode,g.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=g.SecureErase&&(g.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==g.SecureErase&&AvdPowerDlg.RSEPassword&&(g.RSEPassword=AvdPowerDlg.RSEPassword)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1385 -0!=(amtPowerBootCapabilities.PlatformErase&1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(g.BIOSPause=!1,g.EnforceSecureBoot=!1,g.BIOSSetup=99<b&&104>b,g.BootMediaIndex=0,g.FirmwareVerbosity=0,g.ForcedProgressEvents=!1,g.IDERBootDevice=202==b||203==b?1:0,g.LockKeyboard=!1,g.LockPowerButton=!1,g.LockResetButton=!1,g.LockSleepButton=!1,g.ReflashBIOS=
1386 -!1,g.UseIDER=199<b&&300>b,g.UseSOL=13==currentView&&8!=b&&300>b,g.UseSafeMode=!1,g.UserPasswordBypass=!1,null!=g.SecureErase&&(g.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===g.SecureErase&&0<rsepass.length&&(g.RSEPassword=rsepass)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&
1387 -1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=!1),rsepass=null);console.log("Startaktion: "+b);console.log("Festlegen der Starteinstellungen: "+ObjectToString2(g));statusbox("Power Action","Starteinstellungen einstellen ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,b,c,d){200!=d?messagebox("Power Action",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",
1388 -d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",g,powerActionResponse2,0,1)},0,1)}}
1389 -function powerActionResponse2(b,c,a,d,g){200!=d?messagebox("Power Action",format("PUT AMT_BootSettingData, Fehler # {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("Power Action","N\u00e4chsten Start einstellen ..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1390 -function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c41.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c41.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c41").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1402 +function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("Power Action",format("Fehler # {0}",d));else{b=d5actionSelect.value;var e=a.Body;e.ConfigurationDataReset=!1;delete e.WinREBootEnabled;delete e.UEFILocalPBABootEnabled;delete e.UEFIHTTPSBootEnabled;delete e.SecureBootControlEnabled;delete e.BootguardStatus;delete e.OptionsCleared;delete e.BIOSLastStatus;delete e.UefiBootParametersArray;delete e.RPEEnabled;999==b?(e.BIOSPause=AvdPowerDlg.BIOSPause,e.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1403 +e.BIOSSetup=AvdPowerDlg.BIOSSetup,e.BootMediaIndex=AvdPowerDlg.BootMediaIndex,e.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,e.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,e.IDERBootDevice=AvdPowerDlg.IDERBootDevice,e.LockKeyboard=AvdPowerDlg.LockKeyboard,e.LockPowerButton=AvdPowerDlg.LockPowerButton,e.LockResetButton=AvdPowerDlg.LockResetButton,e.LockSleepButton=AvdPowerDlg.LockSleepButton,e.ReflashBIOS=AvdPowerDlg.ReflashBIOS,e.UseIDER=AvdPowerDlg.UseIDER,e.UseSOL=AvdPowerDlg.UseSOL,
1404 +e.UseSafeMode=AvdPowerDlg.UseSafeMode,e.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=e.SecureErase&&(e.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==e.SecureErase&&AvdPowerDlg.RSEPassword&&(e.RSEPassword=AvdPowerDlg.RSEPassword)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1405 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(e.BIOSPause=!1,e.EnforceSecureBoot=!1,e.BIOSSetup=99<b&&104>b,e.BootMediaIndex=0,e.FirmwareVerbosity=0,e.ForcedProgressEvents=!1,e.IDERBootDevice=202==b||203==b?1:0,e.LockKeyboard=!1,e.LockPowerButton=!1,e.LockResetButton=!1,e.LockSleepButton=
1406 +!1,e.ReflashBIOS=!1,e.UseIDER=199<b&&300>b,e.UseSOL=13==currentView&&8!=b&&300>b,e.UseSafeMode=!1,e.UserPasswordBypass=!1,null!=e.SecureErase&&(e.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===e.SecureErase&&0<rsepass.length&&(e.RSEPassword=rsepass)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&
1407 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=!1),rsepass=null);console.log("Startaktion: "+b);console.log("Festlegen der Starteinstellungen: "+ObjectToString2(e));statusbox("Power Action","Starteinstellungen einstellen ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,b,c,d){200!=d?messagebox("Power Action",
1408 +format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",e,powerActionResponse2,0,1)},0,1)}}
1409 +function powerActionResponse2(b,c,a,d,e){200!=d?messagebox("Power Action",format("PUT AMT_BootSettingData, Fehler # {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("Power Action","N\u00e4chsten Start einstellen ..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1410 +function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c66.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c66.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c66").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1411 c+"</Selector></SelectorSet></ReferenceParameters>",powerActionResponse3)}var targetPowerAction=0;
1392 -function powerActionResponse3(b,c,a,d){console.log("powerActionResponse3("+c+","+a+","+d+")");if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("Power Action","Power Action ausf\u00fchren ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==b&&(b=AvdPowerDlg.Action);
1393 -targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("Power Action","N\u00e4chster Startaktionssatz.")}}function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"Power-Aktion abgeschlossen."),setDialogMode(1,"Power Action",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}
1394 -function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c54",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1412 +function powerActionResponse3(b,c,a,d){if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("Power Action","Power Action ausf\u00fchren ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==b&&(b=AvdPowerDlg.Action);targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+
1413 +b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("Power Action","N\u00e4chster Startaktionssatz.")}}function powerActionResponse4(b,c,a,d){200==d&&(QH(61,"Power-Aktion abgeschlossen."),setDialogMode(1,"Power Action",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}function powerActionResponse5(b,c,a,d){}
1414 +function consentChanged(){QE("c106",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1415 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1416 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1397 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var g=b[c].app?b[c].app:"";a[d][g]||(a[d][g]={});b[c].name&&(a[d][g][b[c].name]=b[c])}xxStorage.content=
1398 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Verwalten Sie den Intel&reg; AMT-Speicher f\u00fcr diesen Computer.<br><br>";var v,n,g="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,e;for(e in b[c][p]){q++;if(c!=v||p!=n)""!=g&&(a+=g,g="<br>"),v=c,n=p,g=""!=c?g+EscapeHtml(c+
1399 -" / "+p):g+"Wurzel";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+e+'"',g=g+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+e+'",'+C+")><div style=float:right>"),g=g+(" "+AddButton2("Herunterladen","DownloadFromStorage("+C+',"'+e+'",event)')),g=g+("</div><div style=padding-top:3px><b>"+EscapeHtml(e)+"</b>, <i>"+b[c][p][e].size+" Bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==
1400 -q&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=g&&(a+=g);0==d&&(a+="<div style=padding-left:15px><br><i>Keine Dateien gefunden.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+
1401 -(v?AddButton("Hochladen...","UploadToStorage()"):""));QH(55,a)}else QH(55,"Speicherdaten k\u00f6nnen nicht geladen werden ...<br/>"+AddButton("Aktualisierung","PullStorage()"))}
1402 -function showStorageDetails(b,c,a,d){if(!xxdialogMode){var g="",v=xxStorage.content[b][c][a];""!=b&&(g+=addHtmlValue("Verk\u00e4ufer",b));""!=c&&(g+=addHtmlValue("Anwendung",c));g+=addHtmlValue("Name",a);g+=addHtmlValue("Gr\u00f6\u00dfe",v.size+" bytes");v.link&&(g+=addHtmlValue("Verkn\u00fcpfung",v.link));setDialogMode(11,"Aufbewahrungsgegenstand",5,showStorageDetailsEx,g,d)}}
1417 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1418 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Verwalten Sie den Intel&reg; AMT-Speicher f\u00fcr diesen Computer.<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var r=0,g;for(g in b[c][p]){r++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+
1419 +" / "+p):e+"Wurzel";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+g+'",'+C+")><div style=float:right>"),e=e+(" "+AddButton2("Herunterladen","DownloadFromStorage("+C+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][p][g].size+" Bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==
1420 +r&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>Keine Dateien gefunden.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+
1421 +(v?AddButton("Hochladen...","UploadToStorage()"):""));QH(56,a)}else QH(56,"Speicherdaten k\u00f6nnen nicht geladen werden ...<br/>"+AddButton("Aktualisierung","PullStorage()"))}
1422 +function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("Verk\u00e4ufer",b));""!=c&&(e+=addHtmlValue("Anwendung",c));e+=addHtmlValue("Name",a);e+=addHtmlValue("Gr\u00f6\u00dfe",v.size+" bytes");v.link&&(e+=addHtmlValue("Verkn\u00fcpfung",v.link));setDialogMode(11,"Aufbewahrungsgegenstand",5,showStorageDetailsEx,e,d)}}
1423 function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}function storageDeleteResponse(b,c){200!=c?messagebox("Lager",format("Datei kann nicht gel\u00f6scht werden (ERR {0}). \u00dcberpr\u00fcfen Sie, ob der Computer eingeschaltet ist.",c)):PullStorage()}function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}
1424 function DownloadFromStorageEx(b,c,a){200!=c||null==b?console.log(c,"Data = null"):saveAs(data2blob(b),a)}function OpenFromStorage(b,c){if(!xxdialogMode){haltEvent(c);var a=window.open("http://"+wsstack.comm.host+":"+wsstack.comm.port+"/amt-storage/"+b,"_blank","noopener,noreferrer");a.opener=null;a.focus()}}
1425 function PushToStorage(b,c,a){var d=null;7E3<c.length&&(d=[b,c.substring(7E3)],c=c.substring(0,7E3));wsstack.comm.PerformAjax(c,PushToStorageResponse,d,0,"/amt-storage/"+b+(1==a?"?append=":""),"PUT")}function PushToStorageResponse(b,c,a){200!=c?messagebox("Lager",format("Datei kann nicht \u00fcbertragen werden (ERR {0}). \u00dcberpr\u00fcfen Sie, ob der Computer eingeschaltet ist.",c)):null!=a?PushToStorage(a[0],a[1],!0):PullStorage()}
@@ -1410,36 +1430,36 @@ a+="<datalist id=mstorageapplicationlist>";for(d in xxStorageApplications)a+='<o
1430 function UploadToStorageEx(b,c){if(c)d=new FileReader,d.onload=UploadToStorageEx2,d.filename=Q("mstoragefile").value,d.readAsBinaryString(c);else{var a=Q("mstoragefile");if(1==a.files.length){var d=new FileReader;d.onload=UploadToStorageEx2;d.filename=a.files[0].name;d.readAsBinaryString(a.files[0])}}}
1431 function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0].name:"");b=b.split(" ").join("");var c=b.split("-");3==c.length&&12>c[0].length&&12>c[1].length&&(Q("mstoragevendor").value=c[0],Q("mstorageapplication").value=c[1],b=c[2]);b=b.split("-").join("");b.endsWith(".gz")&&(b=b.substring(0,b.length-3));b.endsWith(".htm")||b.endsWith(".html")?Q("mstoragetype").value="text/html":b.endsWith(".txt")&&(Q("mstoragetype").value="text/plain");11<b.length&&(b=b.substring(0,11));Q("mstoragefilename").value=
1432 b}
1413 -function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var g=Q("mstoragetype").value;""==g&&(g="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1414 -"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+g+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1433 +function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1434 +"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1435 function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," Tage").replace("H"," Std").replace("M"," Protokoll");b=b.replace(" 1 Tag"," 1 Tag").replace(" 1 Stunde"," 1 Stunde").replace(" 1 minute "," 1 Minute ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1416 -function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Weckalarme verwalten.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,g){if(200==g){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, wach auf "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," beim"),void 0!=d[c].Interval&&(a+=" und jede"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+=", l\u00f6schen, wenn Sie fertig sind"),
1417 -b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("Bearbeiten...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>Es wurden keine Weckalarme registriert.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("Entfernen Sie alle Alarme","RemoveAllAlarms()")+
1418 -AddButton("Hinzuf\u00fcgen","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
1419 -function prepareAlarmOccurenceTemplate(b,c,a,d,g){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1420 -g+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"Entfernen Sie alle Weckalarme",3,RemoveAllAlarmsEx,"Entfernen aller Weckalarme best\u00e4tigen?")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,g,v){0==--b&&PullAlarms()})}
1436 +function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Weckalarme verwalten.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, wach auf "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," beim"),void 0!=d[c].Interval&&(a+=" und jede"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+=", l\u00f6schen, wenn Sie fertig sind"),
1437 +b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("Bearbeiten...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>Es wurden keine Weckalarme registriert.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton2("Entfernen Sie alle Alarme","RemoveAllAlarms()",
1438 +xxAlarms?"":"disabled")+AddButton("Hinzuf\u00fcgen","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(58,b)}},null,!0)}
1439 +function prepareAlarmOccurenceTemplate(b,c,a,d,e){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1440 +e+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"Entfernen Sie alle Weckalarme",3,RemoveAllAlarmsEx,"Entfernen aller Weckalarme best\u00e4tigen?")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,e,v){0==--b&&PullAlarms()})}
1441 function showAddAlarm(b){if(!xxdialogMode){QE("d25alarm_name",!b);if(void 0!=b){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime);Q("d25alarm_name").value=c.ElementName;Q("d25alarm_sdate").value=a.getFullYear()+"-"+_fmttimepad(a.getMonth()+1)+"-"+_fmttimepad(a.getDate());Q("d25alarm_stime").value=a.getHours()+":"+_fmttimepad(a.getMinutes())+":"+_fmttimepad(a.getSeconds());if(c.Interval){var a=c.Interval.Interval.replace("P","").replace("T","").replace("D","D,").replace("H","H,").replace("M","M,").split(","),
1422 -d=[0,0,0],g;for(g in a){var v=a[g].length-1;"D"==a[g][v]&&(d[0]=parseInt(a[g].substring(0,v)));"H"==a[g][v]&&(d[1]=parseInt(a[g].substring(0,v)));"M"==a[g][v]&&(d[2]=parseInt(a[g].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1423 -Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"Neuen Alarm hinzuf\u00fcgen",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c54",b)}
1424 -function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),g=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],g[0],g[1],g[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",g=Q("d25alarm_interval").value.split("-");3!=g.length&&(g=[0,0,0]);var g=
1425 -"P"+g[0]+"DT"+g[1]+"H"+g[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,g,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("Alarm hinzuf\u00fcgen",format("Fehler beim Hinzuf\u00fcgen eines Alarms. Status: {0}. <br/> \u00dcberpr\u00fcfen Sie, ob der Alarm f\u00fcr eine zuk\u00fcnftige Zeit gilt.",d)):0!=c.Body.ReturnValue?messagebox("Alarm hinzuf\u00fcgen",format("Alarm {0} konnte nicht hinzugef\u00fcgt werden. <br/> \u00dcberpr\u00fcfen Sie, ob der Alarm f\u00fcr eine zuk\u00fcnftige Zeit gilt.",
1426 -c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+g+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("Alarm bearbeiten",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1442 +d=[0,0,0],e;for(e in a){var v=a[e].length-1;"D"==a[e][v]&&(d[0]=parseInt(a[e].substring(0,v)));"H"==a[e][v]&&(d[1]=parseInt(a[e].substring(0,v)));"M"==a[e][v]&&(d[2]=parseInt(a[e].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1443 +Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"Neuen Alarm hinzuf\u00fcgen",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c106",b)}
1444 +function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),e=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],e[0],e[1],e[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",e=Q("d25alarm_interval").value.split("-");3!=e.length&&(e=[0,0,0]);var e=
1445 +"P"+e[0]+"DT"+e[1]+"H"+e[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,e,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("Alarm hinzuf\u00fcgen",format("Fehler beim Hinzuf\u00fcgen eines Alarms. Status: {0}. <br/> \u00dcberpr\u00fcfen Sie, ob der Alarm f\u00fcr eine zuk\u00fcnftige Zeit gilt.",d)):0!=c.Body.ReturnValue?messagebox("Alarm hinzuf\u00fcgen",format("Alarm {0} konnte nicht hinzugef\u00fcgt werden. <br/> \u00dcberpr\u00fcfen Sie, ob der Alarm f\u00fcr eine zuk\u00fcnftige Zeit gilt.",
1446 +c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+e+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("Alarm bearbeiten",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1447 function showAlertDetails(b){if(!xxdialogMode){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime),a="<div style=text-align:left>"+addHtmlValue("Name",c.ElementName)+addHtmlValue("Weckzeit",a.toLocaleString().replace(", "," at "));void 0!=c.Interval&&(a+=addHtmlValue("Intern",_fmtinterval(c.Interval.Interval)));a+=addHtmlValue("Nach dem Aufwachen",1==c.DeleteOnCompletion?"Alarm l\u00f6schen":"Alarm halten")+"</div>";messagebox(format("Alarm {0}",c.ElementName),a);setDialogMode(11,"Alarm"+c.ElementName,
1448 5,showAlertDetailsDelete,a,b)}}function showAlertDetailsDelete(b,c){2==b&&amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,b,c,v){PullAlarms()})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag;
1429 -function setDialogMode(b,c,a,d,g,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c54",!0);QV("c54",a&1);QV("c53",a&2);QV(58,a&2);QV("c55",a&4);c&&QH(59,c);for(c=1;27>c;c++)QV("dialog"+c,c==b);QV("dialog",b);g&&(11==b?QH(63,g):QH(60,g));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1449 +function setDialogMode(b,c,a,d,e,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c106",!0);QV("c106",a&1);QV("c105",a&2);QV(59,a&2);QV("c107",a&4);c&&QH(60,c);for(c=1;28>c;c++)QV("dialog"+c,c==b);QV("dialog",b);e&&(11==b?QH(64,e):QH(61,e));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1450 function dialogclose(b){var c=xxdialogFunc,a=xxdialogButtons,d=xxdialogTag;setDialogMode();(a&8||b)&&c&&c(b,d)}
1431 -function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(41).offsetWidth&&(QS("Desk")["max-width"]=Q(41).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1432 -"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(60,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(60,c);setDialogMode(1,b)}
1433 -function SaveJsonFile(b,c,a,d){var g="",v={},n=new Date;amtsysstate&&(g="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));g+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1434 -n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+g+".json")}var httpErrorTable={200:"OK",401:"Authentifizierungsfehler",408:"Timeout-Fehler",601:"WSMAN-Analysefehler",602:"HTTP-Antwortheader kann nicht analysiert werden",603:"Unerwartete HTTP-Enum-Antwort",604:"Unerwartete HTTP-Pull-Antwort",997:"Ung\u00fcltiger Verdauungsbereich"};
1451 +function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(42).offsetWidth&&(QS("Desk")["max-width"]=Q(42).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1452 +"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(61,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(61,c);setDialogMode(1,b)}
1453 +function SaveJsonFile(b,c,a,d){var e="",v={},n=new Date;amtsysstate&&(e="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));e+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1454 +n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+e+".json")}var httpErrorTable={200:"OK",401:"Authentifizierungsfehler",408:"Timeout-Fehler",601:"WSMAN-Analysefehler",602:"HTTP-Antwortheader kann nicht analysiert werden",603:"Unerwartete HTTP-Enum-Antwort",604:"Unerwartete HTTP-Pull-Antwort",997:"Ung\u00fcltiger Verdauungsbereich"};
1455 function errcheck(b,c){if(null==wsstack||amtstack!=c)return!0;200!=b&&9!=b&&(setDialogMode(),wsstack.comm.FailAllError=999,amtstack.CancelAllQueries(999),QH(5,httpErrorTable[b]?httpErrorTable[b]:format("Fehler # {0}",b)),401==b&&QH(5,'Authentifizierungsfehler<br /><br /><input type=button value="Set new credentials" onclick=meshcentral2credCallback(true)></input>'),go(100),QS(3).width=0);return 200!=b}
1456 function goiFrame(b,c,a){if(!xxdialogMode){go(c);if(1==b.shiftKey||0==Q(13).src.endsWith(a))Q(13).src=a;QV(14,!1);QV(12,!0)}}function go(b,c){if(!xxdialogMode||1==c){QV(12,!1);QV(14,!0);QV(4,100==b);QV(6,100>b);for(var a=0;80>a;a++){QV("p"+a,a==b);var d=QS("go"+a);d&&(d["background-color"]=a==b?"#abcae1":"");d&&(d["background-color"]=a==b?"gray":"")}currentView=b;center()}}
1437 -function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,g=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:g};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(g=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:g}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(g=parseInt(a[2]));return{host:a[0],http:d,redir:g}}
1457 +function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,e=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:e};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(e=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:e}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(e=parseInt(a[2]));return{host:a[0],http:d,redir:e}}
1458 function addLink(b,c){return"<a style=cursor:pointer;color:blue onclick='"+c+"'>&diams; "+b+"</a>"}function addLinkConditional(b,c,a){return a?addLink(b,c):b}function haltEvent(b){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1}function addOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;Q(b).add(d)}function addDisabledOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;d.disabled=1;Q(b).add(d)}
1439 -function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,g=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:g=1}return 4==c+a+d+g}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("Anruffehler",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}
1459 +function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,e=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:e=1}return 4==c+a+d+e}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("Anruffehler",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}
1460 function TableStart2(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><p><td>"}function TableEntry(b,c){return"<tr><td class=r1><p>"+b+"<td class=r1>"+c}function FullTable(b,c){var a=TableStart();for(i in b)i&&b[i]&&(a+=TableEntry(i,b[i]));return a+TableEnd(c)}function TableEnd(b){return"<tr><td colspan=2><p>"+(b?b:"")+"</table>"}function AddButton(b,c){return"<input type=button value='"+b+"' onclick='"+c+"' style=margin:4px>"}
1461 function AddButton2(b,c,a){return"<input type=button value='"+b+"' onclick='"+c+"' "+a+">"}function AddRefreshButton(b){return'<input type=button name=refreshbtn value="Aktualisierung" onclick=\'refreshButtons(false);'+b+"' style=margin:4px "+(0==refreshButtonsState?"disabled":"")+">"}function MoreStart(){return'<a style=cursor:pointer;color:blue id=morexxx1 onclick=QV("morexxx1",false);QV("morexxx2",true)>&#x25BC; More</a><div id=morexxx2 style=display:none><br><hr>'}
1442 -function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,g=b.options.length;d<g;d++)a=b.options[d],a.selected&&c.push(a.value);return c}function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}
1462 +function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,e=b.options.length;d<e;d++)a=b.options[d],a.selected&&c.push(a.value);return c}function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}
1463 function guidToStr(b){return b.substring(6,8)+b.substring(4,6)+b.substring(2,4)+b.substring(0,2)+"-"+b.substring(10,12)+b.substring(8,10)+"-"+b.substring(14,16)+b.substring(12,14)+"-"+b.substring(16,20)+"-"+b.substring(20)}function getUrlVars(){for(var b,c=[],a=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),d=0;d<a.length;d++)b=a[d].indexOf("="),0<b&&(c[a[d].substring(0,b)]=a[d].substring(b+1,a[d].length));return c}
1464 function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}
1465 function getDocHeight(){return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight&&0!=document.documentElement.clientHeight?document.documentElement.clientHeight:document.getElementsByTagName("body")[0].clientHeight}function addHtmlValue(b,c){return'<div style=height:20px><div style=float:right;width:220px;overflow:hidden><b title="'+c+'">'+c+"</b></div><div>"+b+"</div></div>"}
public/commander-es.htm
+912 -891
@@ -1,8 +1,8 @@
1 -<!DOCTYPE html><html lang="es" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Conectar 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>Desconectado</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>Estado del sistema</a><p id=go14 class=nav1 onclick=go(14)><a>Escritorio remoto</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Archivos</a><p id=go13 class=nav1 onclick=go(13)><a>Serie sobre LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Información de hardware</a><p id=go6 class=nav1 onclick=go(6)><a>Registro de eventos</a><p id=go15 class=nav1 onclick=go(15)><a>Registro de auditoría</a><p id=go21 class=nav1 onclick=go(21)><a>Almacenamiento</a><p id=go8 class=nav1 onclick=go(8)><a>Configuración de red</a><p id=go17 class=nav1 onclick=go(17)><a>Configuraciones de internet</a><p id=go16 class=nav1 onclick=go(16)><a>Configuracion seguridad</a><p id=go19 class=nav1 onclick=go(19)><a>Presencia de agente</a><p id=go18 class=nav1 onclick=go(18)><a>Defensa del sistema</a><p id=go11 class=nav1 onclick=go(11)><a>Cuentas de usuario</a><p id=go22 class=nav1 onclick=go(22)><a>Suscripciones</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go12 class=nav1 onclick=go(12)><a>Navegador WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Mapa de disco" onclick=iderToggleDiskMap()><input type=button value="Detener sesión IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Disquete, los bloques son 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, los bloques son 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>El firmware de esta computadora debe actualizarse,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>por favor verifique aquí</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>Cargando...</h1></div><div id=p1 style=display:none><h1>Estado del sistema</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Información de hardware</h1><span id=16></span></div><div id=p6 style=display:none><h1>Registro de eventos</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Configuración de red</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Cuentas de usuario</h1><span id=21></span></div><div id=p12 style=display:none><h1>Navegador WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><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=Consulta style=margin:4px onclick=wsmanQuery()><input type=button value=Claro style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filtrar style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminal de serie sobre LAN</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>El puerto Intel® AMT Redirection o la función Serial-over-LAN está deshabilitada<span id=26>, haga clic aquí para habilitarlo.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La computadora remota no está encendida, haga clic aquí para emitir un comando de encendido.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Acciones de poder ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Iniciar la operación remota de montaje en disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Iniciar captura" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Conectar onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Desconectado.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Alternar lo que enviará la tecla de retorno" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Cambiar tamaño de terminal" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Cambiar el tipo de emulación de teclas F1 a F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii extendido" title="Cambiar el tipo de emulación de terminal" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Retroceso<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Pegar disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Escritorio remoto</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>El puerto Intel® AMT Redirection o la función KVM están deshabilitados<span id=37>, haga clic aquí para habilitarlo.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La computadora remota no está encendida, haga clic aquí para emitir un comando de encendido.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Girar a la izquierda" onclick=drotate(-1)>↺</div><div class=rb title="Gira a la derecha" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Alternar el modo de pantalla completa" onkeypress="return false" onkeydown="return false" value=Completo onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Guardar una captura de pantalla del escritorio remoto" onkeypress="return false" onkeydown="return false" value=Salvar... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Configuraciones ..." title="Editar configuraciones de escritorio remoto" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Iniciar la operación remota de montaje en disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Cambiar el estado de energía de la máquina remota" onkeypress="return false" onkeydown="return false" value="Acciones de poder ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Conectar onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Desconectado.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Ganar<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Win + Izquierda<option value=24>Win + Right<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Tipo onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Pantalla en blanco&nbsp;</span><span id=47><input id=48 type=checkbox>Sólo vista&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Registro de auditoría</h1><span id=50></span></div><div id=p16 style=display:none><h1>Configuracion seguridad</h1><span id=51></span></div><div id=p17 style=display:none><h1>Configuraciones de internet</h1><span id=52></span></div><div id=p18 style=display:none><h1>Defensa del sistema</h1><span id=53></span></div><div id=p19 style=display:none><h1>Presencia de agente</h1><span id=54></span></div><div id=p21 style=display:none><h1>Almacenamiento</h1><span id=55></span></div><div id=p22 style=display:none><h1>Suscripciones a eventos</h1><span id=56></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Archivos</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Arriba>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Seleccionar todo" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rebautizar onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Eliminar onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nueva carpeta" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Subir onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Cortar onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Copiar onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Pegar onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Actualizar onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Ordenar por nombre<option value=2>Ordenado por tamaño<option value=3>Ordenar por fecha<option value=4>Desciende por nombre<option value=5>Descender por tamaño<option value=6>Descender por fecha</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 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=60 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>Nombre de usuario</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Contraseña*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirmar contraseña</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Red<option value=2>Ninguna</select><div>Permiso</div></div><div>Permisos concedidos</div><ul id=62 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>* Mínimo 8 caracteres con mayúsculas, minúsculas, 0-9 y uno de! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Acción de poder</div></div><div><span style=color:red>Advertencia:</span>Algunas acciones de energía pueden provocar la pérdida de datos y pueden desconectar las sesiones de redirección de escritorio, terminal o disco.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Código de consentimiento</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Pantalla principal<option value=1>Pantalla secundaria<option id=d6ThirdDisplay value=2 style=display:none>Tercera pantalla</select><div>Visualización de consentimiento</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Codificación de imagen</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Discapacitado<option value=2>Automatic<option value=3>Habilitado</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Mostrar cursor del mouse local</label><br><label><input type=checkbox id=d7showcad>Mostrar Ctrl-Alt-Supr</label><br><label><input type=checkbox id=d7limitFrameRate>Límite de velocidad de fotogramas</label><br><label><input type=checkbox id=d7noMouseRotate>No gire el mouse</label><br></div><div>Otros ajustes</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Calidad</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Escalada</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=administración style=float:right;width:220px><div style=height:20px>Nombre de usuario</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Contraseña</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Puerto de redireccionamiento</label><label id=c15 style=display:block><input type=checkbox id=c16>Escritorio remoto KVM</label><label style=display:block><input type=checkbox id=c17>Redirección IDE<br></label><label style=display:block><input type=checkbox id=c18>Serie sobre LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>No requerido<br></label><label><input type=radio name=d10 id=c20 value=1>Requerido solo para KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Siempre requerido<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo 32 caracteres"><div title="Máximo 32 caracteres">Nombre de perfil</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo 32 caracteres"><div title="Máximo 32 caracteres">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Prioridad</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>PSK WPA</select><div>Autenticación</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Ninguna</select><div>Cifrado</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longitud entre 8 y 63 caracteres."><div title="Longitud entre 8 y 63 caracteres.">Contraseña*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longitud entre 8 y 63 caracteres."><div title="Longitud entre 8 y 63 caracteres.">Confirmar contraseña</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Esto guardará todo el estado de Intel® AMT para esta máquina en un archivo. Las contraseñas no se guardarán, pero se pueden incluir algunos datos confidenciales.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Discapacitado<br><input type=radio name=d20 id=d20b value=1>Respuesta ICMP<br><input type=radio name=d20 id=d20c value=2>Respuesta RMCP<br><input type=radio name=d20 id=d20d value=3>Respuesta ICMP y RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Sincronización de dirección IP del sistema operativo</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>dirección IP</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Marca de subred</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Puerta</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS primario</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternativo</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Discapacitado<option value=1>Desactivado, actualización de DHCP<option value=2>Habilitado</select><div>Cliente DNS dinámico</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Intervalo de actualización (minutos)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (segundos)</div></div><div style=font-size:10px><br>El intervalo predeterminado es de 1440 minutos, el TTL predeterminado es de 900 segundos.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Encender<option value=10>Reiniciar<option value=5>Ciclo de poder<option value=8>Corriente cortada<option id=d24p500 value=500>OS Wake desde Standby<option id=d24p501 value=501>Ahorro de energía del sistema operativo<option value=999>Establecer opciones de arranque</select><div>Comando remoto</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pausa del BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Hacer cumplir el arranque seguro</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Configuración del BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forzar eventos de progreso</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Botón de encendido de bloqueo</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Botón de reinicio de bloqueo</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Botón de bloqueo</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Bloqueo de teclado</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS bypass de contraseña</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflash BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Modo seguro</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Use IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serie sobre LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Borrado seguro remoto Intel®</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Configuración de arranque</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Ninguna<option id=ForceDVDBootOption value=1>Forzar arranque de CD / DVD<option id=ForcePXEBootOption value=2>Arranque Force PXE<option id=ForceHDBootOption value=3>Forzar arranque de disco duro<option id=ForceDiagBootOption value=4>Arranque de diagnóstico de fuerza</select><div>Fuente de arranque</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Ninguna<option value=1>Índice 1<option value=2>Índice 2<option value=3>Índice 3<option value=3>Índice 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Arrancar en disquete<option value=1>Arrancar en CDROM</select><div>Dispositivo de arranque IDER</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Sistema por defecto<option id=c46 value=1>Tranquilo<option id=c47 value=2>Verboso<option id=c48 value=3>Pantalla en blanco</select><div>Verbocidad</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>Contraseña RSE</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>Nombre de alarma</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>Fecha de activación (año-mes-día)</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>Tiempo de activación (hora: min: seg)</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>Intervalo (días-horas-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>Mantener alarma<option value=1>Eliminar al finalizar</select></div><div style=padding-top:4px>Despues de despertar</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Habilitado<br></label><label><input type=radio name=d26b id=c50 value=0>Discapacitado<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Habilitado<br></label><label><input type=radio name=d26a id=c52 value=0>Discapacitado<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Cancelar style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=Okay style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Eliminar style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="es" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Conectar 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>Desconectado</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>Estado del sistema</a><p id=go14 class=nav1 onclick=go(14)><a>Escritorio remoto</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Archivos</a><p id=go13 class=nav1 onclick=go(13)><a>Serie sobre LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Información de hardware</a><p id=go6 class=nav1 onclick=go(6)><a>Registro de eventos</a><p id=go15 class=nav1 onclick=go(15)><a>Registro de auditoría</a><p id=go21 class=nav1 onclick=go(21)><a>Almacenamiento</a><p id=go8 class=nav1 onclick=go(8)><a>Configuración de red</a><p id=go17 class=nav1 onclick=go(17)><a>Configuraciones de internet</a><p id=go16 class=nav1 onclick=go(16)><a>Configuracion seguridad</a><p id=go19 class=nav1 onclick=go(19)><a>Presencia de agente</a><p id=go18 class=nav1 onclick=go(18)><a>Defensa del sistema</a><p id=go11 class=nav1 onclick=go(11)><a>Cuentas de usuario</a><p id=go22 class=nav1 onclick=go(22)><a>Suscripciones</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go12 class=nav1 onclick=go(12)><a>Navegador WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Mapa de disco" onclick=iderToggleDiskMap()><input type=button value="Detener sesión IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Disquete, los bloques son 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, los bloques son 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>El firmware de esta computadora debe actualizarse,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>por favor verifique aquí</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>Cargando...</h1></div><div id=p1 style=display:none><h1>Estado del sistema</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Información de hardware</h1><span id=16></span></div><div id=p6 style=display:none><h1>Registro de eventos</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Configuración de red</h1><span id=19></span><span id=20></span><span id=21></span></div><div id=p11 style=display:none><h1>Cuentas de usuario</h1><span id=22></span></div><div id=p12 style=display:none><h1>Navegador WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=23 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=24 type=button value=Consulta style=margin:4px onclick=wsmanQuery()><input type=button value=Claro style=margin:4px onclick="QH(25, '')"><input id=c0 placeholder=Filtrar style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=25></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminal de serie sobre LAN</h1><br><div id=26 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>El puerto Intel® AMT Redirection o la función Serial-over-LAN está deshabilitada<span id=27>, haga clic aquí para habilitarlo.</span></div></div><div id=28 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La computadora remota no está encendida, haga clic aquí para emitir un comando de encendido.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=29></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Acciones de poder ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Iniciar la operación remota de montaje en disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Iniciar captura" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Conectar onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=30>Desconectado.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Alternar lo que enviará la tecla de retorno" onclick="termToggleCr();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Cambiar tamaño de terminal" onclick="termToggleSize();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Cambiar el tipo de emulación de teclas F1 a F10" onclick="termToggleFx();Q(33).blur()"><input id=34 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii extendido" title="Cambiar el tipo de emulación de terminal" onclick="termToggleType();Q(34).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Retroceso<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=35 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Pegar disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=36><h1>Escritorio remoto</h1><br></div><div id=37 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>El puerto Intel® AMT Redirection o la función KVM están deshabilitados<span id=38>, haga clic aquí para habilitarlo.</span></div></div><div id=39 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La computadora remota no está encendida, haga clic aquí para emitir un comando de encendido.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=40></span>&nbsp;<div class=rb title="Girar a la izquierda" onclick=drotate(-1)>↺</div><div class=rb title="Gira a la derecha" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Alternar el modo de pantalla completa" onkeypress="return false" onkeydown="return false" value=Completo onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Guardar una captura de pantalla del escritorio remoto" onkeypress="return false" onkeydown="return false" value=Salvar... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Configuraciones ..." title="Editar configuraciones de escritorio remoto" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Iniciar la operación remota de montaje en disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Cambiar el estado de energía de la máquina remota" onkeypress="return false" onkeydown="return false" value="Acciones de poder ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Conectar onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=41>Desconectado.</span></div><tr><td id=42 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onwheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=43 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Ganar<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Win + Izquierda<option value=24>Win + Right<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12<option value=25>Enter</select><input id=DeskWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=44 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=45 type=button value=Tipo onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=46><input id=47 type=checkbox>Pantalla en blanco&nbsp;</span><span id=48><input id=49 type=checkbox>Sólo vista&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=50></span><h1>Registro de auditoría</h1><span id=51></span></div><div id=p16 style=display:none><h1>Configuracion seguridad</h1><span id=52></span></div><div id=p17 style=display:none><h1>Configuraciones de internet</h1><span id=53></span></div><div id=p18 style=display:none><h1>Defensa del sistema</h1><span id=54></span></div><div id=p19 style=display:none><h1>Presencia de agente</h1><span id=55></span></div><div id=p21 style=display:none><h1>Almacenamiento</h1><span id=56></span></div><div id=p22 style=display:none><h1>Suscripciones a eventos</h1><span id=57></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=58></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Archivos</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Arriba>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Seleccionar todo" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rebautizar onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Eliminar onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nueva carpeta" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Subir onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Cortar onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Copiar onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Pegar onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Actualizar onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Ordenar por nombre<option value=2>Ordenado por tamaño<option value=3>Ordenar por fecha<option value=4>Desciende por nombre<option value=5>Descender por tamaño<option value=6>Descender por fecha</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=59 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=60 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=61 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>Nombre de usuario</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Contraseña*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirmar contraseña</div></div><div id=62><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Red<option value=2>Ninguna</select><div>Permiso</div></div><div>Permisos concedidos</div><ul id=63 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>* Mínimo 8 caracteres con mayúsculas, minúsculas, 0-9 y uno de! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Acción de poder</div></div><div><span style=color:red>Advertencia:</span>Algunas acciones de energía pueden provocar la pérdida de datos y pueden desconectar las sesiones de redirección de escritorio, terminal o disco.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Código de consentimiento</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Pantalla principal<option value=1>Pantalla secundaria<option id=d6ThirdDisplay value=2 style=display:none>Tercera pantalla</select><div>Visualización de consentimiento</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Codificación de imagen</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Discapacitado<option value=2>Automatic<option value=3>Habilitado</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Mostrar cursor del mouse local</label><br><label><input type=checkbox id=d7showcad>Mostrar Ctrl-Alt-Supr</label><br><label><input type=checkbox id=d7limitFrameRate>Límite de velocidad de fotogramas</label><br><label><input type=checkbox id=d7noMouseRotate>No gire el mouse</label><br><label><input type=checkbox id=d7kvmrmw>Reverse Mouse Wheel</label><br></div><div>Otros ajustes</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Calidad</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Escalada</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=administración style=float:right;width:220px><div style=height:20px>Nombre de usuario</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Contraseña</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Puerto de redireccionamiento</label><label id=c15 style=display:block><input type=checkbox id=c16>Escritorio remoto KVM</label><label style=display:block><input type=checkbox id=c17>Redirección IDE<br></label><label style=display:block><input type=checkbox id=c18>Serie sobre LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>No requerido<br></label><label><input type=radio name=d10 id=c20 value=1>Requerido solo para KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Siempre requerido<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=64></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo 32 caracteres"><div title="Máximo 32 caracteres">Nombre de perfil</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo 32 caracteres"><div title="Máximo 32 caracteres">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Prioridad</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Autenticación</div></div><div style=height:26px><select id=c26 style=float:right;width:200px onclick=updateWifiDialog()><option id=65 value=4>CCMP-AES<option id=66 value=3>TKIP-RC4</select><div>Cifrado</div></div><div id=c27><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longitud entre 8 y 63 caracteres."><div title="Longitud entre 8 y 63 caracteres.">Contraseña*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longitud entre 8 y 63 caracteres."><div title="Longitud entre 8 y 63 caracteres.">Confirmar contraseña</div></div></div><div id=c30 style=display:none><div id=c31 style=height:26px><select id=c32 style=float:right;width:200px onchange=updateNetAuth2Dialog(event)><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protocolo</div></div><div id=c33 style=height:26px><input id=c34 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Máximo 32 caracteres"><div title="Máximo 32 caracteres">Server Name</div></div><div id=c35 style=height:26px><select id=c36 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c37 style=height:26px><input id=c38 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c39 style=height:26px><input id=c40 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Nombre de usuario</div></div><div id=c41 style=height:26px><input id=c42 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuth2Dialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Contraseña</div></div><div id=c43 style=height:26px><input id=c44 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuth2Dialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c45 style=height:26px><input id=c46 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c47 style=height:26px><input id=c48 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c49 style=height:26px><select id=c50 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Client Certificate</div></div><div id=c51 style=height:26px><select id=c52 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Server Issuer Cert</div></div><div id=c53 style=height:26px><select id=c54 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=1>Habilitado<option value=0>Discapacitado</select><div>Active in S0</div></div></div></div><div id=dialog19 style=margin:auto;margin:3px>Esto guardará todo el estado de Intel® AMT para esta máquina en un archivo. Las contraseñas no se guardarán, pero se pueden incluir algunos datos confidenciales.<br><br><input id=c55 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Discapacitado<br><input type=radio name=d20 id=d20b value=1>Respuesta ICMP<br><input type=radio name=d20 id=d20c value=2>Respuesta RMCP<br><input type=radio name=d20 id=d20d value=3>Respuesta ICMP y RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=67><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Sincronización de dirección IP del sistema operativo</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=68><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c56 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>dirección IP</div></div><div style=height:26px id=69><input id=c57 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Marca de subred</div></div><div style=height:26px><input id=c58 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Puerta</div></div><div style=height:26px><input id=c59 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS primario</div></div><div style=height:26px><input id=c60 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternativo</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c61 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Discapacitado<option value=1>Desactivado, actualización de DHCP<option value=2>Habilitado</select><div>Cliente DNS dinámico</div></div><div style=height:26px><input id=c62 style=float:right;width:200px><div>Intervalo de actualización (minutos)</div></div><div style=height:26px><input id=c63 style=float:right;width:200px><div>TTL (segundos)</div></div><div style=font-size:10px><br>El intervalo predeterminado es de 1440 minutos, el TTL predeterminado es de 900 segundos.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c64 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Encender<option value=10>Reiniciar<option value=5>Ciclo de poder<option value=8>Corriente cortada<option id=d24p500 value=500>OS Wake desde Standby<option id=d24p501 value=501>Ahorro de energía del sistema operativo<option value=999>Establecer opciones de arranque</select><div>Comando remoto</div></div><div style=height:80px><div id=c65 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pausa del BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Hacer cumplir el arranque seguro</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Configuración del BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forzar eventos de progreso</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Botón de encendido de bloqueo</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Botón de reinicio de bloqueo</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Botón de bloqueo</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Bloqueo de teclado</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS bypass de contraseña</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflash BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Modo seguro</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Use IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serie sobre LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Borrado seguro remoto Intel®</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Configuración de arranque</div></div><div style=height:26px><select id=c66 style=float:right;width:200px onchange=showAdvPowerDlgChange()></select><div>Fuente de arranque</div></div><div id=c67 style=height:26px><select id=c68 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Ninguna<option value=1>Índice 1<option value=2>Índice 2<option value=3>Índice 3<option value=3>Índice 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c69 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Arrancar en disquete<option value=1>Arrancar en CDROM</select><div>Dispositivo de arranque IDER</div></div><div style=height:26px><select id=c70 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Sistema por defecto<option id=c71 value=1>Tranquilo<option id=c72 value=2>Verboso<option id=c73 value=3>Pantalla en blanco</select><div>Verbocidad</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>Contraseña RSE</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>Nombre de alarma</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>Fecha de activación (año-mes-día)</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>Tiempo de activación (hora: min: seg)</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>Intervalo (días-horas-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>Mantener alarma<option value=1>Eliminar al finalizar</select></div><div style=padding-top:4px>Despues de despertar</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c74 value=2>Habilitado<br></label><label><input type=radio name=d26b id=c75 value=0>Discapacitado<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c76 value=1>Habilitado<br></label><label><input type=radio name=d26a id=c77 value=0>Discapacitado<br></label></div><div id=dialog27 style=margin:auto;margin:3px><br><div style=height:26px><select id=c78 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>Discapacitado<option value=1>Habilitado</select><div>Habilitado</div></div><div id=c79 style=height:26px><select id=c80 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protocolo</div></div><div id=c81 style=height:26px><input id=c82 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Máximo 32 caracteres"><div title="Máximo 32 caracteres">Server Name</div></div><div id=c83 style=height:26px><select id=c84 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c85 style=height:26px><input id=c86 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c87 style=height:26px><input id=c88 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Nombre de usuario</div></div><div id=c89 style=height:26px><input id=c90 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuthDialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Contraseña</div></div><div id=c91 style=height:26px><input id=c92 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c93 style=height:26px><input id=c94 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c95 style=height:26px><input id=c96 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c97 style=height:26px><select id=c98 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Client Certificate</div></div><div id=c99 style=height:26px><select id=c100 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Server Issuer Cert</div></div><div id=c101 style=height:26px><select id=c102 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>Habilitado<option value=1>Discapacitado</select><div>Active in S0</div></div><div id=c103 style=height:26px><input id=c104 style=float:right;width:200px onkeyup=updateNetAuthDialog()><div>PXE Timeout</div></div></div></div><div style=padding:10px;margin-bottom:4px><input id=c105 type=button value=Cancelar style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c106 type=button value=Okay style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c107 type=button value=Eliminar style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
5 -$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var g=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==g&&$jscomp.global.Object.defineProperty(b,d,g)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
5 +$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var e=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==e&&$jscomp.global.Object.defineProperty(b,d,e)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
6 String.prototype.endsWith||(String.prototype.endsWith=function(b){return-1!==this.indexOf(b,this.length-b.length)});function Q(b){return document.getElementById(b)}function QS(b){try{return Q(b).style}catch(c){}}function QE(b,c){try{Q(b).disabled=!c}catch(a){}}function QV(b,c){try{QS(b).display=c?"":"none"}catch(a){}}function QA(b,c){Q(b).innerHTML+=c}function QH(b,c){Q(b).innerHTML=c}function inputBoxFocus(b){Q(b).focus();var c=Q(b).value;Q(b).value="";Q(b).value=c}
7 function ReadShort(b,c){return(b.charCodeAt(c)<<8)+b.charCodeAt(c+1)}function ReadShortX(b,c){return(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}function ReadInt(b,c){return 16777216*b.charCodeAt(c)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadSInt(b,c){return(b.charCodeAt(c)<<24)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadIntX(b,c){return 16777216*b.charCodeAt(c+3)+(b.charCodeAt(c+2)<<16)+(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}
8 function ShortToStr(b){return String.fromCharCode(b>>8&255,b&255)}function ShortToStrX(b){return String.fromCharCode(b&255,b>>8&255)}function IntToStr(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}function IntToStrX(b){return String.fromCharCode(b&255,b>>8&255,b>>16&255,b>>24&255)}function MakeToArray(b){return b&&null!=b&&"object"!=typeof b?[b]:b}function SplitArray(b){return b.split(",")}function Clone(b){return JSON.parse(JSON.stringify(b))}
@@ -12,153 +12,153 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a,d){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(d?d:32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,u,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.floppyReady)return g.floppyReady=!0,g.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.cdromReady)return g.cdromReady=!0,g.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}g.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,u);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),g.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 -d=0;switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}g.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),u&1);return}g.SendCommandEndResponse(1,5,c,36,0);break;case 27:g.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==g.floppy||176==c&&null==g.cdrom)return g.SendCommandEndResponse(1,
18 -2,c,58,0),-1;g.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}g.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),u&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.floppy&&(d=(g.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.cdrom&&(d=(g.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);g.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),u&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,F,d);a(c,F,d,u);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);g.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return g.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?g.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -u&1):0==N&&(H?g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),u&1):g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),u&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=r;if(16==v||N&&16>v)H+=K;if(30==
22 -v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=A;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));g.SendDataToHost(c,!0,H,u&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");g.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=g.floppy?d=2:176==c&&null!=g.cdrom&&(d=2);g.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),u&1);break;case 76:g.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),g.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),g.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;F=0;160==c?null!=g.floppy&&(F=g.floppy.size>>9):null!=g.cdrom&&(F=g.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?y:R:z;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?q:l:D;break;case 26:176==c&&(H=e);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?g.SendCommandEndResponse(0,5,c,32,0):g.SendDataToHost(c,!0,H,u&1);break;case 81:g.SendDataToHost(c,!0,E,u&1);break;case 172:g.SendDataToHost(c,!0,O,u&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),g.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 -b,x,e){var c=null,y=0;160==a&&(c=g.floppy,null!=g.floppy&&(y=g.floppy.size>>9));176==a&&(c=g.cdrom,null!=g.cdrom&&(y=g.cdrom.size>>11));if(0>x||b+x>y)return g.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return g.SendCommandEndResponse(1,0,a,0,0),0;null!=c&&(g.sectorStats&&g.sectorStats(1,160==a?0:1,y,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==u?H.push({media:c,dev:a,lba:b,len:x,fr:e}):(u=c,T=a,P=b,F=x,d(e)))}function d(a){var b=F,x=P;F>g.iderinfo.readbfr&&(b=g.iderinfo.readbfr);F-=b;P+=b;var e=
26 -new FileReader;e.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));g.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(u=null,N?(g.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),u=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};e.readAsBinaryString?e.readAsBinaryString(u.slice(x,x+b)):e.readAsArrayBuffer(u.slice(x,x+b))}var g={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,q,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,q);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),q&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),q&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);e.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),q&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,F,d);a(c,F,d,q);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);e.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +q&1):0==N&&(H?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),q&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),q&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=u;if(16==v||N&&16>v)H+=K;if(30==
22 +v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=z;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));e.SendDataToHost(c,!0,H,q&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),q&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;F=0;160==c?null!=e.floppy&&(F=e.floppy.size>>9):null!=e.cdrom&&(F=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?A:R:y;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?r:l:D;break;case 26:176==c&&(H=g);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,H,q&1);break;case 81:e.SendDataToHost(c,!0,E,q&1);break;case 172:e.SendDataToHost(c,!0,O,q&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 +b,x,c){var g=null,p=0;160==a&&(g=e.floppy,null!=e.floppy&&(p=e.floppy.size>>9));176==a&&(g=e.cdrom,null!=e.cdrom&&(p=e.cdrom.size>>11));if(0>x||b+x>p)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,p,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==q?H.push({media:g,dev:a,lba:b,len:x,fr:c}):(q=g,T=a,P=b,F=x,d(c)))}function d(a){var b=F,x=P;F>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);F-=b;P+=b;var c=
26 +new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));e.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(q=null,N?(e.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),q=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(q.slice(x,x+b)):c.readAsArrayBuffer(q.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
27 iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,
28 -0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),e=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 -18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),r=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 -0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),A=String.fromCharCode(1,5,3,0),y=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),z=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);g.xxStateChange=function(a){b("IDER-StateChange",a);
31 -0==a&&g.Stop();3==a&&g.Start()};g.Start=function(){b("IDER-Start");b(g.floppy,g.cdrom);g.bytesToAmt=0;g.bytesFromAmt=0;g.inSequence=0;g.outSequence=0;H=[];g.SendCommand(64,ShortToStrX(g.rx_timeout)+ShortToStrX(g.tx_timeout)+ShortToStrX(g.heartbeat)+IntToStrX(g.version));g.sectorStats&&(g.sectorStats(0,0,g.floppy?g.floppy.size>>9:0),g.sectorStats(0,1,g.cdrom?g.cdrom.size>>11:0))};g.Stop=function(){b("IDER-Stop");g.parent.Stop()};g.ProcessData=function(a){g.bytesFromAmt+=a.length;g.acc+=a;null!=v&&
32 -v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",g.acc.length,rstr2hex(g.acc));;){a=g.ProcessDataEx();if(0==a)break;if(g.inSequence!=ReadIntX(g.acc,4)){b("ERROR: Out of sequence",g.inSequence,ReadIntX(g.acc,4));g.Stop();break}g.inSequence++;g.acc=g.acc.substring(a)}};g.SendCommand=function(a,x,e,c){null==x&&(x="");e=50<a&&1==e?2:0;c&&(e+=1);x=String.fromCharCode(a,0,0,e)+IntToStrX(g.outSequence++)+x;g.parent.xxSend(x);g.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 -"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};g.SendCommandEndResponse=function(a,b,x,e,c){a?g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,e,c),!0)};g.SendDataToHost=function(a,b,x,e){var c=e?0:x.length;1==b?g.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,e):g.SendCommand(84,
34 -String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,e)};g.SendGetDataFromHost=function(a,b){g.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};g.SendDisableEnableFeatures=function(a,b){null==b&&(b="");g.SendCommand(72,String.fromCharCode(a)+b)};g.ProcessDataEx=function(){if(8>g.acc.length)return 0;switch(g.acc.charCodeAt(0)){case 65:if(30>g.acc.length)break;var a=g.acc.charCodeAt(29);
35 -if(g.acc.length<30+a)break;g.iderinfo={};g.iderinfo.major=g.acc.charCodeAt(8);g.iderinfo.minor=g.acc.charCodeAt(9);g.iderinfo.fwmajor=g.acc.charCodeAt(10);g.iderinfo.fwminor=g.acc.charCodeAt(11);g.iderinfo.readbfr=ReadShortX(g.acc,16);g.iderinfo.writebfr=ReadShortX(g.acc,18);g.iderinfo.proto=g.acc.charCodeAt(21);g.iderinfo.iana=ReadIntX(g.acc,25);b(g.iderinfo);0!=g.iderinfo.proto&&(b("Unknown proto",g.iderinfo.proto),g.Stop());8192<g.iderinfo.readbfr&&(b("Illegal read buffer size",g.iderinfo.readbfr),
36 -g.Stop());8192<g.iderinfo.writebfr&&(b("Illegal write buffer size",g.iderinfo.writebfr),g.Stop());0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),g.Stop(),8;case 68:return g.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>g.acc.length)break;a=g.acc.charCodeAt(8);null===u?(g.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 -a));return 9;case 73:if(13>g.acc.length)break;var a=g.acc.charCodeAt(8),x=ReadIntX(g.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:g.enabled=x&2?!0:!1;b("IDER Status: "+g.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>g.acc.length)break;b("IDER: ABORT",g.acc.charCodeAt(8));
38 -return 11;case 75:return 8;case 80:if(28>g.acc.length)break;var a=g.acc.charCodeAt(14)&16?176:160,x=g.acc.charCodeAt(14),e=g.acc.substring(16,28),y=g.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(e),y,x);c(a,e,y,x);return 28;case 83:if(14>g.acc.length)break;a=ReadShortX(g.acc,9);if(g.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",g.acc[0]),g.Stop()}return 0};
39 -var H=[],N=!1,u=null,T,P,F;return g},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 -a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,g,v,n){b("SIDER-Start",a,d,g,v,n);c.host=a;c.port=d;c.user=g;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==g?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+g:"")+"&tls1only="+
41 -c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(g){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
28 +0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),r=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 +18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 +0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);
31 +0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;H=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&
32 +v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 +"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,
34 +String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);
35 +if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),
36 +e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===q?(e.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 +a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));
38 +return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),d=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),d,x);c(a,g,d,x);return 28;case 83:if(14>e.acc.length)break;a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};
39 +var H=[],N=!1,q=null,T,P,F;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 +a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+
41 +c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
42 b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);break;
43 -default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,g){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){e.socketState=2;e.socketParseState=0;e.socketAccumulator="";e.socketHeader=null;e.socketData="";
44 -for(i in e.pendingAjaxCall)e.sendRequest(e.pendingAjaxCall[i][0],e.pendingAjaxCall[i][3],e.pendingAjaxCall[i][4])}function p(a){var b=e.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(e.socketAccumulator=b+a;;){if(0==e.socketParseState){b=e.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;e.socketHeader=e.socketAccumulator.substring(0,b).split("\r\n");if(null==e.amtVersion)for(var c in e.socketHeader)0==e.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 -(e.amtVersion=e.socketHeader[c].substring(46));e.socketAccumulator=e.socketAccumulator.substring(b+4);e.socketParseState=1;e.socketData="";e.socketXHeader={Directive:e.socketHeader[0].split(" ")};for(c in e.socketHeader)0!=c&&(b=e.socketHeader[c].indexOf(":"),e.socketXHeader[e.socketHeader[c].substring(0,b).toLowerCase()]=e.socketHeader[c].substring(b+2))}if(1==e.socketParseState){b=-1;if(void 0==e.socketXHeader.connection||"close"!=e.socketXHeader.connection.toLowerCase()||void 0!=e.socketXHeader["transfer-encoding"]&&
46 -"chunked"==e.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=e.socketXHeader["content-length"]){b=parseInt(e.socketXHeader["content-length"]);if(e.socketAccumulator.length<b)break;a=e.socketAccumulator.substring(0,b);e.socketAccumulator=e.socketAccumulator.substring(b);e.socketData=a;b=0}else{var p=e.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(e.socketAccumulator.substring(0,p),16);if(isNaN(b)){e.websocket&&e.websocket.close();break}if(e.socketAccumulator.length<p+2+b+2)break;
47 -a=e.socketAccumulator.substring(p+2,p+2+b);e.socketAccumulator=e.socketAccumulator.substring(p+2+b+2);e.socketData+=a}else b=0;if(0==b){p=e.socketXHeader;b=e.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++e.authcounter){if(e.challengeParams=e.parseDigest(p["www-authenticate"]),null!=e.challengeParams.qop){b=e.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 -e.challengeParams.qop="auth-int":e.challengeParams.qop="auth"}}else p=e.pendingAjaxCall.shift(),e.authcounter=0,e.ActiveAjaxCount--,e.gotNextMessages(b,"success",{status:a},p),e.PerformNextAjax();e.socketParseState=0;e.socketHeader=null}}}}function q(a){0==e.inDataCount&&(e.tlsv1only=1-e.tlsv1only);e.socketState=0;null!=e.socket&&(e.socket.close(),e.socket=null);if(0<e.pendingAjaxCall.length){a=e.pendingAjaxCall.shift();var b=a[5];e.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var e={PendingAjax:[],
49 -ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};e.host=b;e.port=c;e.user=a;e.pass=d;e.tls=g;e.tlsv1only=0;e.inDataCount=0;e.amtVersion=null;e.digestRealmMatch=null;e.digestRealm=null;e.PerformAjax=function(a,b,c,p,d,h){e.ActiveAjaxCount<e.MaxActiveAjaxCount&&0==e.PendingAjax.length?e.PerformAjaxEx(a,b,c,d,h):1==p?e.PendingAjax.unshift([a,b,c,d,h]):e.PendingAjax.push([a,b,c,d,h])};e.PerformNextAjax=function(){if(!(e.ActiveAjaxCount>=
50 -e.MaxActiveAjaxCount||0==e.PendingAjax.length)){var a=e.PendingAjax.shift();e.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);e.PerformNextAjax()}};e.PerformAjaxEx=function(a,b,c,p,d){if(0!=e.FailAllError)e.gotNextMessagesError({status:e.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),e.ActiveAjaxCount++,e.PerformAjaxExNodeJS(a,b,c,p,d)};e.pendingAjaxCall=[];e.PerformAjaxExNodeJS=function(a,b,c,p,d){e.PerformAjaxExNodeJS2(a,
51 -b,c,p,d,5)};e.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=e.FailAllError?(e.ActiveAjaxCount--,999!=e.FailAllError&&e.gotNextMessages(null,"error",{status:0==e.FailAllError?408:e.FailAllError},[a,b,c,p,d]),e.PerformNextAjax()):(e.pendingAjaxCall.push([a,b,c,p,d,h]),0==e.socketState?e.xxConnectHttpSocket():2==e.socketState&&e.sendRequest(a,p,d))};e.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=e.challengeParams){e.digestRealm=e.challengeParams.realm;
52 -if(e.digestRealmMatch&&e.digestRealm!=e.digestRealmMatch){e.FailAllError=997;e.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(e.user+":"+e.challengeParams.realm+":"+e.pass)+":"+e.challengeParams.nonce+":"+n(e.noncecounter)+":"+d+":"+e.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==e.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+e.renderDigest({username:e.user,realm:e.challengeParams.realm,nonce:e.challengeParams.nonce,uri:b,qop:e.challengeParams.qop,
53 -response:c,nc:n(e.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+e.host+":"+e.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==e.socketState&&null!=e.socket&&e.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{e.socket.send(b.buffer)}catch(h){}}};e.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var e=b.trim().split("=");a[e[0]]=e[1].replace(RegExp('"',"g"),"");return a},{})};e.renderDigest=function(a){var b=
54 -[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,e){return b+","+("nc"==e||"qop"==e?e+"="+a[e]:e+'="'+a[e]+'"')},"").substring(1)};e.xxConnectHttpSocket=function(){e.inDataCount=0;e.socketState=1;e.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+e.host+"&port="+e.port+"&tls="+e.tls+"&tls1only="+e.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 -typeof d?"&serverauth=1&user="+a:""));e.socket.binaryType="arraybuffer";e.socket.onopen=l;e.socket.onmessage=p;e.socket.onclose=q};e.gotNextMessages=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](a,c.status,p[2])};e.gotNextMessagesError=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](e,null,{Header:{HttpError:a.status}},a.status,p[2])};e.CancelAllQueries=function(a){for(;0<e.PendingAjax.length;){var b=
56 -e.PendingAjax.shift();b[1](null,a,b[2])}null!=e.websocket&&(e.websocket.close(),e.websocket=null,e.socketState=0)};return e},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
43 +default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){g.socketState=2;g.socketParseState=0;g.socketAccumulator="";g.socketHeader=null;g.socketData="";
44 +for(i in g.pendingAjaxCall)g.sendRequest(g.pendingAjaxCall[i][0],g.pendingAjaxCall[i][3],g.pendingAjaxCall[i][4])}function p(a){var b=g.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(g.socketAccumulator=b+a;;){if(0==g.socketParseState){b=g.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;g.socketHeader=g.socketAccumulator.substring(0,b).split("\r\n");if(null==g.amtVersion)for(var c in g.socketHeader)0==g.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 +(g.amtVersion=g.socketHeader[c].substring(46));g.socketAccumulator=g.socketAccumulator.substring(b+4);g.socketParseState=1;g.socketData="";g.socketXHeader={Directive:g.socketHeader[0].split(" ")};for(c in g.socketHeader)0!=c&&(b=g.socketHeader[c].indexOf(":"),g.socketXHeader[g.socketHeader[c].substring(0,b).toLowerCase()]=g.socketHeader[c].substring(b+2))}if(1==g.socketParseState){b=-1;if(void 0==g.socketXHeader.connection||"close"!=g.socketXHeader.connection.toLowerCase()||void 0!=g.socketXHeader["transfer-encoding"]&&
46 +"chunked"==g.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=g.socketXHeader["content-length"]){b=parseInt(g.socketXHeader["content-length"]);if(g.socketAccumulator.length<b)break;a=g.socketAccumulator.substring(0,b);g.socketAccumulator=g.socketAccumulator.substring(b);g.socketData=a;b=0}else{var p=g.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(g.socketAccumulator.substring(0,p),16);if(isNaN(b)){g.websocket&&g.websocket.close();break}if(g.socketAccumulator.length<p+2+b+2)break;
47 +a=g.socketAccumulator.substring(p+2,p+2+b);g.socketAccumulator=g.socketAccumulator.substring(p+2+b+2);g.socketData+=a}else b=0;if(0==b){p=g.socketXHeader;b=g.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++g.authcounter){if(g.challengeParams=g.parseDigest(p["www-authenticate"]),null!=g.challengeParams.qop){b=g.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 +g.challengeParams.qop="auth-int":g.challengeParams.qop="auth"}}else p=g.pendingAjaxCall.shift(),g.authcounter=0,g.ActiveAjaxCount--,g.gotNextMessages(b,"success",{status:a},p),g.PerformNextAjax();g.socketParseState=0;g.socketHeader=null}}}}function r(a){0==g.inDataCount&&(g.tlsv1only=1-g.tlsv1only);g.socketState=0;null!=g.socket&&(g.socket.close(),g.socket=null);if(0<g.pendingAjaxCall.length){a=g.pendingAjaxCall.shift();var b=a[5];g.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var g={PendingAjax:[],
49 +ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};g.host=b;g.port=c;g.user=a;g.pass=d;g.tls=e;g.tlsv1only=0;g.inDataCount=0;g.amtVersion=null;g.digestRealmMatch=null;g.digestRealm=null;g.PerformAjax=function(a,b,c,p,d,h){g.ActiveAjaxCount<g.MaxActiveAjaxCount&&0==g.PendingAjax.length?g.PerformAjaxEx(a,b,c,d,h):1==p?g.PendingAjax.unshift([a,b,c,d,h]):g.PendingAjax.push([a,b,c,d,h])};g.PerformNextAjax=function(){if(!(g.ActiveAjaxCount>=
50 +g.MaxActiveAjaxCount||0==g.PendingAjax.length)){var a=g.PendingAjax.shift();g.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);g.PerformNextAjax()}};g.PerformAjaxEx=function(a,b,c,p,d){if(0!=g.FailAllError)g.gotNextMessagesError({status:g.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),g.ActiveAjaxCount++,g.PerformAjaxExNodeJS(a,b,c,p,d)};g.pendingAjaxCall=[];g.PerformAjaxExNodeJS=function(a,b,c,p,d){g.PerformAjaxExNodeJS2(a,
51 +b,c,p,d,5)};g.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=g.FailAllError?(g.ActiveAjaxCount--,999!=g.FailAllError&&g.gotNextMessages(null,"error",{status:0==g.FailAllError?408:g.FailAllError},[a,b,c,p,d]),g.PerformNextAjax()):(g.pendingAjaxCall.push([a,b,c,p,d,h]),0==g.socketState?g.xxConnectHttpSocket():2==g.socketState&&g.sendRequest(a,p,d))};g.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=g.challengeParams){g.digestRealm=g.challengeParams.realm;
52 +if(g.digestRealmMatch&&g.digestRealm!=g.digestRealmMatch){g.FailAllError=997;g.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(g.user+":"+g.challengeParams.realm+":"+g.pass)+":"+g.challengeParams.nonce+":"+n(g.noncecounter)+":"+d+":"+g.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==g.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+g.renderDigest({username:g.user,realm:g.challengeParams.realm,nonce:g.challengeParams.nonce,uri:b,qop:g.challengeParams.qop,
53 +response:c,nc:n(g.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+g.host+":"+g.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==g.socketState&&null!=g.socket&&g.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{g.socket.send(b.buffer)}catch(h){}}};g.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};g.renderDigest=function(a){var b=
54 +[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+","+("nc"==c||"qop"==c?c+"="+a[c]:c+'="'+a[c]+'"')},"").substring(1)};g.xxConnectHttpSocket=function(){g.inDataCount=0;g.socketState=1;g.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+g.host+"&port="+g.port+"&tls="+g.tls+"&tls1only="+g.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 +typeof d?"&serverauth=1&user="+a:""));g.socket.binaryType="arraybuffer";g.socket.onopen=l;g.socket.onmessage=p;g.socket.onclose=r};g.gotNextMessages=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](a,c.status,p[2])};g.gotNextMessagesError=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](g,null,{Header:{HttpError:a.status}},a.status,p[2])};g.CancelAllQueries=function(a){for(;0<g.PendingAjax.length;){var b=
56 +g.PendingAjax.shift();b[1](null,a,b[2])}null!=g.websocket&&(g.websocket.close(),g.websocket=null,g.socketState=0)};return g},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
57 function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;
58 d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?
59 d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,
60 0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):d.Stop(2);
61 -else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),e=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),q=q+(e+
62 -1),e=0,e=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(e=n[q],e=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),w="00000002:"+C+":"+e+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(q+=e.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 -p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(e.length)+e);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
61 +else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var r=0,p=n[r],l=a(new Uint8Array(n.buffer.slice(r+1,r+1+p))),r=r+(p+1),g=n[r],p=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),r=r+(g+
62 +1),g=0,g=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[r],g=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),w="00000002:"+C+":"+g+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));r=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(r+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(r)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 +p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
64 break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;
65 break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&
66 1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+
67 "/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=
68 --1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,g,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
68 +-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
69 b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b="",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";
70 var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";
71 -b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,g,v);q.PerformAjax=function(a,b,c,p,d){null==d&&(d="");q.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" '+
72 -d+"><Header><a:Action>"+a,function(a,c,e){var p=q.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(q,p.Header.ResourceURI,p,c,e)}else b(q,null,{Header:{HttpError:c}},601,e)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,h,g,l,B){var x="",A="";
73 -g="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 -B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",A='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=g&&(g="<a:ReferenceParameters><m:arg>"+g+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+
75 -"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+g+"</e:NotifyTo>"+A+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=
76 -function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 -q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=q.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var g in b)if(b.hasOwnProperty(g)&&0!==g.indexOf("__")&&0!==g.indexOf("@")&&null!=b[g]&&"function"!==typeof b[g])if("object"===typeof b[g]&&
78 -b[g].ReferenceParameters){a+="<r:"+g+"><a:Address>"+b[g].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[g].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[g].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+g+">"}else if(Array.isArray(b[g]))for(B=0;B<b[g].length;B++)a+=
79 -"<r:"+g+">"+b[g][B].toString()+"</r:"+g+">";else a+="<r:"+g+">"+b[g].toString()+"</r:"+g+">";b=a+("</r:"+h+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var h=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
80 -p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var g in b)a+="<g:"+g+">"+b[g]+"</g:"+g+">";q.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
81 -p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>",b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,
82 -h){var g="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])g+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else g+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,g,p,d,k,h)};q.ExecMethodXml=function(a,b,c,d,m,k,h){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
83 -p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>',
84 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var g=a.getElementsByTagName("Body")[0];g||(g=a.getElementsByTagName("a:Body")[0]);
86 -if(!g)return null;if(0<g.childNodes.length){k=g.childNodes[0].localName;var q=k.indexOf("_OUTPUT");-1!=q&&q==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(g.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",g,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
87 -function AmtStackCreateService(b){function c(){var a=e.GetPendingActions();C<a&&(C=a);null!=e.onProcessChanged&&w!=a&&(w=a,e.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,z,h,k){200!=z?(c(e,a,null,z,h),g(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?e.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,e,p,z){d(a,p,c,e,[],z,h,k)}):(c(e,a,null,603,h),g(1))}function d(a,b,p,h,z,E,k,m){if(200!=E)p(e,a,null,E,k),g(1);else if(null==b||"PullResponse"!=b.Header.Method)p(e,
88 -a,null,604,k),g(1);else{for(var r in b.Body.Items)if(b.Body.Items[r]instanceof Array)for(var q in b.Body.Items[r])"function"!=typeof b.Body.Items[r][q]&&z.push(b.Body.Items[r][q]);else"function"!=typeof b.Body.Items[r]&&z.push(b.Body.Items[r]);b.Body.EnumerationContext?e.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,e,A){d(a,e,p,c,z,A,k,1)}):(g(1),p(e,a,z,E,k),c())}}function g(a){e.ActiveEnumsCount-=a;e.ActiveEnumsCount>=e.MaxActiveEnumsCount||0==e.PendingEnums.length?c():(a=e.PendingEnums.shift(),
89 -e.Enum(a[0],a[1],a[2]),g(0))}function v(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]),function(b,c,p,d){null==p||200!=d?a.callback(e,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](e,null,d[2]);else e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,z){if(200!=d||"0"!=c.Body.ReturnValue)z[0](e,
90 -null,z[2]);else{var h,m,g;b=z[2];d=new Date;var r=c.Body.RecordArray;"string"===typeof r&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in r){a=null;try{a=window.atob(r[h])}catch(q){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){g={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),
91 -EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)g.EventData.push(a.charCodeAt(m));g.EntityStr=k[g.Entity];g.Desc=p(g.EventSensorType,g.EventOffset,g.EventData,g.Entity);g.EntityStr||(g.EntityStr="Unknown");b.push(g)}}if(1!=c.Body.NoMoreRecords)e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[z[0],b,z[2]]);else z[0](e,b,z[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Datos inv\u00e1lidos";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
92 -r[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
93 -64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
94 -a&&170==c[0])return"Agente de vigilancia"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... cambiado a"+e.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Intrusi\u00f3n de casos";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Se estableci\u00f3 una sesi\u00f3n remota Serial Over LAN.";if(1==c[2])return"Sesi\u00f3n remota serie en LAN finalizada. Se restableci\u00f3 el control del usuario.";if(2==c[2])return"Se estableci\u00f3 una sesi\u00f3n remota de redirecci\u00f3n de IDE.";
71 +b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var r={NextMessageId:1,Address:"/wsman"};r.comm=CreateWsmanComm(b,c,a,d,e,v);r.PerformAjax=function(a,b,c,p,d){null==d&&(d="");r.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" '+
72 +d+"><Header><a:Action>"+a,function(a,c,g){var p=r.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(r,p.Header.ResourceURI,p,c,g)}else b(r,null,{Header:{HttpError:c}},601,g)},c,p)};r.CancelAllQueries=function(a){r.comm.CancelAllQueries(a)};r.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};r.ExecSubscribe=function(a,b,c,d,m,k,h,e,l,B){var x="",z="";
73 +e="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 +B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=e&&(e="<a:ReferenceParameters><m:arg>"+e+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+r.Address+
75 +"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+e+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";r.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};r.ExecUnSubscribe=
76 +function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";r.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};r.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 +r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=r.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var e in b)if(b.hasOwnProperty(e)&&0!==e.indexOf("__")&&0!==e.indexOf("@")&&null!=b[e]&&"function"!==typeof b[e])if("object"===typeof b[e]&&
78 +b[e].ReferenceParameters){a+="<r:"+e+"><a:Address>"+b[e].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[e].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[e].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+e+">"}else if(Array.isArray(b[e]))for(B=0;B<b[e].length;B++)a+=
79 +"<r:"+e+">"+b[e][B].toString()+"</r:"+e+">";else a+="<r:"+e+">"+b[e].toString()+"</r:"+e+">";b=a+("</r:"+h+">")}else b="";r.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};r.ExecCreate=function(a,b,c,d,m,k){var h=r.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
80 +p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";r.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};r.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
81 +p(b)+"</Header><Body /></Envelope>";r.PerformAjax(a,c,d,m)};r.ExecGet=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>",b,c,p)};r.ExecMethod=function(a,b,c,p,d,k,
82 +h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])e+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";r.ExecMethodXml(a,b,e,p,d,k,h)};r.ExecMethodXml=function(a,b,c,d,m,k,h){r.PerformAjax(a+"/"+b+"</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
83 +p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};r.ExecEnum=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>',
84 +b,c,p)};r.ExecPull=function(a,b,c,p,d){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 +c,p,d)};r.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var e=a.getElementsByTagName("Body")[0];e||(e=a.getElementsByTagName("a:Body")[0]);
86 +if(!e)return null;if(0<e.childNodes.length){k=e.childNodes[0].localName;var r=k.indexOf("_OUTPUT");-1!=r&&r==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(e.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",e,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return r};
87 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();C<a&&(C=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,g,p,y){d(a,p,c,g,[],y,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,p,h,y,E,k,m){if(200!=E)p(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(g,
88 +a,null,604,k),e(1);else{for(var u in b.Body.Items)if(b.Body.Items[u]instanceof Array)for(var r in b.Body.Items[u])"function"!=typeof b.Body.Items[u][r]&&y.push(b.Body.Items[u][r]);else"function"!=typeof b.Body.Items[u]&&y.push(b.Body.Items[u]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,p,c,y,z,k,1)}):(e(1),p(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
89 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
90 +null,y[2]);else{var h,m,e;b=y[2];d=new Date;var u=c.Body.RecordArray;"string"===typeof u&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in u){a=null;try{a=window.atob(u[h])}catch(r){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){e={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),
91 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)e.EventData.push(a.charCodeAt(m));e.EntityStr=k[e.Entity];e.Desc=p(e.EventSensorType,e.EventOffset,e.EventData,e.Entity);e.EntityStr||(e.EntityStr="Unknown");b.push(e)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Datos inv\u00e1lidos";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("One Click Recovery: {0}",
92 +u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("One Click Recovery: {0}",h[c[2]]):format("One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&64==c[1]){if(1==
93 +c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
94 +a&&170==c[0])return"Agente de vigilancia"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... cambiado a"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Intrusi\u00f3n de casos";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Se estableci\u00f3 una sesi\u00f3n remota Serial Over LAN.";if(1==c[2])return"Sesi\u00f3n remota serie en LAN finalizada. Se restableci\u00f3 el control del usuario.";if(2==c[2])return"Se estableci\u00f3 una sesi\u00f3n remota de redirecci\u00f3n de IDE.";
95 if(3==c[2])return"Sesi\u00f3n remota de redirecci\u00f3n de IDE finalizada. Se restableci\u00f3 el control del usuario."}if(36==a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="cableado"),4294967293==a?"Todos los filtros de paquetes recibidos coinciden"+b+" interfaz.":4294967292==a?"Todos los filtros de paquetes salientes coincidieron con"+b+" interfaz.":4294967290==a?"El filtro de paquetes falsificado se hizo coincidir"+b+" interfaz.":"Filtrar"+a+" fue emparejado en"+b+" interfaz.";
96 if(192==a)return 0==c[2]?"Pol\u00edtica de seguridad invocada. Se detuvo parte o todo el tr\u00e1fico de red (TX).":2==c[2]?"Pol\u00edtica de seguridad invocada. Se detuvo parte o todo el tr\u00e1fico de red (RX).":"Pol\u00edtica de seguridad invocada.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"Solicitud del usuario para conexi\u00f3n remota.";if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"Error de EAC: intente obtener una postura mientras NAC en Intel\u00ae AMT est\u00e1 desactivado.";
97 if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"Error de HWA: error general"}return 6==a?"Autenticaci\u00f3n fallida"+(c[1]+(c[2]<<8))+" veces. El sistema puede estar bajo ataque.":30==a?"No hay medios de arranque":32==a?"Bloqueo del sistema operativo o interrupci\u00f3n de energ\u00eda":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"Falla de arranque del sistema":37==a?"Se inici\u00f3 el firmware del sistema (al menos una CPU se est\u00e1 ejecutando correctamente).":"Tipo de sensor desconocido #"+
98 -a}function q(a,b,c,p,d){if(200!=p)d[0](e,[],p);else{var h,k,m=d[1],g=new Date,r;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),
99 -b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>Puerto predeterminado de KVM</i>",h=5);r=ReadInt(a,h);b.Time=new Date(1E3*(r+60*g.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);r=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+r);h+=r;r=a.charCodeAt(h++);b.Ex=a.substring(h,h+r);
100 -b.ExStr=e.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)e.AMT_AuditLog_ReadRecords(m.length+1,q,[d[0],m]);else d[0](e,m,p)}}var e={};e.wsman=b;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 C=0,w=0;e.GetPendingActions=
101 -function(){return 2*e.PendingEnums.length+e.ActiveEnumsCount+e.wsman.comm.PendingAjax.length+e.wsman.comm.ActiveAjaxCount+e.PendingBatchOperations};e.Subscribe=function(a,b,p,d,z,h,k,m,g,r){e.wsman.ExecSubscribe(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,y,A,z)},0,h,k,m,g,r);c()};e.UnSubscribe=function(a,b,p,d,z){e.wsman.ExecUnSubscribe(e.CompleteName(a),function(d,z,h,k){c();b(e,a,h,k,p)},0,d,z);c()};e.Get=function(a,b,p,d){e.wsman.ExecGet(e.CompleteName(a),function(d,h,k,m){c();b(e,a,k,m,
102 -p)},0,d);c()};e.Put=function(a,b,p,d,z,h){e.wsman.ExecPut(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z,h);c()};e.Create=function(a,b,p,d,z){e.wsman.ExecCreate(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Delete=function(a,b,p,d,z){e.wsman.ExecDelete(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Exec=function(a,b,p,d,z,h,k){e.wsman.ExecMethod(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.ExecWithXml=
103 -function(a,b,p,d,z,h,k){e.wsman.ExecMethodXml(e.CompleteName(a),b,execArgumentsToXml(p),function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.Enum=function(b,p,d,h){e.ActiveEnumsCount<e.MaxActiveEnumsCount?(e.ActiveEnumsCount++,e.wsman.ExecEnum(e.CompleteName(b),function(e,d,y,h,k){c();a(b,y,p,d,h,k)},d,h)):e.PendingEnums.push([b,p,d,h]);c()};e.BatchEnum=function(a,b,p,d,z,h){z={_pending:b.length};e.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],g=e.Enum;"*"==m[0]&&
104 -(g=e.Get,m=m.substring(1));g(m,function(b,z,A,h,k){e.PendingBatchOperations--;c();k[2][z]={response:null==A?null:A.Body,responses:A,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(e,e,a,k[2],h,d))},[a,b,z,g==e.Get?"Get":"Enum"],h)}};e.BatchGet=function(a,b,p,e,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:e,pri:d});c()};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==a.indexOf("IPS_"))return e.pfx[2]+a};e.CompleteExecResponse=
105 -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,b){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>',
106 -null,null,b)};e.RequestOSPowerStateChange=function(a,b){e.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
107 -null,null,b)};e.SetBootConfigRole=function(a,b){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>',
108 -a,b)};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,b){e.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
109 -k,m,g){e.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,g)};e.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){e.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};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=
110 -function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){e.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};e.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA",
111 -"DeleteAllActions",{_method_dummy:a},b)};e.AMT_AuditLog_ClearLog=function(a){e.Exec("AMT_AuditLog","ClearLog",{},a)};e.AMT_AuditLog_RequestStateChange=function(a,b,c){e.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_AuditLog_ReadRecords=function(a,b,c){e.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};e.AMT_AuditLog_SetAuditLock=function(a,b,c,p){e.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};e.AMT_AuditLog_ExportAuditLogSignature=
112 -function(a,b){e.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};e.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){e.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule",
113 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){e.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};e.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){e.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};e.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService",
114 -"GetUserAclEntryEx",{Handle:a},b,c)};e.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){e.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};e.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){e.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};e.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
115 -{Username:a,DigestPassword:b},c)};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,b,c,p){e.Exec("AMT_AuthorizationService",
116 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};e.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){e.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};e.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_EndpointAccessControlService_GetPosture=function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};e.AMT_EndpointAccessControlService_GetPostureHash=
117 -function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};e.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){e.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};e.AMT_EndpointAccessControlService_GetEacOptions=function(a){e.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};e.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
118 -PostureHashAlgorithm:b},c)};e.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};e.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};e.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){e.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};e.AMT_GeneralSettings_AMTAuthenticate=
119 -function(a,b){e.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};e.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){e.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};e.AMT_KerberosSettingData_GetCredentialCacheState=function(a){e.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};e.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){e.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
120 -b)};e.AMT_MessageLog_CancelIteration=function(a,b){e.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};e.AMT_MessageLog_RequestStateChange=function(a,b,c){e.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_MessageLog_ClearLog=function(a){e.Exec("AMT_MessageLog","ClearLog",{},a)};e.AMT_MessageLog_GetRecords=function(a,b,c,p){e.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};e.AMT_MessageLog_GetRecord=function(a,
121 -b,c){e.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};e.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){e.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};e.AMT_MessageLog_PositionToFirstRecord=function(a,b){e.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};e.AMT_MessageLog_FreezeLog=function(a,b){e.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};e.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){e.Exec("AMT_PublicKeyManagementService",
122 -"AddCRL",{Url:a,SerialNumbers:b},c)};e.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){e.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};e.AMT_PublicKeyManagementService_AddCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddKey=
123 -function(a,b){e.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};e.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};e.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};e.AMT_PublicKeyManagementService_GenerateKeyPair=
124 -function(a,b,c){e.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};e.AMT_RedirectionService_RequestStateChange=function(a,b){e.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};e.AMT_RedirectionService_TerminateSession=function(a,b){e.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};e.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,g){e.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
125 -Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},g)};e.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){e.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};e.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){e.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){e.Exec("AMT_SetupAndConfigurationService",
126 -"CommitChanges",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_Unprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};e.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
127 -e.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};e.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){e.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};e.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){e.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){e.Exec("AMT_SetupAndConfigurationService",
128 -"GetProvisioningAuditRecord",{},a)};e.AMT_SetupAndConfigurationService_GetUuid=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};e.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){e.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};e.AMT_SystemDefensePolicy_GetTimeout=
129 -function(a){e.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};e.AMT_SystemDefensePolicy_SetTimeout=function(a,b){e.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};e.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){e.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};e.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){e.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};e.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
130 -function(a,b){e.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};e.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){e.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};e.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){e.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WebUIService_RequestStateChange=function(a,b,c){e.Exec("AMT_WebUIService",
131 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
132 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};e.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};e.CIM_Account_RequestStateChange=function(a,b,c){e.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
133 -c)};e.CIM_AccountManagementService_CreateAccount=function(a,b,c){e.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};e.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){e.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};e.CIM_BootService_SetBootConfigRole=function(a,b,c){e.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};e.CIM_BootService_RequestStateChange=function(a,b,c,p){e.Exec("CIM_BootService","RequestStateChange",
134 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};e.CIM_Card_ConnectorPower=function(a,b,c){e.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};e.CIM_Card_IsCompatible=function(a,b){e.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};e.CIM_Chassis_IsCompatible=function(a,b){e.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};e.CIM_Fan_SetSpeed=function(a,b){e.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};e.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){e.Exec("CIM_KVMRedirectionSAP",
135 -"RequestStateChange",{RequestedState:a},c)};e.CIM_MediaAccessDevice_LockMedia=function(a,b){e.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};e.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){e.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_MediaAccessDevice_Reset=function(a){e.Exec("CIM_MediaAccessDevice","Reset",{},a)};e.CIM_MediaAccessDevice_EnableDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};e.CIM_MediaAccessDevice_OnlineDevice=
136 -function(a,b){e.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};e.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};e.CIM_MediaAccessDevice_SaveProperties=function(a){e.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};e.CIM_MediaAccessDevice_RestoreProperties=function(a){e.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};e.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){e.Exec("CIM_MediaAccessDevice","RequestStateChange",
137 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_PhysicalFrame_IsCompatible=function(a,b){e.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};e.CIM_PhysicalPackage_IsCompatible=function(a,b){e.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};e.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){e.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.CIM_PowerSupply_SetPowerState=function(a,
138 -b,c){e.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_PowerSupply_Reset=function(a){e.Exec("CIM_PowerSupply","Reset",{},a)};e.CIM_PowerSupply_EnableDevice=function(a,b){e.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};e.CIM_PowerSupply_OnlineDevice=function(a,b){e.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};e.CIM_PowerSupply_QuiesceDevice=function(a,b){e.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};e.CIM_PowerSupply_SaveProperties=function(a){e.Exec("CIM_PowerSupply",
139 -"SaveProperties",{},a)};e.CIM_PowerSupply_RestoreProperties=function(a){e.Exec("CIM_PowerSupply","RestoreProperties",{},a)};e.CIM_PowerSupply_RequestStateChange=function(a,b,c){e.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Processor_SetPowerState=function(a,b,c){e.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Processor_Reset=function(a){e.Exec("CIM_Processor","Reset",{},a)};e.CIM_Processor_EnableDevice=function(a,b){e.Exec("CIM_Processor",
140 -"EnableDevice",{Enabled:a},b)};e.CIM_Processor_OnlineDevice=function(a,b){e.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};e.CIM_Processor_QuiesceDevice=function(a,b){e.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Processor_SaveProperties=function(a){e.Exec("CIM_Processor","SaveProperties",{},a)};e.CIM_Processor_RestoreProperties=function(a){e.Exec("CIM_Processor","RestoreProperties",{},a)};e.CIM_Processor_RequestStateChange=function(a,b,c){e.Exec("CIM_Processor","RequestStateChange",
141 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RecordLog_ClearLog=function(a){e.Exec("CIM_RecordLog","ClearLog",{},a)};e.CIM_RecordLog_RequestStateChange=function(a,b,c){e.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RedirectionService_RequestStateChange=function(a,b,c){e.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Sensor_SetPowerState=function(a,b,c){e.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
142 -c)};e.CIM_Sensor_Reset=function(a){e.Exec("CIM_Sensor","Reset",{},a)};e.CIM_Sensor_EnableDevice=function(a,b){e.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};e.CIM_Sensor_OnlineDevice=function(a,b){e.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};e.CIM_Sensor_QuiesceDevice=function(a,b){e.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Sensor_SaveProperties=function(a){e.Exec("CIM_Sensor","SaveProperties",{},a)};e.CIM_Sensor_RestoreProperties=function(a){e.Exec("CIM_Sensor","RestoreProperties",
143 -{},a)};e.CIM_Sensor_RequestStateChange=function(a,b,c){e.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_StatisticalData_ResetSelectedStats=function(a,b){e.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};e.CIM_Watchdog_KeepAlive=function(a){e.Exec("CIM_Watchdog","KeepAlive",{},a)};e.CIM_Watchdog_SetPowerState=function(a,b,c){e.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Watchdog_Reset=function(a){e.Exec("CIM_Watchdog",
144 -"Reset",{},a)};e.CIM_Watchdog_EnableDevice=function(a,b){e.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};e.CIM_Watchdog_OnlineDevice=function(a,b){e.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};e.CIM_Watchdog_QuiesceDevice=function(a,b){e.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};e.CIM_Watchdog_SaveProperties=function(a){e.Exec("CIM_Watchdog","SaveProperties",{},a)};e.CIM_Watchdog_RestoreProperties=function(a){e.Exec("CIM_Watchdog","RestoreProperties",{},a)};e.CIM_Watchdog_RequestStateChange=
145 -function(a,b,c){e.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_WiFiPort_SetPowerState=function(a,b,c){e.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_WiFiPort_Reset=function(a){e.Exec("CIM_WiFiPort","Reset",{},a)};e.CIM_WiFiPort_EnableDevice=function(a,b){e.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};e.CIM_WiFiPort_OnlineDevice=function(a,b){e.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};e.CIM_WiFiPort_QuiesceDevice=function(a,
146 -b){e.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};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,b,c){e.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){e.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
147 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};e.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};e.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){e.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},h)};e.IPS_HostBasedSetupService_UpgradeClientToAdmin=
148 -function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};e.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){e.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};e.IPS_KVMRedirectionSettingData_TerminateSession=function(a){e.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){e.Exec("IPS_KVMRedirectionSettingData",
149 -"DataChannelRead",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){e.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};e.IPS_OptInService_StartOptIn=function(a){e.Exec("IPS_OptInService","StartOptIn",{},a)};e.IPS_OptInService_CancelOptIn=function(a){e.Exec("IPS_OptInService","CancelOptIn",{},a)};e.IPS_OptInService_SendOptInCode=function(a,b){e.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};e.IPS_OptInService_StartService=function(a){e.Exec("IPS_OptInService",
150 -"StartService",{},a)};e.IPS_OptInService_StopService=function(a){e.Exec("IPS_OptInService","StopService",{},a)};e.IPS_OptInService_RequestStateChange=function(a,b,c){e.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){e.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.IPS_ProvisioningRecordLog_RequestStateChange=
151 -function(a,b,c){e.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_ProvisioningRecordLog_ClearLog=function(a,b){e.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};e.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){e.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};e.IPS_SecIOService_RequestStateChange=function(a,b,c){e.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
152 -TimeoutPeriod:b},c)};e.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){e.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};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",
153 -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",
154 -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",
155 -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",
156 -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,b){e.AMT_MessageLog_PositionToFirstRecord(n,
157 -[a,b,[]])};var D="Sin especificar. No hay memoria del sistema instalada f\u00edsicamente en el sistema. No hay memoria utilizable del sistema, toda la memoria instalada ha experimentado una falla irrecuperable. Falla irrecuperable del disco duro / dispositivo ATAPI / IDE. Falla irrecuperable de la placa del sistema. falla del subsistema. ; Falla irrecuperable del controlador del disco duro. ; Falla irrecuperable del teclado PS / 2 o USB. ; No se encontr\u00f3 el medio de arranque extra\u00edble. ; Falla irrecuperable del controlador de video. ; No se detect\u00f3 ning\u00fan dispositivo de video. ; Se detect\u00f3 corrupci\u00f3n de ROM del firmware (BIOS). ; Falta de coincidencia de voltaje de la CPU (los procesadores que comparten el mismo suministro tienen requisitos de voltaje no coincidentes)".split(";"),
98 +a}function r(a,b,c,p,d){if(200!=p)d[0](g,[],p);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),
99 +b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>Puerto predeterminado de KVM</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);
100 +b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,r,[d[0],m]);else d[0](g,m,p)}}var g={};g.wsman=b;g.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/"];g.PendingEnums=[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var C=0,w=0;g.GetPendingActions=
101 +function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,p,d,y,h,k,m,e,u){g.wsman.ExecSubscribe(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,A,z,y)},0,h,k,m,e,u);c()};g.UnSubscribe=function(a,b,p,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,p)},0,d,y);c()};g.Get=function(a,b,p,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,
102 +p)},0,d);c()};g.Put=function(a,b,p,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,p,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,p,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,p,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=
103 +function(a,b,p,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,p,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(g,d,A,h,k){c();a(b,A,p,d,h,k)},d,h)):g.PendingEnums.push([b,p,d,h]);c()};g.BatchEnum=function(a,b,p,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],e=g.Enum;"*"==m[0]&&
104 +(e=g.Get,m=m.substring(1));e(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(g,g,a,k[2],h,d))},[a,b,y,e==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,p,g,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:g,pri:d});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=
105 +function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.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>',
106 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
107 +null,null,b)};g.SetBootConfigRole=function(a,b){g.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>',
108 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
109 +k,m,e){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,e)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
110 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
111 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,p){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};g.AMT_AuditLog_ExportAuditLogSignature=
112 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule",
113 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
114 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
115 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){g.Exec("AMT_AuthorizationService",
116 +"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
117 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
118 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
119 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
120 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,p){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};g.AMT_MessageLog_GetRecord=function(a,
121 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
122 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
123 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
124 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,e){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
125 +Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},e)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
126 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
127 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
128 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
129 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
130 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
131 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){console.log(JSON.stringify({WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},null,2));g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=
132 +function(a,b,c,p,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},
133 +b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,
134 +Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,p){g.Exec("CIM_BootService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c,p,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan",
135 +"SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=
136 +function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",
137 +{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",
138 +{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply",
139 +"QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply","SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor",
140 +"Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor","EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=
141 +function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,
142 +b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=
143 +function(a){g.Exec("CIM_Sensor","RestoreProperties",{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},
144 +c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog","Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog",
145 +"RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",
146 +{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){g.Exec("IPS_HostBasedSetupService",
147 +"Setup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,
148 +DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=
149 +function(a){g.Exec("IPS_KVMRedirectionSettingData","DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};
150 +g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService","StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,
151 +Time:c,TimeoutPeriod:p},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=
152 +function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",
153 +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",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",
154 +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",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",
155 +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",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",
156 +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",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",
157 +4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,[a,b,[]])};var D="Sin especificar. No hay memoria del sistema instalada f\u00edsicamente en el sistema. No hay memoria utilizable del sistema, toda la memoria instalada ha experimentado una falla irrecuperable. Falla irrecuperable del disco duro / dispositivo ATAPI / IDE. Falla irrecuperable de la placa del sistema. falla del subsistema. ; Falla irrecuperable del controlador del disco duro. ; Falla irrecuperable del teclado PS / 2 o USB. ; No se encontr\u00f3 el medio de arranque extra\u00edble. ; Falla irrecuperable del controlador de video. ; No se detect\u00f3 ning\u00fan dispositivo de video. ; Se detect\u00f3 corrupci\u00f3n de ROM del firmware (BIOS). ; Falta de coincidencia de voltaje de la CPU (los procesadores que comparten el mismo suministro tienen requisitos de voltaje no coincidentes)".split(";"),
158 m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS 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(";"),
159 k="Sin especificar ; Otro ; Desconocido ; Procesador ; Disco ; Perif\u00e9rico ; M\u00f3dulo de gesti\u00f3n del sistema ; Placa del sistema ; M\u00f3dulo de memoria ; M\u00f3dulo del procesador ; Fuente de alimentaci\u00f3n ; Agregar tarjeta ; Placa del panel frontal ; Placa del panel posterior ; Placa del sistema de alimentaci\u00f3n ; Placa posterior de la unidad ; Expansi\u00f3n interna del sistema placa ; Otra placa del sistema ; Placa del procesador ; Unidad de potencia ; M\u00f3dulo de potencia ; Placa de administraci\u00f3n de energ\u00eda ; Placa del panel posterior del chasis ; Chasis del sistema ; Chasis secundario ; Otra placa del chasis ; Compartimento de la unidad de disco ; Compartimento perif\u00e9rico ; Compartimento del dispositivo ; Refrigeraci\u00f3n del ventilador ; Unidad de refrigeraci\u00f3n ; Interconexi\u00f3n de cables ; Dispositivo de memoria ; Software de gesti\u00f3n del sistema ; BIOS ; Intel (r) ME ; Bus del sistema ; Grupo ; Intel (r) ME ; Entorno externo ; Bater\u00eda ; Blade de procesamiento ; Interruptor de conectividad ; M\u00f3dulo de procesador / memoria ; M\u00f3dulo de E / S ; M\u00f3dulo de E / S del procesador ; Firmware del controlador de gesti\u00f3n ; Canal IPMI ; Bus PCI ; Bus PCI express ; Bus SCSI ; Bus SATA / SAS ; Bus frontal del procesador".split(";");
160 -e.RealmNames=";; Redirecci\u00f3n ;; Activo de hardware ; Control remoto ; Almacenamiento ; Administrador de eventos ; Administrador de almacenamiento ; Presencia de agente local ; Presencia de agente remoto ; Disyuntor ; Tiempo de red ; Informaci\u00f3n general ; Actualizaci\u00f3n de firmware ; EIT ; LocalUN ; Control de acceso de punto final ; Control de acceso de punto final Admin ; Lector de registro de eventos ; Registro de auditor\u00eda ; Reino ACL ;;; Sistema local".split(";");e.WatchdogCurrentStates=
161 -{1:"No empezado",2:"Detenido",4:"Corriendo",8:"Caducado",16:"Suspendido"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),r=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
160 +g.RealmNames=";; Redirecci\u00f3n ;; Activo de hardware ; Control remoto ; Almacenamiento ; Administrador de eventos ; Administrador de almacenamiento ; Presencia de agente local ; Presencia de agente remoto ; Disyuntor ; Tiempo de red ; Informaci\u00f3n general ; Actualizaci\u00f3n de firmware ; EIT ; LocalUN ; Control de acceso de punto final ; Control de acceso de punto final Admin ; Lector de registro de eventos ; Registro de auditor\u00eda ; Reino ACL ;;; Sistema local".split(";");g.WatchdogCurrentStates=
161 +{1:"No empezado",2:"Detenido",4:"Corriendo",8:"Caducado",16:"Suspendido"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
162 K={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},B={16:"Administrador de seguridad",17:"RCO",18:"Gerente de redireccionamiento",19:"Administrador de actualizaci\u00f3n de firmware",20:"Registro de auditor\u00eda de seguridad",21:"Tiempo de red",22:"Administraci\u00f3n de red",23:"Administraci\u00f3n de almacenamiento",24:"Administrador de evento",25:"Gerente de disyuntores",26:"Gerente de presencia de agente",27:"Configuraci\u00f3n inal\u00e1mbrica",28:"EAC",29:"KVM",30:"Eventos de aceptaci\u00f3n del usuario",
163 32:"Pantalla en blanco",33:"Eventos de vigilancia",1600:"Aprovisionamiento iniciado",1601:"Aprovisionamiento completado",1602:"Entrada de ACL agregada",1603:"Entrada de ACL modificada",1604:"Entrada de ACL eliminada",1605:"Acceso a ACL con credenciales no v\u00e1lidas",1606:"Estado de entrada de ACL",1607:"Estado de TLS cambiado",1608:"Conjunto de certificados de servidor TLS",1609:"Certificado de servidor TLS Eliminar",1610:"Certificado TLS Trusted Root agregado",1611:"Certificado ra\u00edz de confianza TLS eliminado",
164 1612:"Juego de llaves TLS previamente compartidas",1613:"Configuraci\u00f3n de Kerberos modificada",1614:"Clave principal de Kerberos modificada",1615:"Restablecimiento de contadores de desgaste de flash",1616:"Paquete de energ\u00eda modificado",1617:"Establecer modo de autenticaci\u00f3n de reino",1618:"Actualizar cliente al modo de control de administrador",1619:"Desaprovisionamiento iniciado",1700:"Encendido realizado",1701:"Apagado realizado",1702:"Ciclo de energ\u00eda realizado",1703:"Reinicio realizado",
@@ -167,109 +167,109 @@ K={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},B={16:"Administrador de seguridad",17
167 2100:"Intel&reg; ME Time Set",2200:"Conjunto de par\u00e1metros TCPIP",2201:"Conjunto de nombres de host",2202:"Conjunto de nombres de dominio",2203:"Conjunto de par\u00e1metros de VLAN",2204:"Conjunto de pol\u00edticas de enlace",2205:"Conjunto de par\u00e1metros de IPv6",2300:"Conjunto de atributos de almacenamiento global",2301:"Almacenamiento EACL modificado",2302:"Almacenamiento FPACL modificado",2303:"Operaci\u00f3n de escritura de almacenamiento",2400:"Alerta suscrita",2401:"Alerta sin suscripci\u00f3n",
168 2402:"Registro de eventos borrado",2403:"Registro de eventos congelado",2500:"Filtro CB agregado",2501:"Filtro CB eliminado",2502:"Pol\u00edtica de CB agregada",2503:"Pol\u00edtica de CB eliminada",2504:"Conjunto de pol\u00edticas predeterminadas de CB",2505:"Conjunto de opciones de heur\u00edstica CB",2506:"Estado de heur\u00edstica de CB aprobado",2600:"Agente de vigilancia agregado",2601:"Agente de vigilancia eliminado",2602:"Conjunto de acciones del agente de vigilancia",2700:"Perfil inal\u00e1mbrico agregado",
169 2701:"Perfil inal\u00e1mbrico eliminado",2702:"Perfil inal\u00e1mbrico actualizado",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",2800:"EAC Posture Signer SET",2801:"EAC habilitado",2802:"EAC deshabilitado",2803:"Estado de postura de EAC",2804:"Opciones de configuraci\u00f3n de EAC",2900:"Opci\u00f3n KVM habilitada",2901:"Opci\u00f3n KVM desactivada",2902:"Contrase\u00f1a KVM modificada",
170 -2903:"Consentimiento de KVM exitoso",2904:"Consentimiento de KVM fallido",3E3:"Cambio de pol\u00edtica de aceptaci\u00f3n",3001:"Enviar evento de c\u00f3digo de consentimiento",3002:"Iniciar evento bloqueado de aceptaci\u00f3n",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};e.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));
171 -if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Acceso inv\u00e1lido a m\u00ed","Acceso no v\u00e1lido a MEBx"][b.charCodeAt(0)];if(1606==a){var c=["Discapacitado","Habilitado"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Remoto"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?e.RealmNames[ReadInt(b,0)]+","+["NoAuth","Autenticaci\u00f3n","Discapacitado"][b.charCodeAt(4)]:
170 +2903:"Consentimiento de KVM exitoso",2904:"Consentimiento de KVM fallido",3E3:"Cambio de pol\u00edtica de aceptaci\u00f3n",3001:"Enviar evento de c\u00f3digo de consentimiento",3002:"Iniciar evento bloqueado de aceptaci\u00f3n",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));
171 +if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Acceso inv\u00e1lido a m\u00ed","Acceso no v\u00e1lido a MEBx"][b.charCodeAt(0)];if(1606==a){var c=["Discapacitado","Habilitado"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Remoto"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?g.RealmNames[ReadInt(b,0)]+","+["NoAuth","Autenticaci\u00f3n","Discapacitado"][b.charCodeAt(4)]:
172 1619==a?["BIOS","MEBx","MEI local","WSMAN local","WSAMN remota"][b.charCodeAt(0)]:1900==a?"Desde"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" a"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"Desde"+["Ninguna","KVM","Todas"][b.charCodeAt(0)]+" a"+["Ninguna","KVM","Todas"][b.charCodeAt(1)]:3001==a?["\u00c9xito","Fall\u00f3 3 veces"][b.charCodeAt(0)]:
173 -null};e.GetAuditLog=function(a){e.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return e}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
174 -function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",g=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+g+v+">"));return a+("</r:"+b+">")}
173 +null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,r,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
174 +function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">";if("string"==typeof c)a+=c;else for(var v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
175 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
176 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
177 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
178 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function g(a,b){var c,p,e,d,x,h,k,m,g,q=b&&b.split("/"),w=r.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){q=q.slice(0,q.length-1);a=a.split("/");x=a.length-1;r.nodeIdCompat&&A.test(a[x])&&(a[x]=a[x].replace(A,""));a=q.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
179 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((q||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(q)for(g=q.length;0<g;--g)if(e=w[q.slice(0,g).join("/")])if(e=e[p]){d=e;h=x;break}if(d)break;!k&&l&&l[p]&&(k=l[p],m=x)}!d&&k&&(d=k,h=m);d&&(c.splice(0,h,d),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return g(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
180 -a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function e(a){return function(){return r&&r.config&&r.config[a]||{}}}var C,w,D,m,k={},h={},r={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,A=/\.js$/;D=function(a,b){var c,d=q(a),e=d[0];a=d[1];e&&(e=g(e,b),c=p(e));e?a=c&&c.normalize?c.normalize(a,n(b)):g(a,b):(a=g(a,b),d=q(a),
181 -e=d[0],a=d[1],e&&(c=p(e)));return{f:e?e+"!"+a:a,n:a,pr:e,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:e(a)}}};C=function(a,b,c,e){var x,g,A,r,q=[];g=typeof c;var w;e=e||a;if("undefined"===g||"function"===g){b=!b.length&&c.length?["require","exports","module"]:b;for(r=0;r<b.length;r+=1)if(A=D(b[r],e),g=A.f,"require"===g)q[r]=m.require(a);else if("exports"===g)q[r]=m.exports(a),
182 -w=!0;else if("module"===g)x=q[r]=m.module(a);else if(B.call(k,g)||B.call(h,g)||B.call(K,g))q[r]=p(g);else if(A.p)A.p.load(A.n,v(e,!0),l(g),{}),q[r]=k[g];else throw Error(a+" missing "+g);b=c?c.apply(k[a],q):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,e,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){r=a;r.deps&&w(r.deps,r.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
183 -typeof c&&(c=e,e=x);e?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(e.isArrayBuffer(a)||e.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
184 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var e=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)e.nextTick=process.nextTick,e.setImmediate="function"===typeof setImmediate?setImmediate:e.nextTick;else if("function"===typeof setImmediate)e.setImmediate=setImmediate,e.nextTick=function(a){return setImmediate(a)};
185 -else{e.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];e.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
186 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var d=e.setImmediate;e.setImmediate=function(e){15<Date.now()-b?(b=Date.now(),d(e)):(a.push(e),1===a.length&&p.setAttribute("a",c=!c))}}e.nextTick=e.setImmediate}})();e.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};e.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};e.isArrayBufferView=function(a){return a&&
187 -e.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};e.ByteBuffer=c;e.ByteStringBuffer=c;e.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};e.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};e.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};e.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
188 -e.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};e.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};e.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(e.encodeUtf8(a))};e.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
189 -255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
190 -8&255))};e.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};e.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};e.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
191 -e.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};e.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};e.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
192 -16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};e.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24Le=
193 -function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};e.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};e.ByteStringBuffer.prototype.getSignedInt=
194 -function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};e.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
195 -a)};e.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};e.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};e.ByteStringBuffer.prototype.copy=function(){var a=e.createBuffer(this.data);a.read=this.read;return a};e.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};e.ByteStringBuffer.prototype.clear=
196 -function(){this.data="";this.read=0;return this};e.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};e.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.ByteStringBuffer.prototype.toString=function(){return e.decodeUtf8(this.bytes())};e.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
197 -0;this.growSize=b.growSize||1024;var c=e.isArrayBuffer(a),p=e.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};e.DataBuffer.prototype.length=function(){return this.write-this.read};e.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
198 -e.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),p=new Uint8Array(this.length()+b);p.set(c);this.data=new DataView(p.buffer);return this};e.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};e.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
199 -return this};e.DataBuffer.prototype.putBytes=function(a,b){if(e.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var d=new Uint8Array(this.data.buffer,this.write);d.set(c);this.write+=p;return this}if(e.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),d=new Uint8Array(this.data.buffer),d.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof e.DataBuffer||"object"===typeof a&&"number"===
200 -typeof a.read&&"number"===typeof a.write&&e.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),d=new Uint8Array(a.data.byteLength,this.write),d.set(c),this.write+=c.byteLength,this;a instanceof e.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.hex.decode(a,c,this.write),this;if("base64"===
201 -b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=e.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=e.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
202 -b);}throw Error("Invalid parameter: "+a);};e.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};e.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};e.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};e.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
203 -e.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};e.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};e.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};e.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
204 -a,!0);this.write+=4;return this};e.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};e.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};e.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};e.DataBuffer.prototype.getInt24=
205 -function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};e.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};e.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};e.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};e.DataBuffer.prototype.getInt32Le=function(){var a=
206 -this.data.getInt32(this.read,!0);this.read+=4;return a};e.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};e.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
207 -e.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};e.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};e.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};e.DataBuffer.prototype.copy=function(){return new e.DataBuffer(this)};e.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
208 -new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};e.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};e.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};e.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
209 -this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return e.binary.raw.encode(b);if("hex"===a)return e.binary.hex.encode(b);if("base64"===a)return e.binary.base64.encode(b);if("utf8"===a)return e.text.utf8.decode(b);if("utf16"===a)return e.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};e.createBuffer=function(a,b){void 0!==a&&"utf8"===
210 -(b||"raw")&&(a=e.encodeUtf8(a));return new e.ByteBuffer(a)};e.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};e.xorBytes=function(a,b,c){for(var p="",e="",d="",h=0,k=0;0<c;--c,++h)e=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(p+=d,d="",k=0),d+=String.fromCharCode(e),++k;return p+d};e.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};e.bytesToHex=
211 -function(a){return e.createBuffer(a).toHex()};e.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var d=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];e.encode64=function(a,b){for(var c="",p="",e,d,h,k=0;k<a.length;)e=
212 -a.charCodeAt(k++),d=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,b)+"\r\n",c=c.substr(b));return p+
213 -c};e.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,p,e,h,k=0;k<a.length;)c=d[a.charCodeAt(k++)-43],p=d[a.charCodeAt(k++)-43],e=d[a.charCodeAt(k++)-43],h=d[a.charCodeAt(k++)-43],b+=String.fromCharCode(c<<2|p>>4),64!==e&&(b+=String.fromCharCode((p&15)<<4|e>>2),64!==h&&(b+=String.fromCharCode((e&3)<<6|h)));return b};e.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};e.decodeUtf8=function(a){return decodeURIComponent(escape(a))};e.binary={raw:{},hex:{},base64:{}};
214 -e.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};e.binary.raw.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(a.length));for(var e=c=c||0,d=0;d<a.length;++d)p[e++]=a.charCodeAt(d);return b?e-c:p};e.binary.hex.encode=e.bytesToHex;e.binary.hex.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var e=0,d=c;a.length&1&&(e=1,p[d++]=parseInt(a[0],16));for(;e<a.length;e+=2)p[d++]=parseInt(a.substr(e,2),16);return b?d-c:p};e.binary.base64.encode=
215 -function(a,b){for(var c="",p="",e,d,h,k=0;k<a.byteLength;)e=a[k++],d=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,
216 -b)+"\r\n",c=c.substr(b));return p+c};e.binary.base64.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var e,h,k,m,g=0,r=c;g<a.length;)e=d[a.charCodeAt(g++)-43],h=d[a.charCodeAt(g++)-43],k=d[a.charCodeAt(g++)-43],m=d[a.charCodeAt(g++)-43],p[r++]=e<<2|h>>4,64!==k&&(p[r++]=(h&15)<<4|k>>2,64!==m&&(p[r++]=(k&3)<<6|m));return b?r-c:p.subarray(0,r)};e.text={utf8:{},utf16:{}};e.text.utf8.encode=function(a,b,c){a=e.encodeUtf8(a);
217 -var p=b;p||(p=new Uint8Array(a.length));for(var d=c=c||0,h=0;h<a.length;++h)p[d++]=a.charCodeAt(h);return b?d-c:p};e.text.utf8.decode=function(a){return e.decodeUtf8(String.fromCharCode.apply(null,a))};e.text.utf16.encode=function(a,b,c){var p=b;p||(p=new Uint8Array(2*a.length));for(var e=new Uint16Array(p.buffer),d=c=c||0,h=c,k=0;k<a.length;++k)e[h++]=a.charCodeAt(k),d+=2;return b?d-c:p};e.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};e.deflate=function(a,
218 -b,c){b=e.decode64(a.deflate(e.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};e.inflate=function(a,b,c){a=a.inflate(e.encode64(b)).rval;return null===a?null:e.decode64(a)};var g=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=e.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
219 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(e.decode64(c)));return c},m=function(a,b,c,p){var e=l(a,b);null===e&&(e={});e[c]=p;g(a,b,e)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var p=l(a,b);if(null!==p&&c in p){delete p[c];c=!0;for(var e in p){c=!1;break}c&&(p=null);g(a,b,p)}},r=function(a,b){g(a,b,null)},K=function(a,b,
220 -c){var p=null;"undefined"===typeof c&&(c=["web","flash"]);var e,d=!1,h=null,k;for(k in c){e=c[k];try{if("flash"===e||"both"===e){if(null===b[0])throw Error("Flash local storage not available.");p=a.apply(this,b);d="flash"===e}if("web"===e||"both"===e)b[0]=localStorage,p=a.apply(this,b),d=!0}catch(m){h=m}if(d)break}if(!d)throw h;return p};e.setItem=function(a,b,c,p,e){K(m,arguments,e)};e.getItem=function(a,b,c,p){return K(k,arguments,p)};e.removeItem=function(a,b,c,p){K(h,arguments,p)};e.clearItems=
221 -function(a,b,c){K(r,arguments,c)};e.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;e.getQueryVariables=function(a){var b=function(a){var b=
222 -{};a=a.split("&");for(var c=0;c<a.length;c++){var p=a[c].indexOf("="),e;0<p?(e=a[c].substring(0,p),p=a[c].substring(p+1)):(e=a[c],p=null);e in b||(b[e]=[]);e in Object.prototype||null===p||b[e].push(unescape(p))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};e.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
223 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:e.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};e.makeRequest=function(a){var b=e.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var p;"undefined"===typeof a?p=b.query:(p=b.query[a])&&"undefined"!==typeof c&&(p=p[c]);return p},getQueryLast:function(a,b){var p=c.getQuery(a);return p?p[p.length-1]:b}};return c};e.makeLink=function(a,
224 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};e.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var p=0,e=b.length;p<e;){var d=b[p++];if(p==e)a[d]=c;else{var h=d in a;if(!h||h&&"object"!==typeof a[d]||h&&null===a[d])a[d]={};a=a[d]}}};e.getPath=function(a,b,c){for(var p=0,e=b.length,d=!0;d&&p<e&&"object"===typeof a&&null!==a;){var h=b[p++];(d=h in a)&&(a=a[h])}return d?a:c};e.deletePath=function(a,b){if("object"===
225 -typeof a&&null!==a)for(var c=0,p=b.length;c<p;){var e=b[c++];if(c==p)delete a[e];else{if(!(e in a)||"object"!==typeof a[e]||null===a[e])break;a=a[e]}}};e.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};e.format=function(a){var b=/%./g,c,p,e=0,d=[];for(p=0;c=b.exec(a);)switch(p=a.substring(p,b.lastIndex-2),0<p.length&&d.push(p),p=b.lastIndex,c=c[0][1],c){case "s":case "o":e<arguments.length?d.push(arguments[e++ +1]):d.push("<?>");break;case "%":d.push("%");break;default:d.push("<#"+
226 -c+"?>")}d.push(a.substring(p));return d.join("")};e.formatNumber=function(a,b,c,p){var e=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;p=void 0===p?".":p;c=0>a?"-":"";var d=parseInt(a=Math.abs(+a||0).toFixed(e),10)+"",h=3<d.length?d.length%3:0;return c+(h?d.substr(0,h)+p:"")+d.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+p)+(e?b+Math.abs(a-d).toFixed(e).slice(2):"")};e.formatSize=function(a){return a=1073741824<=a?e.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?e.formatNumber(a/1048576,2,".","")+
227 -" MiB":1024<=a?e.formatNumber(a/1024,0)+" KiB":e.formatNumber(a,0)+" bytes"};e.bytesFromIP=function(a){return-1!==a.indexOf(".")?e.bytesFromIPv4(a):-1!==a.indexOf(":")?e.bytesFromIPv6(a):null};e.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=e.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};e.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
228 -2*(8-a.length+b),p=e.createBuffer(),d=0;8>d;++d)if(a[d]&&0!==a[d].length){var h=e.hexToBytes(a[d]);2>h.length&&p.putByte(0);p.putBytes(h)}else p.fillWithByte(0,c),c=0;return p.getBytes()};e.bytesToIP=function(a){return 4===a.length?e.bytesToIPv4(a):16===a.length?e.bytesToIPv6(a):null};e.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};e.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,d=0;d<a.length;d+=
229 -2){for(var h=e.bytesToHex(a[d]+a[d+1]);"0"===h[0]&&"0"!==h;)h=h.substr(1);if("0"===h){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(h)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};e.estimateCores=function(a,b){function c(a,k,m){if(0===k){var g=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);e.cores=
230 -Math.max(1,g);URL.revokeObjectURL(h);return b(null,e.cores)}p(m,function(b,p){a.push(d(m,p));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],e=0;e<a;++e){var z=new Worker(h);z.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(z)}for(e=0;e<a;++e)c[e].postMessage(e)}function d(a,b){for(var c=[],p=0;p<a;++p)for(var e=b[p],h=c[p]=[],z=0;z<a;++z)if(p!==z){var k=b[z];(e.st>k.st&&e.st<k.et||k.st>e.st&&k.st<e.et)&&h.push(z)}return c.reduce(function(a,
231 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in e&&!a.update)return b(null,e.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return e.cores=navigator.hardwareConcurrency,b(null,e.cores);if("undefined"===typeof Worker)return e.cores=1,b(null,e.cores);if("undefined"===typeof Blob)return e.cores=2,b(null,e.cores);var h=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
232 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var q=0;q<g.length;++q)g[q](c);
233 -return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
178 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,g,x,h,k,m,e,r=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){r=r.slice(0,r.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=r.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
179 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((r||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(r)for(e=r.length;0<e;--e)if(d=w[r.slice(0,e).join("/")])if(d=d[p]){g=d;h=x;break}if(g)break;!k&&l&&l[p]&&(k=l[p],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
180 +a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function r(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var C,w,D,m,k={},h={},u={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=r(a),g=d[0];a=d[1];g&&(g=e(g,b),c=p(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=r(a),
181 +g=d[0],a=d[1],g&&(c=p(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};C=function(a,b,c,g){var x,e,z,u,r=[];e=typeof c;var w;g=g||a;if("undefined"===e||"function"===e){b=!b.length&&c.length?["require","exports","module"]:b;for(u=0;u<b.length;u+=1)if(z=D(b[u],g),e=z.f,"require"===e)r[u]=m.require(a);else if("exports"===e)r[u]=m.exports(a),
182 +w=!0;else if("module"===e)x=r[u]=m.module(a);else if(B.call(k,e)||B.call(h,e)||B.call(K,e))r[u]=p(e);else if(z.p)z.p.load(z.n,v(g,!0),l(e),{}),r[u]=k[e];else throw Error(a+" missing "+e);b=c?c.apply(k[a],r):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
183 +typeof c&&(c=g,g=x);g?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(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(b){for(var p=
184 +0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.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)};
185 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
186 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}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&&
187 +d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
188 +d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
189 +255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
190 +8&255))};d.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};d.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};d.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
191 +d.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};d.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};d.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
192 +16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};d.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24Le=
193 +function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};d.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};d.ByteStringBuffer.prototype.getSignedInt=
194 +function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
195 +a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
196 +function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
197 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
198 +d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
199 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
200 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
201 +b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
202 +b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
203 +d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
204 +a,!0);this.write+=4;return this};d.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};d.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};d.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};d.DataBuffer.prototype.getInt24=
205 +function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};d.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};d.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};d.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};d.DataBuffer.prototype.getInt32Le=function(){var a=
206 +this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};d.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
207 +d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
208 +new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
209 +this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
210 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
211 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
212 +a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
213 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
214 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
215 +function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
216 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,u=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[u++]=p<<2|g>>4,64!==h&&(d[u++]=(g&15)<<4|h>>2,64!==k&&(d[u++]=(h&3)<<6|k));return b?u-c:d.subarray(0,u)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
217 +var p=b;p||(p=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)p[y++]=a.charCodeAt(h);return b?y-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
218 +b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
219 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},K=function(a,b,
220 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){K(m,arguments,p)};d.getItem=function(a,b,c,d){return K(k,arguments,d)};d.removeItem=function(a,b,c,d){K(h,arguments,d)};d.clearItems=
221 +function(a,b,c){K(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;d.getQueryVariables=function(a){var b=function(a){var b=
222 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
223 +0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
224 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
225 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
226 +c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
227 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
228 +2*(8-a.length+b),p=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&p.putByte(0);p.putBytes(k)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,h=0;h<a.length;h+=
229 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],e=b.length;m&&e===m.end+1?(m.end=e,m.end-m.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:e,end:e})}b.push(k)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,e){if(0===m){var u=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
230 +Math.max(1,u);URL.revokeObjectURL(k);return b(null,d.cores)}p(e,function(b,d){a.push(h(e,d));c(a,m-1,e)})}function p(a,b){for(var c=[],d=[],g=0;g<a;++g){var h=new Worker(k);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(g=0;g<a;++g)c[g].postMessage(g)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],g=c[d]=[],y=0;y<a;++y)if(d!==y){var k=b[y];(p.st>k.st&&p.st<k.et||k.st>p.st&&k.st<p.et)&&g.push(y)}return c.reduce(function(a,
231 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
232 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var r=0;r<e.length;++r)e[r](c);
233 +return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
234 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
235 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
236 this.mode.start(c)};c.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()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
237 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
238 -c.defined.cipher=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
239 -4<b.length){var d=b;b=a.util.createBuffer();for(var e=0;e<d.length;++e)b.putByte(d[e])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function g(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
237 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
238 +c.defined.cipher=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
239 +4<b.length){var d=b;b=a.util.createBuffer();for(var g=0;g<d.length;++g)b.putByte(d[g])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
240 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
241 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.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);
242 this._outBlock=Array(this._ints)};w.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=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
243 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
244 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
245 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32()^this._outBlock[d],b.putInt32(this._inBlock[d]);else{var e=(this.blockSize-p)%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]);
246 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
247 -p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32(),b.putInt32(this._inBlock[d]^this._outBlock[d]);else{var e=(this.blockSize-p)%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);
248 -if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
249 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)b.putInt32(a.getInt32()^this._outBlock[d]),this._inBlock[d]=this._outBlock[d];else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(d=0;d<this._ints;++d)this._partialOutput.putInt32(a.getInt32()^
250 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
251 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var g=0;g<
252 -this._ints;++g)b.putInt32(a.getInt32()^this._outBlock[g]);else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);0<q&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
245 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
246 +if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
247 +d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
248 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
249 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
250 +this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
251 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var e=0;e<
252 +this._ints;++e)b.putInt32(a.getInt32()^this._outBlock[e]);else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);0<r&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<r&&!c)return b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
253 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
254 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.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,
255 -this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(g(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=g(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
256 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var g=0;g<this._ints;++g)b.putInt32(this._outBlock[g]^=a.getInt32());this._cipherLength+=this.blockSize}else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();
257 -for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);if(0===q||c){c?(g=p%this.blockSize,this._cipherLength+=g,this._partialOutput.truncate(this.blockSize-g)):this._cipherLength+=this.blockSize;for(g=0;g<this._ints;++g)this._outBlock[g]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),
258 -this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
259 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var e=this._aDataLength.concat(g(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,e);e=[];this.cipher.encrypt(this._j0,e);for(var q=0;q<
260 -this._ints;++q)this.tag.putInt32(this._s[q]^e[q]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],p=b.slice(0),d=0;128>d;++d)a[d/32|0]&1<<31-d%32&&(c[0]^=p[0],c[1]^=p[1],c[2]^=p[2],c[3]^=p[3]),this.pow(p,p);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,p=3;0<p;--p)b[p]=a[p]>>>1|(a[p-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
261 -[0,0,0,0],c=0;32>c;++c){var p=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=p[0];b[1]^=p[1];b[2]^=p[2];b[3]^=p[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,p=4*c,c=16*c,d=Array(c),e=0;e<c;++e){var g=[0,0,0,0];g[e/p|0]=1<<b-1<<(p-1-e%p)*b;d[e]=this.generateSubHashTable(this.multiply(g,a),b)}return d};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
262 -p=c>>>1,d=Array(c);d[p]=a.slice(0);for(var e=p>>>1;0<e;)this.pow(d[2*e],d[e]=[]),e>>=1;for(e=2;e<p;){for(var g=1;g<e;++g){var q=d[e],w=d[g];d[e+g]=[q[0]^w[0],q[1]^w[1],q[2]^w[2],q[3]^w[3]]}e*=2}d[0]=[0,0,0,0];for(e=p+1;e<c;++e)g=d[e^p],d[e]=[a[0]^g[0],a[1]^g[1],a[2]^g[2],a[3]^g[3]];return d}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=
263 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
264 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);r=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,e,g,k,q,u,b=0;256>b;++b){q=p^p<<1^p<<2^p<<3^p<<4;q=q>>8^q&255^99;h[c]=q;r[q]=c;u=a[q];e=a[c];g=a[e];k=a[g];u^=u<<24^q<<16^q<<8^q;g=(e^g^k)<<24^(c^
265 -k)<<16^(c^g^k)<<8^c^e^k;for(var w=0;4>w;++w)B[w][c]=u,x[w][q]=g,u=u<<24|u>>>8,g=g<<24|g>>>8;0===c?c=p=1:(c=e^a[a[a[e^k]]],p^=a[a[p]])}}function g(a,b){for(var c=a.slice(0),p,d=1,e=c.length,m=k*(e+6+1),q=e;q<m;++q)p=c[q-1],0===q%e?(p=h[p>>>16&255]<<24^h[p>>>8&255]<<16^h[p&255]<<8^h[p>>>24]^K[d]<<24,d++):6<e&&4===q%e&&(p=h[p>>>24]<<24^h[p>>>16&255]<<16^h[p>>>8&255]<<8^h[p&255]),c[q]=c[q-e]^p;if(b){for(var d=x[0],e=x[1],r=x[2],w=x[3],l=c.slice(0),m=c.length,q=0,F=m-k;q<m;q+=k,F-=k)if(0===q||q===m-k)l[q]=
266 -c[F],l[q+1]=c[F+3],l[q+2]=c[F+2],l[q+3]=c[F+1];else for(var B=0;B<k;++B)p=c[F+B],l[q+(3&-B)]=d[h[p>>>24]]^e[h[p>>>16&255]]^r[h[p>>>8&255]]^w[h[p&255]];c=l}return c}function w(a,b,c,p){var d=a.length/4-1,e,g,k,m,q;p?(e=x[0],g=x[1],k=x[2],m=x[3],q=r):(e=B[0],g=B[1],k=B[2],m=B[3],q=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[p?3:1]^a[1];C=b[2]^a[2];b=b[p?1:3]^a[3];for(var n=3,v=1;v<d;++v)L=e[w>>>24]^g[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=e[l>>>24]^g[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=e[C>>>24]^
267 -g[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=e[b>>>24]^g[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=q[w>>>24]<<24^q[l>>>16&255]<<16^q[C>>>8&255]<<8^q[b&255]^a[++n];c[p?3:1]=q[l>>>24]<<24^q[C>>>16&255]<<16^q[b>>>8&255]<<8^q[w&255]^a[++n];c[2]=q[C>>>24]<<24^q[b>>>16&255]<<16^q[w>>>8&255]<<8^q[l&255]^a[++n];c[p?1:3]=q[b>>>24]<<24^q[w>>>16&255]<<16^q[l>>>8&255]<<8^q[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
268 -a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;e.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!1,mode:p});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!0,mode:p});a.start(b);return a};a.aes.createDecryptionCipher=
255 +this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
256 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var e=0;e<this._ints;++e)b.putInt32(this._outBlock[e]^=a.getInt32());this._cipherLength+=this.blockSize}else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();
257 +for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(0===r||c){c?(e=p%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<r&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),
258 +this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
259 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var u=0;u<
260 +this._ints;++u)this.tag.putInt32(this._s[u]^g[u]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
261 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),g=0;g<c;++g){var e=[0,0,0,0];e[g/d|0]=1<<b-1<<(d-1-g%d)*b;p[g]=this.generateSubHashTable(this.multiply(e,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
262 +d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(p[2*g],p[g]=[]),g>>=1;for(g=2;g<d;){for(var e=1;e<g;++e){var r=p[g],w=p[e];p[g+e]=[r[0]^w[0],r[1]^w[1],r[2]^w[2],r[3]^w[3]]}g*=2}p[0]=[0,0,0,0];for(g=d+1;g<c;++g)e=p[g^d],p[g]=[a[0]^e[0],a[1]^e[1],a[2]^e[2],a[3]^e[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=
263 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
264 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,g,e,k,r,q,b=0;256>b;++b){r=p^p<<1^p<<2^p<<3^p<<4;r=r>>8^r&255^99;h[c]=r;u[r]=c;q=a[r];g=a[c];e=a[g];k=a[e];q^=q<<24^r<<16^r<<8^r;e=(g^e^k)<<24^(c^
265 +k)<<16^(c^e^k)<<8^c^g^k;for(var w=0;4>w;++w)B[w][c]=q,x[w][r]=e,q=q<<24|q>>>8,e=e<<24|e>>>8;0===c?c=p=1:(c=g^a[a[a[g^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,g=c.length,m=k*(g+6+1),r=g;r<m;++r)d=c[r-1],0===r%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^K[p]<<24,p++):6<g&&4===r%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[r]=c[r-g]^d;if(b){for(var p=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),m=c.length,r=0,F=m-k;r<m;r+=k,F-=k)if(0===r||r===m-k)l[r]=
266 +c[F],l[r+1]=c[F+3],l[r+2]=c[F+2],l[r+3]=c[F+1];else for(var B=0;B<k;++B)d=c[F+B],l[r+(3&-B)]=p[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,g,e,k,m,r;d?(g=x[0],e=x[1],k=x[2],m=x[3],r=u):(g=B[0],e=B[1],k=B[2],m=B[3],r=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[d?3:1]^a[1];C=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)L=g[w>>>24]^e[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^e[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=g[C>>>24]^
267 +e[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^e[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=r[w>>>24]<<24^r[l>>>16&255]<<16^r[C>>>8&255]<<8^r[b&255]^a[++n];c[d?3:1]=r[l>>>24]<<24^r[C>>>16&255]<<16^r[b>>>8&255]<<8^r[w&255]^a[++n];c[2]=r[C>>>24]<<24^r[b>>>16&255]<<16^r[w>>>8&255]<<8^r[l&255]^a[++n];c[d?1:3]=r[b>>>24]<<24^r[w>>>16&255]<<16^r[l>>>8&255]<<8^r[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
268 +a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;g.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
269 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
270 -c;for(var c=a.util.createBuffer(),e=0;e<d.length;++e)c.putByte(d[e])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,e=0;e<h;++e)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=g(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return g(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
271 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,r,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
272 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
270 +c;for(var c=a.util.createBuffer(),g=0;g<d.length;++g)c.putByte(d[g])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,g=0;g<h;++g)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
271 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
272 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
273 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
274 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
275 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -283,336 +283,336 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
283 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
284 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
285 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
286 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var q=0;q<g.length;++q)g[q](c);return c.oids}},
287 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
288 -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};c.create=function(b,c,d,e){if(a.util.isArray(e)){for(var h=[],g=0;g<e.length;++g)void 0!==e[g]&&h.push(e[g]);e=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(e),value:e}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,g){void 0===g&&(g=!0);
289 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,r=d(b);if(b.length()<r){if(g)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+r,m;r=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<r){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===r-(b.read-
290 -x))++x,--r}catch(A){}b.read=x}if(l)if(l=[],void 0===r)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,g))}else for(x=b.length();0<r;)l.push(c.fromDer(b,g)),r-=x-b.length(),x=b.length();else{if(void 0===r){if(g)throw Error("Non-constructed ASN.1 object of indefinite length.");r=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<r;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(r)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
291 -e=b.tagClass|b.type,g=a.util.createBuffer();if(b.composed){b.constructed?e|=32:g.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&g.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)g.putInt16(b.value.charCodeAt(h));else g.putBytes(b.value);d.putByte(e);if(127>=g.length())d.putByte(g.length()&127);else{h=g.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(g);
292 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,e,h,g,q=2;q<b.length;++q){d=!0;e=[];h=parseInt(b[q],10);do g=h&127,h>>>=7,d||(g|=128),e.push(g),d=!1;while(0<h);for(d=e.length-1;0<=d;--d)c.putByte(e[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var e=0;0<b.length();)d=b.getByte(),e<<=7,d&128?e+=d&127:(c+="."+(e+d),e=0);
293 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,e=parseInt(a.substr(4,2),10),p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,e);b.setUTCHours(p,g,q,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
294 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,e=parseInt(a.substr(6,2),10),p=parseInt(a.substr(8,2),10),g=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),x=0,l=0,y=!1;"Z"===a.charAt(a.length-1)&&(y=!0);var R=a.length-5,z=a.charAt(R);if("+"===z||"-"===z)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===z&&(l*=-1),y=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
295 -10));y?(b.setUTCFullYear(c,d,e),b.setUTCHours(p,g,q,x),b.setTime(+b+l)):(b.setFullYear(c,d,e),b.setHours(p,g,q,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
286 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var r=0;r<e.length;++r)e[r](c);return c.oids}},
287 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
288 +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};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
289 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
290 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
291 +g=b.tagClass|b.type,e=a.util.createBuffer();if(b.composed){b.constructed?g|=32:e.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&e.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)e.putInt16(b.value.charCodeAt(h));else e.putBytes(b.value);d.putByte(g);if(127>=e.length())d.putByte(e.length()&127);else{h=e.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(e);
292 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,r=2;r<b.length;++r){d=!0;g=[];h=parseInt(b[r],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
293 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),r=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(r=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(g,e,r,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
294 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),r=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
295 +10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(g,e,r,x),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(g,e,r,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
296 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
297 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,e,g){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)g&&(b.tagClass!==d.tagClass&&g.push("["+d.name+'] Expected tag class "'+d.tagClass+
298 -'", got "'+b.tagClass+'"'),b.type!==d.type&&g.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var r=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[r]&&((h=c.validate(b.value[r],d.value[l],e,g))?++r:d.value[l].optional&&(h=!0)),!h&&g&&g.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
299 -b.value.length+'"');h&&e&&(d.capture&&(e[d.capture]=b.value),d.captureAsn1&&(e[d.captureAsn1]=b))}else g&&g.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var g=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,e){var k="";d=d||0;e=e||2;0<d&&(k+="\n");for(var h="",r=0;r<d*e;++r)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
297 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
298 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
299 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
300 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
301 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
302 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",r=0;r<b.value.length;++r)void 0!==b.value[r]&&(l+=1,B+=c.prettyPrint(b.value[r],d+1,e),r+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
303 -c.Type.OCTETSTRING?(g.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:g.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
304 -c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<g.length;++q)g[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
302 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,B+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
303 +c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
304 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var r=0;r<e.length;++r)e[r](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
305 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[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];m=[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];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
306 -Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var e,p,h,g,z,E,q,l=c.length();64<=l;){p=a.h0;h=a.h1;g=a.h2;z=a.h3;for(q=0;16>q;++q)b[q]=c.getInt32Le(),e=z^h&(g^z),e=p+e+k[q]+b[q],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;32>q;++q)e=g^z&(h^g),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;48>q;++q)e=h^g^z,e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;64>q;++q)e=g^(h|~z),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;a.h0=a.h0+p|0;a.h1=a.h1+h|0;a.h2=a.h2+g|0;a.h3=
307 -a.h3+z|0;l-=64}}var g=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=g;g.create=function(){h||c();var b=null,g=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);g=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
308 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],z=m.fullMessageLength.length-1;0<=z;--z)m.fullMessageLength[z]+=q[1],q[1]=q[0]+(m.fullMessageLength[z]/4294967296>>>0),m.fullMessageLength[z]>>>=0,q[0]=q[1]/4294967296>>>0;g.putBytes(c);d(b,k,g);(2048<g.read||0===g.length())&&g.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(g.bytes());c.putBytes(l.substr(0,
309 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,q=0,z=m.fullMessageLength.length-1;0<=z;--z)h=8*m.fullMessageLength[z]+q,q=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=
310 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
311 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,A,y,w,z=d.length();64<=z;){p=a.h0;g=a.h1;q=a.h2;l=a.h3;A=a.h4;for(w=0;16>w;++w)e=d.getInt32(),b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;20>w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;32>
312 -w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;40>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;60>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g&q|l&(g^q),e=(p<<5|p>>>27)+y+A+2400959708+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;80>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>
313 -27)+y+A+3395469782+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;a.h0=a.h0+p|0;a.h1=a.h1+g|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+A|0;z-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),e=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
314 -0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,e=0;e<c;++e)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var w=g.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
315 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],A=0;A<h.fullMessageLength.length;++A)w=8*h.fullMessageLength[A+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
316 -h4:b.h4};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var g=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
317 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,y,w,z,E,O,H,C,u,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
318 -for(;64>l;++l)e=b[l-2],e=(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10,p=b[l-15],p=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,b[l]=e+b[l-7]+p+b[l-16]|0;y=a.h0;w=a.h1;z=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;u=a.h7;for(l=0;64>l;++l)e=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),g=C^O&(H^C),p=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),q=y&w|z&(y^w),e=u+e+g+n[l]+b[l],p+=q,u=C,C=H,H=O,O=E+e|0,E=z,z=w,w=y,y=e+p|0;a.h0=a.h0+y|0;a.h1=a.h1+w|0;a.h2=a.h2+z|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+u|0;v-=
319 -64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.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,
320 -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],l=!0);var b=null,d=a.util.createBuffer(),e=Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,
321 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){r.messageLength=0;r.fullMessageLength=r.messageLength64=[];for(var c=r.messageLengthSize/4,e=0;e<c;++e)r.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return r}};r.start();r.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var x=g.length;r.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=r.fullMessageLength.length-
322 -1;0<=w;--w)r.fullMessageLength[w]+=x[1],x[1]=x[0]+(r.fullMessageLength[w]/4294967296>>>0),r.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return r};r.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,r.blockLength-(r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize&r.blockLength-1)));a.util.createBuffer();for(var w,x,A=8*r.fullMessageLength[0],y=0;y<r.fullMessageLength.length;++y)w=
323 -8*r.fullMessageLength[y+1],x=w/4294967296>>>0,A+=x,l.putInt32(A>>>0),A=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return r};var g=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
324 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
325 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,k,q,z,E,l,w,C,u,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)q=b[S-2],w=q[0],q=q[1],e=((w>>>19|q<<13)^(q>>>29|w<<3)^w>>>6)>>>0,p=((w<<13|q>>>19)^(q<<3|w>>>29)^(w<<26|q>>>6))>>>0,q=b[S-15],w=q[0],q=q[1],g=((w>>>1|q<<31)^(w>>>8|q<<24)^w>>>7)>>>0,k=((w<<31|q>>>1)^(w<<24|q>>>8)^(w<<25|q>>>7))>>>0,w=b[S-7],C=b[S-
326 -16],q=p+w[1]+k+C[1],b[S][0]=e+w[0]+g+C[0]+(q/4294967296>>>0)>>>0,b[S][1]=q>>>0;w=a[0][0];C=a[0][1];u=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)e=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,q=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,p=(ba^D&(J^ba))>>>0,z=(W^V&(aa^W))>>>0,g=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
327 -E=(w&u|v&(w^u))>>>0,l=(C&n|F&(C^n))>>>0,q=G+q+z+m[S][1]+b[S][1],e=I+e+p+m[S][0]+b[S][0]+(q/4294967296>>>0)>>>0,p=q>>>0,q=k+l,g=g+E+(q/4294967296>>>0)>>>0,k=q>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,q=L+p,D=Y+e+(q/4294967296>>>0)>>>0,V=q>>>0,Y=v,L=F,v=u,F=n,u=w,n=C,q=p+k,w=e+g+(q/4294967296>>>0)>>>0,C=q>>>0;q=a[0][1]+C;a[0][0]=a[0][0]+w+(q/4294967296>>>0)>>>0;a[0][1]=q>>>0;q=a[1][1]+n;a[1][0]=a[1][0]+u+(q/4294967296>>>0)>>>0;a[1][1]=q>>>0;q=a[2][1]+F;a[2][0]=a[2][0]+v+(q/4294967296>>>0)>>>0;a[2][1]=q>>>0;
328 -q=a[3][1]+L;a[3][0]=a[3][0]+Y+(q/4294967296>>>0)>>>0;a[3][1]=q>>>0;q=a[4][1]+V;a[4][0]=a[4][0]+D+(q/4294967296>>>0)>>>0;a[4][1]=q>>>0;q=a[5][1]+aa;a[5][0]=a[5][0]+J+(q/4294967296>>>0)>>>0;a[5][1]=q>>>0;q=a[6][1]+W;a[6][0]=a[6][0]+ba+(q/4294967296>>>0)>>>0;a[6][1]=q>>>0;q=a[7][1]+G;a[7][0]=a[7][0]+I+(q/4294967296>>>0)>>>0;a[7][1]=q>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var g=a.sha384=a.sha512.sha384=a.sha512.sha384||
329 -{};g.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=g;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
306 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var p,g,h,e,y,E,r,l=c.length();64<=l;){g=a.h0;h=a.h1;e=a.h2;y=a.h3;for(r=0;16>r;++r)b[r]=c.getInt32Le(),p=y^h&(e^y),p=g+p+k[r]+b[r],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;32>r;++r)p=e^y&(h^e),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;48>r;++r)p=h^e^y,p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;64>r;++r)p=e^(h|~y),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;a.h0=a.h0+g|0;a.h1=a.h1+h|0;a.h2=a.h2+e|0;a.h3=
307 +a.h3+y|0;l-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
308 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var r=c.length;m.messageLength+=r;for(var r=[r/4294967296>>>0,r>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=r[1],r[1]=r[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,r[0]=r[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
309 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,r=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+r,r=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
310 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
311 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;r=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;32>
312 +w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&r|l&(e^r),p=(g<<5|g>>>27)+A+z+2400959708+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>
313 +27)+A+z+3395469782+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+r|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
314 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
315 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
316 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
317 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,A,w,y,E,O,H,C,q,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
318 +for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=p+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;q=a.h7;for(l=0;64>l;++l)p=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),e=C^O&(H^C),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),r=A&w|y&(A^w),p=q+p+e+n[l]+b[l],g+=r,q=C,C=H,H=O,O=E+p|0,E=y,y=w,w=A,A=p+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+q|0;v-=
319 +64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.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,
320 +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],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
321 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
322 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
323 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
324 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
325 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,k,r,y,E,l,w,C,q,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)r=b[S-2],w=r[0],r=r[1],p=((w>>>19|r<<13)^(r>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|r>>>19)^(r<<3|w>>>29)^(w<<26|r>>>6))>>>0,r=b[S-15],w=r[0],r=r[1],e=((w>>>1|r<<31)^(w>>>8|r<<24)^w>>>7)>>>0,k=((w<<31|r>>>1)^(w<<24|r>>>8)^(w<<25|r>>>7))>>>0,w=b[S-7],C=b[S-
326 +16],r=g+w[1]+k+C[1],b[S][0]=p+w[0]+e+C[0]+(r/4294967296>>>0)>>>0,b[S][1]=r>>>0;w=a[0][0];C=a[0][1];q=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)p=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,r=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(J^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
327 +E=(w&q|v&(w^q))>>>0,l=(C&n|F&(C^n))>>>0,r=G+r+y+m[S][1]+b[S][1],p=I+p+g+m[S][0]+b[S][0]+(r/4294967296>>>0)>>>0,g=r>>>0,r=k+l,e=e+E+(r/4294967296>>>0)>>>0,k=r>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,r=L+g,D=Y+p+(r/4294967296>>>0)>>>0,V=r>>>0,Y=v,L=F,v=q,F=n,q=w,n=C,r=g+k,w=p+e+(r/4294967296>>>0)>>>0,C=r>>>0;r=a[0][1]+C;a[0][0]=a[0][0]+w+(r/4294967296>>>0)>>>0;a[0][1]=r>>>0;r=a[1][1]+n;a[1][0]=a[1][0]+q+(r/4294967296>>>0)>>>0;a[1][1]=r>>>0;r=a[2][1]+F;a[2][0]=a[2][0]+v+(r/4294967296>>>0)>>>0;a[2][1]=r>>>0;
328 +r=a[3][1]+L;a[3][0]=a[3][0]+Y+(r/4294967296>>>0)>>>0;a[3][1]=r>>>0;r=a[4][1]+V;a[4][0]=a[4][0]+D+(r/4294967296>>>0)>>>0;a[4][1]=r>>>0;r=a[5][1]+aa;a[5][0]=a[5][0]+J+(r/4294967296>>>0)>>>0;a[5][1]=r>>>0;r=a[6][1]+W;a[6][0]=a[6][0]+ba+(r/4294967296>>>0)>>>0;a[6][1]=r>>>0;r=a[7][1]+G;a[7][0]=a[7][0]+I+(r/4294967296>>>0)>>>0;a[7][1]=r>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
329 +{};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
330 3609767458],[1899447441,602891725],[3049323471,3964484399],[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],
331 [1555081692,3175218132],[1996064986,2198950837],[2554220882,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,
332 106217008],[3516065817,3606008344],[3600352804,1432725776],[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],
333 [3515267271,566280711],[3940187606,3454069534],[4118630271,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]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
334 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,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,
335 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],e=null,g=a.util.createBuffer(),x=Array(80),A=0;80>A;++A)x[A]=Array(2);var y={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){y.messageLength=
336 -0;y.fullMessageLength=y.messageLength128=[];for(var b=y.messageLengthSize/4,c=0;c<b;++c)y.fullMessageLength.push(0);g=a.util.createBuffer();e=Array(d.length);for(c=0;c<d.length;++c)e[c]=d[c].slice(0);return y}};y.start();y.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;y.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=y.fullMessageLength.length-1;0<=k;--k)y.fullMessageLength[k]+=h[1],h[1]=h[0]+(y.fullMessageLength[k]/4294967296>>>0),y.fullMessageLength[k]>>>=0,h[0]=
337 -h[1]/4294967296>>>0;g.putBytes(b);c(e,x,g);(2048<g.read||0===g.length())&&g.compact();return y};y.digest=function(){var d=a.util.createBuffer();d.putBytes(g.bytes());d.putBytes(l.substr(0,y.blockLength-(y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize&y.blockLength-1)));a.util.createBuffer();for(var z,k,m=8*y.fullMessageLength[0],r=0;r<y.fullMessageLength.length;++r)z=8*y.fullMessageLength[r+1],k=z/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=z;z=Array(e.length);for(r=0;r<e.length;++r)z[r]=
338 -e[r].slice(0);c(z,x,d);d=a.util.createBuffer();k="SHA-512"===b?z.length:"SHA-384"===b?z.length-2:z.length-4;for(r=0;r<k;++r)d.putInt32(z[r][0]),r===k-1&&"SHA-512/224"===b||d.putInt32(z[r][1]);return d};return y};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
339 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
340 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md}},l=a;a=function(b,
341 -c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,g={start:function(g,m){if(null!==g)if("string"===typeof g)if(g=g.toLowerCase(),g in a.md.algorithms)b=
342 -a.md.algorithms[g].create();else throw Error('Unknown hash algorithm "'+g+'"');else b=g;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
343 -d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};g.digest=g.getMac;return g}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
344 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<g.length;++q)g[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],e=function(a,
345 -b){return" "+b},p=0;p<a.values.length;++p)d.push(a.values[p].replace(/^(\S+\r\n)/,e));b+=d.join(",")+"\r\n";d=0;a=-1;for(p=0;p<b.length;++p,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=p-a-1,a=-1,++p;else if(" "===b[p]||"\t"===b[p]||","===b[p])a=p;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var e="-----BEGIN "+b.type+"-----\r\n",g;b.procType&&(g={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
346 -e+=c(g));b.contentDomain&&(g={name:"Content-Domain",values:[b.contentDomain]},e+=c(g));b.dekInfo&&(g={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&g.values.push(b.dekInfo.parameters),e+=c(g));if(b.headers)for(g=0;g<b.headers.length;++g)e+=c(b.headers[g]);b.procType&&(e+="\r\n");e+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return e+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
347 -e=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,g=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var q={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(q);if(h[2]){for(var l=h[2].split(g),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var A=l[x];if(!/\s/.test(A[0]))break;h+=A;B=x}if(h=h.match(e)){for(var x={name:h[1],values:[]},A=h[2].split(","),y=0;y<A.length;++y)x.values.push(A[y].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
348 -"Content-Domain"!==x.name)if(q.dekInfo||"DEK-Info"!==x.name)q.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:A[0],parameters:A[1]||null}}else q.contentDomain=A[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
349 -q.procType={version:A[0],type:A[1]}}}++B}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
350 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
351 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,e){var p=32===a.length?3:9;e=3===p?e?[30,-2,-2]:[0,32,2]:e?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=b[0],q=b[1];b=(g>>>4^q)&252645135;q^=b;g^=b<<4;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(g>>>1^q)&1431655765;for(var q=q^b,g=g^b<<1,g=g<<1|g>>>31,q=q<<1|q>>>31,H=0;H<p;H+=3){for(var C=e[H+1],u=e[H+2],T=e[H];T!=C;T+=u){var P=q^a[T],F=(q>>>4|q<<28)^a[T+1];b=g;
352 -g=q;q=b^(n[P>>>24&63]|k[P>>>16&63]|r[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=g;g=q;q=b}g=g>>>1|g<<31;q=q>>>1|q<<31;b=(g>>>1^q)&1431655765;q^=b;g^=b<<1;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(g>>>4^q)&252645135;c[0]=g^b<<4;c[1]=q^b}function g(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var g=
353 -null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;e.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return g({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return g({key:a,
335 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
336 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
337 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
338 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
339 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
340 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md}},l=a;a=function(b,
341 +c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
342 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
343 +d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
344 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var r=0;r<e.length;++r)e[r](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
345 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
346 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
347 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var r={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(r);if(h[2]){for(var l=h[2].split(e),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;B=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(r.procType)if(r.contentDomain||
348 +"Content-Domain"!==x.name)if(r.dekInfo||"DEK-Info"!==x.name)r.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');r.dekInfo={algorithm:z[0],parameters:z[1]||null}}else r.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
349 +r.procType={version:z[0],type:z[1]}}}++B}if("ENCRYPTED"===r.procType&&!r.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
350 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
351 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,g){var p=32===a.length?3:9;g=3===p?g?[30,-2,-2]:[0,32,2]:g?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],r=b[1];b=(e>>>4^r)&252645135;r^=b;e^=b<<4;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(e>>>1^r)&1431655765;for(var r=r^b,e=e^b<<1,e=e<<1|e>>>31,r=r<<1|r>>>31,H=0;H<p;H+=3){for(var C=g[H+1],q=g[H+2],T=g[H];T!=C;T+=q){var P=r^a[T],F=(r>>>4|r<<28)^a[T+1];b=e;
352 +e=r;r=b^(n[P>>>24&63]|k[P>>>16&63]|u[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=e;e=r;r=b}e=e>>>1|e<<31;r=r>>>1|r<<31;b=(e>>>1^r)&1431655765;r^=b;e^=b<<1;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(e>>>4^r)&252645135;c[0]=e^b<<4;c[1]=r^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
353 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
354 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
355 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[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],
356 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],r=[0,268435456,8,268435464,0,268435456,
355 +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],
356 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],r=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
357 8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],F=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],B=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],L=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
358 1,C=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],K=0,D,W=0;W<n;W++){var I=b.getInt32(),G=b.getInt32();D=(I>>>4^G)&252645135;G^=D;I^=D<<4;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>2^G)&858993459;G^=D;I^=D<<2;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=(G>>>8^I)&16711935;I^=D;G^=D<<8;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=I<<8|G>>>20&240;for(var I=G<<24|G<<8&16711680|G>>>8&65280|G>>>24&240,G=D,S=0;S<v.length;++S){v[S]?(I=I<<2|I>>>26,G=G<<2|G>>>26):(I=I<<1|I>>>27,G=G<<1|G>>>27);
359 -var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|e[I>>>20&15]|g[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|q[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|r[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
359 +var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|g[I>>>20&15]|e[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|r[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|u[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
360 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[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,
361 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,
362 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[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,
363 8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[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],h=[256,34078976,34078720,1107296512,
364 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,
365 -524288,0,1074266112,34078976,1073742080],r=[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,
365 +524288,0,1074266112,34078976,1073742080],u=[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,
366 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[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,
367 67108866,67110912,2048,2097154],B=[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,
368 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<g.length;++q)g[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,
369 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,g;e&&!a.disableNativeCode&&(g=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,q){function l(){if(N>A)return q(null,z);n.start(null,
370 -null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();u=2;B()}function B(){if(u<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++u,a.util.setImmediate(B);z+=N<A?E:E.substr(0,y);++N;l()}"function"===typeof h&&(q=h,h=null);if(e&&!a.disableNativeCode&&g.pbkdf2&&(null===h||"object"!==typeof h)&&(4<g.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),q?4===g.pbkdf2Sync.length?g.pbkdf2(b,
371 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):g.pbkdf2(b,c,d,k,h,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===g.pbkdf2Sync.length?g.pbkdf2Sync(b,c,d,k).toString("binary"):g.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
372 -if(q)return q(b);throw b;}var A=Math.ceil(k/x),y=k-(A-1)*x,n=a.hmac.create();n.start(h,b);var z="",E,O,H;if(!q){for(var N=1;N<=A;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var u=2;u<=d;++u)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;z+=N<A?E:E.substr(0,y)}return z}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
373 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
374 -"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
375 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function g(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
376 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)e.putInt32(k[h])}catch(z){if(!("undefined"!==typeof QuotaExceededError&&z instanceof QuotaExceededError))throw z;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
377 -e.putByte(String.fromCharCode(k&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),q=0;32>q;++q)h[q]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(g(k.key,h(k.seed)));k.seed=z(g(k.key,k.seed));
378 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,q=k.plugin.formatKey,z=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var z=c(k.key,
379 -k.seed);k.generated+=z.length;q.putBytes(z);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,g(a))}catch(c){b(c)}},k.seedFileSync=g);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
368 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var r=0;r<e.length;++r)e[r](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
369 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},g="undefined"!==typeof process&&process.versions&&process.versions.node,e;g&&!a.disableNativeCode&&(e=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,r){function l(){if(N>z)return r(null,y);n.start(null,
370 +null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();q=2;B()}function B(){if(q<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++q,a.util.setImmediate(B);y+=N<z?E:E.substr(0,A);++N;l()}"function"===typeof h&&(r=h,h=null);if(g&&!a.disableNativeCode&&e.pbkdf2&&(null===h||"object"!==typeof h)&&(4<e.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),r?4===e.pbkdf2Sync.length?e.pbkdf2(b,
371 +c,d,k,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):e.pbkdf2(b,c,d,k,h,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):4===e.pbkdf2Sync.length?e.pbkdf2Sync(b,c,d,k).toString("binary"):e.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
372 +if(r)return r(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,n=a.hmac.create();n.start(h,b);var y="",E,O,H;if(!r){for(var N=1;N<=z;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var q=2;q<=d;++q)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;y+=N<z?E:E.substr(0,A)}return y}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
373 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
374 +"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,g=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(g=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
375 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function e(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var g=
376 +a.util.createBuffer();if(c)for(;g.length()<b;){var h=Math.max(1,Math.min(b-g.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)g.putInt32(k[h])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(g.length()<b)for(c=Math.floor(65536*Math.random());g.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
377 +g.putByte(String.fromCharCode(k&255));return g.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),r=0;32>r;++r)h[r]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function g(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(g)});l=e(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=r(e(k.key,h(k.seed)));k.seed=y(e(k.key,k.seed));
378 +a.util.setImmediate(g)}if(!d)return k.generateSync(b);var e=k.plugin.cipher,h=k.plugin.increment,r=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;g()};k.generateSync=function(b){var c=k.plugin.cipher,g=k.plugin.increment,e=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var r=a.util.createBuffer();r.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
379 +k.seed);k.generated+=y.length;r.putBytes(y);k.key=e(c(k.key,g(k.seed)));k.seed=h(c(k.key,k.seed))}return r.getBytes(b)};g?(k.seedFile=function(a,b){g.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return g.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,e(a))}catch(c){b(c)}},k.seedFileSync=e);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
380 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
381 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<g.length;++q)g[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
382 -0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},g=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
383 -b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,g,!1);l.putInt32(g[0]);l.putInt32(g[1]);l.putInt32(g[2]);l.putInt32(g[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
384 -process.versions.node,h=null;if("undefined"!==typeof window){var r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(h=function(a){return r.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
385 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<g.length;++q)g[q](c);
386 -return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
381 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var r=0;r<e.length;++r)e[r](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
382 +0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
383 +b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
384 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
385 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var r=0;r<e.length;++r)e[r](c);
386 +return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
387 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,
388 -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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
389 -1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var g=function(b,c,g){var k=!1,h=null,q=null,l=null,n,x,A,y,v=[];b=a.rc2.expandKey(b,c);for(A=0;64>A;A++)v.push(b.getInt16Le());g?(n=function(a){for(A=0;4>A;A++){a[A]+=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);var b=a[A],c=d[A];a[A]=b<<c&65535|(b&65535)>>16-c;y++}},x=function(a){for(A=0;4>A;A++)a[A]+=v[a[(A+3)%4]&63]}):(n=function(a){for(A=3;0<=A;A--){var b=a[A],c=d[A];a[A]=
390 -(b&65535)>>c|b<<16-c&65535;a[A]-=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);y--}},x=function(a){for(A=3;0<=A;A--)a[A]-=v[a[(A+3)%4]&63]});var z=null;return z={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();q=c||new a.util.createBuffer;l=b;z.output=q},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(A=0;4>A;A++){var c=h.getInt16Le();null!==l&&(g?c^=l.getInt16Le():l.putInt16Le(c));
391 -b.push(c&65535)}y=g?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(A=0;4>A;A++)null!==l&&(g?l.putInt16Le(b[A]):b[A]^=l.getInt16Le()),q.putInt16Le(b[A])}},finish:function(a){var b=!0;if(g)if(a)b=a(8,h,!g);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,z.update());!g&&(b=0===h.length())&&(a?b=a(8,q,!g):(a=q.length(),c=q.at(a-1),c>a?b=!1:q.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
392 -a.rc2.createEncryptionCipher=function(a,b){return g(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return g(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
393 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
394 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function g(a,b,c,d,e,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+e;e=Math.floor(h/67108864);c.data[d++]=h&67108863}return e}function l(a,b,c,d,e,p){var g=b&32767;for(b>>=15;0<=--p;){var h=this.data[a]&32767,z=this.data[a++]>>15,k=b*h+z*g,h=g*h+((k&32767)<<15)+c.data[d]+(e&1073741823);e=(h>>>30)+(k>>>15)+b*z+(e>>>30);c.data[d++]=h&1073741823}return e}function n(a,b,
395 -c,d,e,g){var p=b&16383;for(b>>=14;0<=--g;){var h=this.data[a]&16383,z=this.data[a++]>>14,k=b*h+z*p,h=p*h+((k&16383)<<14)+c.data[d]+e;e=(h>>28)+(k>>14)+b*z;c.data[d++]=h&268435455}return e}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function r(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
396 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function A(a,b){return a^b}function y(a,b){return a&~b}function R(){}function z(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
397 -navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=g,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],u;H=48;for(u=0;9>=u;++u)N[H++]=u;H=97;for(u=10;36>u;++u)N[H++]=u;H=65;for(u=10;36>u;++u)N[H++]=u;r.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};r.prototype.revert=function(a){return a};r.prototype.reduce=
398 -function(a){a.divRemTo(this.m,null,a)};r.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};r.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
388 +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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var g=b,e=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=e;128>n;n++)g.putByte(c[g.at(n-
389 +1)+g.at(n-e)&255]);g.setAt(128-l,c[g.at(128-l)&h]);for(n=127-l;0<=n;n--)g.setAt(n,c[g.at(n+1)^g.at(n+l)]);return g};var e=function(b,c,e){var k=!1,h=null,r=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
390 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();r=c||new a.util.createBuffer;l=b;y.output=r},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
391 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),r.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,r,!e):(a=r.length(),c=r.at(a-1),c>a?b=!1:r.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
392 +a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
393 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
394 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,g,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+g;g=Math.floor(h/67108864);c.data[d++]=h&67108863}return g}function l(a,b,c,d,g,e){var p=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,y=this.data[a++]>>15,k=b*h+y*p,h=p*h+((k&32767)<<15)+c.data[d]+(g&1073741823);g=(h>>>30)+(k>>>15)+b*y+(g>>>30);c.data[d++]=h&1073741823}return g}function n(a,b,
395 +c,d,g,e){var p=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,y=this.data[a++]>>14,k=b*h+y*p,h=p*h+((k&16383)<<14)+c.data[d]+g;g=(h>>28)+(k>>14)+b*y;c.data[d++]=h&268435455}return g}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
396 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
397 +navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=e,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],q;H=48;for(q=0;9>=q;++q)N[H++]=q;H=97;for(q=10;36>q;++q)N[H++]=q;H=65;for(q=10;36>q;++q)N[H++]=q;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
398 +function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
399 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
400 -c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var e=a.length,p=!1,g=0;0<=--e;){var h=8==d?a[e]&255:m(a,e);0>h?"-"==a.charAt(e)&&(p=!0):(p=!1,0==g?this.data[this.t++]=h:g+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-g)-1)<<g,this.data[this.t++]=
401 -h>>this.DB-g):this.data[this.t-1]|=h<<g,g+=d,g>=this.DB&&(g-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<g&&(this.data[this.t-1]|=(1<<this.DB-g)-1<<g));this.clamp();p&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
402 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,e=(1<<d)-1,g=Math.floor(a/this.DB),p=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+g+1]=this.data[h]>>d|p,p=(this.data[h]&e)<<c;for(h=g-1;0<=h;--h)b.data[h]=0;b.data[g]=p;b.t=this.t+g+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,e=this.DB-d,g=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var p=
403 -c+1;p<this.t;++p)b.data[p-c-1]|=(this.data[p]&g)<<e,b.data[p-c]=this.data[p]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&g)<<e);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
404 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),e=a.abs(),g=d.t;for(b.t=g+e.t;0<=--g;)b.data[g]=0;for(g=0;g<e.t;++g)b.data[g+d.t]=d.am(0,e.data[g],b,g,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
405 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,g){var p=a.abs();if(!(0>=p.t)){var z=this.abs();if(z.t<p.t)null!=b&&b.fromInt(0),null!=g&&this.copyTo(g);else{null==g&&(g=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),z.lShiftTo(l,g)):(p.copyTo(k),z.copyTo(g));p=k.t;z=k.data[p-1];if(0!=z){var E=z*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),u=this.FV/E,E=(1<<this.F1)/E,y=1<<this.F2,r=g.t,x=r-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=g.compareTo(w)&&
406 -(g.data[g.t++]=1,g.subTo(w,g));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=g.data[--r]==z?this.DM:Math.floor(g.data[r]*u+(g.data[r-1]+y)*E);if((g.data[r]+=k.am(0,O,g,x,0,p))<O)for(k.dlShiftTo(x,w),g.subTo(w,g);g.data[r]<--O;)g.subTo(w,g)}null!=b&&(g.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));g.t=p;g.clamp();0<l&&g.rShiftTo(l,g);0>m&&c.ZERO.subTo(g,g)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
407 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var g=d(),p=d(),z=b.convert(this),k=h(a)-1;for(z.copyTo(g);0<=--k;)if(b.sqrTo(g,p),0<(a&1<<k))b.mulTo(p,z,g);else var m=g,g=p,p=m;return b.revert(g)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
400 +c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var g=a.length,e=!1,p=0;0<=--g;){var h=8==d?a[g]&255:m(a,g);0>h?"-"==a.charAt(g)&&(e=!0):(e=!1,0==p?this.data[this.t++]=h:p+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-p)-1)<<p,this.data[this.t++]=
401 +h>>this.DB-p):this.data[this.t-1]|=h<<p,p+=d,p>=this.DB&&(p-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<p&&(this.data[this.t-1]|=(1<<this.DB-p)-1<<p));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
402 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,g=(1<<d)-1,p=Math.floor(a/this.DB),e=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+p+1]=this.data[h]>>d|e,e=(this.data[h]&g)<<c;for(h=p-1;0<=h;--h)b.data[h]=0;b.data[p]=e;b.t=this.t+p+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,g=this.DB-d,p=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var e=
403 +c+1;e<this.t;++e)b.data[e-c-1]|=(this.data[e]&p)<<g,b.data[e-c]=this.data[e]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&p)<<g);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,g=Math.min(a.t,this.t);c<g;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
404 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),g=a.abs(),e=d.t;for(b.t=e+g.t;0<=--e;)b.data[e]=0;for(e=0;e<g.t;++e)b.data[e+d.t]=d.am(0,g.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
405 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,e){var p=a.abs();if(!(0>=p.t)){var y=this.abs();if(y.t<p.t)null!=b&&b.fromInt(0),null!=e&&this.copyTo(e);else{null==e&&(e=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),y.lShiftTo(l,e)):(p.copyTo(k),y.copyTo(e));p=k.t;y=k.data[p-1];if(0!=y){var E=y*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),q=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=e.t,x=u-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=e.compareTo(w)&&
406 +(e.data[e.t++]=1,e.subTo(w,e));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=e.data[--u]==y?this.DM:Math.floor(e.data[u]*q+(e.data[u-1]+A)*E);if((e.data[u]+=k.am(0,O,e,x,0,p))<O)for(k.dlShiftTo(x,w),e.subTo(w,e);e.data[u]<--O;)e.subTo(w,e)}null!=b&&(e.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));e.t=p;e.clamp();0<l&&e.rShiftTo(l,e);0>m&&c.ZERO.subTo(e,e)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
407 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var e=d(),p=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(e);0<=--k;)if(b.sqrTo(e,p),0<(a&1<<k))b.mulTo(p,y,e);else var l=e,e=p,p=l;return b.revert(e)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
408 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 b=(1<<a)-1,c,d=!1,e="",g=this.t,p=this.DB-g*this.DB%a;if(0<g--)for(p<this.DB&&0<(c=this.data[g]>>p)&&(d=!0,e="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=g;)p<a?(c=(this.data[g]&(1<<p)-1)<<a-p,c|=this.data[--g]>>(p+=this.DB-a)):(c=this.data[g]>>(p-=a)&b,0>=p&&(p+=this.DB,--g)),0<c&&(d=!0),d&&(e+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?e:"0"};c.prototype.negate=function(){var a=
409 d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
410 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new r(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=z;R.prototype.revert=z;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
410 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
411 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)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var T=[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,
412 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],P=67108864/T[T.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
413 -b),c=k(b),g=d(),p=d(),h="";for(this.divRemTo(c,g,p);0<g.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,g.divRemTo(c,g,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,z=0;z<a.length;++z){var k=m(a,z);0>k?"-"==a.charAt(z)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
413 +b),c=k(b),e=d(),p=d(),h="";for(this.divRemTo(c,e,p);0<e.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,e.divRemTo(c,e,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
414 this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var e=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<e?d[0]&(1<<e)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,e,g=Math.min(a.t,this.t);for(d=
415 0;d<g;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){e=a.s&this.DM;for(d=g;d<this.t;++d)c.data[d]=b(this.data[d],e);c.t=this.t}else{e=this.s&this.DM;for(d=g;d<a.t;++d)c.data[d]=b(e,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
416 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
417 0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var e;for(e=c.t-this.t;d<e;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(e=Math.min(a.t,b);d<e;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
418 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var z=1;z++<d&&0!=
418 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var y=1;y++<d&&0!=
419 p.compareTo(b);)if(p=p.modPowInt(2,this),0==p.compareTo(c.ONE))return!1;if(0!=p.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.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]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
420 function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,e=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[e++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==e&&
421 -(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,A,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
422 -y,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
421 +(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
422 +A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
423 0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,e=0;0!=d;)d&=d-1,++e;a+=e}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
424 -y)};c.prototype.flipBit=function(a){return this.changeBit(a,A)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
425 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),g,p=k(1),z;if(0>=c)return p;g=18>c?1:48>c?3:144>c?4:768>c?5:6;z=8>c?new r(b):b.isEven()?new E(b):new v(b);var m=[],l=3,q=g-1,u=(1<<g)-1;m[1]=z.convert(this);if(1<g)for(c=d(),z.sqrTo(m[1],c);l<=u;)m[l]=d(),z.mulTo(c,m[l-2],m[l]),l+=2;for(var y=a.t-1,x,w=!0,O=d(),c=h(a.data[y])-1;0<=y;){c>=q?x=a.data[y]>>c-q&u:(x=(a.data[y]&(1<<c+1)-1)<<q-c,0<y&&(x|=a.data[y-1]>>this.DB+c-q));for(l=g;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--y);
426 -if(w)m[x].copyTo(p),w=!1;else{for(;1<l;)z.sqrTo(p,O),z.sqrTo(O,p),l-=2;0<l?z.sqrTo(p,O):(l=p,p=O,O=l);z.mulTo(O,m[x],p)}for(;0<=y&&0==(a.data[y]&1<<c);)z.sqrTo(p,O),l=p,p=O,O=l,0>--c&&(c=this.DB-1,--y)}return z.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),g=k(1),p=k(0),h=k(0),z=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(g.isEven()&&p.isEven()||(g.addTo(this,g),p.subTo(a,p)),g.rShiftTo(1,
427 -g)):p.isEven()||p.subTo(a,p),p.rShiftTo(1,p);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&z.isEven()||(h.addTo(this,h),z.subTo(a,z)),h.rShiftTo(1,h)):z.isEven()||z.subTo(a,z),z.rShiftTo(1,z);0<=d.compareTo(e)?(d.subTo(e,d),b&&g.subTo(h,g),p.subTo(z,p)):(e.subTo(d,e),b&&h.subTo(g,h),z.subTo(p,z))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=z.compareTo(a))return z.subtract(a);if(0>z.signum())z.addTo(a,z);else return z;return 0>z.signum()?z.add(a):z};c.prototype.pow=function(a){return this.exp(a,
424 +A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
425 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),e,p=k(1),y;if(0>=c)return p;e=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var l=[],m=3,r=e-1,q=(1<<e)-1;l[1]=y.convert(this);if(1<e)for(c=d(),y.sqrTo(l[1],c);m<=q;)l[m]=d(),y.mulTo(c,l[m-2],l[m]),m+=2;for(var A=a.t-1,x,w=!0,O=d(),c=h(a.data[A])-1;0<=A;){c>=r?x=a.data[A]>>c-r&q:(x=(a.data[A]&(1<<c+1)-1)<<r-c,0<A&&(x|=a.data[A-1]>>this.DB+c-r));for(m=e;0==(x&1);)x>>=1,--m;0>(c-=m)&&(c+=this.DB,--A);
426 +if(w)l[x].copyTo(p),w=!1;else{for(;1<m;)y.sqrTo(p,O),y.sqrTo(O,p),m-=2;0<m?y.sqrTo(p,O):(m=p,p=O,O=m);y.mulTo(O,l[x],p)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(p,O),m=p,p=O,O=m,0>--c&&(c=this.DB-1,--A)}return y.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),p=k(1),g=k(0),h=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(p.isEven()&&g.isEven()||(p.addTo(this,p),g.subTo(a,g)),p.rShiftTo(1,
427 +p)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&y.isEven()||(h.addTo(this,h),y.subTo(a,y)),h.rShiftTo(1,h)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(e)?(d.subTo(e,d),b&&p.subTo(h,p),g.subTo(y,g)):(e.subTo(d,e),b&&h.subTo(p,h),y.subTo(g,y))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
428 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
429 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
430 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<g.length;++l)g[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
429 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
430 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<e.length;++l)e[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
431 0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var l=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+l);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
432 v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
433 v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
434 2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
435 -0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs1}},
436 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?g(a,b,p,h):d(a,b,p,h)}function d(b,c,g,k){var m=l(b,c),z=0,q=n(m.bitLength());"millerRabinTests"in
437 -g&&(q=g.millerRabinTests);var r=10;"maxBlockTime"in g&&(r=g.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(q))return k(null,m);m.dAddOffset(h[z++%8],0)}while(0>r||+new Date-v<r);a.util.setImmediate(function(){d(b,c,g,k)})}function g(b,c,h,m){function q(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}z.bitLength()>b&&(z=l(b,c));h=z.toString(16);e.target.postMessage({hex:h,workLoad:r});
438 -z.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var z=l(b,c),E=h.workers,r=h.workLoad||100,n=30*r/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;q()});q()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(r).byteValue(),0);return c}
439 -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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],r=new k(null);r.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
440 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
441 -0;l<g.length;++l)g[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
435 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
436 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?e(a,b,p,h):d(a,b,p,h)}function d(b,c,e,k){var m=l(b,c),y=0,r=n(m.bitLength());"millerRabinTests"in
437 +e&&(r=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(r))return k(null,m);m.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,m){function r(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}y.bitLength()>b&&(y=l(b,c));h=y.toString(16);e.target.postMessage({hex:h,workLoad:u});
438 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;r()});r()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
439 +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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
440 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
441 +0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
442 Error("Message is too long for PKCS#1 v1.5 padding."),g.length=b.length,g.max=d-11,g;g.putByte(0);g.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var h=0;h<d;++h)g.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),h=0;h<d;++h)e=l.charCodeAt(h),0===e?++k:g.putByte(e);d=k}g.putByte(0);g.putBytes(b);return g}function d(b,c,e,g){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var h=b.getByte(),k=b.getByte();if(0!==h||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
443 -typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function g(b,c,d){function e(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
444 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var g=b.p;b.p=b.q;b.q=g}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,e()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,e()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
445 -(g=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,g,b.p,b.q,g.mod(b.p1),g.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);e()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
446 -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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,r=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
443 +typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
444 +b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,r,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
445 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var r={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(r.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
446 +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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
447 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},B={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
448 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
449 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
450 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},A=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
451 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},y=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
450 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
451 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
452 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
453 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
454 -b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,g,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
455 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,g).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,g):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
454 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
455 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,e):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
456 c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:g,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},g=+new Date,p,k=0;null===a.keys&&
457 -(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(r[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
457 +(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
458 null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(p=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,p,a.p,a.q,
459 p.mod(a.p1),p.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});p=+new Date;k+=p-g;g=p}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
460 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var e=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(e,0),e.keys;g(e,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,g){var l={n:b,e:g,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
460 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var g=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(g,0),g.keys;e(g,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
461 b,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+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
462 -l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,g,k,l,m,q,r){var x={n:b,e:c,d:g,p:k,q:l,dP:m,dQ:q,qInv:r,decrypt:function(b,c,g){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,g)}};else if(-1!==["RAW","NONE",
463 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:y},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
462 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,l,m,r,u){var x={n:b,e:c,d:e,p:k,q:l,dP:m,dQ:r,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
463 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
464 [k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,B,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
465 -c.errors=d,c;var e,g,l,q,y,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();y=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
466 -16),new m(e,16),new m(g,16),new m(l,16),new m(q,16),new m(y,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
467 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,A,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
465 +c.errors=d,c;var e,g,l,r,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();r=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
466 +16),new m(e,16),new m(g,16),new m(l,16),new m(r,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
467 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
468 c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
469 -!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||
470 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<g.length;++l)g[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
471 -b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var g=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encryptionOid"},
472 -{name:"AlgorithmIdentifier.parameters",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
473 -tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:g.Class.UNIVERSAL,
474 -type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"salt"},
475 -{name:"pkcs-12PbeParams.iterations",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var e=a.random.getBytesSync(d.saltSize),h=d.count,k=g.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var z,q;switch(d.algorithm){case "aes128":z=m=16;d=n["aes128-CBC"];q=a.aes.createEncryptionCipher;break;case "aes192":m=24;
476 -z=16;d=n["aes192-CBC"];q=a.aes.createEncryptionCipher;break;case "aes256":m=32;z=16;d=n["aes256-CBC"];q=a.aes.createEncryptionCipher;break;case "des":z=m=8;d=n.desCBC;q=a.des.createEncryptionCipher;break;default:throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;}var v=a.pkcs5.pbkdf2(c,e,h,m);c=a.random.getBytesSync(z);h=q(v);h.start(c);h.update(g.toDer(b));h.finish();b=h.output.getBytes();e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,
477 -g.Type.OID,!1,g.oidToDer(n.pkcs5PBES2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n.pkcs5PBKDF2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(d).getBytes()),g.create(g.Class.UNIVERSAL,
478 -g.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(e),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(g.toDer(b)),h.finish(),b=h.output.getBytes(),e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,
479 -!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]);else throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[e,g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,e={},h=[];if(!g.validate(b,m,e,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=g.derToOid(e.encryptionOid);
480 -h=l.pbe.getCipher(h,e.encryptionParams,c);e=a.util.createBuffer(e.encryptedData);h.update(e);h.finish()&&(d=g.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:g.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
481 -b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return g.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var e,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
482 -h=24;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
483 -e.substr(0,8),h);c=k(c);c.start(e);c.update(g.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(e).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,e=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==e.type&&"PRIVATE KEY"!==e.type&&"RSA PRIVATE KEY"!==e.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".'),
484 -d.headerType=d,d;if(e.procType&&"ENCRYPTED"===e.procType.type){var h,k;switch(e.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
485 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+e.dekInfo.algorithm+'".'),d.algorithm=e.dekInfo.algorithm,d;}var m=a.util.hexToBytes(e.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(e.body));if(k.finish())d=k.output.getBytes();else return d}else d=
486 -e.body;d="ENCRYPTED PRIVATE KEY"===e.type?l.decryptPrivateKeyInfo(g.fromDer(d),c):g.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,q=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var u=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,q);
487 -var C=q*Math.ceil(u/q);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%u));C=q*Math.ceil(b/q);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<q;l++)D.putByte(C.at(l%m));var Y=Math.ceil(u/q)+Math.ceil(b/q),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(q)),
469 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
470 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
471 +b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
472 +{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"}]},k={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",
473 +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,
474 +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"}]}]},h={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"},
475 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var g=a.random.getBytesSync(d.saltSize),h=d.count,k=e.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,r;switch(d.algorithm){case "aes128":y=m=16;d=n["aes128-CBC"];r=a.aes.createEncryptionCipher;break;case "aes192":m=24;
476 +y=16;d=n["aes192-CBC"];r=a.aes.createEncryptionCipher;break;case "aes256":m=32;y=16;d=n["aes256-CBC"];r=a.aes.createEncryptionCipher;break;case "des":y=m=8;d=n.desCBC;r=a.des.createEncryptionCipher;break;default:throw g=Error("Cannot encrypt private key. Unknown encryption algorithm."),g.algorithm=d.algorithm,g;}var v=a.pkcs5.pbkdf2(c,g,h,m);c=a.random.getBytesSync(y);h=r(v);h.start(c);h.update(e.toDer(b));h.finish();b=h.output.getBytes();g=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
477 +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,
478 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(g),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(e.toDer(b)),h.finish(),b=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,
479 +!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,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,g={},h=[];if(!e.validate(b,m,g,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=e.derToOid(g.encryptionOid);
480 +h=l.pbe.getCipher(h,g.encryptionParams,c);g=a.util.createBuffer(g.encryptedData);h.update(g);h.finish()&&(d=e.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
481 +b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var g,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
482 +h=24;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
483 +g.substr(0,8),h);c=k(c);c.start(g);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(g).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,g=a.pem.decode(b)[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".'),
484 +d.headerType=d,d;if(g.procType&&"ENCRYPTED"===g.procType.type){var h,k;switch(g.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
485 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+g.dekInfo.algorithm+'".'),d.algorithm=g.dekInfo.algorithm,d;}var m=a.util.hexToBytes(g.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(g.body));if(k.finish())d=k.output.getBytes();else return d}else d=
486 +g.body;d="ENCRYPTED PRIVATE KEY"===g.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,r=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var q=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,r);
487 +var C=r*Math.ceil(q/r);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%q));C=r*Math.ceil(b/r);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<r;l++)D.putByte(C.at(l%m));var Y=Math.ceil(q/r)+Math.ceil(b/r),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(r)),
488 V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);L.putBuffer(ea)}v=L;n.putBuffer(C)}n.truncate(n.length()-g);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
489 -"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var e={};b=[];if(!g.validate(c,k,e,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=g.derToOid(e.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=g.derToOid(e.encOid);if(b!==l.oids["aes128-CBC"]&&
490 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=e.kdfSalt;var m=a.util.createBuffer(e.kdfIterationCount),m=m.getInt(m.length()<<3),q;switch(l.oids[b]){case "aes128-CBC":q=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":q=24;h=a.aes.createDecryptionCipher;break;
491 -case "aes256-CBC":q=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":q=24;h=a.des.createDecryptionCipher;break;case "desCBC":q=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,q);e=e.encIv;h=h(b);h.start(e);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var e={},k=[];if(!g.validate(c,h,e,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(e.salt),e=a.util.createBuffer(e.iterations),
492 -e=e.getInt(e.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,e,m);d=l.pbe.generatePkcs12Key(d,k,2,e,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
493 -typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
494 -0;l<g.length;++l)g[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
495 -a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var g={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
489 +"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var g={};b=[];if(!e.validate(c,k,g,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=e.derToOid(g.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=e.derToOid(g.encOid);if(b!==l.oids["aes128-CBC"]&&
490 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=g.kdfSalt;var m=a.util.createBuffer(g.kdfIterationCount),m=m.getInt(m.length()<<3),r;switch(l.oids[b]){case "aes128-CBC":r=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":r=24;h=a.aes.createDecryptionCipher;break;
491 +case "aes256-CBC":r=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":r=24;h=a.des.createDecryptionCipher;break;case "desCBC":r=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,r);g=g.encIv;h=h(b);h.start(g);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
492 +g=g.getInt(g.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,g,m);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
493 +typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
494 +0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
495 +a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
496 tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",
497 -tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(g)};d.encryptedDataValidator={name:"EncryptedData",
498 -tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(g)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
497 +tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(e)};d.encryptedDataValidator={name:"EncryptedData",
498 +tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(e)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
499 captureAsn1:"digestAlgorithms"},a,{name:"SignedData.Certificates",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,capture:"signerInfos",optional:!0,value:[{name:"SignerInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:c.Class.UNIVERSAL,
500 type:c.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
501 value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,
502 constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]}]}]};d.recipientInfoValidator={name:"RecipientInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,
503 constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
504 -value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
505 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
506 -["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var g=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());g.putBuffer(b.digest())}g.truncate(g.length()-d);return g.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
507 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
508 -Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
509 -{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
510 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,g=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,x=Math.ceil(v/8),A=b.digest().getBytes();
511 -if(x<g+m+2)throw Error("Message is too long to encrypt.");var y;y=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(A);n.putBytes(y);c.start();c.update(n.getBytes());A=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-g-2);n.putByte(1);n.putBytes(y);var R=n.getBytes(),z=x-g-1,E=d.generate(A,z);y="";for(n=0;n<z;n++)y+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;y=String.fromCharCode(y.charCodeAt(0)&~v)+y.substr(1);
512 -return y+A+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<g+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-g-1,v=k.substr(0,n);k=k.substr(n,g);var y=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&y))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),z="";for(q=0;q<n;q++)z+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
513 -z=String.fromCharCode(z.charCodeAt(0)&~y)+z.substr(1);l=l-g-m-2;for(q=0;q<l;q++)if(0!==z.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==z.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=z.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,
514 -module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
504 +value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
505 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
506 +["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var e=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());e.putBuffer(b.digest())}e.truncate(e.length()-d);return e.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
507 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
508 +Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
509 +{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
510 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,r){var n,v=r-1,x=Math.ceil(v/8),z=b.digest().getBytes();
511 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
512 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var r;r=l-1;l=Math.ceil(r/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-r&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(r=0;r<n;r++)y+=String.fromCharCode(v.charCodeAt(r)^R.charCodeAt(r));
513 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(r=0;r<l;r++)if(0!==y.charCodeAt(r))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
514 +module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
515 ["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
516 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function g(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
517 -v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===r.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
516 +var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
517 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
518 typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
519 (e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
520 -"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in r?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
520 +"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
521 d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
522 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
523 -d.extension=b,d;return b}function n(a,b){switch(a){case r["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
523 +d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
524 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
525 !1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
526 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},r=h.oids,v={};v.CN=r.commonName;v.commonName="CN";v.C=r.countryName;v.countryName="C";v.L=r.localityName;v.localityName="L";v.ST=r.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=r.organizationName;v.organizationName="O";v.OU=r.organizationalUnitName;v.organizationalUnitName="OU";v.E=r.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
526 +h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
527 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
528 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
529 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
530 {name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},B,{name:"Certificate.TBSCertificate.issuerUniqueID",
531 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
532 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
533 -{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},A={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
533 +{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
534 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
535 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
536 -tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},y={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
536 +tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
537 tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},B,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
538 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
539 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in r&&(g.name=r[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
540 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in r&&(p.name=r[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===r.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==r["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:r.sha1},mgf:{algorithmOid:r.mgf1,hash:{algorithmOid:r.sha1}},
541 -saltLength:20});c={};a=[];if(!k.validate(b,A,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
539 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
540 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
541 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
542 b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
543 return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
544 body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
545 break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
546 c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
547 -null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){g([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){g(a);
548 -b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){g(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
549 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
550 -e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in r)switch(r[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
551 -e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case r.sha1WithRSAEncryption:l=void 0;break;case r["RSASSA-PSS"]:d=r[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=r[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
552 -e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=r[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
553 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=r.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
554 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,x,e,l))throw e=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),e.errors=l,e;if("string"!==typeof e.certSignature){for(var l="\x00",m=0;m<e.certSignature.length;++m)l+=k.toDer(e.certSignature[m]).getBytes();e.certSignature=l}var l=k.derToOid(e.publicKeyOid),y=h.createCertificate();y.version=e.certVersion?e.certVersion.charCodeAt(0):
555 -0;m=a.util.createBuffer(e.certSerialNumber);y.serialNumber=m.toHex();y.signatureOid=a.asn1.derToOid(e.certSignatureOid);y.signatureParameters=R(y.signatureOid,e.certSignatureParams,!0);y.siginfo.algorithmOid=a.asn1.derToOid(e.certinfoSignatureOid);y.siginfo.parameters=R(y.siginfo.algorithmOid,e.certinfoSignatureParams,!1);m=a.util.createBuffer(e.certSignature);++m.read;y.signature=m.getBytes();m=[];void 0!==e.certValidity1UTCTime&&m.push(k.utcTimeToDate(e.certValidity1UTCTime));void 0!==e.certValidity2GeneralizedTime&&
556 -m.push(k.generalizedTimeToDate(e.certValidity2GeneralizedTime));void 0!==e.certValidity3UTCTime&&m.push(k.utcTimeToDate(e.certValidity3UTCTime));void 0!==e.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(e.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
557 -y.validity.notBefore=m[0];y.validity.notAfter=m[1];y.tbsCertificate=e.tbsCertificate;if(d){y.md=null;if(y.signatureOid in r)switch(l=r[y.signatureOid],l){case "sha1WithRSAEncryption":y.md=a.md.sha1.create();break;case "md5WithRSAEncryption":y.md=a.md.md5.create();break;case "sha256WithRSAEncryption":y.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":y.md=a.md.sha512.create();break;case "RSASSA-PSS":y.md=a.md.sha256.create()}if(null===y.md)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
558 -e.signatureOid=y.signatureOid,e;m=k.toDer(y.tbsCertificate);y.md.update(m.getBytes())}m=a.md.sha1.create();y.issuer.getField=function(a){return c(y.issuer,a)};y.issuer.addField=function(a){g([a]);y.issuer.attributes.push(a)};y.issuer.attributes=h.RDNAttributesAsArray(e.certIssuer,m);e.certIssuerUniqueId&&(y.issuer.uniqueId=e.certIssuerUniqueId);y.issuer.hash=m.digest().toHex();m=a.md.sha1.create();y.subject.getField=function(a){return c(y.subject,a)};y.subject.addField=function(a){g([a]);y.subject.attributes.push(a)};
559 -y.subject.attributes=h.RDNAttributesAsArray(e.certSubject,m);e.certSubjectUniqueId&&(y.subject.uniqueId=e.certSubjectUniqueId);y.subject.hash=m.digest().toHex();y.extensions=e.certExtensions?h.certificateExtensionsFromAsn1(e.certExtensions):[];l===h.oids.rsaEncryption&&(y.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo));return y};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
560 -return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in r)if(c.name=r[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
547 +null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
548 +b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
549 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
550 +e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
551 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
552 +e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
553 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
554 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),q=h.createCertificate();q.version=g.certVersion?g.certVersion.charCodeAt(0):
555 +0;m=a.util.createBuffer(g.certSerialNumber);q.serialNumber=m.toHex();q.signatureOid=a.asn1.derToOid(g.certSignatureOid);q.signatureParameters=R(q.signatureOid,g.certSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;q.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
556 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
557 +q.validity.notBefore=m[0];q.validity.notAfter=m[1];q.tbsCertificate=g.tbsCertificate;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===q.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
558 +g.signatureOid=q.signatureOid,g;m=k.toDer(q.tbsCertificate);q.md.update(m.getBytes())}m=a.md.sha1.create();q.issuer.getField=function(a){return c(q.issuer,a)};q.issuer.addField=function(a){e([a]);q.issuer.attributes.push(a)};q.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(q.issuer.uniqueId=g.certIssuerUniqueId);q.issuer.hash=m.digest().toHex();m=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};
559 +q.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(q.subject.uniqueId=g.certSubjectUniqueId);q.subject.hash=m.digest().toHex();q.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return q};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
560 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
561 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
562 -k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in r?c[r[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
563 -g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,y,e,l))throw e=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),e.errors=l,e;if("string"!==typeof e.csrSignature){for(var l=
564 -"\x00",m=0;m<e.csrSignature.length;++m)l+=k.toDer(e.csrSignature[m]).getBytes();e.csrSignature=l}l=k.derToOid(e.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var u=h.createCertificationRequest();u.version=e.csrVersion?e.csrVersion.charCodeAt(0):0;u.signatureOid=a.asn1.derToOid(e.csrSignatureOid);u.signatureParameters=R(u.signatureOid,e.csrSignatureParams,!0);u.siginfo.algorithmOid=a.asn1.derToOid(e.csrSignatureOid);u.siginfo.parameters=R(u.siginfo.algorithmOid,
565 -e.csrSignatureParams,!1);l=a.util.createBuffer(e.csrSignature);++l.read;u.signature=l.getBytes();u.certificationRequestInfo=e.certificationRequestInfo;if(d){u.md=null;if(u.signatureOid in r)switch(l=r[u.signatureOid],l){case "sha1WithRSAEncryption":u.md=a.md.sha1.create();break;case "md5WithRSAEncryption":u.md=a.md.md5.create();break;case "sha256WithRSAEncryption":u.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":u.md=a.md.sha512.create();break;case "RSASSA-PSS":u.md=a.md.sha256.create()}if(null===
566 -u.md)throw e=Error("Could not compute certification request digest. Unknown signature OID."),e.signatureOid=u.signatureOid,e;l=k.toDer(u.certificationRequestInfo);u.md.update(l.getBytes())}l=a.md.sha1.create();u.subject.getField=function(a){return c(u.subject,a)};u.subject.addField=function(a){g([a]);u.subject.attributes.push(a)};u.subject.attributes=h.RDNAttributesAsArray(e.certificationRequestInfoSubject,l);u.subject.hash=l.digest().toHex();u.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo);
567 -u.getAttribute=function(a){return c(u,a)};u.addAttribute=function(a){g([a]);u.attributes.push(a)};u.attributes=h.CRIAttributesAsArray(e.certificationRequestInfoAttributes||[]);return u};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
568 -null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){g([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){g(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){g(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
569 -e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in r)switch(r[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
570 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case r["RSASSA-PSS"]:c=r[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=r[b.signatureParameters.mgf.algorithmOid];
571 -if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=r[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
562 +k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
563 +g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
564 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var q=h.createCertificationRequest();q.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;q.signatureOid=a.asn1.derToOid(g.csrSignatureOid);q.signatureParameters=R(q.signatureOid,g.csrSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,
565 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;q.signature=l.getBytes();q.certificationRequestInfo=g.certificationRequestInfo;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===
566 +q.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=q.signatureOid,g;l=k.toDer(q.certificationRequestInfo);q.md.update(l.getBytes())}l=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};q.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);q.subject.hash=l.digest().toHex();q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
567 +q.getAttribute=function(a){return c(q,a)};q.addAttribute=function(a){e([a]);q.attributes.push(a)};q.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return q};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
568 +null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
569 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
570 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
571 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
572 h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
573 k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
574 !1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
575 return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
576 return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
577 -h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return g.certs[b.hash]||
578 -null}var g={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in g.certs?(c=g.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):g.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
579 -for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)g.addCertificate(b[l]);return g};h.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"};
580 -h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var q=c.shift(),y=null,r=!1;if(g<q.validity.notBefore||g>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:g};if(null===k){y=c[0]||b.getIssuer(q);null===y&&q.isIssuer(q)&&(r=!0,y=q);if(y){var n=y;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){y=n.shift();
581 -try{x=y.verify(q)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||y&&!r||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&y&&!q.isIssuer(y)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<q.extensions.length;++x){var w=q.extensions[x];!w.critical||w.name in n||(k=
582 -{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||y&&!r)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
583 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
584 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
585 -c.defined.x509=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
586 -[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function g(b,c,h,q){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
587 -for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],r,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},u=null,u=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(u.tagClass!==m.Class.UNIVERSAL||u.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");u=d(u).value;break;case k.oids.encryptedData:var A=q,x={},B=[];if(!m.validate(u,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
588 -b.errors=B,b;u=m.derToOid(x.contentType);if(u!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=u,b;u=m.derToOid(x.encAlgorithm);u=k.pbe.getCipher(u,x.encParameter,A);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);u.update(x);if(!u.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");u=u.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
589 -l(u,h,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var q,r,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
590 -k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:q=A;r=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
591 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(x,q,g,h))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=h,a;r()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
592 -a.pkcs12||{},r={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
593 -r,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
577 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
578 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
579 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.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"};
580 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var r=c.shift(),A=null,u=!1;if(g<r.validity.notBefore||g>r.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:r.validity.notBefore,notAfter:r.validity.notAfter,now:g};if(null===k){A=c[0]||b.getIssuer(r);null===A&&r.isIssuer(r)&&(u=!0,A=r);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
581 +try{x=A.verify(r)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(r)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&A&&!r.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<r.extensions.length;++x){var w=r.extensions[x];!w.critical||w.name in n||(k=
582 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=r.getExtension("basicConstraints"),r=r.getExtension("keyUsage"),null!==r&&(r.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
583 +null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==r&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));r=null===k?!0:k.error;l=d?d(r,m,e):r;if(!0===l)k=null;else{!0===r&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
584 +if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
585 +c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
586 +[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,r){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
587 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},q=null,q=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(q.tagClass!==m.Class.UNIVERSAL||q.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");q=d(q).value;break;case k.oids.encryptedData:var z=r,x={},B=[];if(!m.validate(q,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
588 +b.errors=B,b;q=m.derToOid(x.contentType);if(q!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=q,b;q=m.derToOid(x.encAlgorithm);q=k.pbe.getCipher(q,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);q.update(x);if(!q.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");q=q.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
589 +l(q,h,r);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var r,u,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
590 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:r=z;u=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
591 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==r&&!m.validate(x,r,g,h))throw a=Error("Cannot read PKCS#12 "+r.name),a.errors=h,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
592 +a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
593 +u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
594 tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},B={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
595 value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
596 -capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},A={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
597 -h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var r={};if(!m.validate(b,v,r,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:r.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
598 -(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==r.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=r.version.charCodeAt(0),l;if(m.derToOid(r.contentType)!==k.oids.data)throw l=
599 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(r.contentType),l;b=r.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(r.mac){var w=null,A=0,u=m.derToOid(r.macAlgorithm);switch(u){case k.oids.sha1:w=a.md.sha1.create();A=20;break;case k.oids.sha256:w=a.md.sha256.create();A=32;break;case k.oids.sha384:w=a.md.sha384.create();A=48;break;case k.oids.sha512:w=a.md.sha512.create();
600 -A=64;break;case k.oids.md5:w=a.md.md5.create(),A=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+u);var u=new a.util.ByteBuffer(r.macSalt),B="macIterations"in r?parseInt(a.util.bytesToHex(r.macIterations),16):1,A=h.generateKey(n,u,3,B,A,w),u=a.hmac.create();u.start(w,A);u.update(b.value);if(u.getMac().getBytes()!==r.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}g(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
601 -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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(q)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);q=[];null!==
602 -g&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
603 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));g=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],n=0;n<q.length;++n){c=q[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
604 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
596 +capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
597 +h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
598 +(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
599 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var w=null,z=0,q=m.derToOid(u.macAlgorithm);switch(q){case k.oids.sha1:w=a.md.sha1.create();z=20;break;case k.oids.sha256:w=a.md.sha256.create();z=32;break;case k.oids.sha384:w=a.md.sha384.create();z=48;break;case k.oids.sha512:w=a.md.sha512.create();
600 +z=64;break;case k.oids.md5:w=a.md.md5.create(),z=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+q);var q=new a.util.ByteBuffer(u.macSalt),B="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,z=h.generateKey(n,q,3,B,z,w),q=a.hmac.create();q.start(w,z);q.update(b.value);if(q.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
601 +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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var r=a.util.isArray(c)?c[0]:c;"string"===typeof r&&(r=k.certificateFromPem(r));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(r)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);r=[];null!==
602 +g&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
603 +0<r.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,r));g=[];r=[];null!==c&&(r=a.util.isArray(c)?c:[c]);for(var u=[],n=0;n<r.length;++n){c=r[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
604 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);u.push(c)}0<u.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,u),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
605 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
606 [m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var v;e.useMac&&(g=a.md.sha1.create(),v=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,v,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),v=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
607 !0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,v.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
608 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
609 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
610 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var g=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
611 -g.headerType=b.type;throw g;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,g){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:g})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
612 -typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
608 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
609 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
610 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
611 +e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
612 +typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
613 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var g=a.util.createBuffer(),h=b.length>>1,l=h+(b.length&1),k=b.substr(0,l),l=b.substr(h,l);b=a.util.createBuffer();h=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);h.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
614 -for(var q=0;q<m;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
615 -a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},g=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
614 +for(var r=0;r<m;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(r=0;r<c;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
615 +a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
616 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
617 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
618 certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};m.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};m.CipherSuites={};m.getCipherSuite=function(a){var b=null,c;for(c in m.CipherSuites){var d=m.CipherSuites[c];if(d.id[0]===a.charCodeAt(0)&&d.id[1]===a.charCodeAt(1)){b=d;break}}return b};
@@ -623,41 +623,41 @@ send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protoco
623 b.session.compressionMethod=g?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.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,
624 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
625 (a.expect=B,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
626 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:z,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
626 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
627 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
628 !1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
629 -l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:z:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:z)):b.error(b,{message:e?"No server certificate provided.":
630 -"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=r;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
629 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
630 +"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
631 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
632 try{var g=b.session.sp;g.pre_master_secret=d.decrypt(c);var h=b.session.clientHelloVersion;if(h.major!==g.pre_master_secret.charCodeAt(0)||h.minor!==g.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){g.pre_master_secret=a.random.getBytes(48)}b.expect=O;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
633 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
634 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(g){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=O;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
635 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
636 -return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=y;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
636 +return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
637 data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=B;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
638 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:H;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var g=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
639 e.putBuffer(b.session.sha1.digest());var h=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,h?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(g);b.session.sha1.update(g);if(b.session.resuming&&h||!b.session.resuming&&!h)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
640 -data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?A:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
640 +data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?z:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
641 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
642 "Bad certificate.";break;case m.Alert.Description.unsupported_certificate:d="Unsupported certificate.";break;case m.Alert.Description.certificate_revoked:d="Certificate revoked.";break;case m.Alert.Description.certificate_expired:d="Certificate expired.";break;case m.Alert.Description.certificate_unknown:d="Certificate unknown.";break;case m.Alert.Description.illegal_parameter:d="Illegal parameter.";break;case m.Alert.Description.unknown_ca:d="Unknown certificate authority.";break;case m.Alert.Description.access_denied:d=
643 "Access denied.";break;case m.Alert.Description.decode_error:d="Decode error.";break;case m.Alert.Description.decrypt_error:d="Decrypt error.";break;case m.Alert.Description.export_restriction:d="Export restriction.";break;case m.Alert.Description.protocol_version:d="Unsupported protocol version.";break;case m.Alert.Description.insufficient_security:d="Insufficient security.";break;case m.Alert.Description.internal_error:d="Internal error.";break;case m.Alert.Description.user_canceled:d="User canceled.";
644 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt24();if(g>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var h=d.bytes(g+
645 4);d.read+=4;e in J[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(h),b.session.sha1.update(h)),J[b.entity][b.expect][e](b,c,g)):
646 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt16(),d=d.getBytes(g);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||g>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
647 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,r=3,v=4,B=5,x=6,A=7,y=8,R=1,z=2,E=3,O=4,H=5,N=6,u=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];ea[m.ConnectionEnd.server]=[[u,P,F,u,L],[u,
648 -P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[u,u,m.handleServerHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,P,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,L,u,u,u,u,u,u],
649 -[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];J[m.ConnectionEnd.server]=[[u,m.handleClientHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,P,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleClientKeyExchange,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleCertificateVerify,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,
650 -u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
647 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,B=5,x=6,z=7,A=8,R=1,y=2,E=3,O=4,H=5,N=6,q=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];ea[m.ConnectionEnd.server]=[[q,P,F,q,L],[q,
648 +P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[q,q,m.handleServerHello,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,P,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,L,q,q,q,q,q,q],
649 +[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q]];J[m.ConnectionEnd.server]=[[q,m.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,P,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.handleClientKeyExchange,q,q,q,q],[q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,m.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,
650 +q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[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]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
651 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};g&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
652 cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
653 a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
654 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=g;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
654 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
655 }return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
656 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
657 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
656 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var r=a.util.createBuffer();
657 +n(r,2,k);n(l,2,r);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
658 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var g=
659 -null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(q.bytes(),!1));
660 -var y=a.util.createBuffer();n(y,3,q);e.putBuffer(y)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
659 +null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var r=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(r.bytes(),!1));
660 +var u=a.util.createBuffer();n(u,3,r);e.putBuffer(u)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(q){return b.error(b,{message:"Could not send certificate list.",cause:q,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
661 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
662 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(g){b.error(b,{message:"Could not get private key.",cause:g,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
663 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var g=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(g))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -679,199 +679,199 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_versio
679 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_message}})),c.record.ready=!0));c=b}if(!h.fail&&null!==h.record&&h.record.ready)if(b=h.record,d=b.type-m.ContentType.change_cipher_spec,e=ea[h.entity][h.expect],d in e)e[d](h,b);else m.handleUnexpected(h,b)}return c};h.prepare=function(b){m.queue(h,m.createRecord(h,{type:m.ContentType.application_data,data:a.util.createBuffer(b)}));return m.flush(h)};h.prepareHeartbeatRequest=function(b,c){b instanceof a.util.ByteBuffer&&
680 (b=b.bytes());"undefined"===typeof c&&(c=b.length);h.expectedHeartbeatPayload=b;m.queue(h,m.createRecord(h,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_request,b,c)}));return m.flush(h)};h.close=function(a){if(!h.fail&&h.sessionCache&&h.session){var b={id:h.session.id,version:h.session.version,sp:h.session.sp};b.sp.keys=null;h.sessionCache.setSession(b.id,b)}if(h.open){h.open=!1;h.input.clear();if(h.isConnected||h.handshaking)h.isConnected=h.handshaking=!1,
681 m.queue(h,m.createAlert(h,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(h);h.closed(h)}h.reset(a)};return h};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
682 -return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<g.length;++l)g[l](c);return c.tls}},
683 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,g,l){g=g.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
684 -g?l.keys.server_write_key:l.keys.client_write_key),iv:g?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",g?l.keys.client_write_key:l.keys.server_write_key),iv:g?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var e=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
685 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(g)&&(b.fragment=k.output,b.length=b.fragment.length(),e=!0);return e}function g(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
686 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,q=a.random.getBytesSync(g),y=e.output.length();y>=g?(b.fragment=e.output.getBytes(y-g),q=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
687 -b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;y=a.hmac.create();y.start("SHA1",e);y.update(q);q=y.digest().getBytes();y.start(null,null);y.update(g);g=y.digest().getBytes();return q===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
682 +return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
683 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
684 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
685 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
686 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,r=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),r=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
687 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(r);r=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return r===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
688 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
689 -20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<g.length;++l)g[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
690 -typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
691 -a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
692 -function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<g.length;++l)g[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
693 -(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<q;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var g=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(g.getBytesSync(h)),
694 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));h-=q.length;0<h&&(q=a.util.fillString(String.fromCharCode(0),h)+q);h=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:h,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
695 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<g.length;++l)g[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
696 -"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],g=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var g=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):g<=c[m.level].index&&
689 +20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
690 +typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
691 +a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
692 +function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
693 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,r=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<r;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),r;do r=(new d(a.util.bytesToHex(e.getBytesSync(h)),
694 +16)).mod(c.n);while(r.equals(d.ZERO));r=a.util.hexToBytes(r.toString(16));h-=r.length;0<h&&(r=a.util.fillString(String.fromCharCode(0),h)+r);h=c.encrypt(r,"NONE");r=b.generate(r,l);return{encapsulation:h,key:r}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
695 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
696 +"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
697 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
698 a.log.logMessage({timestamp:new Date,level:b,category:c,message:d,arguments:e})}})(n[l]);a.log.makeLogger=function(b){b={flags:0,f:b};a.log.setLevel(b,"none");return b};a.log.setLevel=function(b,c){var d=!1;if(b&&!(b.flags&a.log.LEVEL_LOCKED))for(var e=0;e<a.log.levels.length;++e)if(c==a.log.levels[e]){b.level=c;d=!0;break}return d};a.log.lock=function(b,c){b.flags="undefined"===typeof c||c?b.flags|a.log.LEVEL_LOCKED:b.flags&~a.log.LEVEL_LOCKED};a.log.addLogger=function(a){d.push(a)};if("undefined"!==
699 -typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},g=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else g=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};g=a.log.makeLogger(g);a.log.setLevel(g,"debug");a.log.addLogger(g)}else console={log:function(){}};
700 -null!==g&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(g,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(g));a.log.consoleLogger=g}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
701 -c.defined.log=!0;for(var l=0;l<g.length;++l)g[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!r.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
702 -b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:r.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
703 -r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.encryptedContent.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]),r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function g(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
704 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.digestAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(r.create(r.Class.UNIVERSAL,
705 -r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.signatureAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]));c.value.push(r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=r.create(r.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
706 -r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?r.utcTimeToDate(e):r.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?r.create(r.Class.UNIVERSAL,r.Type.UTCTIME,!1,r.dateToUtcTime(e)):
707 -r.create(r.Class.UNIVERSAL,r.Type.GENERALIZEDTIME,!1,r.dateToGeneralizedTime(e))}return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[c])])}function m(b){return[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,
708 -r.Type.OCTETSTRING,!1,b.parameter.getBytes())]),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!r.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(r.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
709 -0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:r.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
699 +typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},e=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else e=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};e=a.log.makeLogger(e);a.log.setLevel(e,"debug");a.log.addLogger(e)}else console={log:function(){}};
700 +null!==e&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(e,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(e));a.log.consoleLogger=e}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
701 +c.defined.log=!0;for(var l=0;l<e.length;++l)e[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!u.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
702 +b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:u.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
703 +u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.encryptedContent.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]),u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function e(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
704 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.digestAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(u.create(u.Class.UNIVERSAL,
705 +u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.signatureAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]));c.value.push(u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=u.create(u.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
706 +u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?u.utcTimeToDate(e):u.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?u.create(u.Class.UNIVERSAL,u.Type.UTCTIME,!1,u.dateToUtcTime(e)):
707 +u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
708 +u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
709 +0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
710 c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
711 -break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var r=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
712 -b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=r.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:r.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!r.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=r.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
711 +break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
712 +b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
713 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
714 -c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
715 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.signerInfos));return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),
714 +c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
715 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
716 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
717 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
718 -signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(r.create(r.Class.CONTEXT_SPECIFIC,
719 -0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(g).getBytes()),r.create(r.Class.UNIVERSAL,
720 -r.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=r.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=r.toDer(d);h.getByte();r.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
721 -}else{e.authenticatedAttributesAsn1=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=r.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
717 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var r=c[m];if(!l&&r.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&r.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
718 +signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
719 +0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
720 +u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
721 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var r=e.authenticatedAttributes[m];r.type===a.pki.oids.messageDigest?r.value=c[e.digestAlgorithm].digest():r.type!==a.pki.oids.signingTime||r.value||(r.value=k);h.value.push(n(r));e.authenticatedAttributesAsn1.value.push(n(r))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
722 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
723 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,
724 -!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,g(b.recipients)),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
723 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
724 +!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
725 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
726 }h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
727 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
728 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
729 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
730 -Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function g(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
731 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=g(w.bytes()),b.truncate(b.length()-
732 -x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(g("\x00\x00\x00\x00",l)),x.putBuffer(g("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=g("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
733 -h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,g){g=g||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+g};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
734 -function(b,g){g=g||{};var l=g.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===g.encoding)return l=l.toHex(),g.delimiter?l.match(/.{2}/g).join(g.delimiter):l;if("binary"===g.encoding)return l.getBytes();if(g.encoding)throw Error('Unknown encoding "'+g.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
735 -(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<g.length;++l)g[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
736 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var g={};a.debug.set("forge.task","queues",g);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
729 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
730 +Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
731 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
732 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
733 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
734 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
735 +(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
736 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
737 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
738 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
739 -this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",g)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
739 +this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
740 (c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
741 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
742 this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
743 a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
744 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in g?0===g[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):g[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(g[b.type].shift(),0===g[b.type].length?delete g[b.type]:g[b.type][0].start()):a.log.error("forge.task",
745 -"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in g?g[a.type].push(b):(g[b.type]=[b],m(b))};a.task.cancel=function(a){a in g&&(g[a]=[g[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
746 -a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<g.length;++l)g[l](c);return c.task}},
747 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
748 -return}var g,v=function(a,b){b.exports=function(b){var c=g.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){g="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
744 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
745 +"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
746 +a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
747 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
748 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
749 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});
750 -function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var g=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),g=g.substring(0,g.length-24),v=0;v<c.length;v++)if(g===c[v].DERKey||g==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
751 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),g=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(g,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
752 -var e=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,e,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,g){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,g)}
753 -function amtcert_createCertificate(b,c,a,d,g){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
754 -value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==g?g={name:"extKeyUsage",serverAuth:!0}:g.name="extKeyUsage",
755 -n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},g,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
756 -function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,g=b.length;d<g;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
750 +function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),e=e.substring(0,e.length-24),v=0;v<c.length;v++)if(e===c[v].DERKey||e==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
751 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),r=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(r).getBytes();
752 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
753 +function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
754 +value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
755 +n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
756 +function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,e=b.length;d<e;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
757 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
758 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
759 -require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var g="";a.on("data",function(a){null!=g&&(g+=a.toString("binary"));5E5<g.length&&(g=null)});a.on("end",function(){certUrlCache[b]={data:btoa(g),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,g)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
760 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,e,k,m,q){var r=a[b++];q={};var u=0,B=0;if(0==r){if(2==h.bpp)for(e=0;e<m;e++)n(a[b++]+(a[b++]<<8),e);else for(e=0;e<m;e++)v(a[b++],e);g(h.spare,c,d)}else if(1==r)h.graymode?(r=a[b++],h.lowcolor&&(r<<=4),h.canvas.fillStyle="rgb("+r+","+r+","+r+")"):(r=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(r&224)+","+((r&28)<<3)+","+D((r&3)<<6):(r>>8&248)+","+(r>>3&252)+","+
761 -((r&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,e,k);else if(1<r&&17>r){k=4;B=15;if(2==h.bpp){for(e=0;e<r;e++)q[e]=a[b++]+(a[b++]<<8);2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)n(q[r>>e&B],u++)}else{for(e=0;e<r;e++)q[e]=a[b++];2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)v(q[r>>e&B],u++)}g(h.spare,c,d)}else if(128==r){if(2==h.bpp)for(;u<m&&b<a.byteLength;){r=a[b++]+(a[b++]<<8);B=1;do B+=e=a[b++];while(255==e);if(0==
762 -h.rotation)p(r,u,B),u+=B;else for(;0<=--B;)n(r,u++)}else for(;u<m&&b<a.byteLength;){r=a[b++];B=1;do B+=e=a[b++];while(255==e);if(0==h.rotation)l(r,u,B),u+=B;else for(;0<=--B;)v(r,u++)}g(h.spare,c,d)}else if(129<r){if(2==h.bpp)for(e=0;e<r-128;e++)q[e]=a[b++]+(a[b++]<<8);else for(e=0;e<r-128;e++)q[e]=a[b++];for(;u<m&&b<a.byteLength;){B=1;e=a[b++];r=q[e%128];if(127<e){do B+=e=a[b++];while(255==e)}if(0==h.rotation)2==h.bpp?p(r,u,B):l(r,u,B),u+=B;else if(2==h.bpp)for(;0<=--B;)n(r,u++);else for(;0<=--B;)v(r,
763 -u++)}g(h.spare,c,d)}}function g(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
759 +require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
760 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,r){var u=a[b++];r={};var q=0,B=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
761 +((u&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;B=15;if(2==h.bpp){for(g=0;g<u;g++)r[g]=a[b++]+(a[b++]<<8);2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(r[u>>g&B],q++)}else{for(g=0;g<u;g++)r[g]=a[b++];2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(r[u>>g&B],q++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;q<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);B=1;do B+=g=a[b++];while(255==g);if(0==
762 +h.rotation)p(u,q,B),q+=B;else for(;0<=--B;)n(u,q++)}else for(;q<m&&b<a.byteLength;){u=a[b++];B=1;do B+=g=a[b++];while(255==g);if(0==h.rotation)l(u,q,B),q+=B;else for(;0<=--B;)v(u,q++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)r[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)r[g]=a[b++];for(;q<m&&b<a.byteLength;){B=1;g=a[b++];u=r[g%128];if(127<g){do B+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?p(u,q,B):l(u,q,B),q+=B;else if(2==h.bpp)for(;0<=--B;)n(u,q++);else for(;0<=--B;)v(u,
763 +q++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
764 h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
765 b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
766 -1]=e,h.spare.data[b+2]=a,b+=4}function q(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function e(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
767 -2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):r[c.code];
768 -null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
769 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
770 -0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
771 -h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var e=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)e=12,h.state=1,h.parent&&delete h.parent.connectTime,
772 -h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)e=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){e=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;e=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
766 +1]=e,h.spare.data[b+2]=a,b+=4}function r(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
767 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];null!=c&&h.sendkey(c,
768 +a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);173==c&&(d=45);186==c&&
769 +(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=0;h.spareh2=0;
770 +h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=h.rwidth=
771 +h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
772 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
773 h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
774 0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
775 -50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);e=4;break;case 2:e=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)e=0;else if(b=l.getUint32(4)+8,c.byteLength<b)e=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
775 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
776 0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
777 -h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}e=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),e=l.getUint16(4),q=l.getUint16(6),p=e*q,r=l.getUint32(8);if(17>r){if(1>e||64<e||1>q||
778 -64<q)return console.log("Invalid tile size ("+e+","+q+"), disconnecting."),h.Stop();if(h.sparew!=e||h.spareh!=q){h.sparew=h.sparew2=e;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=e;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==r){h.canvas.canvas.width=h.rwidth=h.width=e;h.canvas.canvas.height=h.rheight=
779 -h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));e=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==r){r=12;e=12+p*h.bpp;if(h.acc.byteLength<e)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(r,!0),w),r+=2;else for(w=0;w<p;w++)v(h.acc[r++],w);g(h.spare,b,c)}else if(16==r){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
780 -16+w)break;r=16;if(5<w&&0==h.acc[r]&&l.getUint16(r+1,!0)==w-5)d(h.acc,r+5,b,c,e,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(r,r+w-0)))),0<l.length){for(var r=l,N=new Uint8Array(r.length),u=0,C=r.length;u<C;++u)N[u]=r.charCodeAt(u);d(N,0,b,c,e,q,p,l.length)}else console.log("Invalid deflate data");e=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==e)break;h.acc=e!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(e)):
777 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),r=l.getUint16(6),p=g*r,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>r||
778 +64<r)return console.log("Invalid tile size ("+g+","+r+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=r){h.sparew=h.sparew2=g;h.spareh=h.spareh2=r;if(1==h.rotation||3==h.rotation)h.sparew2=r,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
779 +h.height=r;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
780 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,r,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,N=new Uint8Array(u.length),q=0,C=u.length;q<C;++q)N[q]=u.charCodeAt(q);d(N,0,b,c,g,r,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
781 null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
782 function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
783 -h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,C(0,0),w(0,0));h.width=h.canvas.canvas.width;
784 -h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var r={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
784 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
785 NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
786 F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
787 h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
788 h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var K=!1,B=!1;h.GrabMouseInput=function(){if(1!=K){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;K=!0}};h.UnGrabMouseInput=function(){if(0!=K){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;K=!1}};h.GrabKeyInput=function(){1!=B&&(document.onkeyup=
789 h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,B=!0)};h.UnGrabKeyInput=function(){0!=B&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,B=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
790 0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){h.ReverseMouseWheel&&(b*=-1);var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/
791 -Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,g=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-g[0])*d;h.my=(event.pageY-g[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=q(h.mx,h.my),h.my=e(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
791 +Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=r(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
792 h.mNagleTimer=null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=
793 -0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;
794 -a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,g="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?g:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");
795 -a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&
796 -a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var g=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<g&&0!=a.State)for(a.PendingOperations.push([g,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];
797 -if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&
798 -255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),g=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),n=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,n,b,e,g,n,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);
799 -a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();
800 -if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,e=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,
801 -4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),e=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+
802 -q+" Y="+e);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,e);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,e);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,
803 -4));break;case 11:c=0;q={};e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<e)for(c=((b.charCodeAt(6+2*e)&255)<<8)+(b.charCodeAt(7+2*e)&255),n=0;n<e;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,
804 -4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);g=v[b];d&&(a.CanvasId.style.cursor=g)}return w+D}}};a.MouseButton=
805 -{NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,
806 -Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?
807 -d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,
808 -a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,
809 -67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,g;for(g in a.TouchArray)g==b?e=c:1==a.TouchArray[g].f?(e=65542,a.TouchArray[g].f=3):e=2==a.TouchArray[g].f?262144:131078,d+=String.fromCharCode(g)+a.intToStr(e)+a.shortToStr(a.TouchArray[g].x)+a.shortToStr(a.TouchArray[g].y),2==a.TouchArray[g].f&&
810 -delete a.TouchArray[g];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,g=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-g[0])*e,d=(c.pageY-
811 -g[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var n=g=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?g=a.MouseButton.LEFT:2==c.which?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT:c.button&&(0==c.button?g=a.MouseButton.LEFT:1==c.button?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?n=-120*c.detail:c.wheelDelta&&(n=3*c.wheelDelta));var v="",v=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,
812 -a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,n/256&255,n&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?g:2*g&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(v),a.Alternate=1):a.Alternate=0:a.send(v)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",
813 -b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,
814 -a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&
815 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&
816 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&
817 -(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&
818 -a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};
819 -a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,g=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]=
820 -{x:e,y:g});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
821 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<
822 -b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/
823 -a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=
824 -a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
825 -null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=
826 -null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;
827 -if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||
828 -3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,
829 -0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};
830 -a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;
831 -d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var g=new FileReader,v=!1,n=[];g.readAsBinaryString?g.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:g.readAsBinaryString(new Blob([n.shift()]))}:g.readAsArrayBuffer&&(g.onloadend=function(a){d.xxOnSocketData(a.target.result);
832 -0==n.length?v=!1:g.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(g.readAsBinaryString)v=!0,g.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,g.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=
833 -function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=
834 -a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");
835 -d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(u[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<
836 -b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){y[m][D]=a;A[m][D]=(e<<6)+(C<<12)+q}function g(){for(var a=(e<<6)+(C<<12)+q,b=D;b<l.width;b++)y[m][b]=" ",A[m][b]=a}function v(a){for(var b=(e<<6)+(C<<12)+q,c=0;c<l.width;c++)y[a][c]=" ",A[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)y[b]=y[b+a],A[b]=A[b+a];for(b=E[1]-a+1;b<=
837 -E[1];b++)for(y[b]=[],A[b]=[],a=0;a<l.width;a++)y[b][a]=" ",A[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,e=7,C=0,w=!0,D=0,m=0,k=0,h=0,r=0,K=[],B=0,x=0,A=[],y=[],R=!1,z=!0,E,O=!1,H=[],
838 -N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){y[c]=[];A[c]=[];for(var d=0;d<l.width;d++)y[c][d]=" ",A[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=
839 -decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(r){case 0:switch(n){case 27:r=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":r=2;break;case "(":r=4;break;case ")":r=5;break;case "]":r=6;break;case "=":O=!0;r=0;break;case ">":O=!1;r=0;break;case "7":k=D;h=m;r=0;break;case "8":D=k;m=h;r=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var u=0;u<l.width;u++)y[n][u]=y[n-1][u],A[n][u]=A[n-1][u];for(n=
840 -E[0]+1-1;n>E[0]-1;n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;r=0;break;default:console.log("unknown terminal short code",p),r=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,u=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(z=!1);break;case "h":25==n[0]&&(z=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==u&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==
841 -u&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==u&&(0==n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==u&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==u&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==u&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==u&&(p=n[0]);for(J=D;J<l.width-p;J++)y[m][J]=y[m][J+p],A[m][J]=A[m][J+p];for(J=l.width-p;J<l.width;J++)y[m][J]=" ",A[m][J]=448;break;case "L":J=1;1==u&&(J=n[0]);0==J&&(J=1);
842 -for(n=E[1];n>=m+J;n--)y[n]=y[n-J],A[n]=A[n-J];for(n=m;n<m+J;n++)for(y[n]=[],A[n]=[],p=0;p<l.width;p++)y[n][p]=" ",A[n][p]=448;break;case "J":if(1==u&&2==n[0])l.TermClear((C<<12)+(e<<6)),m=D=0,H=[];else if(0==u||1==u&&0==n[0])for(g(),J=m+1;J<l.height;J++)v(J);else if(1==u&&1==n[0])for(g(),J=0;J<m-1;J++)v(J);break;case "H":2==u?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<u;J++)n[J]&&0!=n[J]?1==n[J]?
843 -8>e&&(e+=8):2==n[J]||22==n[J]?8<=e&&(e-=8):7==n[J]?q=2:27==n[J]?q=0:30<=n[J]&&37>=n[J]?(p=8<=e,e=n[J]-30,p&&8>=e&&(e+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?e=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,e=7,q=0);break;case "K":if(0!=u&&(1!=u||n[0]&&0!=n[0])){if(1==u)if(1==n[0])for(n=(e<<6)+(C<<12)+q,u=0;u<D;u++)y[m][u]=" ",A[m][u]=n;else 2==n[0]&&v(m)}else g();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==u&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-
844 -1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=E[1]);break;case "S":p=1;1==u&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "M":p=1;1==u&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "T":p=1;1==u&&(p=n[0]);for(n=E[1];n>E[0]+
845 -p;n--)for(u=0;u<l.width;u++)y[n][u]=y[n-p][u],A[n][u]=A[n-p][u];for(n=E[0]+p;n>E[0];n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "X":p=1;J=D;R=m;for(1==u&&(p=n[0]);0<p&&R<l.height;)y[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}r=0}break;case 4:r=0;break;case 5:r=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(u=parseInt(n[0]),(0==u||2==u)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,
846 -l.title=n[1]);r=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var u=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
847 -9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,
848 -9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)y[b][c]=" ",A[b][c]=a;H=[]};l.TermResetScreen=function(){q=0;e=7;C=0;w=z=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);
849 -N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};
850 -l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,
851 -79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,
852 -91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;
853 -var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
854 -a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=A[b][h],D==h&&m==b&&z&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=y[b][h],d){case "&":a+="&amp;";
793 +0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=
794 +700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
795 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
796 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
797 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
798 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
799 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
800 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,r=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
801 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),r=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+r+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
802 +a.ProcessPictureMsg(c,r,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(r,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;r={};g=((b.charCodeAt(4)&255)<<8)+
803 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);r[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,r,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
804 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
805 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
806 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&
807 +7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==
808 +a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&
809 +a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+
810 +a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
811 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
812 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
813 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
814 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
815 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
816 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
817 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
818 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
819 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
820 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
821 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
822 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
823 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
824 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
825 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
826 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
827 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
828 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
829 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
830 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
831 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
832 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
833 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
834 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
835 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(q[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
836 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(C<<12)+r}function e(){for(var a=(g<<6)+(C<<12)+r,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(C<<12)+r,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
837 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),r=0,g=7,C=0,w=!0,D=0,m=0,k=0,h=0,u=0,K=[],B=0,x=0,z=[],A=[],R=!1,y=!0,E,O=!1,H=[],N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
838 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=
839 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":O=!0;u=0;break;case ">":O=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var q=0;q<l.width;q++)A[n][q]=A[n-1][q],z[n][q]=z[n-1][q];for(n=E[0]+1-1;n>E[0]-1;n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;u=0;break;
840 +default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,q=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==q&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==q&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==q&&(0==
841 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==q&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==q&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==q&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==q&&(p=n[0]);for(J=D;J<l.width-p;J++)A[m][J]=A[m][J+p],z[m][J]=z[m][J+p];for(J=l.width-p;J<l.width;J++)A[m][J]=" ",z[m][J]=448;break;case "L":J=1;1==q&&(J=n[0]);0==J&&(J=1);for(n=E[1];n>=m+J;n--)A[n]=A[n-J],z[n]=z[n-J];for(n=m;n<m+J;n++)for(A[n]=[],
842 +z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==q&&2==n[0])l.TermClear((C<<12)+(g<<6)),m=D=0,H=[];else if(0==q||1==q&&0==n[0])for(e(),J=m+1;J<l.height;J++)v(J);else if(1==q&&1==n[0])for(e(),J=0;J<m-1;J++)v(J);break;case "H":2==q?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<q;J++)n[J]&&0!=n[J]?1==n[J]?8>g&&(g+=8):2==n[J]||22==n[J]?8<=g&&(g-=8):7==n[J]?r=2:27==n[J]?r=0:30<=n[J]&&
843 +37>=n[J]?(p=8<=g,g=n[J]-30,p&&8>=g&&(g+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?g=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,g=7,r=0);break;case "K":if(0!=q&&(1!=q||n[0]&&0!=n[0])){if(1==q)if(1==n[0])for(n=(g<<6)+(C<<12)+r,q=0;q<D;q++)A[m][q]=" ",z[m][q]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==q&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
844 +E[1]);break;case "S":p=1;1==q&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "M":p=1;1==q&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "T":p=1;1==q&&(p=n[0]);for(n=E[1];n>E[0]+p;n--)for(q=0;q<l.width;q++)A[n][q]=A[n-p][q],z[n][q]=z[n-p][q];for(n=
845 +E[0]+p;n>E[0];n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "X":p=1;J=D;R=m;for(1==q&&(p=n[0]);0<p&&R<l.height;)A[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(q=parseInt(n[0]),(0==q||2==q)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=
846 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var q=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
847 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
848 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;H=[]};l.TermResetScreen=function(){r=0;g=7;C=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
849 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
850 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
851 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
852 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
853 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
854 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
855 break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<H.length&&(H=H.slice(H.length-800));c=H.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
856 l.Init();return l},ZLIB=ZLIB||{};
857 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
858 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
859 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,x,A,B,D,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=A=1;15>=p;p++)if(A<<=1,A-=M[p],0>A)return-1;if(0<A&&(0==
860 -b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(q=0;q<n;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=r,fa=K,ga=ca=0,U=-1}q=D=0;p=d;S=c;n=w;x=0;W=-1;B=1<<w;I=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[q]<U?G.val=e[q]:e[q]>U?(G.op=fa[ga+e[q]],G.val=Z[ca+e[q]]):G.op=96;A=1<<p-x;d=C=1<<n;do C-=A,m[S+(D>>>x)+C]=G;while(0!=C);for(A=1<<p-1;D&A;)A>>>=1;
861 -0!=A?(D&=A-1,D+=A):D=0;q++;if(0==--M[p]){if(p==v)break;p=g[l+e[q]]}if(p>w&&(D&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(A=1<<n;n+x<v;){A-=M[n+x];if(0>=A)break;n++;A<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=D&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=D&&(m[S+D]={op:64,bits:p-x,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function g(){var a;this.total=this.check=
859 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,r,v,w,x,z,D,B,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(r=0;r<n;r++)M[g[l+r]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
860 +b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(r=0;r<n;r++)0!=g[l+r]&&(e[x[g[l+r]]++]=r);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=u,fa=K,ga=ca=0,U=-1}r=B=0;p=d;S=c;n=w;x=0;W=-1;D=1<<w;I=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[r]<U?G.val=e[r]:e[r]>U?(G.op=fa[ga+e[r]],G.val=Z[ca+e[r]]):G.op=96;z=1<<p-x;d=C=1<<n;do C-=z,m[S+(B>>>x)+C]=G;while(0!=C);for(z=1<<p-1;B&z;)z>>>=1;
861 +0!=z?(B&=z-1,B+=z):B=0;r++;if(0==--M[p]){if(p==v)break;p=g[l+e[r]]}if(p>w&&(B&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(z=1<<n;n+x<v;){z-=M[n+x];if(0>=z)break;n++;z<<=1}D+=1<<n;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:p-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
862 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
863 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function e(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function C(a,b){return a.hold&
864 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
863 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function r(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!r(a))return!1;return!0}function C(a,b){return a.hold&
864 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
865 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
866 -e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new g;ZLIB.inflateReset(b,
867 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,g,h,k,r,u=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);g={};n(a,g);h=g.have;k=g.left;
868 -P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!e(g,16))break a;if(d.wrap&2&&35615==g.hold){d.check=a.checksum_function(0,null,0,0);v(a,g.hold);p(g);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(g,8)<<8)+(g.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(g,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(g,4);u=C(g,4)+8;if(0==d.wbits)d.wbits=u;else if(u>d.wbits){a.msg="invalid window size";d.mode=
869 -29;break}d.dmax=1<<u;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=g.hold&512?9:11;p(g);break;case 1:if(!e(g,16))break a;d.flags=g.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=g.hold>>>8&1);d.flags&512&&v(a,g.hold);p(g);d.mode=2;case 2:if(!e(g,32))break a;null!==d.head&&(d.head.time=g.hold);d.flags&512&&(r=g.hold,a.state.check=a.checksum_function(a.state.check,
870 -[r&255,r>>>8&255,r>>>16&255,r>>>24&255],0,4));p(g);d.mode=3;case 3:if(!e(g,16))break a;null!==d.head&&(d.head.xflags=g.hold&255,d.head.os=g.hold>>>8);d.flags&512&&v(a,g.hold);p(g);d.mode=4;case 4:if(d.flags&1024){if(!e(g,16))break a;d.length=g.hold;null!==d.head&&(d.head.extra_len=g.hold);d.flags&512&&v(a,g.hold);p(g);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(r=d.length,r>g.have&&(r=g.have),r&&(null!==d.head&&null!==d.head.extra&&(u=d.head.extra_len-
871 -d.length,d.head.extra+=a.input_data.substring(g.next,g.next+(u+r>d.head.extra_max?d.head.extra_max-u:r))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r)),g.have-=r,g.next+=r,d.length-=r),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==g.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");r=0;do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=u,d.length++)}while(r<g.have);d.flags&
872 -512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==g.have)break a;r=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=u,d.length++)}while(r<g.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=
873 -r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!e(g,16))break a;if(g.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(g)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!e(g,32))break a;a.adler=d.check=m(g.hold);p(g);d.mode=10;case 10:if(0==d.havedict)return l(g),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
874 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(g);d.mode=26;break}if(!e(g,3))break a;d.last=C(g,1);w(g,1);switch(C(g,2)){case 0:d.mode=13;break;case 1:r=d;u=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
866 +e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
867 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,q=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
868 +P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);q=C(e,4)+8;if(0==d.wbits)d.wbits=q;else if(q>d.wbits){a.msg="invalid window size";d.mode=
869 +29;break}d.dmax=1<<q;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
870 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(q=d.head.extra_len-
871 +d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(q+u>d.head.extra_max?d.head.extra_max-q:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=q,d.length++)}while(u<e.have);d.flags&
872 +512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=q,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
873 +u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
874 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=C(e,1);w(e,1);switch(C(e,2)){case 0:d.mode=13;break;case 1:u=d;q=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
875 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
876 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
877 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -894,28 +894,28 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
894 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
895 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
896 {op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
897 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);r.lencode=0;r.distcode=512;for(u=0;512>u;u++)r.codes[u]=B[u];for(u=0;32>u;u++)r.codes[u+512]=x[u];r.lenbits=9;r.distbits=5;
898 -d.mode=19;if(c==ZLIB.Z_TREES){w(g,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(g,2);break;case 13:D(g);if(!e(g,32))break a;if((g.hold&65535)!=(g.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=g.hold&65535;p(g);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(r=d.length){r>g.have&&(r=g.have);r>g.left&&(r=g.left);if(0==r)break a;a.output_data+=a.input_data.substring(g.next,g.next+r);a.next_out+=r;g.have-=
899 -r;g.next+=r;g.left-=r;d.length-=r;break}d.mode=11;break;case 16:if(!e(g,14))break a;d.nlen=C(g,5)+257;w(g,5);d.ndist=C(g,5)+1;w(g,5);d.ncode=C(g,4)+4;w(g,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!e(g,3))break a;r=C(g,3);d.lens[A[d.have++]]=r;w(g,3)}for(;19>d.have;)d.lens[A[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
900 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(16>r.val)w(g,r.bits),d.lens[d.have++]=r.val;else{if(16==r.val){if(!e(g,r.bits+2))break a;w(g,r.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}u=d.lens[d.have-1];r=3+C(g,2);w(g,2)}else if(17==r.val){if(!e(g,r.bits+3))break a;w(g,r.bits);u=0;r=3+C(g,3);w(g,3)}else{if(!e(g,r.bits+7))break a;w(g,r.bits);u=0;r=11+C(g,7);w(g,7)}if(d.have+r>d.nlen+d.ndist){a.msg=
901 -"invalid bit length repeat";d.mode=29;break}for(;r--;)d.lens[d.have++]=u}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=g.have&&258<=g.left){l(g);r=a;var F=K=u=void 0,Y=void 0,L=void 0,
902 -ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,u=r.state,K=r.input_data,F=r.next_in,Y=F+r.avail_in-5,L=r.next_out,ea=L-(k-r.avail_out),V=L+(r.avail_out-257),J=u.wsize,aa=u.whave,ba=u.wnext,W=u.window,I=u.hold,G=u.bits,S=u.codes,Z=u.lencode,ca=u.distcode,fa=(1<<u.lenbits)-1,ga=(1<<u.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
903 -G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)r.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
904 -u.sane){r.msg="invalid distance too far back";u.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,r.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)r.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);r.output_data+=r.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),X-=3;X&&(r.output_data+=r.output_data.charAt(U++),
905 -1<X&&(r.output_data+=r.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{r.msg="invalid distance code";u.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?u.mode=11:(r.msg="invalid literal/length code",u.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;r.next_in=F;r.next_out=L;r.avail_in=F<Y?5+(Y-F):5-(F-Y);r.avail_out=L<V?257+(V-L):257-(L-V);u.hold=I;u.bits=G;n(a,g);11==d.mode&&(d.back=-1);
906 -break}for(d.back=0;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(r.op&&0==(r.op&240)){for(u=r;;){r=d.codes[d.lencode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;d.length=r.val;if(0==r.op){d.mode=25;break}if(r.op&32){d.back=-1;d.mode=11;break}if(r.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=r.op&15;d.mode=21;case 21:if(d.extra){if(!e(g,d.extra))break a;
907 -d.length+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){r=d.codes[d.distcode+C(g,d.distbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(0==(r.op&240)){for(u=r;;){r=d.codes[d.distcode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;if(r.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=r.val;d.extra=r.op&15;d.mode=23;case 23:if(d.extra){if(!e(g,d.extra))break a;
908 -d.offset+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==g.left)break a;r=k-g.left;if(d.offset>r){r=d.offset-r;if(r>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}r>d.wnext?(r-=d.wnext,u=d.wsize-r):u=d.wnext-r;K=-1;r>d.length&&(r=d.length)}else u=-1,K=a.next_out-d.offset,r=d.length;r>g.left&&(r=g.left);g.left-=r;d.length-=r;if(0<=u)a.output_data+=d.window.substring(u,u+r),a.next_out+=r;else{a.next_out+=r;do a.output_data+=a.output_data.charAt(K++);while(--r)}0==
909 -d.length&&(d.mode=20);break;case 25:if(0==g.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;g.left--;d.mode=20;break;case 26:if(d.wrap){if(!e(g,32))break a;k-=g.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=g.left;if((d.flags?g.hold:m(g.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(g)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!e(g,32))break a;if(g.hold!=(d.total&4294967295)){a.msg="incorrect length check";
910 -d.mode=29;break}p(g)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(g);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))g=a.state,r=a.output_data.length,null===g.window&&(g.window=""),0==g.wsize&&(g.wsize=1<<g.wbits),g.window=r>=g.wsize?a.output_data.substring(r-g.wsize):g.whave+r<g.wsize?g.window+a.output_data:g.window.substring(g.whave-(g.wsize-r))+a.output_data,g.whave=g.window.length,
911 -g.wnext=g.whave<g.wsize?g.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
897 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(q=0;512>q;q++)u.codes[q]=B[q];for(q=0;32>q;q++)u.codes[q+512]=x[q];u.lenbits=9;u.distbits=5;
898 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
899 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=C(e,5)+257;w(e,5);d.ndist=C(e,5)+1;w(e,5);d.ncode=C(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=C(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
900 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}q=d.lens[d.have-1];u=3+C(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);q=0;u=3+C(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);q=0;u=11+C(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
901 +"invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=q}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var F=K=q=void 0,Y=void 0,L=void 0,
902 +ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,q=u.state,K=u.input_data,F=u.next_in,Y=F+u.avail_in-5,L=u.next_out,ea=L-(k-u.avail_out),V=L+(u.avail_out-257),J=q.wsize,aa=q.whave,ba=q.wnext,W=q.window,I=q.hold,G=q.bits,S=q.codes,Z=q.lencode,ca=q.distcode,fa=(1<<q.lenbits)-1,ga=(1<<q.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
903 +G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)u.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
904 +q.sane){u.msg="invalid distance too far back";q.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)u.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);u.output_data+=u.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),X-=3;X&&(u.output_data+=u.output_data.charAt(U++),
905 +1<X&&(u.output_data+=u.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{u.msg="invalid distance code";q.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?q.mode=11:(u.msg="invalid literal/length code",q.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;u.next_in=F;u.next_out=L;u.avail_in=F<Y?5+(Y-F):5-(F-Y);u.avail_out=L<V?257+(V-L):257-(L-V);q.hold=I;q.bits=G;n(a,e);11==d.mode&&(d.back=-1);
906 +break}for(d.back=0;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(u.op&&0==(u.op&240)){for(q=u;;){u=d.codes[d.lencode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
907 +d.length+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+C(e,d.distbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(0==(u.op&240)){for(q=u;;){u=d.codes[d.distcode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
908 +d.offset+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,q=d.wsize-u):q=d.wnext-u;K=-1;u>d.length&&(u=d.length)}else q=-1,K=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=q)a.output_data+=d.window.substring(q,q+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(K++);while(--u)}0==
909 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
910 +d.mode=29;break}p(e)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
911 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
912 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
913 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
914 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
915 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
916 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;a%=65521;n%=65521}return a|n<<16}function c(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b[c],65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),
917 a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b[c++],n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=
918 -a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,g,v){return"string"===typeof d?b(a,d,g,v):c(a,d,g,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
918 +a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,e,v){return"string"===typeof d?b(a,d,e,v):c(a,d,e,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
919 65521);131042<=v&&(v-=131042);65521<=v&&(v-=65521);return c|v<<16}})();"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-crc32.js");
920 (function(){function b(a,b){var c,n=0;for(c=0;b;)b&1&&(c^=a[n]),b>>=1,n++;return c}function c(a,c){var v;for(v=0;32>v;v++)a[v]=b(c,c[v])}var a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,
921 3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,
@@ -924,32 +924,32 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
924 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
925 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
926 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
927 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,g,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^g}})();
928 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),g=b.webkitRequestFileSystem,v=b.requestFileSystem||g||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
929 -b.chrome?c():setTimeout(c,500)},q=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(g){n(g)}}},e=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},C=function(n,m,k){k||(n=e(n));var h=this;k=n.type;var r=!1,w,B,x=function(){q(h,["writestart","progress","write","writeend"])},A=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
930 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(r||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},y=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},z;h.readyState=h.INIT;m||(m="download");if(a)w=
931 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(z=n.slice||n.webkitSlice,n=z.call(n,0,n.size,"application/octet-stream"),r=!0);g&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||g)B=b;v?(l+=n.size,v(b.TEMPORARY,l,y(function(a){a.root.getDirectory("saved",C,y(function(a){var b=function(){a.getFile(m,C,y(function(a){a.createWriter(y(function(b){b.onwriteend=
932 -function(b){B.location.href=a.toURL();h.readyState=h.DONE;q(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&A()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),A)}),A)};a.getFile(m,{create:!1},y(function(a){a.remove();b()}),y(function(a){a.code===a.NOT_FOUND_ERR?b():A()}))}),A)}),A)):A()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
933 -b,c){c||(a=e(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
927 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,r;if(0>=v)return a;p=Array(32);r=Array(32);r[0]=3988292384;for(n=l=1;32>n;n++)r[n]=l,l<<=1;c(p,r);c(r,p);do{c(p,r);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(r,p);v&1&&(a=b(r,a));v>>=1}while(0!=v);return a^e}})();
928 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
929 +b.chrome?c():setTimeout(c,500)},r=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(g){n(g)}}},g=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},C=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){r(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
930 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
931 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",C,A(function(a){var b=function(){a.getFile(m,C,A(function(a){a.createWriter(A(function(b){b.onwriteend=
932 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;r(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
933 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;r(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
934 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
935 -var version="0.9.3",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
935 +var version="0.9.7",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
936 null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Cargando...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetAuth NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
937 StatusStrs=["Desconectado","Conectando ...","Preparar...","Conectado"],t,t2,rsepass=null;
938 -function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
939 -applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
940 -haltEvent,!1);document.addEventListener("dragleave",haltEvent,!1);document.addEventListener("drop",documentFileSelectHandler,!1);Q("p16").addEventListener("dragover",haltEvent,!1);Q("p16").addEventListener("dragleave",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",
941 -p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
938 +function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(23).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
939 +urlvars.kvmenc&&(c=parseInt(urlvars.kvmenc),"number"==typeof c&&(desktopsettings.encflags=c));urlvars.kvmdec&&(c=parseInt(urlvars.kvmdec),"number"==typeof c&&(desktopsettings.decimationMode=c));applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(34).value=terminalEmulations[terminal.m.terminalEmulation];Q(31).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",
940 +haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);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",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);
941 +document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
942 function documentFileSelectHandler(b){haltEvent(b);for(var c=!0,a=0;a<b.dataTransfer.files.length;a++)0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".img")&&0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".iso")&&(c=!1);1==c&&null!=b.dataTransfer&&0<currentView&&100>currentView&&(1==b.dataTransfer.files.length||2==b.dataTransfer.files.length)?(a=c=null,b.dataTransfer.files[0].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[0]),b.dataTransfer.files[0].name.toLowerCase().endsWith(".img")&&
943 (c=b.dataTransfer.files[0]),2==b.dataTransfer.files.length&&(b.dataTransfer.files[1].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[1]),b.dataTransfer.files[1].name.toLowerCase().endsWith(".img")&&(c=b.dataTransfer.files[1])),null==c&&null==a||iderStart3(c,a,1)):null!=b.dataTransfer&&1==b.dataTransfer.files.length&&(c=b.dataTransfer.files[0].name.toLowerCase(),21==currentView&&UploadToStorage(b.dataTransfer.files[0],c))}
944 function connectButtonfunction(){wsstack&&0!=wsstack.socketState?disconnect():meshcentral2credCallback()}function connectButtonfunctionEx(){currentMeshNode=parent.getCurrentNode();connect(currentMeshNode._id,16992,null,null,0);Q("xconnectbutton1").value="Desconectar"}function getCurrentMeshNode(){return currentMeshNode}function setConnectionState(b){QE("xconnectbutton1",b);0==b&&disconnect()}function setFrameHeight(b){}function setAuthCallback(b){meshcentral2credCallback=b}
945 function setUrlVar(b,c){urlvars||(urlvars={});urlvars[b]=c}function cleanup(){c3.value="Iniciar captura";terminal.m.capture&&delete terminal.m.capture;terminal.Stop();desktop.disconnectCode=0;desktop.Stop()}
946 -function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
947 -function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
948 -function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
949 -function connect(b,c,a,d,g,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,g);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(28,"");QH(39,"");amtversion=amtversionmin=amtFirstPull=
950 -0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(21,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(49,"");
951 -QH(50,LoadingHtml);xxCertificates=null;QH(51,LoadingHtml);QH(24,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(52,LoadingHtml);QH(54,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
952 -!1;QH(53,LoadingHtml);QE(43,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(48,!1),Q(48).checked=!0);QE(44,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
946 +function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
947 +function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
948 +function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
949 +function connect(b,c,a,d,e,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,e);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(29,"");QH(40,"");amtversion=amtversionmin=amtFirstPull=
950 +0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(22,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(50,"");
951 +QH(51,LoadingHtml);xxCertificates=null;QH(52,LoadingHtml);QH(25,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(53,LoadingHtml);QH(55,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
952 +!1;QH(54,LoadingHtml);QE(44,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(49,!1),Q(49).checked=!0);QE(45,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
953 function disconnect(){null!=desktopPollTimer&&(clearInterval(desktopPollTimer),desktopPollTimer=null);fullscreen&&deskToggleFull();iderStop();StopDefenseStatsTimer();dialogclose(0);amtstack&&(amtstack.onProcessChanged=null,amtstack.CancelAllQueries(999),amtstack=null);cleanup();wsstack=null;delete amtstack;onProcessChanged(0,1);go(101);Q("xconnectbutton1").value="Conectar";QH(5,"Desconectado");go(100)}
954 function onProcessChanged(b,c){QS(3).width=100*b/c+"%";0==b&&refreshButtons(!0);0==b&&amtstack&&(0<amtversion&&0==(amtFirstPull&64)?(amtFirstPull|=64,PullPowerPolicy(),subscriptionsFilters=null,PullEventSubscriptions(),PullWatchdog(),5<amtversion&&(PullCertificates(),PullRemoteAccess())):0==(amtFirstPull&1)?PullHardware():0==(amtFirstPull&16)?PullEventLog():0==(amtFirstPull&32)&&PullAuditLog())}
955 function checkAmtVersion(b){var c=b.split(".");b=parseInt(c[0]);var a=parseInt(c[1]),c=parseInt(c[2]),c=1E3*a+c,d=0;5>=b||12<=b?d=1:6==b&&2061<=c?d=1:7==b&&1091<=c?d=1:8==b&&1071<=c?d=1:9==b?5>a&&1041<=c?d=1:5061<=c&&(d=1):10==b&&55<=c?d=1:11==b&&(5>a&&25<=c?d=1:6027<=c&&(d=1));return 0==d}
@@ -958,36 +958,37 @@ function processSystemVersion(b,c,a,d){if(200==d||400==d){if(200==d){amtlogicale
958 1==urlvars.sol&&(go(13),connectTerminal())}else errcheck(d,b)}var refreshButtonsState=!0;function refreshButtons(b){if(refreshButtonsState!=b){refreshButtonsState=b;for(var c=0,a=document.getElementsByTagName("input");c<a.length;c++)"refreshbtn"==a[c].name&&(a[c].disabled=!b)}}
959 function PullPowerState(){amtstack&&0==amtstack.GetPendingActions()&&amtsysstate&&amtsysstate.CIM_ServiceAvailableToElement&&amtstack.Enum("CIM_ServiceAvailableToElement",function(b,c,a,d){200==d&&(amtsysstate.CIM_ServiceAvailableToElement.responses=a,9<amtversion&&null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?
960 amtstack.Get("IPS_PowerManagementService",function(a,b,c,d){200==d&&(amtsysstate.IPS_PowerManagementService.response=c.Body,updateSystemStatus())}):updateSystemStatus())})}
961 -function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c=["CIM_ServiceAvailableToElement","*AMT_GeneralSettings","AMT_EthernetPortSettings","*AMT_RedirectionService","CIM_ElementSettingData"];5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");15<amtversion&&1==amtstack.wsman.comm.xtls&&
962 -c.push("*CIM_BootService");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
961 +function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c="CIM_ServiceAvailableToElement *AMT_GeneralSettings AMT_EthernetPortSettings *AMT_RedirectionService CIM_ElementSettingData *AMT_BootCapabilities".split(" ");5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");
962 +15<amtversion&&c.push("*CIM_BootService");2<amtversion&&c.push("*AMT_8021XProfile");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
963 function processSystemStatus(b,c,a,d){if(void 0==a.IPS_ScreenConfigurationService||400==a.IPS_ScreenConfigurationService.status)a.IPS_ScreenConfigurationService=null;if(void 0==a.IPS_KVMRedirectionSettingData||400==a.IPS_KVMRedirectionSettingData.status)a.IPS_KVMRedirectionSettingData=null;if(void 0==a.CIM_KVMRedirectionSAP||400==a.CIM_KVMRedirectionSAP.status)a.CIM_KVMRedirectionSAP=null;if(void 0==a.IPS_OptInService||400==a.IPS_OptInService.status)a.IPS_OptInService=null;void 0!=a.AMT_RedirectionService&&
964 -200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var g in a)null!=a[g]&&a[g].status>d&&(d=a[g].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"Sincronizar reloj",3,syncClockEx,"\u00bfSincronizar el reloj Intel AMT con esta computadora?")}
964 +200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var e in a)null!=a[e]&&a[e].status>d&&(d=a[e].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"Sincronizar reloj",3,syncClockEx,"\u00bfSincronizar el reloj Intel AMT con esta computadora?")}
965 function syncClockEx(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(b,c,a,d){200!=d?messagebox("","Error al establecer la hora, estado ="+d):0!=a.Body.ReturnValue?messagebox("","Error al establecer la hora, error: "+a.Body.ReturnValueStr):(b=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(a.Body.Ta0,b,b,function(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}))})}
966 var DMTFPowerStates=";;Encendido;Sue\u00f1o ligero;Sue\u00f1o profundo;Ciclo de encendido (apagado suave);Apagado: duro;Hibernar (apagado suave);Suave apagado;Ciclo de encendido (apagado);Reinicio del bus principal;Interrupci\u00f3n de diagn\u00f3stico (NMI);No aplica;Apagado: suave y elegante;Apagado: duro y elegante;Reinicio del bus maestro agraciado;Ciclo de encendido (apagado - suave y elegante);Ciclo de encendido (Apagado - Gracioso duro);Interrupci\u00f3n de diagn\u00f3stico (INIT)".split(";");
967 -function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),g="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Desconocido</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Encendido"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
968 -3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", Conectado",", En la bater\u00eda"][v.PowerSource]);d+=TableEntry("Poder",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Ninguna</i>":EscapeHtml(c);d+=TableEntry("Nombre y dominio",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?
967 +function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Desconocido</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Encendido"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
968 +3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(29,n),QH(40,n));v.PowerSource&&(n+=[", Conectado",", En la bater\u00eda"][v.PowerSource]);d+=TableEntry("Poder",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Ninguna</i>":EscapeHtml(c);d+=TableEntry("Nombre y dominio",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?
969 d+=TableEntry("ID del sistema",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("ID del sistema",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" activado en modo de control de administrador (ACM)",4==l.ProvisioningMode&&(n=" activado en modo de control de cliente (CCM)",b=9));d+=TableEntry("Intel&reg; ME",
970 -"v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
971 -q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),e=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),e=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
972 -p&&(g+=", Puerto de redireccionamiento");q&&(g+=", Serie sobre LAN");n&&(g+=", IDE-Redirect");e&&(g+=", KVM");""==g&&(g=" Ninguna");d+=TableEntry("Caracter\u00edsticas activas",addLinkConditional(g.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,g="Pantalla principal",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(g=["Pantalla principal",
973 -"Pantalla secundaria","Tercera pantalla"][n.DefaultScreen]),g='<span title="'+format("La pantalla remota predeterminada es {0}",g.toLowerCase())+'">'+g+"</span>",1==n.Is5900PortEnabled&&(g+=", Puerto 5900 habilitado"),1==n.OptInPolicy&&(g+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"segundos de suscripci\u00f3n":"segundo opt-in")),g+=","+n.SessionTimeout+" minuto"+(0<n.SessionTimeout?"s":"")+" hora de t\u00e9rmino de la sesi\u00f3n",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?
974 -((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(g+=", Blanking permitido"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Escritorio remoto",addLinkConditional(g,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!e);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&
975 -(g="Estado desconocido",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(g="No requerido"),1==p&&(g="Requerido solo para KVM"),4294967295==p&&(g="Siempre requerido"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(g=addLinkConditional(g,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consentimiento del usuario",g));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(g={0:"Desconocido",1:"Otro",
976 -2:"Habilitado",3:"Discapacitado",4:"Apagando",5:"No aplica",6:"Habilitado pero sin conexi\u00f3n",7:"En prueba",8:"Diferido",9:"Quietud",10:"Comenzando",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(g[32768]="OCR & RPE Disabled",g[32769]="OCR Enabled, RPE Disabled"),n=g[amtsysstate.CIM_BootService.response.EnabledState]?g[amtsysstate.CIM_BootService.response.EnabledState]:"Desconocido",d+=TableEntry("Boot Features",addLinkConditional(n,
977 -"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)if(g[C].SettingData&&1==g[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==g[C].SettingData.ReferenceParameters.ResourceURI)for(p=g[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("Pol\u00edtica de energ\u00eda",
978 -addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Fecha y hora",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));g=AddRefreshButton("PullSystemStatus()")+" ";g+=AddButton("Acciones de poder ...","showPowerActionDlg()")+" ";g+=AddButton("Guardar Estado...","saveEntireAmtState()")+" ";d+=TableEnd(g);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
979 -QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" Cambiar la configuraci\u00f3n de red puede hacer que esta p\u00e1gina no est\u00e9 disponible.");d=d+"<br><h2>Configuraci\u00f3n general</h2>"+TableStart();g="";"<i>Ninguna</i>"!=c&&(1==v.SharedFQDN&&(g=", compartido con el sistema operativo"),0==v.SharedFQDN&&(g=", diferente del sistema operativo"));d+=TableEntry("Nombre y dominio",
980 -addLinkConditional(c+g,"showEditNameDlg(1)",xxAccountAdminName));c="Discapacitado";1==v.DDNSUpdateEnabled?c="Habilitado cada"+v.DDNSPeriodicUpdateInterval+" minutos, TTL es"+v.DDNSTTL+" minutos":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Actualizaci\u00f3n por servidor DHCP");d+=TableEntry("DNS Din\u00e1mico",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||
981 -1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Interfaz inal\u00e1mbrica":"Interfaz cableada")+"</h2>";d+=TableStart();d+=TableEntry("Estado de enlace",1==c.LinkIsUp?"Enlace est\u00e1 arriba":"El enlace est\u00e1 ca\u00eddo");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);g=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&g.push("S0 / AC"),14==c.LinkPolicy[C]&&g.push("Sx / AC"),16==c.LinkPolicy[C]&&g.push("S0 / DC"),
982 -224==c.LinkPolicy[C]&&g.push("Sx / DC");0==g.length&&g.push("");d+=TableEntry("Pol\u00edtica de enlaces",addLinkConditional(0==g.length?"No disponible":"Disponible en: "+g.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("Direcci\u00f3n MAC",c.MACAddress));amtwirelessif==a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("Estado",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",
983 -xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("Radio State",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>Ninguna</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?
984 -"Habilitado":"Discapacitado","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"Habilitado":"Discapacitado",
985 -"showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Responder al ping",addLinkConditional(["Discapacitado","Respuesta ICMP","Respuesta RMCP","Respuesta ICMP y RMCP"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),g=1==c.DHCPEnabled?"Autom\u00e1tico usando el servidor DHCP":"Direcci\u00f3n IP est\u00e1tica",1==c.IpSyncEnabled&&(g+=", IP sync with OS"),d+=TableEntry("Estado IPv4",
986 -addLinkConditional(g,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("Direcci\u00f3n IPv4",isIpAddress(c.IPAddress,"Ninguna"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("Puerta de enlace IPv4 / M\u00e1scara",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Ninguna")));g=c.PrimaryDNS;isIpAddress(g)&&(c.SecondaryDNS&&(g+=" / "+c.SecondaryDNS),d+=TableEntry("Servidor de nombres de dominio IPv4",g));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];
987 -for(var p="Discapacitado",w,g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)g[C].SettingData&&g[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==g[C].IsCurrent);1==w&&(p=(g=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Direcciones habilitadas, autom\u00e1ticas y manuales":"Habilitado, direcciones autom\u00e1ticas");d+=TableEntry("Estado IPv6",addLinkConditional(p,
988 -"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("Direcci\u00f3n IPv6",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("Direcci\u00f3n IPv6","Ninguna");isIpAddress(c.CurrentDefaultRouter)&&
989 -(d+=TableEntry("Enrutador predeterminado IPv6",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(g=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(g+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("Servidor de nombres de dominio IPv6",g))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&
990 -5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
970 +"v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(28,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(39,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
971 +r=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
972 +p&&(e+=", Puerto de redireccionamiento");r&&(e+=", Serie sobre LAN");n&&(e+=", IDE-Redirect");g&&(e+=", KVM");""==e&&(e=" Ninguna");d+=TableEntry("Caracter\u00edsticas activas",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Pantalla principal",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Pantalla principal",
973 +"Pantalla secundaria","Tercera pantalla"][n.DefaultScreen]),e='<span title="'+format("La pantalla remota predeterminada es {0}",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+=", Puerto 5900 habilitado"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"segundos de suscripci\u00f3n":"segundo opt-in")),e+=","+n.SessionTimeout+" minuto"+(0<n.SessionTimeout?"s":"")+" hora de t\u00e9rmino de la sesi\u00f3n",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?
974 +((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+=", Blanking permitido"),QV(46,n),Q(47).checked=!1):QV(46,!1),d+=TableEntry("Escritorio remoto",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(26,!p||!r);QV(27,xxAccountAdminName);QV(37,!p||!g);QV(38,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&
975 +(e="Estado desconocido",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(e="No requerido"),1==p&&(e="Requerido solo para KVM"),4294967295==p&&(e="Siempre requerido"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consentimiento del usuario",e));null!=amtsysstate.AMT_BootCapabilities.response.PlatformErase&&0<amtsysstate.AMT_BootCapabilities.response.PlatformErase&&null!=amtsysstate.CIM_BootService&&
976 +null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"Desconocido",1:"Otro",2:"Habilitado",3:"Discapacitado",4:"Apagando",5:"No aplica",6:"Habilitado pero sin conexi\u00f3n",7:"En prueba",8:"Diferido",9:"Quietud",10:"Comenzando",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:
977 +"Desconocido",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)if(e[C].SettingData&&1==e[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[C].SettingData.ReferenceParameters.ResourceURI)for(p=e[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,r=0;r<AmtSystemPowerSchemes.length;r++)AmtSystemPowerSchemes[r].SchemeGUID==
978 +p&&(d+=TableEntry("Pol\u00edtica de energ\u00eda",addLinkConditional(AmtSystemPowerSchemes[r].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Fecha y hora",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("Acciones de poder ...","showPowerActionDlg()")+" ";e+=AddButton("Guardar Estado...","saveEntireAmtState()")+
979 +" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" Cambiar la configuraci\u00f3n de red puede hacer que esta p\u00e1gina no est\u00e9 disponible.");d=d+"<br><h2>Configuraci\u00f3n general</h2>"+
980 +TableStart();e="";"<i>Ninguna</i>"!=c&&(1==v.SharedFQDN&&(e=", compartido con el sistema operativo"),0==v.SharedFQDN&&(e=", diferente del sistema operativo"));d+=TableEntry("Nombre y dominio",addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));c="Discapacitado";1==v.DDNSUpdateEnabled?c="Habilitado cada"+v.DDNSPeriodicUpdateInterval+" minutos, TTL es"+v.DDNSTTL+" minutos":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Actualizaci\u00f3n por servidor DHCP");d+=TableEntry("DNS Din\u00e1mico",addLinkConditional(c,
981 +"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Interfaz inal\u00e1mbrica":"Interfaz cableada")+"</h2>";d+=TableStart();d+=TableEntry("Estado de enlace",1==c.LinkIsUp?"Enlace est\u00e1 arriba":"El enlace est\u00e1 ca\u00eddo");if(c.LinkPolicy){c.LinkPolicy=
982 +MakeToArray(c.LinkPolicy);e=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&e.push("S0 / AC"),14==c.LinkPolicy[C]&&e.push("Sx / AC"),16==c.LinkPolicy[C]&&e.push("S0 / DC"),224==c.LinkPolicy[C]&&e.push("Sx / DC");0==e.length&&e.push("");d+=TableEntry("Pol\u00edtica de enlaces",addLinkConditional(0==e.length?"No disponible":"Disponible en: "+e.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("Direcci\u00f3n MAC",c.MACAddress));amtwirelessif==
983 +a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("Estado",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("Radio State",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>Ninguna</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&
984 +(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"Habilitado":"Discapacitado","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",
985 +addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"Habilitado":"Discapacitado","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Responder al ping",addLinkConditional(["Discapacitado","Respuesta ICMP","Respuesta RMCP","Respuesta ICMP y RMCP"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-FAST/TLS".split(" "),
986 +p="Discapacitado",amtsysstate.AMT_8021XProfile.responses.Body.Enabled&&(p="Habilitado,"+e[amtsysstate.AMT_8021XProfile.responses.Body.AuthenticationProtocol]),d+=TableEntry("802.1x",addLinkConditional(p,"editNetAuthProfile()",xxAccountAdminName)),e=1==c.DHCPEnabled?"Autom\u00e1tico usando el servidor DHCP":"Direcci\u00f3n IP est\u00e1tica",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("Estado IPv4",addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("Direcci\u00f3n IPv4",
987 +isIpAddress(c.IPAddress,"Ninguna"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("Puerta de enlace IPv4 / M\u00e1scara",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Ninguna")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("Servidor de nombres de dominio IPv4",e));if(5<amtversion&&200==amtsysstate.IPS_IPv6PortSettings.status){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="Discapacitado",w,e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<
988 +e.length;C++)e[C].SettingData&&e[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[C].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Direcciones habilitadas, autom\u00e1ticas y manuales":"Habilitado, direcciones autom\u00e1ticas");d+=TableEntry("Estado IPv6",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&
989 +0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("Direcci\u00f3n IPv6",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("Direcci\u00f3n IPv6","Ninguna");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("Enrutador predeterminado IPv6",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&
990 +(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("Servidor de nombres de dominio IPv6",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}
991 +function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
992 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
993 "")+">Available in S0/DC - Powered on & on battery</label><br>";a+="<label><input type=checkbox id=d11p4 value=224 "+(0<=c.LinkPolicy.indexOf(224)?"checked":"")+">Available in Sx/DC - Sleeping & on battery</label><br>";setDialogMode(11,"Pol\u00edtica de enlaces",3,showLinkPolicyDlgEx,a,b)}}
994 function showLinkPolicyDlgEx(b,c){var a=Clone(amtsysstate.AMT_EthernetPortSettings.responses[c]);a.DHCPEnabled&&(delete a.IPAddress,delete a.SubnetMask,delete a.DefaultGateway,delete a.PrimaryDNS,delete a.SecondaryDNS);a.LinkPolicy=[];Q("d11p1").checked&&a.LinkPolicy.push(1);Q("d11p2").checked&&a.LinkPolicy.push(14);Q("d11p3").checked&&a.LinkPolicy.push(16);Q("d11p4").checked&&a.LinkPolicy.push(224);amtstack.Put("AMT_EthernetPortSettings",a,showLinkPolicyDlgExDone,0,1,a)}
@@ -996,30 +997,30 @@ function showAuthCsme(){if(!xxdialogMode){var b;b="<div style=margin-top:8px>Int
997 for(var c in amtstack.amtauth.Certificates){var a=amtstack.amtauth.Certificates[c];b+="<tr><td style=width:32px;vertical-align:top><img src=images-commander/cert1.png height=32 width=32 />";b+="<td style=padding-bottom:6px><b>"+EscapeHtml(a.subject.getField("CN").value)+(!0===a.xTrusted?", <span style=color:#080>Trusted</span>":"")+"</b><br />";a.subject.getField("OU")&&(b+=EscapeHtml(a.subject.getField("OU").value)+"<br />");b+=amtstack.amtauth.CertificatesDer[c].length+" bytes,<a style=cursor:pointer;color:blue onclick=downloadAuthCert("+
998 c+")>Descargar</a>";a.xCrl&&(b+="<br />CRL "+a.xCrl.length+" bytes,<a style=cursor:pointer;color:blue onclick=downloadCertCrl("+c+")>Descargar</a>")}setDialogMode(11,"Authentic CSME",1,null,b+"</table><div>")}}function downloadCertCrl(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.Certificates[b].xCrl),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".crl")}
999 function downloadAuthCert(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.CertificatesDer[b]),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".cer")}var IntelAmtEntireState,IntelAmtEntireStateCalls;
999 -function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c30.value="amtstate"+b+".json";setDialogMode(19,"Guardar todo el estado de Intel&reg; AMT",3,saveEntireAmtStateOk)}}
1000 -function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(60,"Fetching entire state, please wait...");setDialogMode(1,"Guardar todo el estado de Intel&reg; AMT",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
1001 -function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c30.value))}
1000 +function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c55.value="amtstate"+b+".json";setDialogMode(19,"Guardar todo el estado de Intel&reg; AMT",3,saveEntireAmtStateOk)}}
1001 +function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(61,"Fetching entire state, please wait...");setDialogMode(1,"Guardar todo el estado de Intel&reg; AMT",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
1002 +function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c55.value))}
1003 function showDesktopSettingsDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_KVMRedirectionSettingData.response,c;c="<div style=text-align:left><div style=height:26px;margin-top:4px><select id=subddisplay style=float:right;width:200px><option value=0>Pantalla principal</option><option value=1>Pantalla secundaria</option>";9<amtversion&&(c+="<option value=2>Tercera pantalla</option>");c+='</select><div style=padding-top:4px>Pantalla predeterminada</div></div><div style=height:26px;margin-top:4px><input id=subsessiontimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>Tiempo de espera de la sesi\u00f3n (minutos)</div></div>';
1004 1==b.OptInPolicy&&(c+='<div style=height:26px;margin-top:4px><input id=suboptintimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>Opt-in timeout (segundos)</div></div>');c+="<div style=height:26px;margin-top:4px><select id=subdlegacy style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>Deshabilitado, Recomendado</option><option value=1>Habilitado, visores KVM heredados</option></select><div style=padding-top:4px>Puerto 5900</div></div>";
1005 c+="<div style=height:26px;margin-top:4px id=subspassx><input id=subspass type=password autocomplete=off style=float:right;width:200px maxlength=8 onkeyup=showDesktopSettingsDlgUpdate()><div style=padding-top:4px>5900 contrase\u00f1a (8 caracteres)</div></div>";9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(c+='<div style=height:26px;margin-top:4px><select id=subsb style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>Discapacitado</option><option value=1>Habilitado</option></select><div style=padding-top:4px title="Esta caracter\u00edstica no suele ser compatible">Pantalla en blanco</div></div>');
1006 c+="</div>";setDialogMode(11,"Configuraci\u00f3n de escritorio remoto",3,showDesktopSettingsDlgOk,c);Q("subddisplay").value=b.DefaultScreen;Q("subsessiontimeout").value=b.SessionTimeout;1==b.OptInPolicy&&(Q("suboptintimeout").value=b.OptInPolicyTimeout);Q("subdlegacy").value=1==b.Is5900PortEnabled?1:0;9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(Q("subsb").value=amtsysstate.IPS_ScreenConfigurationService.response.EnabledState);showDesktopSettingsDlgUpdate()}}
1006 -function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c54",b)}
1007 +function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c106",b)}
1008 function showDesktopSettingsDlgOk(){var b=Clone(amtsysstate.IPS_KVMRedirectionSettingData.response);b.DefaultScreen=Q("subddisplay").value;b.SessionTimeout=Q("subsessiontimeout").value;b.Is5900PortEnabled=1==Q("subdlegacy").value;1==b.OptInPolicy&&(b.OptInPolicyTimeout=Q("suboptintimeout").value);1==b.Is5900PortEnabled&&(b.RFBPassword=Q("subspass").value);amtstack.Put("IPS_KVMRedirectionSettingData",b,showDesktopSettingsDlgOk2);b=Clone(amtsysstate.IPS_ScreenConfigurationService.response);b.EnabledState=
1009 parseInt(Q("subsb").value);amtstack.Put("IPS_ScreenConfigurationService",b,showDesktopSettingsDlgOk3)}function showDesktopSettingsDlgOk2(b,c,a,d){200==d?PullSystemStatus():messagebox("Configuraci\u00f3n de escritorio remoto",format("Error {0}, no se pueden establecer valores.",d))}
1010 function showDesktopSettingsDlgOk3(b,c,a,d){200!=d?messagebox("Error",format("No se pudo establecer la supresi\u00f3n de pantalla, es posible que la supresi\u00f3n de este sistema no sea compatible ({0})",d)):amtstack.Get("IPS_ScreenConfigurationService",function(a,b,c,d){200==d&&(amtsysstate.IPS_ScreenConfigurationService.response=c.Body,updateSystemStatus())},0,1)}
1011 function PullEventLog(b){1==b&&xxdialogMode||(amtFirstPull|=16,amtstack.Enum("AMT_MessageLog",processMessageLog0),amtstack.GetMessageLog(processMessageLog1))}var processMessageLog0responses=null;
1012 function processMessageLog0(b,c,a,d){200==d&&(d&&QV("go6",!0),a&&(processMessageLog0responses=a),b="",c="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>",null!=processMessageLog0responses&&(b=1==processMessageLog0responses[0].IsFrozen?AddButton("Descongelar registro","FreezeLog(0)"):AddButton("Congelar registro","FreezeLog(1)")),c+=TableEnd('<div style=float:right><input id=eventFilter placeholder="Filtrar" style=margin:4px onkeyup=eventFilter()>&nbsp;</div><div>&nbsp;'+
1013 AddRefreshButton("PullEventLog(1)")+AddButton("Borrar registro","ClearLog()")+AddButton("Salvar...","SaveEventLog()")+b),QH(17,c+"<br>"))}function SaveEventLog(){xxdialogMode||null==eventmessages||SaveJsonFile("IntelAmtEventlog","events","Intel AMT Event Log",eventmessages)}var eventmessages=null;
1013 -function processMessageLog1(b,c){eventmessages=c;var a,d=0,g;g="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>Fuente</b><td class=r1><b>Descripci\u00f3n</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);g+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1014 -a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}g+=TableEnd(0==d?"&nbsp;":"");QH(18,g+"<br>");processMessageLog0()}
1015 -function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(60,"\u00bfBorrar el registro de eventos?"),setDialogMode(1,"Registro de eventos",3,ClearLogEx))}function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("Registro de eventos","No se puede borrar, error: "+d):PullEventLog()})}
1016 -function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("Hora",c.Time.toLocaleString());a+=addHtmlValue("Fuente",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("Descripci\u00f3n",c.Desc);a+=MoreStart();a+=addHtmlValue("Direcci\u00f3n del dispositivo",c.DeviceAddress);a+=addHtmlValue("Entidad",c.Entity);a+=addHtmlValue("Instancia de entidad",c.EntityInstance);var d="",g;for(g in c.EventData)0<d.length&&(d+=","),d+=c.EventData[g];a+=
1014 +function processMessageLog1(b,c){eventmessages=c;var a,d=0,e;e="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>Fuente</b><td class=r1><b>Descripci\u00f3n</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);e+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1015 +a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}e+=TableEnd(0==d?"&nbsp;":"");QH(18,e+"<br>");processMessageLog0()}
1016 +function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(61,"\u00bfBorrar el registro de eventos?"),setDialogMode(1,"Registro de eventos",3,ClearLogEx))}function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("Registro de eventos","No se puede borrar, error: "+d):PullEventLog()})}
1017 +function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("Hora",c.Time.toLocaleString());a+=addHtmlValue("Fuente",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("Descripci\u00f3n",c.Desc);a+=MoreStart();a+=addHtmlValue("Direcci\u00f3n del dispositivo",c.DeviceAddress);a+=addHtmlValue("Entidad",c.Entity);a+=addHtmlValue("Instancia de entidad",c.EntityInstance);var d="",e;for(e in c.EventData)0<d.length&&(d+=","),d+=c.EventData[e];a+=
1018 addHtmlValue("Datos",d);a+=addHtmlValue("Compensar",c.EventOffset);a+=addHtmlValue("Tipo de sensor",c.EventSensorType);a+=addHtmlValue("Gravedad",c.EventSeverity);a+=addHtmlValue("tipo de fuente",c.EventSourceType);a+=addHtmlValue("Tipo",c.EventType);a+=addHtmlValue("N\u00famero de sensor",c.SensorNumber);a+=MoreEnd();a+="</div>";messagebox(format("Evento # {0} Detalles",b+1),a)}}
1019 function eventFilter(){var b=Q("eventFilter").value.toLowerCase(),c;for(c in eventmessages)QV("xamtevent"+c,""==b||0<=eventmessages[c].Desc.toLowerCase().indexOf(b)||0<=eventmessages[c].EntityStr.toLowerCase().indexOf(b))}var subscriptionsFilters=null,subscriptionsListeners=null;
1020 function PullEventSubscriptions(){null==subscriptionsFilters&&amtstack.Enum("CIM_FilterCollection",processEventSubscriptions0);amtstack.BatchEnum(null,["CIM_ListenerDestination","CIM_FilterCollectionSubscription"],processEventSubscriptions1)}function processEventSubscriptions0(b,c,a,d){408!=d&&400!=d&&(d&&errcheck(d,b)||(subscriptionsFilters=a))}
1020 -function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gestionar suscriptores de eventos.<br><br>";for(var g in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[g].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[g],
1021 -b+='<div class=itemBar onclick="showSubscriptionDetails('+g+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>No se encontraron suscripciones.</i></div><br>");g="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(g+=AddButton("Nueva suscripci\u00f3n","newSubscriptionButton()"));b+=
1022 -"<br><td class=r1>"+TableEnd(g+"</div>");QH(56,b)}}var subscriptionDeliveryModes={2:"empujar",3:"Empujar con ACK",4:"Eventos",5:"Halar"};
1021 +function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gestionar suscriptores de eventos.<br><br>";for(var e in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[e].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[e],
1022 +b+='<div class=itemBar onclick="showSubscriptionDetails('+e+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>No se encontraron suscripciones.</i></div><br>");e="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(e+=AddButton("Nueva suscripci\u00f3n","newSubscriptionButton()"));b+=
1023 +"<br><td class=r1>"+TableEnd(e+"</div>");QH(57,b)}}var subscriptionDeliveryModes={2:"empujar",3:"Empujar con ACK",4:"Eventos",5:"Halar"};
1024 function showSubscriptionDetails(b){if(!xxdialogMode){var c=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[b].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),a=subscriptionsListeners.CIM_ListenerDestination.responses[b],d;d="<div style=text-align:left>"+addHtmlValue("Destino",a.Destination);d+=addHtmlValue("Filtrar",c);d+=addHtmlValue("Modo de entrega",subscriptionDeliveryModes[a.DeliveryMode]);setDialogMode(11,"Suscripci\u00f3n"+(b+1),xxAccountAdminName?
1025 5:1,deleteSubscriptionButton,d+"</div>",b)}}
1026 function deleteSubscriptionButton(b,c){2==b&&amtstack.UnSubscribe("CIM_FilterCollectionSubscription",PullEventSubscriptions,null,1,{Filter:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_FilterCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+subscriptionsListeners.CIM_FilterCollectionSubscription.responses[c].Filter.ReferenceParameters.SelectorSet.Selector.Value+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference>",
@@ -1027,93 +1028,93 @@ Handler:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/a
1028 function newSubscriptionButton(){if(!xxdialogMode&&null!=subscriptionsFilters){var b;b="<div style=height:26px;margin-top:4px><select id=subtype style=float:right;width:260px><option value=Push>empujar</option><option value=PushWithAck>Empujar con ACK</option></select><div style=padding-top:4px>Tipo</div></div><div style=height:26px;margin-top:4px><select id=subfilter style=float:right;width:260px>";for(var c in subscriptionsFilters)b+='<option value="'+subscriptionsFilters[c].InstanceID+'">'+subscriptionsFilters[c].CollectionName.substring(13)+
1029 "</option>";b+="</select><div style=padding-top:4px>Filtrar</div></div>";b+='<div style=height:26px;margin-top:4px><input id=suburl style=float:right;width:260px maxlength=253 onkeyup=newSubscriptionUpdate() value="http://"><div style=padding-top:4px>URL</div></div>';b+="<div style=height:26px;margin-top:4px><select id=subauth style=float:right;width:260px onchange=newSubscriptionUpdate()><option value=0>Ninguna</option><option value=1>Digerir</option></select><div style=padding-top:4px>Autenticaci\u00f3n</div></div>";
1030 b+="<div style=height:26px;margin-top:4px id=subxuser><input id=subuser style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>Nombre de usuario</div></div>";b+="<div style=height:26px;margin-top:4px id=subxpass><input id=subpass style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>Contrase\u00f1a</div></div>";b+="<div style=height:26px;margin-top:4px><input id=subargs style=float:right;width:260px maxlength=128><div style=padding-top:4px>Argumentos</div></div>";
1030 -setDialogMode(11,"Agregar suscripci\u00f3n de evento",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c54",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1031 +setDialogMode(11,"Agregar suscripci\u00f3n de evento",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c106",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1032 function newSubscriptionButtonOk(){var b=0==Q("subuser").value.length?void 0:Q("subuser").value,c=0==Q("subpass").value.length?void 0:Q("subpass").value;amtstack.Subscribe("CIM_FilterCollection",Q("subtype").value,Q("suburl").value,newSubscriptionButtonOk2,null,1,{InstanceID:Q("subfilter").value},0<Q("subargs").value.length?Q("subargs").value:null,b,c)}function newSubscriptionButtonOk2(b,c,a,d){200==d&&PullEventSubscriptions()}
1033 function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AMT_AuditLog",processAuditLog0))}var auditLog=null,auditLogEnabledStates="Desconocido;Otro;Habilitado;Discapacitado;Apagando;No aplica;Habilitado pero sin conexi\u00f3n;En prueba;Diferido;Quietud;Comenzando".split(";");
1033 -function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Discapacitado":"Habilitado",c&2&&(b+=", Bloqueado"),c&4&&(b+=", Casi lleno"),c&8&&(b+=", Completo"),c&16&&(b+=", No hay llave"),c="<h1>Configuraci\u00f3n del registro de auditor\u00eda</h1>"+TableStart(),c+=TableEntry("Estado",b),c+=TableEntry("Almacenamiento",a[0].CurrentNumberOfRecords+" registros),"+a[0].PercentageFree+"% gratis"),c+=TableEntry("Pol\u00edtica de sobrescritura",2==a[0].OverwritePolicy?"Se envuelve cuando est\u00e1 lleno":
1034 -"Nunca sobrescribe"),c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1035 -function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filtrar" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Salvar...","SaveAuditLog()")+AddButton("Borrar registro","ClearAuditLog()"))+"<br>");if(0==c.length)d="No se encontraron eventos de registro de auditor\u00eda.";else{var g=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Hora</b><td class=r1 style=width:260px><b>Iniciador</b><td class=r1><b>Action</b>";
1036 -for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;g++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1037 -minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==g?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Registro de auditor\u00eda de Intel AMT",auditLog)}
1038 -function ClearAuditLog(b){QH(60,"\u00bfBorrar el registro de auditor\u00eda?");setDialogMode(1,"Registro de auditor\u00eda",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1034 +function processAuditLog0(b,c,a,d){200==d&&a&&0<a.length&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Discapacitado":"Habilitado",c&2&&(b+=", Bloqueado"),c&4&&(b+=", Casi lleno"),c&8&&(b+=", Completo"),c&16&&(b+=", No hay llave"),c="<h1>Configuraci\u00f3n del registro de auditor\u00eda</h1>"+TableStart(),c+=TableEntry("Estado",b),c+=TableEntry("Almacenamiento",a[0].CurrentNumberOfRecords+" registros),"+a[0].PercentageFree+"% gratis"),c+=TableEntry("Pol\u00edtica de sobrescritura",2==a[0].OverwritePolicy?
1035 +"Se envuelve cuando est\u00e1 lleno":"Nunca sobrescribe"),c+=TableEnd(),QH(50,c),amtstack.GetAuditLog(processAuditLog1))}
1036 +function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filtrar" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Salvar...","SaveAuditLog()")+AddButton("Borrar registro","ClearAuditLog()"))+"<br>");if(0==c.length)d="No se encontraron eventos de registro de auditor\u00eda.";else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Hora</b><td class=r1 style=width:260px><b>Iniciador</b><td class=r1><b>Action</b>";
1037 +for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1038 +minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(51,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Registro de auditor\u00eda de Intel AMT",auditLog)}
1039 +function ClearAuditLog(b){QH(61,"\u00bfBorrar el registro de auditor\u00eda?");setDialogMode(1,"Registro de auditor\u00eda",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1040 function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("Registro de auditor\u00eda","Error: "+d)}
1040 -function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Hora",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Iniciador",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Habla a",a.NetAddress));d+=addHtmlValue("Solicitud",a.AuditApp);d+=addHtmlValue("Evento",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Datos extendidos",a.ExStr);else if(0<a.Ex.length){var g="";for(c in a.Ex)0<g.length&&(g+=","),g+=a.Ex.charCodeAt(c);""!=g&&(d+=
1041 -addHtmlValue("Valores de datos",g));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("Cadena de datos",a.Ex.substring(2)))}messagebox("Evento de auditor\u00eda #"+(b+1)+" Detalles",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1041 +function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Hora",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Iniciador",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Habla a",a.NetAddress));d+=addHtmlValue("Solicitud",a.AuditApp);d+=addHtmlValue("Evento",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Datos extendidos",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=","),e+=a.Ex.charCodeAt(c);""!=e&&(d+=
1042 +addHtmlValue("Valores de datos",e));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("Cadena de datos",a.Ex.substring(2)))}messagebox("Evento de auditor\u00eda #"+(b+1)+" Detalles",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1043 function PullCertificates(){amtstack.BatchEnum(null,["AMT_PublicKeyCertificate","AMT_PublicPrivateKeyPair","AMT_TLSSettingData","AMT_TLSCredentialContext"],processCerts1)}
1043 -function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var g in xxCertificates)xxCertificates[g].InstanceID==b&&(xxTlsCurrentCert=
1044 -g)}for(g in xxCertificates)xxCertificates[g].TrustedRootCertficate=1==xxCertificates[g].TrustedRootCertficate,xxCertificates[g].X509Certificate=window.atob(xxCertificates[g].X509Certificate),xxCertificates[g].XIssuer=parseCertName(xxCertificates[g].Issuer),xxCertificates[g].XSubject=parseCertName(xxCertificates[g].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1044 +function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var e in xxCertificates)xxCertificates[e].InstanceID==b&&(xxTlsCurrentCert=
1045 +e)}for(e in xxCertificates)xxCertificates[e].TrustedRootCertficate=1==xxCertificates[e].TrustedRootCertficate,xxCertificates[e].X509Certificate=window.atob(xxCertificates[e].X509Certificate),xxCertificates[e].XIssuer=parseCertName(xxCertificates[e].Issuer),xxCertificates[e].XSubject=parseCertName(xxCertificates[e].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1046 function parseCertName(b){var c={},a=b.split(","),d;for(d in a)b=a[d].indexOf("="),c[a[d].substring(0,b)]=a[d].substring(b+1);return c}
1047 function getTlsSecurityState(b){if(0==xxTlsSettings[b].Enabled)return"Discapacitado";var c=(1==xxTlsSettings[b].MutualAuthentication?"TLS de autenticaci\u00f3n mutua":"TLS de autenticaci\u00f3n de servidor")+(1==xxTlsSettings[b].AcceptNonSecureConnections?" y no TLS":"");1==xxTlsSettings[b].MutualAuthentication&&xxTlsSettings[b].TrustedCN&&(b=MakeToArray(xxTlsSettings[b].TrustedCN),0<b.length&&(c+=", "+(1<b.length?"Trusted names":"Trusted name")+": "+b.join(", ")+"."));return c}
1048 function updateCertificates(){if(null!=xxCertificates){var b="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,c=1-b,a=TableStart(),a=a+TableEntry("Seguridad remota de TLS",addLinkConditional(getTlsSecurityState(c),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEntry("Seguridad local de TLS",addLinkConditional(getTlsSecurityState(b),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEnd(),a=a+("<br>"+TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Administre los certificados Intel&reg; AMT para esta computadora.<br><br>");
1049 if(0==xxCertificates.length&&0==xxCertPrivateKeys.length)a+="<div style=padding-left:15px><br><i>No se encontraron certificados.</i></div><br>";else{for(var d in xxCertificates)b="",xxCertificates[d].TrustedRootCertficate&&(b=", Ra\u00edz de confianza"),xxCertificates[d].XPrivateKey&&(b=", Llave privada"),d==xxTlsCurrentCert&&(b+=", Certificado TLS"),a+="<div class=itemBar onclick=showCertDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(xxCertificates[d].XSubject.CN)+"</b><i>"+b+"</i></div></div>";
1049 -for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>Par de claves privadas sin asignar #"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("Agregar certificado ...","addCertButton()")+AddButton("Emitir certificado ...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(51,a)}}
1050 +for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>Par de claves privadas sin asignar #"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("Agregar certificado ...","addCertButton()")+AddButton("Emitir certificado ...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(52,a)}}
1051 function showKeyPairDetails(b){setDialogMode(11,"Par de claves #"+b,5,function(c){2==c&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertPrivateKeys[b].InstanceID},PullCertificates,0,1)},"Este es un par de claves de certificado p\u00fablico / privado que no pertenece a ning\u00fan certificado. Esta entrada debe ser temporal.")}
1052 var xxCertSubjectNames={CN:"Nombre com\u00fan",O:"Organizaci\u00f3n",OU:"Unidad Org",S:"Provincia del estado",ST:"Provincia del estado",L:"Localidad",C:"Pa\u00eds",SN:"Apellido",GN:"Nombre de pila"};
1053 function showCertDetails(b){if(!xxdialogMode){var c=xxCertificates[b],a;a="<br>"+addHtmlValue("Certificado",c.X509Certificate.length+" bytes,<a style=cursor:pointer;color:blue onclick=downloadCert("+b+")>Descargar</a>");a+=addHtmlValue("Ra\u00edz de confianza",c.TrustedRootCertficate?"si":"No");0==c.TrustedRootCertficate&&c.XPrivateKey&&(a+=addHtmlValue("Llave privada","Presente"));a+='<br><div style="border-bottom:1px solid gray"><i>Asunto del certificado</i></div><br>';for(var d in c.XSubject)c.XSubject[d]&&
1054 (a+=addHtmlValue(xxCertSubjectNames[d]?xxCertSubjectNames[d]:d,EscapeHtml(c.XSubject[d])));a+='<br><div style="border-bottom:1px solid gray"><i>Certificado de emisor</i></div><br>';for(d in c.XIssuer)c.XIssuer[d]&&(a+=addHtmlValue(xxCertSubjectNames[d]?xxCertSubjectNames[d]:d,EscapeHtml(c.XIssuer[d])));setDialogMode(11,"Certificado -"+EscapeHtml(c.XSubject.CN),5,function(a){2==a&&(xxCertificates[b].XPrivateKey&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertificates[b].XPrivateKey.InstanceID},
1055 function(){},0,1),amtstack.Delete("AMT_PublicKeyCertificate",xxCertificates[b],certificateRemoved,0,1))},a)}}function downloadCert(b){saveAs(data2blob(xxCertificates[b].X509Certificate),xxCertificates[b].XSubject.CN+".cer")}function cert_FileSelectHandler(b){haltEvent(b);1==b.dataTransfer.files.length&&(b.dataTransfer.files[0].name.toLowerCase().endsWith(".p12")?issueCertButton(b.dataTransfer.files):addCertButton(b.dataTransfer.files))}var xxDragDropCertFiles=null;
1056 function addCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen onchange=addCertButtonUpdate() type=file style=float:right;width:260px accept=".cer,.pem">',xxDragDropCertFiles&&(b='<input style=float:right;width:260px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b="<div style=height:10px></div>"+("<div style=height:26px;margin-top:4px>"+b+"<div style=padding-top:4px>Archivo de certificado</div></div>")+"<div style=height:26px;margin-top:4px><select id=certtype style=float:right;width:260px><option value=1>Certificado ra\u00edz de confianza</option><option value=0>Certificado de cadena</option></select><div style=padding-top:4px>Tipo de certificado</div></div>",
1056 -setDialogMode(11,"Agregar certificado",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c54",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1057 +setDialogMode(11,"Agregar certificado",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c106",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1058 function addCertButtonOk2(b){b=b.target.result;var c=b.indexOf("-----BEGIN CERTIFICATE-----");0<=c?(b=b.substring(c+27),c=b.indexOf("-----END CERTIFICATE-----"),0<=c&&(b=b.substring(0,c)),b=b.replace(/\r\n/g,"")):b=btoa(b);1==getSelectElement("certtype").value?amtstack.AMT_PublicKeyManagementService_AddTrustedRootCertificate(b,certificateAdded):amtstack.AMT_PublicKeyManagementService_AddCertificate(b,certificateAdded)}
1059 function issueCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen type=file style=float:right;width:230px onchange=issueCertButtonUpdate() accept=".p12">',xxDragDropCertFiles&&(b='<input style=float:right;width:230px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b=""+("<div styleheight:26px;margin-top:14px>"+b+"<div style=padding-top:4px>Certificate file</div></div>")+"<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certopenpass type=password autocomplete=off style=float:right;width:230px><div style=padding-top:4px>Contrase\u00f1a del certificado</div></div>",
1060 b+='<br><div style="border-bottom:1px solid gray"><i>Certificado Intel&reg; AMT</i></div>',b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certcn style=float:right;width:230px><div style=padding-top:4px>Nombre com\u00fan</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certo style=float:right;width:230px><div style=padding-top:4px>Organizaci\u00f3n</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certst style=float:right;width:230px><div style=padding-top:4px>Provincia del estado</div></div>",
1061 b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certc style=float:right;width:230px><div style=padding-top:4px>Pa\u00eds</div></div>",b+='<div>Usos de certificado</div><ul 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">',b+="<li><label><input type=checkbox id=d11_cu4 checked>Servidor TLS (HTTPS)</label></li>",b+="<li><label><input type=checkbox id=d11_cu5>Cliente TLS (HTTPS)</label></li>",
1062 b+="<li><label><input type=checkbox id=d11_cu6>Protecci\u00f3n de correo electr\u00f3nico</label></li>",b+="<li><label><input type=checkbox id=d11_cu7>Firma de c\u00f3digo</label></li>",b+="<li><label><input type=checkbox id=d11_cu8>Sello de tiempo</label></li>",b+="</ul>",setDialogMode(11,"Emitir certificado",3,issueCertButtonOk,b),issueCertButtonUpdate())}
1062 -function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c54",c)}
1063 +function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c106",c)}
1064 function issueCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length?(b=new FileReader,b.onload=issueCertButtonOk2,b.readAsBinaryString(c[0])):issueCertButtonOk3(null)}function issueCertButtonOk2(b){0==amtcert_loadP12File(b.target.result,Q("certopenpass").value,issueCertButtonOk3)&&messagebox("Emitir certificado","No se puede descifrar / decodificar el certificado.")}
1065 function issueCertButtonOk3(b,c,a){xxCaPrivateKey=b;xxCaSubjectAttributes=c;amtstack.AMT_PublicKeyManagementService_GenerateKeyPair(0,2048,GenerateKeyPairResponse)}
1066 function GenerateKeyPairResponse(b,c,a,d){200!=d?messagebox("Emitir certificado","Error al generar par de claves. Estado: "+d):0!=a.Body.ReturnValue?messagebox("Emitir certificado","Error al generar par de claves,"+a.Body.ReturnValueStr):amtstack.Enum("AMT_PublicPrivateKeyPair",GenerateKeyPairResponse2,a.Body.KeyPair.ReferenceParameters.SelectorSet.Selector.Value)}
1066 -function GenerateKeyPairResponse2(b,c,a,d,g){if(200!=d)messagebox("Emitir certificado","Error al generar par de claves. Estado: "+d);else{b=null;for(var v in a)a[v].InstanceID==g&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};g={CN:"Certificado ra\u00edz no confiable"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in g={},xxCaSubjectAttributes)g[xxCaSubjectAttributes[v].shortName]=
1067 -xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,g,v);null==v?messagebox("Emitir certificado","No se puede firmar el certificado."):(v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,
1067 +function GenerateKeyPairResponse2(b,c,a,d,e){if(200!=d)messagebox("Emitir certificado","Error al generar par de claves. Estado: "+d);else{b=null;for(var v in a)a[v].InstanceID==e&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};e={CN:"Certificado ra\u00edz no confiable"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in e={},xxCaSubjectAttributes)e[xxCaSubjectAttributes[v].shortName]=
1068 +xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,e,v);null==v?messagebox("Emitir certificado","No se puede firmar el certificado."):(v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,
1069 v.length-25),GenerateKeyPairResponse4))}}function GenerateKeyPairResponse4(b,c,a,d){200!=d?messagebox("Emitir certificado","Error al generar par de claves. Estado: "+d):PullCertificates()}function certificateAdded(b,c,a,d){200!=d||0!=a.Body.ReturnValue?messagebox("Agregar certificado","No se puede agregar el certificado, error"+(200!=d?d:a.Body.ReturnValueStr)):PullCertificates()}
1070 function certificateRemoved(b,c,a,d){200!=d?messagebox("Eliminar certificado","No se puede eliminar el certificado, error"+d):PullCertificates()}function getInputElement(b){var c=document.getElementsByTagName("input");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}function getSelectElement(b){var c=document.getElementsByTagName("select");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}
1070 -function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>Sin certificado, TLS deshabilitado</option>";for(var c in xxCertificates)0!=xxCertificates[c].TrustedRootCertficate||!xxCertificates[c].XPrivateKey||null!=xxTlsCurrentCert&&xxTlsCurrentCert!=c||(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>Certificado</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1071 +function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>Sin certificado, TLS deshabilitado</option>";for(var c in xxCertificates)0==xxCertificates[c].TrustedRootCertficate&&xxCertificates[c].XPrivateKey&&(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>Certificado</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1072 b+="<option value=2>Mutual-auth TLS only</option><option value=3>Mutual-auth, non-TLS allowed</option>";b+='</select><div style=padding-top:4px>Security</div></div><div style=height:26px id=d11rcn title="Lista separada por comas de nombres comunes de certificados que se les permitir\u00e1 conectarse de forma remota."><input id=d11_rcn style=float:right;width:260px onkeyup=showSetTlsSecurityDlgUpdate() placeholder="nombre1, nombre2"><div style=padding-top:4px>CN remotos</div></div>';setDialogMode(11,
1073 "Configuraciones TLS",3,showSetTlsSecurityDlgOk,b);if(0==xxTLSCredentialContext.length||0==xxTlsSettings[0].Enabled||0==xxTlsSettings[1].Enabled)getSelectElement("tlscert").value=-1;else for(c in b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value,xxCertificates)xxCertificates[c].InstanceID==b&&(getSelectElement("tlscert").value=c);c=1-("Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1);getSelectElement("tlsremote").value=(1==xxTlsSettings[c].MutualAuthentication?
1073 -2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c54",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1074 +2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c106",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1075 function showSetTlsSecurityDlgOk(){var b=getSelectElement("tlscert").value,c=getSelectElement("tlsremote").value,a=Clone(xxTlsSettings);setTlsSecurityPendingCalls=0;setTlsSecurityDeleteCredentialContext=null;if(-1!=b){if(0<xxTLSCredentialContext.length){var d=Clone(xxTLSCredentialContext[0]);d.ElementInContext.ReferenceParameters.SelectorSet.Selector.Value=xxCertificates[b].InstanceID;amtstack.Put("AMT_TLSCredentialContext",d,setTlsSecurityResponse,0,1)}else amtstack.Create("AMT_TLSCredentialContext",
1076 {ElementInContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[b].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",ElementProvidingContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_TLSProtocolEndpointCollection")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters>'},
1076 -setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,g=1-d;a[g].Enabled=-1!=b;a[g].MutualAuthentication=2<=c;a[g].AcceptNonSecureConnections=1==c%2;a[g].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1077 +setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,e=1-d;a[e].Enabled=-1!=b;a[e].MutualAuthentication=2<=c;a[e].AcceptNonSecureConnections=1==c%2;a[e].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1078 b,c,d){200!=d?messagebox("","Error al establecer la hora, estado ="+d):0!=c.Body.ReturnValue?messagebox("","Error al establecer la hora, error: "+c.Body.ReturnValueStr):(a=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(c.Body.Ta0,a,a,function(){setTlsSecurityResponse()}))}));setTlsSecurityPendingCalls+=2;amtstack.Put("AMT_TLSSettingData",a[0],setTlsSecurityResponse,0,1,a[0]);amtstack.Put("AMT_TLSSettingData",a[1],setTlsSecurityResponse,0,1,a[1]);
1079 statusbox("Configuraciones TLS","Aplicando nuevas configuraciones de seguridad ...")}function splitDomains(b){b=b.split(",");if(0!=b.length){for(var c in b)if(b[c]=b[c].trim(),0<=b[c].indexOf(" ")||0==b[c].length)return;if(!(4<b.length))return b}}
1080 function setTlsSecurityResponse(b,c,a,d){if(b){if(200!=d){messagebox("","Error al establecer la seguridad de TLS, estado ="+d);return}if(a.Body.ReturnValueStr&&!methodcheck(a))return}0==--setTlsSecurityPendingCalls&&amtstack.AMT_SetupAndConfigurationService_CommitChanges(null,setTlsSecurityResponse2)}
1081 function setTlsSecurityResponse2(b,c,a,d){200!=d?messagebox("","Error al establecer la seguridad de TLS, estado ="+d):0!=a.Body.ReturnValue?messagebox("","Error al establecer la seguridad de TLS, error: "+a.Body.ReturnValueStr):setTimeout(setTlsSecurityResponse3,2E3)}
1082 function setTlsSecurityResponse3(){null!=setTlsSecurityDeleteCredentialContext&&amtstack.Delete("AMT_TLSCredentialContext",setTlsSecurityDeleteCredentialContext,function(){});PullCertificates();setDialogMode();amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}var xxWatchdog=null;
1083 function PullWatchdog(){amtstack.BatchEnum(null,["*AMT_AgentPresenceCapabilities","AMT_AgentPresenceWatchdog","AMT_AgentPresenceWatchdogAction","AMT_StateTransitionCondition","CIM_ConcreteDependency"],PullWatchdogResponse)}
1083 -function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var g in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[g],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1084 +function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var e in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[e],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1085 "@Name","PolicyConditionName").Value,d=getItem(xxWatchdog.AMT_AgentPresenceWatchdog.responses,"DeviceID",d),a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,"PolicyConditionName",a),d.transitions||(d.transitions=[]),d.transitions.push(a)),c&&"AMT_StateTransitionCondition"==c.Value&&(a=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyConditionName").Value,b=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyActionName").Value,a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,
1086 "PolicyConditionName",a),b=getItem(xxWatchdog.AMT_AgentPresenceWatchdogAction.responses,"PolicyActionName",b),a.actions||(a.actions=[]),a.actions.push(b));updateWatchdog();QV("go19",!0)}}var watchdogEnabledStates="Desconocido;Otro;Habilitado;Discapacitado;Apagando;No aplica;Habilitado pero sin conexi\u00f3n;En prueba;Diferido;Quietud;Comenzando".split(";"),watchdogMonitoredEntity="Desconocido;Otro;Sistema operativo;Proceso de arranque del sistema operativo;Proceso de apagado del sistema operativo;Proceso de arranque del firmware;Proceso de arranque del BIOS;Solicitud;Procesador de servicio".split(";");
1087 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("Watchdogs m\u00e1ximos",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" perros guardianes");b+=TableEntry("M\u00e1ximo total de acciones",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" comportamiento");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Administre los perros guardianes de presencia de agente Intel&reg; AMT.<br><br>";if(null==
1088 xxWatchdog.AMT_AgentPresenceWatchdog.responses||0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>No se encontr\u00f3 ning\u00fan agente de vigilancia de presencia de agentes.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));
1088 -b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="Agregar acci\u00f3n ..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="Eliminar acciones ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",g;for(g in a.transitions){var v=a.transitions[g];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+
1089 -" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : Evento para registrar")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("A\u00f1adir perro guardi\u00e1n ...","AddWatchdog()"));b+="<br>";QH(54,b)}}
1089 +b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="Agregar acci\u00f3n ..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="Eliminar acciones ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+
1090 +" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : Evento para registrar")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("A\u00f1adir perro guardi\u00e1n ...","AddWatchdog()"));b+="<br>";QH(55,b)}}
1091 function getWatchdogTransitionStr(b){if(31==b)return"Cualquier estado";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1092 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("Descripci\u00f3n",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("Entidad monitoreada",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("Estado actual",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("Estado habilitado",watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("Intervalo de inicio",
1093 b.StartupInterval+" segundos)");c+=addHtmlValue("Intervalo de tiempo de espera",b.TimeoutInterval+" segundos)");setDialogMode(11,format("Perro guardi\u00e1n {0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
1094 function AddWatchdog(){var b;b="<div style=height:26px;margin-top:4px><input id=wgname style=float:right;width:240px maxlength=16 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Nombre</div></div>"+('<div style=height:26px;margin-top:4px><input id=wgguid style=float:right;width:240px maxlength=36 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px title="Generar DeviceID aleatorio">'+addLink("ID del dispositivo","GenerateWatchdogGuid()")+"</div></div>");b+="<div style=height:26px;margin-top:4px><input id=wgstart style=float:right;width:240px maxlength=8 placeholder=3600 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Inicio (segundos)</div></div>";
1095 b+="<div style=height:26px;margin-top:4px><input id=wgtimeout style=float:right;width:240px maxlength=8 placeholder=60 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Tiempo de espera (segundos)</div></div>";setDialogMode(11,"Agregar perro guardi\u00e1n",3,AddWatchdogOk,b);AddWatchdogUpdate()}function GenerateWatchdogGuid(){var b,c="";for(b=0;16>b;b++)c+=String.fromCharCode(random(255));Q("wgguid").value=guidToStr(rstr2hex(c));AddWatchdogUpdate()}
1095 -function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var g=a.charCodeAt(d);45!=g&&(48<=g&&57>=g||97<=g&&102>=g?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1096 +function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var e=a.charCodeAt(d);45!=e&&(48<=e&&57>=e||97<=e&&102>=e?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1097 function AddWatchdogOk(){var b=Q("wgtimeout").value,c=Q("wgstart").value;""==b&&(b=60);""==c&&(c=3600);b={CreationClassName:0,DeviceID:btoa(hex2rstr(guidToStr(Q("wgguid").value.replace(/-/g,"")).replace(/-/g,""))),StartupInterval:c,SystemCreationClassName:0,SystemName:0,TimeoutInterval:b,MonitoredEntityDescription:Q("wgname").value};amtstack.Create("AMT_AgentPresenceWatchdog",b,AddWatchdogOk2)}
1098 function AddWatchdogOk2(b,c,a,d){200!=d?messagebox("Perro guardi\u00e1n","No se puede agregar el perro guardi\u00e1n, error #"+d):PullWatchdog()}
1099 function addWatchdogAction(b,c){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d;d="<table><td style=width:180px>Desde<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsa"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";d+="<td>A<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsb"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";setDialogMode(11,"Agregar acci\u00f3n de vigilancia",
1100 3,addWatchdogActionOk,d+"</table><br>Realizar una acci\u00f3n<br><input id=wgsevent type=checkbox checked onclick=addWatchdogActionUpdate()>Escribir en el registro de eventos<br />",a);addWatchdogActionUpdate();haltEvent(b)}function addWatchdogActionUpdate(){var b=0,c=0,a;for(a in amtstack.WatchdogCurrentStates)1==Q("wgsa"+a).checked&&(b+=parseInt(a)),1==Q("wgsb"+a).checked&&(c+=parseInt(a));QE("dlgOkButton",0<b&&0<c&&1==Q("wgsevent").checked)}
1100 -function addWatchdogActionOk(b,c){var a=0,d=0,g;for(g in amtstack.WatchdogCurrentStates)1==Q("wgsa"+g).checked&&(a+=parseInt(g)),1==Q("wgsb"+g).checked&&(d+=parseInt(g));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Acci\u00f3n de vigilancia","No se puede agregar la acci\u00f3n de vigilancia, error #"+d):PullWatchdog()}
1101 +function addWatchdogActionOk(b,c){var a=0,d=0,e;for(e in amtstack.WatchdogCurrentStates)1==Q("wgsa"+e).checked&&(a+=parseInt(e)),1==Q("wgsb"+e).checked&&(d+=parseInt(e));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Acci\u00f3n de vigilancia","No se puede agregar la acci\u00f3n de vigilancia, error #"+d):PullWatchdog()}
1102 function deleteWatchdogActions(b,c){setDialogMode(11,"Eliminar acciones de vigilancia",3,deleteWatchdogActionsOk,"\u00bfEliminar todas las acciones para este perro guardi\u00e1n?",xxWatchdog.AMT_AgentPresenceWatchdog.responses[c]);haltEvent(b)}function deleteWatchdogActionsOk(b,c){amtstack.AMT_AgentPresenceWatchdog_DeleteAllActions(deleteWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
1103 function deleteWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Acci\u00f3n de vigilancia","No se pueden eliminar las acciones de vigilancia, error #"+d):PullWatchdog()}
1104 var xxSystemDefense=null,xxSystemDefenceLinkedPolicy={},xxUpdatingDefenseStats=!1,xxFilterStatistics=[{},{}],xxFilterStatisticsTimer=null,xxFilterStatisticsTimerActive=!1,xxSystemDefenceFilterEthernetTypes={2048:"Todos los paquetes IP",2054:"Todos los paquetes ARP"},xxSystemDefenceFilterIPTypes={4:"IPv4",6:"IPv6"},xxSystemDefenceFilterDesc={0:"Permitir, contar",1:"Drop, Count",2:"L\u00edmite de tarifa",3:"Permitir",4:"soltar"},xxSystemDefenceFilters={HdrProtocolID:1,HdrDestAddress:2,HdrDestMask:2,
1105 HdrSrcAddress:2,HdrSrcMask:2,HdrSrcPortStart:1,HdrSrcPortEnd:1,HdrDestPortStart:1,HdrDestPortEnd:1,HdrSrcAddressEndOfRange:2,"HdrDestAddressEndOfRange ":2,TCPFlagsOn:3,TCPFlagsOff:3};function PullSystemDefense(){amtFirstPull|=4;amtstack.BatchEnum(null,["AMT_SystemDefensePolicy","AMT_NetworkPortSystemDefensePolicy","AMT_Hdr8021Filter","AMT_IPHeadersFilter","AMT_NetworkFilter"],PullSystemDefenseResponse)}
1106 function PullSystemDefenseResponse(b,c,a,d){200==d&&(xxSystemDefense=a,updateSystemDefense(),QV("go18",!0),urlvars.norefresh&&UpdateDefenseStats())}
1107 function updateSystemDefense(){if(null!=xxSystemDefense){var b="";xxSystemDefenceLinkedPolicy={};for(var c in xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses){var a=xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses[c],d=+getItem(a.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value.substring(27),a=getItem(xxSystemDefense.AMT_SystemDefensePolicy.responses,"InstanceID",a.Dependent.ReferenceParameters.SelectorSet.Selector.Value);xxSystemDefenceLinkedPolicy[d]=
1107 -a}b+=TableStart();c="<i>Ninguna</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("Pol\u00edtica cableada predeterminada",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],g;for(g in a)d=a[g],d=1==d?d+" paquete":d+" paquetes",b+=TableEntry((0==c?"Cableado":"Inal\u00e1mbrico")+g,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>Administre las pol\u00edticas de defensa del sistema Intel&reg; AMT.<br><br>";
1108 +a}b+=TableStart();c="<i>Ninguna</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("Pol\u00edtica cableada predeterminada",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],e;for(e in a)d=a[e],d=1==d?d+" paquete":d+" paquetes",b+=TableEntry((0==c?"Cableado":"Inal\u00e1mbrico")+e,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>Administre las pol\u00edticas de defensa del sistema Intel&reg; AMT.<br><br>";
1109 if(0==xxSystemDefense.AMT_SystemDefensePolicy.responses.length)b+="<div style=padding-left:15px><i>No se encontraron pol\u00edticas de defensa del sistema.</i></div><br>";else for(c in xxSystemDefense.AMT_SystemDefensePolicy.responses)a=xxSystemDefense.AMT_SystemDefensePolicy.responses[c],d="",a.FilterCreationHandles&&(a.FilterCreationHandles=MakeToArray(a.FilterCreationHandles),d=a.FilterCreationHandles.length,d=", "+d+" filter"+(1<d?"s":"")),b+="<div class=itemBar onclick=showPolicyDetails("+c+
1110 ")><div style=padding-top:3px><b>"+EscapeHtml(a.PolicyName)+"</b>"+d+"</div></div>";b+="<tr><td class=r1 style=padding-left:15px><br>Administre los filtros de defensa del sistema Intel&reg; AMT.<br><br>";if(0==xxSystemDefense.AMT_Hdr8021Filter.responses.length&&0==xxSystemDefense.AMT_IPHeadersFilter.responses.length)b+="<div style=padding-left:15px><i>No se encontraron filtros de defensa del sistema.</i></div><br>";else{for(c in xxSystemDefense.AMT_Hdr8021Filter.responses)a=xxSystemDefense.AMT_Hdr8021Filter.responses[c],
1111 (d=xxSystemDefenceFilterEthernetTypes[a.HdrProtocolID8021])||(d="Todo el protocolo de Ethernet"+a.HdrProtocolID8021),d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile],2==a.FilterProfile&&(d+=" a"+a.FilterProfileData+" paquete / seg"),1==a.ActionEventOnMatch&&(d+=", Evento en partido"),b+="<div class=itemBar onclick=showFilterDetails(0,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>";for(c in xxSystemDefense.AMT_IPHeadersFilter.responses){a=
1111 -xxSystemDefense.AMT_IPHeadersFilter.responses[c];(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="Todo el protocolo de Ethernet"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" a"+a.FilterProfileData+" paquete / seg");1==a.ActionEventOnMatch&&(d+=", Evento en partido");var v=0;for(g in xxSystemDefenceFilters)a[g]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==
1112 -a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("A\u00f1adir filtro...","AddDefenseFilter()")+AddButton("Agregar pol\u00edtica ...","AddDefensePolicy()"));QH(53,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}
1112 +xxSystemDefense.AMT_IPHeadersFilter.responses[c];(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="Todo el protocolo de Ethernet"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" a"+a.FilterProfileData+" paquete / seg");1==a.ActionEventOnMatch&&(d+=", Evento en partido");var v=0;for(e in xxSystemDefenceFilters)a[e]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==
1113 +a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("A\u00f1adir filtro...","AddDefenseFilter()")+AddButton("Agregar pol\u00edtica ...","AddDefensePolicy()"));QH(54,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}
1114 function StopDefenseStatsTimer(){null!=xxFilterStatisticsTimer&&(clearInterval(xxFilterStatisticsTimer),xxFilterStatisticsTimer=null);xxFilterStatisticsTimerActive=!1}
1115 function UpdateDefenseStats(b){if(b||1!=xxFilterStatisticsTimerActive)xxFilterStatisticsTimerActive=!0,b=b?b:0,xxSystemDefenceLinkedPolicy[b]?amtstack.AMT_SystemDefensePolicy_UpdateStatistics('<a:Address></a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+b+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",!1,UpdateDefenseStats2,b,0,{InstanceID:xxSystemDefenceLinkedPolicy[b].InstanceID}):
1115 -(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,g){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,g):StopDefenseStatsTimer()}
1116 -function UpdateDefenseStats3(b,c,a,d,g){b=0;if(200==d){xxFilterStatistics[g]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[g][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1116 +(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,e){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,e):StopDefenseStatsTimer()}
1117 +function UpdateDefenseStats3(b,c,a,d,e){b=0;if(200==d){xxFilterStatistics[e]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[e][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1118 function changeDefaultPolicy(b){if(!xxdialogMode){var c;c="<div style=height:26px;margin-top:4px><select id=policySelection style=float:right;width:266px><option value=-1>Ninguna";for(var a in xxSystemDefense.AMT_SystemDefensePolicy.responses)c+="<option value="+a+(xxSystemDefenceLinkedPolicy[b]&&xxSystemDefense.AMT_SystemDefensePolicy.responses[a].InstanceID==xxSystemDefenceLinkedPolicy[b].InstanceID?" selected":"")+">"+xxSystemDefense.AMT_SystemDefensePolicy.responses[a].PolicyName;setDialogMode(11,
1119 "Pol\u00edtica predeterminada de defensa del sistema",3,changeDefaultPolicyOk,c+"</select><div style=padding-top:4px>Pol\u00edtica predeterminada</div></div>",b)}}
1120 function changeDefaultPolicyOk(b,c){var a=Q("policySelection").value,d=xxSystemDefenceLinkedPolicy[c];d&&amtstack.Delete("AMT_NetworkPortSystemDefensePolicy",'<w:SelectorSet><w:Selector Name="Antecedent"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">CIM_EthernetPort</w:Selector><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+c+
@@ -1126,118 +1127,136 @@ function AddDefenseFilter(){if(!xxdialogMode){var b;b="<div style=height:26px;ma
1127 b+="<div style=height:26px;margin-top:4px id=filterdatadiv><input id=filterdata style=float:right;width:260px maxlength=8 onkeyup=AddDefenseFilterUpdate()><div style=padding-top:4px>Paquetes / segundo</div></div>";b+="<div style=height:26px;margin-top:4px><select id=filteraction style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=false>Hacer nada<option value=1>Evento en partido</select><div style=padding-top:4px>Registro de eventos</div></div>";setDialogMode(11,"Agregar filtro de defensa del sistema",
1128 3,AddDefenseFilterOk,b);AddDefenseFilterUpdate()}}
1129 function AddDefenseFilterOk(){if(1>=Q("filtertype").value){var b=0==Q("filtertype").value?2048:2054,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrProtocolID8021:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value};2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_Hdr8021Filter",c,AddDefenseFilterOk2)}else{var b=2==Q("filtertype").value?
1129 -4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var g=a[d].indexOf("="),v=a[d].substring(0,g),g=a[d].substring(g+1),n=xxSystemDefenceFilters[v];n||(v="Hdr"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(g=g.split("."),4==g.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(g[0]),
1130 -parseInt(g[1]),parseInt(g[2]),parseInt(g[3]))))):c[v]=g)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c54",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1130 +4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var e=a[d].indexOf("="),v=a[d].substring(0,e),e=a[d].substring(e+1),n=xxSystemDefenceFilters[v];n||(v="Hdr"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(e=e.split("."),4==e.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(e[0]),
1131 +parseInt(e[1]),parseInt(e[2]),parseInt(e[3]))))):c[v]=e)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c106",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1132 function AddDefenseFilterOk2(b,c,a,d){200!=d?messagebox("Agregar filtro de defensa del sistema","No se puede agregar el filtro, error #"+d):PullSystemDefense()}
1132 -function showFilterDetails(b,c){if(!xxdialogMode){var a,d,g,v;0==b?(v="AMT_Hdr8021Filter",g="Tr\u00e1fico Ethernet",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="Todo el protocolo de Ethernet"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",g="Tr\u00e1fico IP",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="Todo el protocolo IP"+d.HdrIPVersion));var n;n=""+addHtmlValue("Nombre",EscapeHtml(d.Name));n+=addHtmlValue("Tipo",
1133 -g);n+=addHtmlValue("Tr\u00e1fico a juego",a);n+=addHtmlValue("Direcci\u00f3n",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,g=d[l],b=xxSystemDefenceFilters[l],2==b&&4==g.length&&(g=hex2rstr(g),g=g.charCodeAt(0)+"."+g.charCodeAt(1)+"."+g.charCodeAt(2)+"."+g.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("Filtrar"+a,g));n+=addHtmlValue("Evento en partido",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,
1133 +function showFilterDetails(b,c){if(!xxdialogMode){var a,d,e,v;0==b?(v="AMT_Hdr8021Filter",e="Tr\u00e1fico Ethernet",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="Todo el protocolo de Ethernet"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",e="Tr\u00e1fico IP",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="Todo el protocolo IP"+d.HdrIPVersion));var n;n=""+addHtmlValue("Nombre",EscapeHtml(d.Name));n+=addHtmlValue("Tipo",
1134 +e);n+=addHtmlValue("Tr\u00e1fico a juego",a);n+=addHtmlValue("Direcci\u00f3n",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,e=d[l],b=xxSystemDefenceFilters[l],2==b&&4==e.length&&(e=hex2rstr(e),e=e.charCodeAt(0)+"."+e.charCodeAt(1)+"."+e.charCodeAt(2)+"."+e.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("Filtrar"+a,e));n+=addHtmlValue("Evento en partido",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,
1135 "Filtro Ethernet #"+d.InstanceID,5,showFilterDetailsOk,n,[v,d])}}function showFilterDetailsOk(b,c){2==b&&amtstack.Delete(c[0],c[1],deleteDefenseFilter)}function deleteDefenseFilter(b,c,a,d){200!=d?messagebox("Eliminar filtro","No se puede quitar el filtro, aseg\u00farese de que no est\u00e9 en uso."):PullSystemDefense()}var xxAddDefensePolicyFilters;
1136 function AddDefensePolicy(){if(!xxdialogMode){xxAddDefensePolicyFilters=[];var b;b='<div style=height:26px;margin-top:4px><input id=policyname title="<policy name>:<policy precedence number>" style=float:right;width:260px maxlength=16 onkeyup=AddDefensePolicyUpdate()><div style=padding-top:4px>Nombre</div></div><div style=height:26px;margin-top:4px><select id=policytx title="Acci\u00f3n predeterminada a tomar para el tr\u00e1fico saliente" style=float:right;width:133px><option value=0>Allow<option value=1>soltar<option value=2>Permitir, contar<option value=3>Drop, Count<option value=4>Permitir, contar, evento<option value=5>Drop, Count, Event</select><select id=policyrx style=float:right;width:133px title="Acci\u00f3n predeterminada a tomar para el tr\u00e1fico entrante"><option value=0>Permitir<option value=1>soltar<option value=2>Permitir, contar<option value=3>Drop, Count<option value=4>Permitir, contar, evento<option value=5>Drop, Count, Event</select><div style=padding-top:4px>TX / RX predeterminado</div></div>';b+=
1137 "<div id=policyFilters></div>";if(0<xxSystemDefense.AMT_Hdr8021Filter.responses.length||0<xxSystemDefense.AMT_IPHeadersFilter.responses.length){b+="<div style=height:26px;margin-top:4px><div style=float:right><select id=xfilter style=width:186px>";for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];b+="<option value="+a.InstanceID+">"+a.Name}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],
1138 b+="<option value="+a.InstanceID+">"+a.Name;b+="</select><input id=addFilterButton type=button value=Add style=width:80px onclick=addFilterButton()></div><div style=padding-top:4px>A\u00f1adir filtro</div></div>"}setDialogMode(11,"Agregar pol\u00edtica de defensa del sistema",3,AddDefensePolicyOk,b);AddDefensePolicyUpdate()}}function addFilterButton(){0<=xxAddDefensePolicyFilters.indexOf(Q("xfilter").value)||(xxAddDefensePolicyFilters.push(Q("xfilter").value),AddDefensePolicyUpdate())}
1139 function removeFilterButton(b){xxAddDefensePolicyFilters.splice(b,1);AddDefensePolicyUpdate()}
1139 -function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c54",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>Esta pol\u00edtica no contiene filtros.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Eliminar","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+GetFilterById(xxAddDefensePolicyFilters[c]).Name+
1140 +function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c106",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>Esta pol\u00edtica no contiene filtros.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Eliminar","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+GetFilterById(xxAddDefensePolicyFilters[c]).Name+
1141 "</b></div></div>";QH("policyFilters",b)}}function GetFilterById(b){for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];if(a.InstanceID==b)return a}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)if(a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],a.InstanceID==b)return a}
1142 function AddDefensePolicyOk(){var b=Q("policytx").value,c=Q("policyrx").value,a=0,d=Q("policyname").value.split(":");2==d.length&&(a=parseInt(d[1]));b={"InstanceID ":0,PolicyName:d[0],PolicyPrecedence:a,TxDefaultCount:1<b,TxDefaultDrop:1==b%2,TxDefaultMatchEvent:3<b,RxDefaultCount:1<c,RxDefaultDrop:1==c%2,RxDefaultMatchEvent:3<c};0<xxAddDefensePolicyFilters.length&&(b.FilterCreationHandles=xxAddDefensePolicyFilters);amtstack.Create("AMT_SystemDefensePolicy",b,AddDefensePolicyOk2)}
1143 function AddDefensePolicyOk2(b,c,a,d){200!=d?messagebox("Agregar pol\u00edtica de defensa del sistema","No se puede agregar la pol\u00edtica, error #"+d):PullSystemDefense()}
1144 function showPolicyDetails(b){if(!xxdialogMode){var c=xxSystemDefense.AMT_SystemDefensePolicy.responses[b],a;a=""+addHtmlValue("Nombre",EscapeHtml(c.PolicyName));0!=c.PolicyPrecedence&&(a+=addHtmlValue("Precedencia",c.PolicyPrecedence));var d=1==c.TxDefaultDrop?"soltar":"Permitir";1==c.TxDefaultCount&&(d+=", Cuenta");1==c.TxDefaultMatchEvent&&(d+="Evento");a+=addHtmlValue("Acci\u00f3n TX predeterminada",d);d=1==c.RxDefaultDrop?"Drop":"Allow";1==c.RxDefaultCount&&(d+=", Count");1==c.RxDefaultMatchEvent&&
1145 (d+=", Event");a+=addHtmlValue("Acci\u00f3n RX predeterminada",d);if(c.FilterCreationHandles)for(b in c.FilterCreationHandles)a+=addHtmlValue("Filtro #"+(+b+1),GetFilterById(c.FilterCreationHandles[b]).Name);setDialogMode(11,format("Pol\u00edtica #",c.InstanceID.substring(20)),5,showPolicyDetailsOk,a,c)}}function showPolicyDetailsOk(b,c){2==b&&amtstack.Delete("AMT_SystemDefensePolicy",c,deleteDefensePolicy)}
1145 -function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("Eliminar pol\u00edtica","No se puede eliminar la pol\u00edtica, aseg\u00farese de que no est\u00e9 en uso."):PullSystemDefense()}var xxWireless;function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService *AMT_BootCapabilities".split(" "),processWireless)}
1146 -function wifiRefresh(){xxdialogMode||PullWireless()}var xxWifiState={3:"Discapacitado",32768:"Habilitado en S0",32769:"Habilitado en S0, Sx / AC"},xxRadioState={2:"Encendido, conectado",3:"Apagado",6:"Encendido, desconectado"},xxWifiAuthenticationMethod={1:"Otro",2:"Abierto",3:"Llave compartida",4:"PSK WPA",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE"},xxWifiEncryptionMethod={1:"Otro",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"Ninguna"};
1146 +function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("Eliminar pol\u00edtica","No se puede eliminar la pol\u00edtica, aseg\u00farese de que no est\u00e9 en uso."):PullSystemDefense()}var xxWireless;function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService CIM_IEEE8021xSettings".split(" "),processWireless)}
1147 +function wifiRefresh(){xxdialogMode||PullWireless()}var xxWifiState={3:"Discapacitado",32768:"Habilitado en S0",32769:"Habilitado en S0, Sx / AC"},xxRadioState={2:"Encendido, conectado",3:"Apagado",6:"Encendido, desconectado"},xxWifiAuthenticationMethod={1:"Otro",2:"Abierto",3:"Llave compartida",4:"PSK WPA",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE IEEE 802.1x",32769:"WPA3 OWE IEEE 802.1x"},xxWifiEncryptionMethod={1:"Otro",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"Ninguna"};
1148 function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1148 -function showWirelessInfo(){if(xxWireless){var b,c,a="",d,g;if(xxWireless.CIM_WiFiPortCapabilities.response){g="<br><h2>Perfiles inal\u00e1mbricos</h2>"+TableStart2();g+="<tr><td class=r2 style=padding-left:15px><br>Perfiles inal\u00e1mbricos que Intel&reg; AMT usar\u00e1 para la conectividad de red.<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b&&(g+="<div class=itemBar onclick=showWifiDetails("+
1149 -c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+" &nbsp; ",xxAccountAdminName&&(g+=AddButton2("Eliminar",'wifiRemoveButton("'+c+'")')),g+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>",a++);0==a&&(g+="<i>No hay perfiles inal\u00e1mbricos presentes</i><br>");g+="<br><td class=r2>";g=xxAccountAdminName?g+TableEnd(AddButton("Nuevo perfil","showWifiNewProfile()")):
1150 -g+TableEnd("");QH(20,g+"<br>")}}}function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"Estado inal\u00e1mbrico",3,wifiStateDlg,b)}}
1149 +function showWirelessInfo(){if(xxWireless){var b,c,a="",d,e;if(xxWireless.CIM_WiFiPortCapabilities.response){e="<br><h2>Perfiles inal\u00e1mbricos</h2>"+TableStart2();e+="<tr><td class=r2 style=padding-left:15px><br>Perfiles inal\u00e1mbricos que Intel&reg; AMT usar\u00e1 para la conectividad de red.<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)if(d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b){var v="",n=null,l="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");
1150 +if(xxWireless.CIM_IEEE8021xSettings.responses)for(var p in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[p].ElementName==d.ElementName&&(n=xxWireless.CIM_IEEE8021xSettings.responses[p]);n&&(v=", "+l[n.AuthenticationProtocol]);e+="<div class=itemBar onclick=showWifiDetails("+c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+v+" &nbsp; ";xxAccountAdminName&&
1151 +(e+=AddButton2("Eliminar",'wifiRemoveButton("'+c+'")'));e+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>";a++}0==a&&(e+="<i>No hay perfiles inal\u00e1mbricos presentes</i><br>");e+="<br><td class=r2>";e=xxAccountAdminName?e+TableEnd(AddButton("Nuevo perfil","showWifiNewProfile()")):e+TableEnd("");QH(20,e+"<br>")}}}
1152 +function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"Estado inal\u00e1mbrico",3,wifiStateDlg,b)}}
1153 function wifiStateDlg(){amtstack.CIM_WiFiPort_RequestStateChange(document.querySelector("input[name=d11]:checked").value,null,function(){amtstack.Get("CIM_WiFiPort",function(b,c,a,d){200==d&&(xxWireless.CIM_WiFiPort.response=a.Body,showWirelessInfo())})})}
1154 function showWifiSyncDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d11 id=wl0 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">Discapacitado</label><br>");b+="<label><input type=radio name=d11 id=wl0 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">Habilitado</label><br>";setDialogMode(11,"Local Profile Sync",3,showWifiSyncDlgEx,b)}}
1153 -function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,g){200==g&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1155 +function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,e){200==e&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1156 function showUefiWifiCoExDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d12 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Disabled</label><br>");b+="<label><input type=radio name=d12 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Enabled</label><br>";setDialogMode(11,"UEFI Wifi CoEx Profile Sharing",3,UefiWifiCoExDlg,b)}}
1155 -function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,g){200==g&&PullWireless()})}
1156 -function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("Nombre de perfil",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",b.SSID);c+=addHtmlValue("Autenticaci\u00f3n",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("Cifrado",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("Prioridad",b.Priority);messagebox("Perfil inal\u00e1mbrico",c+"</div>")}}
1157 -function wifiRemoveButton(b){xxdialogMode||(QH(60,format('\u00bfEliminar el perfil inal\u00e1mbrico "{0}"?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"Perfil inal\u00e1mbrico",3,function(){removeWifiButtonEx(b)}))}function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1158 -function removeWifiEntryResponse(b,c,a,d,g){methodcheck(a)||amtstack.Enum("CIM_WiFiEndpointSettings",function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c,showWirelessInfo())})}
1159 -function showWifiNewProfile(){if(!xxdialogMode){var b="";for(i=1;256>i;i++){var c=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==i&&(c=0);c&&(b+="<option value="+i+">"+i)}QH("c24",b);QV("c26",13<amtversion);c25.value=6;c27.value=4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"Agregar perfil inal\u00e1mbrico",3,function(){addWifiProfile()});
1160 -updateWifiDialog()}}
1161 -function addWifiProfile(){amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},{__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c27.value,SSID:c23.value,Priority:c24.value,PSKPassPhrase:c28.value},
1162 -null,null,null,removeWifiEntryResponse)}
1163 -function updateWifiDialog(){var b=!0,c=c25.value,a=c27.value;QV(66,4>c);QV(65,3<c);QV(64,3<c);QV(67,4>c);4>c&&(3==a||4==a)&&(c27.value=2);3<c&&(2==a||5==a)&&(c27.value=3);32768==c&&(c27.value=4);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);QE("c54",1==b&&0<c22.value.length&&0<c23.value.length&&7<c28.value.length&&
1164 -c28.value==c29.value)}function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1157 +function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,e){200==e&&PullWireless()})}
1158 +function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("Nombre de perfil",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",EscapeHtml(b.SSID));c+=addHtmlValue("Autenticaci\u00f3n",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("Cifrado",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("Prioridad",b.Priority);var a=null,d="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");
1159 +if(xxWireless.CIM_IEEE8021xSettings.responses)for(var e in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[e].ElementName==b.ElementName&&(a=xxWireless.CIM_IEEE8021xSettings.responses[e]);a&&(c=c+'<div style="width:100%;border-bottom:1px solid #000;margin-bottom:5px;margin-top:5px">802.11x</div>'+addHtmlValue("Autenticaci\u00f3n",d[a.AuthenticationProtocol]),a.Domain&&(c+=addHtmlValue("Domain",EscapeHtml(a.Domain))),a.Username&&(c+=addHtmlValue("Nombre de usuario",
1160 +EscapeHtml(a.Username))));c+="</div>";messagebox("Perfil inal\u00e1mbrico",c)}}function wifiRemoveButton(b){xxdialogMode||(QH(61,format('\u00bfEliminar el perfil inal\u00e1mbrico "{0}"?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"Perfil inal\u00e1mbrico",3,function(){removeWifiButtonEx(b)}))}
1161 +function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1162 +function removeWifiEntryResponse(b,c,a,d,e){methodcheck(a)||amtstack.BatchEnum("",["CIM_WiFiEndpointSettings","CIM_IEEE8021xSettings"],function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c.CIM_WiFiEndpointSettings.responses,xxWireless.CIM_IEEE8021xSettings.responses=c.CIM_IEEE8021xSettings.responses,showWirelessInfo())})}
1163 +function showWifiNewProfile(){if(!xxdialogMode){for(var b="",c=1;256>c;c++){var a=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==c&&(a=0);a&&(b+="<option value="+c+">"+c)}QH("c24",b);var b="<option value=-1>"+EscapeHtml("Ninguna")+"</option>",a="<option value=-1>"+EscapeHtml("Ninguna")+"</option>",c;for(c in xxCertificates)xxCertificates[c].TrustedRootCertficate?a+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+
1164 +"</option>":xxCertificates[c].XPrivateKey&&(b+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+"</option>");QH("c50",b);QH("c52",a);c="<option value=32769>WPA3 OWE IEEE 802.1x</option><option value=32768>WPA3 SAE IEEE 802.1x</option>";c+="<option value=7>WPA2 IEEE 802.1x</option>";c+="<option value=5>WPA IEEE 802.1x</option>";c+="<option value=6>WPA2 PSK</option>";c+="<option value=4>PSK WPA</option>";QH("c25",c);c25.value=6;c26.value=
1165 +4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"Agregar perfil inal\u00e1mbrico",3,function(){addWifiProfile()});updateWifiDialog()}}
1166 +function addWifiProfile(){var b,c,a,d={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c26.value,SSID:c23.value,Priority:c24.value};if(4==c25.value||6==c25.value)d.PSKPassPhrase=c28.value;if(5==c25.value||7==c25.value||32768==c25.value||
1167 +32769==c25.value)b={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_IEEE8021xSettings"),ElementName:"8021x-"+c22.value,InstanceID:"8021x-"+c22.value,ActiveInS0:1==Q("c54").value,AuthenticationProtocol:Q("c32").value},""!=Q("c44").value&&(b.RoamingIdentity=Q("c44").value),""!=Q("c34").value&&(b.ServerCertificateName=Q("c34").value,b.ServerCertificateNameComparison=Q("c36").value),
1168 +""!=Q("c40").value&&(b.Username=Q("c40").value),""!=Q("c42").value&&(b.Password=Q("c42").value),""!=Q("c38").value&&(b.Domain=Q("c38").value),3<Q("c32").value&&(b.ProtectedAccessCredential=Q("c46").value,b.PACPassword=Q("c48").value),0<=parseInt(Q("c50").value)&&(c='<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">'+
1169 +xxCertificates[parseInt(Q("c50").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>"),0<=parseInt(Q("c52").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">'+
1170 +xxCertificates[parseInt(Q("c52").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>");console.log("wifiepsettinginput",JSON.stringify(d,null,2));console.log("netAuthProfile",JSON.stringify(b,null,2));console.log("netAuthSettingsClientCert",c);console.log("netAuthSettingsServerCaCert",a);amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},d,b,c,a,removeWifiEntryResponse)}
1171 +function updateWifiDialog(){var b=!0,c=c25.value,a=c26.value;4>c&&(3==a||4==a)&&(c26.value=2);3<c&&(2==a||5==a)&&(c26.value=3);if(32768==c||32769==c)c26.value=4;QV("c27",4==c||6==c);QV("c30",5==c||7==c||32768==c||32769==c);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);0==c22.value.length&&0==c23.value.length&&(b=!1);4!=c&&6!=c||
1172 +!(8>c28.value.length||63<c28.value.length||c28.value!=c29.value)||(b=!1);QE("c106",b);updateNetAuthDialog()}function updateNetAuth2Dialog(){QV("c35",""!=Q("c33").value);QV("c45",3<Q("c32").value);QV("c47",3<Q("c32").value)}
1173 +function editNetAuthProfile(){if(!xxdialogMode){var b="<option value=-1>"+EscapeHtml("Ninguna")+"</option>",c="<option value=-1>"+EscapeHtml("Ninguna")+"</option>",a;for(a in xxCertificates)xxCertificates[a].TrustedRootCertficate?c+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>":xxCertificates[a].XPrivateKey&&(b+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>");QH("c98",b);QH("c100",c);b=amtsysstate.AMT_8021XProfile.responses.Body;
1174 +Q("c78").value=b.Enabled?1:0;Q("c102").value=b.ActiveInS0?1:0;Q("c104").value=b.PxeTimeout;if(b.Enabled){Q("c80").value=b.AuthenticationProtocol;Q("c92").value=b.RoamingIdentity?b.RoamingIdentity:"";Q("c82").value=b.ServerCertificateName?b.ServerCertificateName:"";Q("c84").value=b.ServerCertificateNameComparison?b.ServerCertificateNameComparison:0;Q("c88").value=b.Username?b.Username:
1175 +"";Q("c90").value=b.Password?b.Password:"";Q("c86").value=b.Domain?b.Domain:"";Q("c94").value=b.ProtectedAccessCredential?b.ProtectedAccessCredential:"";Q("c96").value=b.PACPassword?b.PACPassword:"";var d=c=-1;b.ServerCertificateIssuer&&(c=b.ServerCertificateIssuer.ReferenceParameters.SelectorSet.Selector.Value);b.ClientCertificate&&(d=b.ClientCertificate.ReferenceParameters.SelectorSet.Selector.Value);for(a in xxCertificates)xxCertificates[a].InstanceID==
1176 +c&&(Q("c100").value=a),xxCertificates[a].InstanceID==d&&(Q("c98").value=a)}setDialogMode(27,"802.1x Profile",3,function(){setNetAuthProfile()});updateNetAuthDialog()}}
1177 +function updateNetAuthDialog(){QV("c79",1==Q("c78").value);QV("c81",1==Q("c78").value);QV("c83",1==Q("c78").value&&""!=Q("c82").value);QV("c85",1==Q("c78").value);QV("c87",1==Q("c78").value);QV("c89",1==Q("c78").value);QV("c91",1==Q("c78").value);QV("c93",1==Q("c78").value&&
1178 +3<Q("c80").value);QV("c95",1==Q("c78").value&&3<Q("c80").value);QV("c97",1==Q("c78").value);QV("c99",1==Q("c78").value);QV("c101",1==Q("c78").value);QV("c103",1==Q("c78").value)}
1179 +function setNetAuthProfile(){var b=Clone(amtsysstate.AMT_8021XProfile.responses.Body);b.Enabled=1==Q("c78").value;b.Enabled&&(b.ActiveInS0=1==Q("c102").value,b.AuthenticationProtocol=Q("c80").value,""!=Q("c92").value?b.RoamingIdentity=Q("c92").value:delete b.RoamingIdentity,""!=Q("c82").value?(b.ServerCertificateName=Q("c82").value,b.ServerCertificateNameComparison=Q("c84").value):
1180 +(delete b.ServerCertificateName,delete b.ServerCertificateNameComparison),""!=Q("c88").value?b.Username=Q("c88").value:delete b.Username,""!=Q("c90").value?b.Password=Q("c90").value:delete b.Password,""!=Q("c86").value?b.Domain=Q("c86").value:delete b.Domain,3<Q("c80").value?(b.ProtectedAccessCredential=Q("c94").value,b.PACPassword=Q("c96").value):(delete b.ProtectedAccessCredential,delete b.PACPassword),
1181 +0<=parseInt(Q("c98").value)?b.ClientCertificate="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c98").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ClientCertificate,0<=parseInt(Q("c100").value)?b.ServerCertificateIssuer="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+
1182 +amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c100").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ServerCertificateIssuer,b.PxeTimeout=Q("c104").value);amtstack.Put("AMT_8021XProfile",b,setNetAuthProfileEx)}
1183 +function setNetAuthProfileEx(b,c,a,d){200==d?(amtsysstate.AMT_8021XProfile.responses.Body=amtsysstate.AMT_8021XProfile.response=a.Body,updateSystemStatus()):a.Header.WsmanError?messagebox("802.1x Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("802.1x Error","Error, Status = "+d)}
1184 +function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1185 var DMTFCPUStatus="Desconocido;Habilitado;Deshabilitado por el usuario;Deshabilitado por BIOS (error POST);Ocioso;Otro".split(";"),DMTFMemType="Desconocido;Otro;DRACMA;DRAM sincr\u00f3nico;DRAM de cach\u00e9;EDO;EDRAM;VRAM;SRAM;RAM;ROM;Destello;EEPROM;FEPROM;EPROM;CDRAM;3DRAM;SDRAM;SGRAM;RDRAM;DDR;DDR-2;BRAM;FB-DIMM;DDR3;FBD2;DDR4;LPDDR;LPDDR2;LPDDR3;LPDDR4".split(";"),DMTFMemFormFactor=";Otro;Desconocido;SIMM;sorbo;Chip;INMERSI\u00d3N;ZIP;Tarjeta propietaria;DIMM;TSOP;Fila de papas fritas;RIMM;SODIMM;SRIMM;FB-DIM".split(";"),
1186 DMTFProcFamilly={191:"Procesador Intel&reg; Core &trade; 2 Duo",192:"Procesador Intel&reg; Core &trade; 2 Solo",193:"Procesador Intel&reg; Core &trade; 2 Extreme",194:"Procesador Intel&reg; Core &trade; 2 Quad",195:"Procesador m\u00f3vil Intel&reg; Core &trade; 2 Extreme",196:"Procesador m\u00f3vil Intel&reg; Core &trade; 2 Duo",197:"Procesador m\u00f3vil Intel&reg; Core &trade; 2 Solo",198:"Procesador Intel&reg; Core &trade; i7",199:"Procesador Intel&reg; Celeron&reg; de doble n\u00facleo"},HardwareInventory;
1167 -function processHardware(b,c,a,d){if(200==d){var g;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("Salvar...","SaveHardwareLog()")+" La informaci\u00f3n de hardware se recopila en el momento del arranque del sistema.");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>Plataforma</h2>"+FullTable({"Modelo de computadora":c.Model,
1187 +function processHardware(b,c,a,d){if(200==d){var e;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("Salvar...","SaveHardwareLog()")+" La informaci\u00f3n de hardware se recopila en el momento del arranque del sistema.");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>Plataforma</h2>"+FullTable({"Modelo de computadora":c.Model,
1188 Fabricante:c.Manufacturer,"Versi\u00f3n":c.Version,"N\u00famero de serie":c.SerialNumber,"ID del sistema":guidToStr(a.CIM_SystemPackaging.responses[0].PlatformGUID).toLowerCase()},"");b+="<br><h2>Z\u00f3calo</h2>";b+=FullTable({Fabricante:d.Manufacturer,"Nombre del producto":d.Model,"Versi\u00f3n":d.Version,"N\u00famero de serie":d.SerialNumber,"Etiqueta de propiedad":d.Tag,"\u00bfReemplazable?":1==d.CanBeFRUed?"Yes":"No"},"");b+="<br><h2>BIOS</h2>";b+=FullTable({Vendedor:a.CIM_BIOSElement.response.Manufacturer,
1169 -"Versi\u00f3n":v,"Fecha de lanzamiento":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",{timeZone:"UTC"})},"");b+="<br>";for(g in a.CIM_Processor.responses)c=a.CIM_Processor.responses[g],d=a.CIM_Chip.responses[g],b+="<h2>Procesador "+(parseInt(g)+1)+"</h2>",b+=FullTable({Fabricante:trademarks(d.Manufacturer),Familia:DMTFProcFamilly[c.Family],"Versi\u00f3n":trademarks(d.Version),"Velocidad m\u00e1xima del z\u00f3calo":c.MaxClockSpeed+" megahercio",Estado:DMTFCPUStatus[c.CPUStatus]},
1170 -"");b+="<br>";for(g in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[g],b+="<h2>M\u00f3dulo de memoria "+(+g+1)+"</h2>",b+=FullTable({"Etiqueta del banco":c.BankLabel,Fabricante:c.Manufacturer,"N\u00famero de serie":c.SerialNumber,Talla:parseInt(c.Capacity/1048576)+" MEGABYTE","Factor de forma":DMTFMemFormFactor[c.FormFactor],Tipo:DMTFMemType[c.MemoryType],"Etiqueta de propiedad":c.Tag,"N\u00famero de pieza":c.PartNumber},"");b+="<br>";for(g in a.CIM_MediaAccessDevice.responses)c=
1171 -a.CIM_MediaAccessDevice.responses[g],d=a.CIM_PhysicalPackage.responses[+g+1],b+="<h2>Medios de almacenamiento "+(parseInt(g)+1)+"</h2>",b+=FullTable({Modelo:d.Model,"N\u00famero de serie":""==d.SerialNumber?"Unknown":d.SerialNumber,Talla:parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" MEGABYTE"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(g in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[g].PackageType&&(c=a.CIM_PhysicalPackage.responses[g]);null!=c&&(b+="<h2>Battery</h2>",
1172 -g=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,Fabricante:c.Manufacturer,"Manufacture date":g,"N\u00famero de serie":c.SerialNumber,Tipo:"Otro;Desconocido;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],"Design capacity":a.CIM_Battery.response.DesignCapacity+" mWatt-hours","Design voltage":a.CIM_Battery.response.DesignVoltage+" mVolts"},c.OtherIdentifyingInfo&&
1189 +"Versi\u00f3n":v,"Fecha de lanzamiento":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",{timeZone:"UTC"})},"");b+="<br>";for(e in a.CIM_Processor.responses)c=a.CIM_Processor.responses[e],d=a.CIM_Chip.responses[e],b+="<h2>Procesador "+(parseInt(e)+1)+"</h2>",b+=FullTable({Fabricante:trademarks(d.Manufacturer),Familia:DMTFProcFamilly[c.Family],"Versi\u00f3n":trademarks(d.Version),"Velocidad m\u00e1xima del z\u00f3calo":c.MaxClockSpeed+" megahercio",Estado:DMTFCPUStatus[c.CPUStatus]},
1190 +"");b+="<br>";for(e in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[e],b+="<h2>M\u00f3dulo de memoria "+(+e+1)+"</h2>",b+=FullTable({"Etiqueta del banco":c.BankLabel,Fabricante:c.Manufacturer,"N\u00famero de serie":c.SerialNumber,Talla:parseInt(c.Capacity/1048576)+" MEGABYTE","Factor de forma":DMTFMemFormFactor[c.FormFactor],Tipo:DMTFMemType[c.MemoryType],"Etiqueta de propiedad":c.Tag,"N\u00famero de pieza":c.PartNumber},"");b+="<br>";for(e in a.CIM_MediaAccessDevice.responses)c=
1191 +a.CIM_MediaAccessDevice.responses[e],d=a.CIM_PhysicalPackage.responses[+e+1],b+="<h2>Medios de almacenamiento "+(parseInt(e)+1)+"</h2>",b+=FullTable({Modelo:d.Model,"N\u00famero de serie":""==d.SerialNumber?"Unknown":d.SerialNumber,Talla:parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" MEGABYTE"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(e in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[e].PackageType&&(c=a.CIM_PhysicalPackage.responses[e]);null!=c&&(b+="<h2>Battery</h2>",
1192 +e=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,Fabricante:c.Manufacturer,"Manufacture date":e,"N\u00famero de serie":c.SerialNumber,Tipo:"Otro;Desconocido;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],"Design capacity":a.CIM_Battery.response.DesignCapacity+" mWatt-hours","Design voltage":a.CIM_Battery.response.DesignVoltage+" mVolts"},c.OtherIdentifyingInfo&&
1193 (a["Other Info"]=c.OtherIdentifyingInfo),b+=FullTable(a,""))}b+="<br>";QH(16,b);updateSystemStatus()}}function SaveHardwareLog(){!xxdialogMode&&HardwareInventory&&SaveJsonFile("IntelAmtHardware","hardware","Informaci\u00f3n de hardware de Intel AMT",HardwareInventory)}var AmtSystemPowerSchemes=null;function PullPowerPolicy(){amtstack.Enum("AMT_SystemPowerScheme",powerPolicyResponse)}function powerPolicyResponse(b,c,a,d){AmtSystemPowerSchemes=a;updateSystemStatus()}
1194 function showPowerPolicyDlg(b){if(!xxdialogMode){for(var c="",a=0;a<AmtSystemPowerSchemes.length;a++)c+='<input type=radio name=powerpolicy value="'+AmtSystemPowerSchemes[a].InstanceID+'" '+(AmtSystemPowerSchemes[a].SchemeGUID==b?" checked":"")+">"+AmtSystemPowerSchemes[a].Description+"<br>";setDialogMode(11,"Pol\u00edtica de energ\u00eda Intel&reg; AMT",3,showPowerPolicyDlgOk,c)}}
1195 function showPowerPolicyDlgOk(){for(var b=null,c=0,a=document.getElementsByTagName("input");c<a.length;c++)"powerpolicy"==a[c].name&&a[c].checked&&(b=a[c].value);amtstack.AMT_SystemPowerScheme_SetPowerScheme(showPowerPolicyDlgOkDone,b)}function showPowerPolicyDlgOkDone(b,c,a,d){200==d&&PullSystemStatus()}var xxAccountAdminName,xxAccountRealmInfo,xxAccountEnabledInfo={},xxAccountFetch,showHiddenAccounts=!1;
1196 function PullUserInfo(){xxAccountFetch=1;delete xxAccountAdminName;xxAccountRealmInfo={};amtstack.AMT_AuthorizationService_GetAdminAclEntry(getAdminAclEntryResponse);amtstack.AMT_AuthorizationService_EnumerateUserAclEntries(1,enumerateUserAclEntriesResponse)}function getAdminAclEntryResponse(b,c,a,d){200==d&&(xxAccountRealmInfo[-1]={AccessPermission:999,DigestUsername:a.Body.Username,Realms:null},xxAccountAdminName=a.Body.Username,updateAccounts())}
1177 -function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var g in a.Body.Handles)b=a.Body.Handles[g],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1178 -function getUserAclEntryExResponse(b,c,a,d,g){xxAccountFetch--;200==d&&(a.Body.Handle=g,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[g]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,g){200==d&&(xxAccountEnabledInfo[g]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,g){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(g,getAclEnabledStateResponse,g))}
1179 -function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>Administre las cuentas de usuario Intel&reg; AMT para esta computadora.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,g=!1,v=0;a.DigestUsername?(d=a.DigestUsername,g="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!g){var n="";if(999!=a.AccessPermission){2==
1180 -v&&(n+="Discapacitado,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Reinos[c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="Auditor,");n=0<=a.Realms.indexOf(3)?n+"Administrador":1==l?n+"1 reino":n+(l+" reinos")}else n+="Administrador",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!g&&xxAccountAdminName&&(b+=" "+AddButton2("Editar...",
1197 +function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var e in a.Body.Handles)b=a.Body.Handles[e],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1198 +function getUserAclEntryExResponse(b,c,a,d,e){xxAccountFetch--;200==d&&(a.Body.Handle=e,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[e]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,e){200==d&&(xxAccountEnabledInfo[e]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,e){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(e,getAclEnabledStateResponse,e))}
1199 +function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>Administre las cuentas de usuario Intel&reg; AMT para esta computadora.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,e=!1,v=0;a.DigestUsername?(d=a.DigestUsername,e="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!e){var n="";if(999!=a.AccessPermission){2==
1200 +v&&(n+="Discapacitado,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Reinos[c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="Auditor,");n=0<=a.Realms.indexOf(3)?n+"Administrador":1==l?n+"1 reino":n+(l+" reinos")}else n+="Administrador",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!e&&xxAccountAdminName&&(b+=" "+AddButton2("Editar...",
1201 "changeAccountButton(event,"+a.Handle+")"));b+='</div><div style=padding-top:3px;width:330px;float:left;overflow-x:hidden title="'+d+'"><b>'+d+"</b></div><div style=padding-top:3px>"+n+"</div></div>"}}c='<div style=float:right;margin-right:8px><a title="Alternar cuentas ocultas" style=color:gray;cursor:pointer onclick=toggleAccountButton()>'+(showHiddenAccounts?"&#x25B2;":"&#x25BC;")+"</a></div><div>&nbsp;"+AddRefreshButton("xxAccountFetch=999;PullUserInfo()");xxAccountAdminName&&(c+=AddButton("Nueva cuenta",
1182 -"newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1202 +"newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(22,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1203 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"Editar cuenta",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1204 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"Nueva cuenta",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1185 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,g=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Error de cuenta","Par\u00e1metros inv\u00e1lidos");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1186 -l,n,g,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,g,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}
1187 -function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Administrador</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1188 -function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["Solo locales","Solo red","Todo (local y de red)"];
1189 -function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,g=c.DigestUsername;g||(g=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("Nombre",g);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("Estado",1==xxAccountEnabledInfo[b].Enabled?"Habilitado":"Discapacitado"));if(g==xxAccountAdminName)a+=addHtmlValue("Permiso","Administrador");else{var a=a+addHtmlValue("Permiso",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v="Administrador",
1190 -0<=c.Realms.indexOf(20)&&(v+="Auditor");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="Ninguna");a+=addHtmlValue("Reinos","")+"<b>"+v+"</b>"}messagebox("Cuenta"+g,a+"</div>")}}
1191 -function wsmanQuery(){QH(24,"");var b=getSelectedOptions(Q(22)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(23,!1),c&&0<c.length&&amtstack.BatchEnum("Navegador",c,browserResponse,null,!0))}
1192 -function browserResponse(b,c,a,d){QE(23,!0);b="";for(var g in a)c=a[g],b+="<h2>"+g+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(Vac\u00edo)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>Error #"+c.status+"</div>"),b+="</div><br>";QH(24,b)}
1205 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Error de cuenta","Par\u00e1metros inv\u00e1lidos");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1206 +l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1207 +function updateRealms(b){QV(62,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Administrador</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(63,c)}}
1208 +function updateAccountDialog(){var b=!0;if("none"!=Q(62).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c106",b)}var xxUserPermissions=["Solo locales","Solo red","Todo (local y de red)"];
1209 +function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,e=c.DigestUsername;e||(e=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("Nombre",e);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("Estado",1==xxAccountEnabledInfo[b].Enabled?"Habilitado":"Discapacitado"));if(e==xxAccountAdminName)a+=addHtmlValue("Permiso","Administrador");else{var a=a+addHtmlValue("Permiso",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v="Administrador",
1210 +0<=c.Realms.indexOf(20)&&(v+="Auditor");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="Ninguna");a+=addHtmlValue("Reinos","")+"<b>"+v+"</b>"}messagebox("Cuenta"+e,a+"</div>")}}
1211 +function wsmanQuery(){QH(25,"");var b=getSelectedOptions(Q(23)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(24,!1),c&&0<c.length&&amtstack.BatchEnum("Navegador",c,browserResponse,null,!0))}
1212 +function browserResponse(b,c,a,d){QE(24,!0);b="";for(var e in a)c=a[e],b+="<h2>"+e+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(Vac\u00edo)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>Error #"+c.status+"</div>"),b+="</div><br>";QH(25,b)}
1213 function wsmanFilter(){var b=c0.value.toLowerCase(),c;for(c in AllWsman)QV("WSB-"+AllWsman[c],""==b||0<=AllWsman[c].toLowerCase().indexOf(b))}function connectTerminal(){terminal&&(0==terminal.State?(terminal.tlsv1only=amtstack.wsman.comm.tlsv1only,terminal.Start(currentMeshNode._id,16994,"*","*",0)):terminal.Stop())}
1194 -function onTerminalStateChange(b,c){c4.value=0==c?"Conectar":"Desconectar";Q(29).textContent=StatusStrs[c];QE(34,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection of not supported.");
1195 -break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(31).value="100x30",terminal.m.Init(100,30)):(Q(31).value="80x25",terminal.m.Init(80,25))}
1196 -var terminalEmulations=["Terminal UTF8","ASCII extendido","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(33).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(32).value=["Intel (F10 = ESC + [OM)","Alternativo (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1197 -function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(30).value="LF",terminal.m.lineFeed="\n"):(Q(30).value="CR + LF",terminal.m.lineFeed="\r\n")}
1214 +function onTerminalStateChange(b,c){c4.value=0==c?"Conectar":"Desconectar";Q(30).textContent=StatusStrs[c];QE(35,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection is not supported.");
1215 +break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(32).value="100x30",terminal.m.Init(100,30)):(Q(32).value="80x25",terminal.m.Init(80,25))}
1216 +var terminalEmulations=["Terminal UTF8","ASCII extendido","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(34).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(33).value=["Intel (F10 = ESC + [OM)","Alternativo (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1217 +function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(31).value="LF",terminal.m.lineFeed="\n"):(Q(31).value="CR + LF",terminal.m.lineFeed="\r\n")}
1218 function terminalCaptureToggle(b){if(!xxdialogMode)if(void 0==terminal.m.capture)terminal.m.capture="",c3.value="Detener captura";else{if(0<terminal.m.capture.length){b="TerminalCapture";var c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);saveAs(data2blob(terminal.m.capture),b+".txt")}delete terminal.m.capture;
1219 c3.value="Iniciar captura"}}function terminal_FileSelectHandler(b){haltEvent(b);if(3==terminal.State&&null!=b.dataTransfer&&1==b.dataTransfer.files.length){var c=new FileReader;c.onload=terminal_onSetupBinRead;c.readAsText(b.dataTransfer.files[0])}}function terminal_onSetupBinRead(b){d3pastetextarea.value=b.target.result;setDialogMode(3,"Pegar",3,termPaste)}var desktopScreenInfo=null,desktopPollTimer=null,webRtcDesktop=null;
1220 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1221 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1202 -function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1203 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1222 +function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&(null==amtsysstate||null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&null!=amtsysstate.IPS_OptInService.response&&0!=amtsysstate.IPS_OptInService.response.OptInRequired)?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&
1223 +null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1224 0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1225 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1226 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1227 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
1228 "\r\n"},webRtcDesktop.webrtc.oniceconnectionstatechange=function(){null==webRtcDesktop||null==webRtcDesktop.webrtc||"disconnected"!=webRtcDesktop.webrtc.iceConnectionState&&"failed"!=webRtcDesktop.webrtc.iceConnectionState||webRtcDesktopReset()},webRtcDesktop.webrtc.createOffer(function(a){webRtcDesktop.webrtcoffer=a;webRtcDesktop.webrtc.setLocalDescription(a,function(){},webRtcDesktopReset)},webRtcDesktopReset,{mandatory:{OfferToReceiveAudio:!1,OfferToReceiveVideo:!1}})):"answer"==a.action&&null!=
1209 -webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=
1210 -setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(42).innerHTML="")}
1229 +webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.m.ReverseMouseWheel=desktopsettings.reverseMouseWheel,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),
1230 +PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(43).innerHTML="")}
1231 function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(desktopScreenInfo=a.IPS_ScreenSettingData.responses.Body,desktopScreenInfo.KVMRSD=a.IPS_KVMRedirectionSettingData.responses.Body,UpdateDesktopDisplayInfo())}
1212 -function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1232 +function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(43).innerHTML=b+"&nbsp;":Q(43).innerHTML=""}
1233 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1214 -function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Conectar":"Desconectar";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Escritorio remoto","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Escritorio remoto","The device indicated that this type of connection of not supported."):5E4==
1215 -b.disconnectCode?messagebox("Escritorio remoto","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("Escritorio remoto","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
1216 -break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1217 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Configuraci\u00f3n de escritorio remoto",3,showDesktopSettingsChanged))}
1218 -function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1219 -1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1220 -function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1221 -15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1234 +function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Conectar":"Desconectar";var d=3==c&&!urlvars.kvmviewonly;QE(44,d);QE("deskkeys",d);QE("DeskWD",d);QE(45,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Escritorio remoto","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Escritorio remoto","The device indicated that this type of connection is not supported."):5E4==
1235 +b.disconnectCode?messagebox("Escritorio remoto","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?a=null!=b.connectTime&&b.connectTime+5E3<Date.now():50002==b.disconnectCode&&messagebox("Escritorio remoto","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;case 3:12<=amtversion&&
1236 +b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(41).textContent=StatusStrs[desktop.State]+b}
1237 +function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Configuraci\u00f3n de escritorio remoto",3,showDesktopSettingsChanged))}
1238 +function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.reverseMouseWheel=d7kvmrmw.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();
1239 +desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1240 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;d7kvmrmw.checked=desktopsettings.reverseMouseWheel;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",
1241 +12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1242 c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1223 -QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1224 -function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1225 -"8px"),center()))}
1226 -function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"Entrada remota de teclado",3,showDeskTypeEx,'<div>Ingrese el texto y haga clic en Aceptar para escribirlo de forma remota con un teclado de ingl\u00e9s de EE. UU. Aseg\u00farese de colocar el cursor remoto en la posici\u00f3n correcta antes de continuar.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1243 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(44,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1244 +function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1!=urlvars.kvmonly&&disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(36,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding="8px"),center()))}
1245 +function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(45).blur(),setDialogMode(11,"Entrada remota de teclado",3,showDeskTypeEx,'<div>Ingrese el texto y haga clic en Aceptar para escribirlo de forma remota con un teclado de ingl\u00e9s de EE. UU. Aseg\u00farese de colocar el cursor remoto en la posici\u00f3n correcta antes de continuar.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1246 var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
1228 -function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(48).checked||desktop.m.sendcad()}
1247 +function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(49).checked||desktop.m.sendcad()}
1248 var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511,0]],2:[[65511,1],[65362,1],[65362,0],[65511,0]],3:[[65511,1],[108,1],[108,0],[65511,0]],4:[[65511,1],[109,1],[109,0],[65511,0]],5:[[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]],6:[[65470,1],[65470,0]],7:[[65471,1],[65471,0]],8:[[65472,1],[65472,0]],9:[[65473,1],[65473,0]],10:[[65474,1],[65474,0]],11:[[65475,1],[65475,0]],12:[[65476,1],[65476,0]],13:[[65477,1],[65477,0]],14:[[65478,1],[65478,0]],15:[[65479,
1230 -1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]]};
1231 -function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1249 +1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]],25:[[65293,1],[65293,0]]};
1250 +function deskSendKeys(){if(!Q(49).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1251 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1233 -function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1234 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1252 +function dmousedown(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1253 +function dmousemove(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1254 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1255 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1256 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1238 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Ra\u00edz</a>",g=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in g)""!=g[v]&&p24filetreelocation.push(g[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var g=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1239 -70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),e="";null!=l.d&&(e=new Date(l.d),e=e.getMonth()+1+"/"+e.getDate()+"/"+e.getFullYear()+" "+e.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1240 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(g+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+e+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1257 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Ra\u00edz</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,r;r=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1258 +70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1259 +encodeURIComponent(l.nx)+'")>'+r+"</a></span></div>":(w=r,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+r+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1260 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1261 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1262 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1247,8 +1266,8 @@ function p24setActions(){if(null==p24filetree)QE("p24DeleteFileButton",!1),QE("p
1266 function p24createfolder(){setDialogMode(11,"Nueva carpeta",3,p24createfolderEx,"<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% />");focusTextBox("p24renameinput");p24fileNameCheck()}function p24createfolderEx(){p24files.sendCtrlMsg(JSON.stringify({action:"mkdir",reqid:1,path:p24filetreelocation.join("/")+"/"+Q("p24renameinput").value}));p24folderup(999)}
1267 function p24deletefile(){var b=p24getFileSelCount();setDialogMode(11,"Eliminar",3,p24deletefileEx,1<b?"Delete "+b+" selected items?":"Delete selected item?")}function p24deletefileEx(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);p24files.sendCtrlMsg(JSON.stringify({action:"rm",reqid:1,path:p24filetreelocation.join("/"),delfiles:b}));p24folderup(999)}
1268 function p24renamefile(){for(var b,c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&(b=p24filetree.dir[c[a].value].n);setDialogMode(11,"Rebautizar",3,p24renamefileEx,'<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% value="'+b+'" />',{action:"rename",path:p24filetreelocation.join("/"),oldname:b});focusTextBox("p24renameinput");p24fileNameCheck()}
1250 -function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c54",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1251 -function p24uploadFile(){setDialogMode(11,"Subir archivo",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c54",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1269 +function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c106",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1270 +function p24uploadFile(){setDialogMode(11,"Subir archivo",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c106",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1271 function p24copyFile(b){var c=document.getElementsByName("fd");p24clipboard=[];p24clipboardCut=b;p24clipboardFolder=p24targetpath;for(b=0;b<c.length;b++)c[b].checked&&"3"==c[b].attributes.file.value&&p24clipboard.push(p24filetree.dir[c[b].value].n);p24updateClipview()}
1272 function p24pasteFile(){var b="";null!=p24clipboard&&0<p24clipboard.length&&(b="Confim "+(0==p24clipboardCut?"copy":"move")+" of "+p24clipboard.length+" entrie"+(1<p24clipboard.length?"s":"")+" to this location?");setDialogMode(11,"Pegar",3,p24pasteFileEx,b)}
1273 function p24pasteFileEx(){p24files.sendCtrlMsg(JSON.stringify({action:0==p24clipboardCut?"copy":"move",reqid:1,scpath:p24clipboardFolder,dspath:p24targetpath,names:p24clipboard}));p24folderup(999);1==p24clipboardCut&&(p24clipboardFolder=p24clipboard=null,p24clipboardCut=0,p24updateClipview())}
@@ -1272,36 +1291,36 @@ function iderStart2(){if(1!=Q("floppyImageInput").files.length&&1!=Q("cdromImage
1291 function iderStart3(b,c,a){iderStop();ider=CreateAmtRedirect(CreateAmtRemoteIder());ider.onStateChanged=onIderStateChange;ider.m.floppy=b;ider.m.cdrom=c;ider.m.iderStart=a;ider.m.sectorStats=iderSectorStats;ider.tlsv1only=amtstack.wsman.comm.tlsv1only;ider.Start(currentMeshNode._id,16994,"*","*",0);QV("IDERDiskMapButton",!0)}
1292 function iderStop(){ider&&(ider.m.Stop(),ider.onStateChanged=null,ider.m.onDialogPrompt=null,delete ider);iderTimer&&(clearInterval(iderTimer),delete iderTimer);iderToggleDiskMap(!1)}function onIderStateChange(b,c){QE("c2",3!=c);QE("c8",3!=c);QE("c1",3!=c);QE("c7",3!=c);QV(9,3==c);center();3==c?(urlvars.norefresh||(iderTimer=setInterval(onIderTimer,500)),onIderTimer()):iderTimer&&(clearInterval(iderTimer),delete iderTimer)}
1293 function onIderTimer(){ider.m.Update&&ider.m.Update();-1==ider.m.bytesFromAmt?iderStop():QH(10,"<b>"+(ider.m.server?"Servidor":"")+"Sesi\u00f3n IDE-R </b>, conectada,"+ider.m.bytesFromAmt+" en,"+ider.m.bytesToAmt+" fuera.")}var heatMapWidth=600,heatMapDividor={};
1275 -function iderSectorStats(b,c,a,d,g){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </b>, los bloques son {0} bytes.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> Disquete </b>, los bloques son {0} bytes.",512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;g/=c;if(0==b)v.height=
1276 -6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+g;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1294 +function iderSectorStats(b,c,a,d,e){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </b>, los bloques son {0} bytes.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> Disquete </b>, los bloques son {0} bytes.",512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;e/=c;if(0==b)v.height=
1295 +6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+e;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1296 function iderToggleDiskMap(b){var c="none"!=QS("iderHeatmap").display;null==b&&(b=!c);xxdialogMode&&(b=!1);QS("iderHeatmap").display=b?"":"none"}function onIderDialogPrompt(b,c,a){iderCodeBlock&&(document.body.removeChild(iderCodeBlock),delete iderCodeBlock);c.js&&(b=document.createElement("script"),b.text=c.js,iderCodeBlock=document.body.appendChild(b));setDialogMode(11,"Redireccionamiento de almacenamiento",a?a:3,onIderDialogPromptOk,c.html)}
1297 function onIderDialogPromptOk(b){1==b?window.iderServerCall?ider.m.dialogPrompt(window.iderServerCall()):ider.m.dialogPrompt():iderStop()}function iderServerStart(){xxdialogMode||(iderStop(),ider=CreateAmtRemoteServerIder(),null!=ider&&(ider.onStateChanged=onIderStateChange,ider.m.sectorStats=iderSectorStats,ider.m.onDialogPrompt=onIderDialogPrompt,ider.tlsv1only=amtstack.wsman.comm.tlsv1only,ider.Start(currentMeshNode._id,16994,"*","*",0)))}
1298 var xxRemoteAccess=null,xxEnvironementDetection=null,xxCiraServers=null,xxUserInitiatedCira=null,xxUserInitiatedEnabledState={32768:"Discapacitado",32769:"BIOS habilitado",32770:"OS habilitado",32771:"BIOS y SO habilitados"},xxRemoteAccessCredentiaLinks=null,xxMPSUserPass=null,xxPolicies=null;
1299 function PullRemoteAccess(){var b="*AMT_EnvironmentDetectionSettingData AMT_ManagementPresenceRemoteSAP AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule *AMT_UserInitiatedConnectionService AMT_MPSUsernamePassword".split(" ");11<amtversion&&b.push("*IPS_HTTPProxyService","IPS_HTTPProxyAccessPoint");amtstack.BatchEnum(null,b,processRemote1)}
1281 -function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var g in a)200!=a[g].status&&(d=a[g].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1282 -MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(g in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[g],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1300 +function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var e in a)200!=a[e].status&&(d=a[e].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1301 +MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(e in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[e],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1302 "@Name","Name").Value)),b.MpsType=c.MpsType,c=getItem(c.PolicySet.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyRuleName").Value.split(" ")[0],xxPolicies[c].push(b);updateRemoteAccess()}}
1303 function updateRemoteAccess(){if(null!=xxEnvironementDetection){var b,c="Discapacitado",a=xxRemoteAccess.IPS_HTTPProxyService&&xxRemoteAccess.IPS_HTTPProxyAccessPoint;xxEnvironementDetection.DetectionStrings&&0<xxEnvironementDetection.DetectionStrings.length&&(c="Habilitado,"+xxEnvironementDetection.DetectionStrings.length+" "+(1<xxEnvironementDetection.DetectionStrings.length?"domains":"domain"));b=""+TableStart();b+=TableEntry("Detecci\u00f3n del entorno",addLink(c,"editEnvironmentDetection()"));
1304 b+=TableEntry("Opciones de iniciaci\u00f3n del usuario",addLinkConditional(xxUserInitiatedEnabledState[xxUserInitiatedCira.EnabledState],"editUserInitiatedCira()",xxAccountAdminName));c="<i>Ninguna</i>";if(0<xxPolicies.User.length){var c="",d;for(d in xxPolicies.User)0<c.length&&(c+=", "),c+=xxPolicies.User[d].AccessInfo,1==xxPolicies.User[d].MpsType&&(c+=" (CILA)")}b+=TableEntry("Conexi\u00f3n iniciada por el usuario",addLinkConditional(c,'editMpsPolicy("User")',xxAccountAdminName));c="<i>Ninguna</i>";
1286 -if(0<xxPolicies.Alert.length)for(d in c="",xxPolicies.Alert)0<c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("Conexi\u00f3n iniciada por alerta",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>Ninguna</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var g=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,
1287 -"PolicyRuleName","Peri\u00f3dico");if(g){var v=atob(g.ExtendedData);0==ReadInt(v,0)&&(c+=format(", cada {0} segundos",ReadInt(v,4)));1==ReadInt(v,0)&&(g=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+g+":"+v+" daily")}b+=TableEntry("Conexi\u00f3n peri\u00f3dica",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Administre los servidores de administraci\u00f3n remota Intel&reg; AMT.<br><br>";
1305 +if(0<xxPolicies.Alert.length)for(d in c="",xxPolicies.Alert)0<c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("Conexi\u00f3n iniciada por alerta",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>Ninguna</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var e=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,
1306 +"PolicyRuleName","Peri\u00f3dico");if(e){var v=atob(e.ExtendedData);0==ReadInt(v,0)&&(c+=format(", cada {0} segundos",ReadInt(v,4)));1==ReadInt(v,0)&&(e=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+e+":"+v+" daily")}b+=TableEntry("Conexi\u00f3n peri\u00f3dica",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Administre los servidores de administraci\u00f3n remota Intel&reg; AMT.<br><br>";
1307 if(0==xxCiraServers.length)b+="<div style=padding-left:15px><br><i>No se encontraron servidores remotos.</i></div><br>";else for(d in xxCiraServers)c=":"+xxCiraServers[d].Port,xxCiraServers[d].CN&&(c+=", "+xxCiraServers[d].CN),b+="<div class=itemBar onclick=showServerDetails("+d+")><div style=padding-top:3px><b>"+xxCiraServers[d].AccessInfo+"</b>"+EscapeHtml(c)+"</div></div>";if(a)if(b+="<br>Administre los servidores proxy HTTP utilizados para las conexiones de administraci\u00f3n.<br><br>",c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses,
1308 0==c.length)b+="<div style=padding-left:15px><br><i>No hay proxies configurados.</i></div><br>";else for(d in c)b+="<div class=itemBar onclick=showProxyDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(c[d].AccessInfo)+":"+c[d].Port+"</b> / "+EscapeHtml(c[d].NetworkDnsSuffix)+"</div></div>";d="";xxAccountAdminName&&(d=AddButton("Agregar servidor...","AddRemoteAccessServer()"),a&&(d+=AddButton("A\u00f1adir proxy ...","AddRemoteAccessProxy()")));b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+
1290 -d);QH(52,b)}}var xxEditMpsPolicyType;
1291 -function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="Usuario iniciado");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(Ninguna)",g;for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[g].Name?" selected":"")+">"+
1292 -xxCiraServers[g].AccessInfo;c+="</select><div>Servidor primario</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Externo<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA - Interna</select><div>Tipo de MPS primario</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";
1293 -c+="<option value=-1>(Ninguna)";for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[g].Name?" selected":"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>Servidor secundario</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Externo<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA - Interna</select><div>Tipo secundario de MPS</div></div>")}g=
1294 -0;d&&(g=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+g+">";c+="<div>Vida \u00fatil del t\u00fanel (segundos)</div></div>";"Periodic"==b&&(a=0,g=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),g=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),g+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">Periodico, intervalo de tiempo<option value=1"+
1295 -(1==a?" selected":"")+">Hora del d\u00eda, una vez al d\u00eda.",c+="</select><div>Tipo de disparador</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+g+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0} Conexi\u00f3n",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1296 -function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c54",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1309 +d);QH(53,b)}}var xxEditMpsPolicyType;
1310 +function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="Usuario iniciado");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(Ninguna)",e;for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[e].Name?" selected":"")+">"+
1311 +xxCiraServers[e].AccessInfo;c+="</select><div>Servidor primario</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Externo<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA - Interna</select><div>Tipo de MPS primario</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";
1312 +c+="<option value=-1>(Ninguna)";for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[e].Name?" selected":"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>Servidor secundario</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Externo<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA - Interna</select><div>Tipo secundario de MPS</div></div>")}e=
1313 +0;d&&(e=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+e+">";c+="<div>Vida \u00fatil del t\u00fanel (segundos)</div></div>";"Periodic"==b&&(a=0,e=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),e=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),e+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">Periodico, intervalo de tiempo<option value=1"+
1314 +(1==a?" selected":"")+">Hora del d\u00eda, una vez al d\u00eda.",c+="</select><div>Tipo de disparador</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+e+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0} Conexi\u00f3n",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1315 +function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c106",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1316 -1!=Q("d2server1").value),QH("ttypelabel",0==Q("d2ttype").value?"Intervalo de activaci\u00f3n (segundos)":"Hora del d\u00eda (HH: MM)"),QE("d2ttype",-1!=Q("d2server1").value));QE("d2lifetime",-1!=Q("d2server1").value);b&&(QE("d2server1cira",-1<Q("d2server1").value),1<xxCiraServers.length&&QE("d2server2cira",-1<Q("d2server1").value&&-1<Q("d2server2").value))}
1317 function editMpsPolicyOk(){var b=xxEditMpsPolicyType;"User"==b&&(b="User Initiated");getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",b)?amtstack.Delete("AMT_RemoteAccessPolicyRule",{PolicyRuleName:b},editMpsPolicyOk2):editMpsPolicyOk2()}
1299 -function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var g,v;0<=Q("d2server1").value&&(g='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1318 +function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var e,v;0<=Q("d2server1").value&&(e='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1319 xxCiraServers[Q("d2server1").value].Name+"</Selector></SelectorSet></ReferenceParameters>");0<=Q("d2server1").value&&1<xxCiraServers.length&&0<=Q("d2server2").value&&(v='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1301 -xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?g&&(0==Q("d2server1cira").value?d.push(g):n.push(g),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):g&&(d.push(g),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1320 +xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?e&&(0==Q("d2server1cira").value?d.push(e):n.push(e),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):e&&(d.push(e),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1321 function editEnvironmentDetection(b){1!=b&&(editEnvironmentDetectionTmp=xxEnvironementDetection.DetectionStrings?Clone(xxEnvironementDetection.DetectionStrings):[]);var c="";xxAccountAdminName&&(c+="Ingrese hasta 5 sufijos de dominio de intranet. Si la computadora est\u00e1 fuera de estos dominios, los puertos locales Intel&reg; AMT se cerrar\u00e1n y las conexiones remotas del servidor estar\u00e1n activas.<br><br>");0==editEnvironmentDetectionTmp.length&&(c+="<i>Sin dominios de intranet, detecci\u00f3n de entorno deshabilitada.</i><br>");
1322 for(var a in editEnvironmentDetectionTmp)c+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Eliminar","editEnvironmentDetectionRemove("+a+")")+'</div><div style=padding-top:3px;max-width:260px;overflow:hidden title="'+editEnvironmentDetectionTmp[a]+'"><b>'+editEnvironmentDetectionTmp[a]+"</b></div></div>";xxAccountAdminName&&5>editEnvironmentDetectionTmp.length&&(c+="<br><input id=edInput placeholder=intranet.org style=width:276px onkeyup=edInputChg() maxlength=63><input type=button id=edAdd value=Add style=width:80px;margin-left:5px onclick=editEnvironmentDetectionAdd()>");
1304 -1==b?QH(63,c):setDialogMode(11,"Detecci\u00f3n de ambiente",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1323 +1==b?QH(64,c):setDialogMode(11,"Detecci\u00f3n de ambiente",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1324 function editEnvironmentDetectionDlg2(b,c,a,d){200!=d?messagebox("Detecci\u00f3n de ambiente",format("Error al agregar servidor, estado {0}",d)):a.Body.ReturnValue&&0!=a.Body.ReturnValue?messagebox("Detecci\u00f3n de ambiente",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}function edInputChg(){5>editEnvironmentDetectionTmp.length&&QE("edAdd",0<Q("edInput").value.length)}
1325 function editEnvironmentDetectionAdd(){editEnvironmentDetectionTmp.push(Q("edInput").value);editEnvironmentDetection(1)}function editEnvironmentDetectionRemove(b){editEnvironmentDetectionTmp.splice(b,1);editEnvironmentDetection(1)}
1326 function editUserInitiatedCira(){if(!xxdialogMode){var b="",c;for(c in xxUserInitiatedEnabledState)b+="<input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxUserInitiatedCira.EnabledState==c?"checked":"")+">"+xxUserInitiatedEnabledState[c]+"<br>";setDialogMode(11,"T\u00fanel iniciado por el usuario",3,editUserInitiatedCiraDlg,b)}}
@@ -1314,7 +1333,7 @@ function showProxyDetails(b){var c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.respo
1333 function showProxyDetailsOk(b,c){var a=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses[c];2==b&&amtstack.Delete("IPS_HTTPProxyAccessPoint",{Name:a.Name},showProxyDetailsOk2)}function showProxyDetailsOk2(b,c,a,d){408==d?messagebox("Eliminaci\u00f3n de proxy HTTP","No se puede eliminar el proxy HTTP, acceso denegado."):PullRemoteAccess()}
1334 function AddRemoteAccessProxy(){var b;b='<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessProxyUpdate()><option value=2>Nombre de host FQDN<option value=3>Direcci\u00f3n IPv4<option value=4>Direcci\u00f3n IPv6</select><div>Tipo de conecci\u00f3n</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>Puerto</div></div>';b+=
1335 "<div style=height:26px><input id=d2domain style=float:right;width:200px maxlength=191 onkeyup=AddRemoteAccessProxyUpdate()><div>Sufijo DNS</div></div>";setDialogMode(11,"Agregar proxy HTTP",3,AddRemoteAccessProxyOk,b);AddRemoteAccessProxyUpdate()}
1317 -function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c54",b);QH("d2typespan",["","","FQDN / nombre de host","Direcci\u00f3n IPv4","Direcci\u00f3n IPv6"][Q("d2type").value])}
1336 +function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c106",b);QH("d2typespan",["","","FQDN / nombre de host","Direcci\u00f3n IPv4","Direcci\u00f3n IPv6"][Q("d2type").value])}
1337 function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}function AddRemoteAccessProxyOk2(b,c,a,d){200!=d?messagebox("Agregar servidor proxy","Error al agregar proxy, estado"+d):0!=a.Body.ReturnValue?messagebox("Agregar servidor proxy",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1338 function AddRemoteAccessServer(){var b=[],c;for(c in xxCertificates)xxCertificates[c].XPrivateKey&&b.push(xxCertificates[c]);var a;a="<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()><option value=201>Nombre de host FQDN<option value=3>Direcci\u00f3n IPv4</select><div>Tipo de conecci\u00f3n</div></div><div style=height:26px><input id=d2name style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div id=d2lname></div></div>";
1339 a+='<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>Puerto de servicio</div></div>';a+="<div style=height:26px id=d2ucn><input id=d2cn style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Nombre com\u00fan del servidor</div></div>";a+="<div style=height:26px><select id=d2auth style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()>";
@@ -1324,85 +1343,87 @@ function AddRemoteAccessServerOk(){var b,c,a,d;1==Q("d2auth").value?b='<Address
1343 "</Selector></SelectorSet></ReferenceParameters>":(c=Q("d2user").value,a=Q("d2pass").value);0<Q("d2cn").value.length&&(d=Q("d2cn").value);amtstack.AMT_RemoteAccessService_AddMpServer(Q("d2name").value,Q("d2type").value,Q("d2port").value,Q("d2auth").value,b,c,a,d,AddRemoteAccessServerOk2)}
1344 function AddRemoteAccessServerOk2(b,c,a,d){200!=d?messagebox("Agregar servidor de Internet",format("Error al agregar servidor, estado {0}",d)):0!=a.Body.ReturnValue?messagebox("Agregar servidor de Internet",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1345 function AddRemoteAccessServerUpdate(){var b=0!=Q("d2name").value.length;3==Q("d2type").value&&1==b&&(b=0!=Q("d2cn").value.length);2==Q("d2auth").value&&1==b&&(b=0!=Q("d2user").value.length&&passwordcheck(Q("d2pass").value));if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;if(-1!=Q("d2name").value.indexOf(":")||3==Q("d2type").value&&-1!=Q("d2cn").value.indexOf(":"))b=!1;QH("d2lname",201==Q("d2type").value?"Nombre de host":"Direcci\u00f3n IPv4");QV("d2utype",2==Q("d2auth").value);
1327 -QV("d2ucn",3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c54",b)}
1346 +QV("d2ucn",3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c106",b)}
1347 function showEditNameDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_GeneralSettings.response.HostName,a=amtsysstate.AMT_GeneralSettings.response.DomainName;null!=a&&0<a.length&&(c+="."+a);c='<br><div style=height:26px><input id=d11name value="'+c+'" style=float:right;width:200px><div>Nombre y dominio</div></div>';1==b&&(b=1==amtsysstate.AMT_GeneralSettings.response.SharedFQDN,c+="<div style=height:26px><select id=d11fqdn style=float:right;width:200px><option value=true "+(b?"selected":"")+'>Compartido, igual que el sistema operativo<option value="false" '+
1348 (b?"":"selected")+">Dedicado, diferente del sistema operativo</select><div>Nombre compartido</div></div>");setDialogMode(11,"Nombre de la computadora",3,editNameDlgOk,c)}}
1349 function editNameDlgOk(){var b=Q("d11name").value,c=b.indexOf("."),a="";0<=c&&(a=b.substring(c+1),b=b.substring(0,c));c=Clone(amtsysstate.AMT_GeneralSettings.response);c.HostName=b;c.DomainName=a;Q("d11fqdn")&&(c.SharedFQDN=d11fqdn.value);amtstack.Put("AMT_GeneralSettings",c,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}function computerNameGet(b,c,a,d){200==d&&(amtsysstate.AMT_GeneralSettings.response=a.Body,updateSystemStatus())}
1331 -function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c36.value=c;c37.value=b.DDNSPeriodicUpdateInterval;c38.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"Cliente DNS din\u00e1mico",3,showEditDnsDlgOk)}}
1332 -function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c36.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c36.value?!0:!1;2==c36.value&&(b.DDNSPeriodicUpdateInterval=c37.value,b.DDNSTTL=c38.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1333 -function showEditDnsDlgChange(){QE("c37",2==c36.value);QE("c38",2==c36.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"Funciones Intel&reg; AMT",3,featuresDlgOk))}
1334 -function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,g){200!=g?messagebox("Error","RedirectionService, RequestStateChange Error"+g):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,g){200!=g?messagebox("Error","KVMRedirectionSAP, RequestStateChange Error"+
1335 -g):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("Error","RedirectionService PUT Error"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1336 -function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c49.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c50.checked=!c49.checked),c51.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c52.checked=!c51.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1350 +function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c61.value=c;c62.value=b.DDNSPeriodicUpdateInterval;c63.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"Cliente DNS din\u00e1mico",3,showEditDnsDlgOk)}}
1351 +function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c61.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c61.value?!0:!1;2==c61.value&&(b.DDNSPeriodicUpdateInterval=c62.value,b.DDNSTTL=c63.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1352 +function showEditDnsDlgChange(){QE("c62",2==c61.value);QE("c63",2==c61.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"Funciones Intel&reg; AMT",3,featuresDlgOk))}
1353 +function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,e){200!=e?messagebox("Error","RedirectionService, RequestStateChange Error"+e):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,e){200!=e?messagebox("Error","KVMRedirectionSAP, RequestStateChange Error"+
1354 +e):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("Error","RedirectionService PUT Error"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1355 +function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c74.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c75.checked=!c74.checked),c76.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c77.checked=!c76.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1356 function showEnableBootServiceDlgOk(){var b=32768+parseInt(document.querySelector("input[name=d26a]:checked").value);15<amtversion&&(b+=parseInt(document.querySelector("input[name=d26b]:checked").value));amtstack.CIM_BootService_RequestStateChange(b,null,showEnableBootServiceDlgResponse,b)}
1338 -function showEnableBootServiceDlgResponse(b,c,a,d,g){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,g),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1339 -function showEnableBootServiceDlgResponse2(b,c,a,d,g){200==d&&a.Body.EnabledState!=g&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"Consentimiento del usuario",3,consentDlgOk)}}
1357 +function showEnableBootServiceDlgResponse(b,c,a,d,e){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,e),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1358 +function showEnableBootServiceDlgResponse2(b,c,a,d,e){200==d&&a.Body.EnabledState!=e&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"Consentimiento del usuario",3,consentDlgOk)}}
1359 function consentDlgOk(){amtsysstate.IPS_OptInService.response.OptInRequired=document.querySelector("input[name=d10]:checked").value;amtstack.Put("IPS_OptInService",amtsysstate.IPS_OptInService.response,function(){amtstack.Get("IPS_OptInService",consentGet,0,1)},0,1)}function consentGet(b,c,a,d){200==d&&PullSystemStatus()}var ipv6addrtype="Direcci\u00f3n local del enlace;Direcci\u00f3n local de red;Direcci\u00f3n global;Usuario configurado;No permitido;DAD en progreso;v\u00e1lido;obsoleto;preferido / en desuso;Caducado;colisi\u00f3n;No permitido".split(";");
1360 function showIPv6AddrDlg(b,c){if(!xxdialogMode){var a=TableStart();t=c.split(",");for(var d=0;d<t.length;d+=3)a+=TableEntry("<b>"+t[d]+"</b><br><span style=font-size:10px>"+ipv6addrtype[t[d+1]]+","+ipv6addrtype[+t[d+2]+5]+"</span>","");setDialogMode(11,0==b?"Direcciones IPv6 para interfaz cableada":"Direcciones IPv6 para interfaz inal\u00e1mbrica",1,null,a+TableEnd())}}
1342 -function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(69,0==b);QV(70,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 deshabilitado");QH("d21l1","IPv6 habilitado, autom\u00e1tico");QH("d21l2","IPv6 habilitado, autom\u00e1tico + direcci\u00f3n manual");d21o0.checked=!c;d21o1.checked=
1343 -c&&!ipv6manual;d21o2.checked=c&&ipv6manual;c31.value=isIpAddress(a.IPv6Address,"");c33.value=isIpAddress(a.DefaultRouter,"");c34.value=isIpAddress(a.PrimaryDNS,"");c35.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"Soporte IPv6 para interfaz cableada":"Compatibilidad con IPv6 para interfaz inal\u00e1mbrica",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1344 -function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c31.value?"::":c31.value.toLocaleLowerCase(),a.DefaultRouter=""==c33.value?"::":c33.value.toLocaleLowerCase(),
1345 -a.PrimaryDNS=""==c34.value?"::":c34.value.toLocaleLowerCase(),a.SecondaryDNS=""==c35.value?"::":c35.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1346 -"CreationClassName").Value,g=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1347 -d+'</w:Selector><w:Selector Name="DeviceID">'+g+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1348 -b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",g=Clone(c[a]);g.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",g,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Soporte IPv6",format("No se puede establecer el estado de IPv6, error {0}",d))}
1361 +function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(68,0==b);QV(69,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 deshabilitado");QH("d21l1","IPv6 habilitado, autom\u00e1tico");QH("d21l2","IPv6 habilitado, autom\u00e1tico + direcci\u00f3n manual");d21o0.checked=!c;d21o1.checked=
1362 +c&&!ipv6manual;d21o2.checked=c&&ipv6manual;c56.value=isIpAddress(a.IPv6Address,"");c58.value=isIpAddress(a.DefaultRouter,"");c59.value=isIpAddress(a.PrimaryDNS,"");c60.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"Soporte IPv6 para interfaz cableada":"Compatibilidad con IPv6 para interfaz inal\u00e1mbrica",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1363 +function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c56.value?"::":c56.value.toLocaleLowerCase(),a.DefaultRouter=""==c58.value?"::":c58.value.toLocaleLowerCase(),
1364 +a.PrimaryDNS=""==c59.value?"::":c59.value.toLocaleLowerCase(),a.SecondaryDNS=""==c60.value?"::":c60.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1365 +"CreationClassName").Value,e=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1366 +d+'</w:Selector><w:Selector Name="DeviceID">'+e+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1367 +b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",e=Clone(c[a]);e.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",e,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Soporte IPv6",format("No se puede establecer el estado de IPv6, error {0}",d))}
1368 function showPingActionDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,b=(1==b.PingResponseEnabled)+((1==b.RmcpPingResponseEnabled)<<1);d20a.checked=0==b;d20b.checked=1==b;d20c.checked=2==b;d20d.checked=3==b;setDialogMode(20,"Respuesta Intel&reg; AMT Ping",3,showPingActionDlgOk)}}
1369 function showPingActionDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response),c=document.querySelector("input[name=d20]:checked").value;b.PingResponseEnabled=0!=(c&1);b.RmcpPingResponseEnabled=0!=(c&2);amtstack.Put("AMT_GeneralSettings",b,PullSystemStatus,0,1)}
1351 -function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(68,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(69,!0);QV(70,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","Configuraci\u00f3n autom\u00e1tica con servidor DHCP");QH("d21l2","Configuraci\u00f3n est\u00e1tica usando la configuraci\u00f3n de IPv4 a continuaci\u00f3n");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=
1352 -!d21o1.checked;c31.value=isIpAddress(b.IPAddress,"");c32.value=isIpAddress(b.SubnetMask,"");c33.value=isIpAddress(b.DefaultGateway,"");c34.value=isIpAddress(b.PrimaryDNS,"");c35.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"Configuraciones IPv4",3,showIPSetupDlgOk)}}
1353 -function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6 habilitado, autom\u00e1tico + direcci\u00f3n manual"==Q("d21l2").innerHTML&&2>c31.value.split(":").length&&(b=!1);QE("c54",b);c31.disabled=c32.disabled=c33.disabled=c34.disabled=c35.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1354 -function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c31.value,b.SubnetMask=c32.value,b.DefaultGateway=c33.value,""!=c34.value&&(b.PrimaryDNS=c34.value),""!=c35.value&&
1355 -(b.SecondaryDNS=c35.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Configuraciones IPv4",format("No se pueden establecer los par\u00e1metros de red, error {0}",d))}amtPowerBootCapabilities=null;function showPowerActionDlg(){xxdialogMode||(statusbox("Acciones de poder","Comprobando capacidades ..."),amtstack.Get("AMT_BootCapabilities",powerActionResponse00,0,1))}
1356 -function powerActionResponse00(b,c,a,d){if(200==d){b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(g){}amtPowerBootCapabilities=a.Body;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","Encender",2);b&1&&(addOption("d5actionSelect","Reiniciar",10),addOption("d5actionSelect","Ciclo de poder",5),addOption("d5actionSelect","Corriente cortada",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect","Encendido al diagn\u00f3stico",
1357 -300),b&1&&addOption("d5actionSelect","Restablecer a diagn\u00f3stico",301));9<amtversion&&b&1&&(addOption("d5actionSelect","OS Wake desde Standby",500),addOption("d5actionSelect","Ahorro de energ\u00eda del sistema operativo",501),addOption("d5actionSelect","Soft-off",12),addOption("d5actionSelect","Reinicio suave",14),addOption("d5actionSelect","Dormir",4),addOption("d5actionSelect","Hibernar",7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&addOption("d5actionSelect","Encienda el BIOS",100),b&1&&
1358 -addOption("d5actionSelect","Restablecer a BIOS",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","Encender para borrar de forma segura",104),b&1&&addOption("d5actionSelect","Restablecer a borrado seguro",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",106),b&
1359 -1&&addOption("d5actionSelect","Reset to Platform Erase",107));b&1&&addOption("d5actionSelect","Restablecer al disquete IDE-R",200);b&2&&addOption("d5actionSelect","Encienda el disquete IDE-R",201);b&1&&addOption("d5actionSelect","Restablecer a IDE-R CDROM",202);b&2&&addOption("d5actionSelect","Encienda el CDROM IDE-R",203);b&1&&addOption("d5actionSelect","Restablecer a PXE",400);b&2&&addOption("d5actionSelect","Encender a PXE",401);addOption("d5actionSelect","Acci\u00f3n personalizada ...",999);5<
1360 -amtversion&&addOption("d5actionSelect","Consentimiento del usuario ...",998);setDialogMode(5,"Acciones de poder",3,powerActionDlgCheck)}else messagebox("Acci\u00f3n de poder",format("No se pueden obtener las capacidades del sistema, error {0}",d))}
1361 -function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"Acci\u00f3n de poder completada."):QH(60,format("Error de acci\u00f3n de energ\u00eda # {0}.",g));setDialogMode(1,"Acci\u00f3n de poder",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="\u00bfConfirmar la ejecuci\u00f3n de Intel&reg; Remote Secure Erase?<br>Ingrese la contrase\u00f1a de borrado seguro si es necesario.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Contrase\u00f1a</div></div><br><div style=color:red><b> ADVERTENCIA: </b> Esto borrar\u00e1 los datos del sistema remoto.</div>",
1370 +function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(67,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(68,!0);QV(69,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","Configuraci\u00f3n autom\u00e1tica con servidor DHCP");QH("d21l2","Configuraci\u00f3n est\u00e1tica usando la configuraci\u00f3n de IPv4 a continuaci\u00f3n");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=
1371 +!d21o1.checked;c56.value=isIpAddress(b.IPAddress,"");c57.value=isIpAddress(b.SubnetMask,"");c58.value=isIpAddress(b.DefaultGateway,"");c59.value=isIpAddress(b.PrimaryDNS,"");c60.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"Configuraciones IPv4",3,showIPSetupDlgOk)}}
1372 +function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6 habilitado, autom\u00e1tico + direcci\u00f3n manual"==Q("d21l2").innerHTML&&2>c56.value.split(":").length&&(b=!1);QE("c106",b);c56.disabled=c57.disabled=c58.disabled=c59.disabled=c60.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1373 +function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c56.value,b.SubnetMask=c57.value,b.DefaultGateway=c58.value,""!=c59.value&&(b.PrimaryDNS=c59.value),""!=c60.value&&
1374 +(b.SecondaryDNS=c60.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Configuraciones IPv4",format("No se pueden establecer los par\u00e1metros de red, error {0}",d))}amtPowerBootCapabilities=null;function showPowerActionDlg(){xxdialogMode||(statusbox("Acciones de poder","Comprobando capacidades ..."),amtstack.Get("AMT_BootCapabilities",powerActionResponse00,0,1))}
1375 +function showPowerActionDlg(){if(!xxdialogMode){var b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(c){}amtPowerBootCapabilities=amtsysstate.AMT_BootCapabilities.response;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","Encender",2);b&1&&(addOption("d5actionSelect","Reiniciar",10),addOption("d5actionSelect","Ciclo de poder",5),addOption("d5actionSelect","Corriente cortada",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect",
1376 +"Encendido al diagn\u00f3stico",300),b&1&&addOption("d5actionSelect","Restablecer a diagn\u00f3stico",301));9<amtversion&&b&1&&(addOption("d5actionSelect","OS Wake desde Standby",500),addOption("d5actionSelect","Ahorro de energ\u00eda del sistema operativo",501),addOption("d5actionSelect","Soft-off",12),addOption("d5actionSelect","Reinicio suave",14),addOption("d5actionSelect","Dormir",4),addOption("d5actionSelect","Hibernar",7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&addOption("d5actionSelect",
1377 +"Encienda el BIOS",100),b&1&&addOption("d5actionSelect","Restablecer a BIOS",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","Encender para borrar de forma segura",104),b&1&&addOption("d5actionSelect","Restablecer a borrado seguro",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",
1378 +106),b&1&&addOption("d5actionSelect","Reset to Platform Erase",107));b&1&&addOption("d5actionSelect","Restablecer al disquete IDE-R",200);b&2&&addOption("d5actionSelect","Encienda el disquete IDE-R",201);b&1&&addOption("d5actionSelect","Restablecer a IDE-R CDROM",202);b&2&&addOption("d5actionSelect","Encienda el CDROM IDE-R",203);b&1&&addOption("d5actionSelect","Restablecer a PXE",400);b&2&&addOption("d5actionSelect","Encender a PXE",401);addOption("d5actionSelect","Acci\u00f3n personalizada ...",
1379 +999);5<amtversion&&addOption("d5actionSelect","Consentimiento del usuario ...",998);setDialogMode(5,"Acciones de poder",3,powerActionDlgCheck)}}
1380 +function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"Acci\u00f3n de poder completada."):QH(61,format("Error de acci\u00f3n de energ\u00eda # {0}.",e));setDialogMode(1,"Acci\u00f3n de poder",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="\u00bfConfirmar la ejecuci\u00f3n de Intel&reg; Remote Secure Erase?<br>Ingrese la contrase\u00f1a de borrado seguro si es necesario.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Contrase\u00f1a</div></div><br><div style=color:red><b> ADVERTENCIA: </b> Esto borrar\u00e1 los datos del sistema remoto.</div>",
1381 rsepass=1,setDialogMode(11,"Acciones de poder",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1363 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> ADVERTENCIA: </b> Esto borrar\u00e1 los datos del sistema remoto.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");
1364 -d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password",
1365 -"<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Acciones de poder",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1366 -function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,g=[1,2,6,25,26,31],v;for(v in g)d&1<<g[v]&&Q("rpef"+g[v]).checked&&(a+=1<<g[v]);d=makeUefiBootParam(1,a,4);g=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),g++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),g++);platfromEraseTLV={tlv:btoa(d),tlvlen:g};c?(statusbox("Acci\u00f3n de poder","Comprobando estado ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1382 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> ADVERTENCIA: </b> Esto borrar\u00e1 los datos del sistema remoto.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&8&&a.push("<label><input id=rpef3 type=checkbox onchange=powerActionDlgRPEValidate()>Verify Storage Erase</label>");
1383 +d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&65536&&a.push("<label><input id=rpef16 type=checkbox onchange=powerActionDlgRPEValidate()>OEM Custom Action</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&
1384 +-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");0<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+
1385 +addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpeeomdata style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("OEM Data (HEX)","<input id=rpeoemdatax style=width:210px maxlength=256 type=input>")+"</div>";setDialogMode(11,"Acciones de poder",3,powerActionDlgRPEEx,c,b);QE("c106",!1)}
1386 +function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,3,6,16,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QV("rpeeomdata",b&65536);QE("c106",b)}var platfromEraseTLV=null;
1387 +function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,3,6,16,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);a&65536&&""!=Q("rpeoemdatax").value&&(d+=makeUefiBootParam(20,hex2rstr(Q("rpeoemdatax").value),null,11),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("Acci\u00f3n de poder","Comprobando estado ..."),
1388 +amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1389 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("Acci\u00f3n de poder","Comprobando estado ...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=!1);13!=currentView&&
1390 10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
1369 -function showAdvPowerDlg(){try{Q("c39").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1391 +function showAdvPowerDlg(){try{Q("c64").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1392 QV("ForceHDBootOption",1==amtPowerBootCapabilities.ForceHardDriveBoot);QV("ForcePXEBootOption",1==amtPowerBootCapabilities.ForcePXEBoot);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);QV("d24dSerialOverLan",1==amtPowerBootCapabilities.SOL);
1393 QV("d24dSecureErase",1==amtPowerBootCapabilities.SecureErase);QV("d24dPlatformErase",null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&0!=(amtsysstate.CIM_BootService.response.EnabledState&2));QV("d24dFirmwareReset",1==amtPowerBootCapabilities.ConfigurationDataReset);QV("d24dLockSleepButton",1==amtPowerBootCapabilities.SleepButtonLock);QV("d24dUserPasswordBypass",1==amtPowerBootCapabilities.UserPasswordBypass);
1372 -QV("c46",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c47",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c48",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);setDialogMode(24,"Acci\u00f3n de poder personalizada",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}
1373 -function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c39").value&&600>Q("c39").value;QE("c41",!b);QE("c43",!b);QE("idd_d24IDERBootDevice",!b);QE("c45",!b);QE("idd_d24RSEPass",!b);QE("c54",!0)}
1374 -function showAdvPowerDlgOk(){var b=Q("c39").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"Acci\u00f3n de poder completada."):QH(60,format("Error de acci\u00f3n de energ\u00eda # {0}.",g));setDialogMode(1,"Acci\u00f3n de poder",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c39").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=
1375 -Q("d24BiosSecureBoot").checked,AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c43").value,AvdPowerDlg.FirmwareVerbosity=Q("c45").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c44").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked,AvdPowerDlg.LockSleepButton=
1394 +QV("c71",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c72",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c73",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);QH("c66",'<option value=0>None</option><option id="ForceDVDBootOption" value=1>Force CD/DVD Boot</option><option id="ForcePXEBootOption" value=2>Force PXE Boot</option><option id="ForceHDBootOption" value=3>Force Hard Disk Boot</option><option id="ForceDiagBootOption" value=4>Force Diagnostic Boot</option>');
1395 +setDialogMode(24,"Acci\u00f3n de poder personalizada",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c64").value&&600>Q("c64").value;QE("c66",!b);QE("c68",!b);QE("idd_d24IDERBootDevice",!b);QE("c70",!b);QE("idd_d24RSEPass",!b);QE("c106",!0)}
1396 +function showAdvPowerDlgOk(){var b=Q("c64").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"Acci\u00f3n de poder completada."):QH(61,format("Error de acci\u00f3n de energ\u00eda # {0}.",e));setDialogMode(1,"Acci\u00f3n de poder",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c64").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=
1397 +Q("d24BiosSecureBoot").checked,AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c68").value,AvdPowerDlg.FirmwareVerbosity=Q("c70").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c69").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked,AvdPowerDlg.LockSleepButton=
1398 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,AvdPowerDlg.PlatformErase=Q("d24PlatformErase").checked,AvdPowerDlg.FirmwareReset=Q("d24FirmwareReset").checked,!0===AvdPowerDlg.SecureErase&&0<Q("d24rsepass").value.length&&
1399 (AvdPowerDlg.RSEPassword=Q("d24rsepass").value),!0===AvdPowerDlg.PlatformErase?powerActionDlgRPE(!0):(statusbox("Acci\u00f3n de poder","Comprobando estado ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)))}
1378 -function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("Acci\u00f3n de poder",format("Error # {0}",d)):4294967295==a.Body.OptInRequired&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(d6ConsentText.value="",setDialogMode(6,"Consentimiento del usuario",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("Acci\u00f3n de poder","Iniciando opt-in ..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):
1379 -connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Consentimiento del usuario","El consentimiento del usuario no es necesario."):(statusbox("Acci\u00f3n de poder","Obteniendo la configuraci\u00f3n de arranque ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1400 +function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("Acci\u00f3n de poder",format("Error # {0}",d)):(4294967295==a.Body.OptInRequired||connectDesktopConsent&&0!=a.Body.OptInRequired)&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(amtstack.IPS_OptInService_CancelOptIn(null),d6ConsentText.value="",setDialogMode(6,"Consentimiento del usuario",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("Acci\u00f3n de poder",
1401 +"Iniciando opt-in ..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Consentimiento del usuario","El consentimiento del usuario no es necesario."):(statusbox("Acci\u00f3n de poder","Obteniendo la configuraci\u00f3n de arranque ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1402 function powerActionResponseC1(b,c,a,d){200!=d?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("Acci\u00f3n de poder",format("Error #",d)):0!=a.Body.ReturnValue?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("Error de consentimiento del usuario",a.Body.ReturnValueStr.replace(/_/g," ")):(d6ConsentText.value="",setDialogMode(6,"Consentimiento del usuario",11,powerActionSendConsent),checkConsentDisplay(),consentChanged(),amtstack.Enum("CIM_ServiceAvailableToElement",
1403 function(a,b,c,d){errcheck(d,a)||(amtsysstate.CIM_ServiceAvailableToElement.responses=c,updateSystemStatus(),null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState&&amtstack.RequestPowerStateChange(2,function(a,b,c,d){}))}))}
1382 -function powerActionSendConsent(b){0==b?amtstack.IPS_OptInService_CancelOptIn(function(){}):(statusbox("Acci\u00f3n de poder","Enviando consentimiento del usuario ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1404 +function powerActionSendConsent(b){console.log("powerActionSendConsent",b);0==b?(amtstack.IPS_OptInService_CancelOptIn(function(){}),connectDesktopConsent=!1,desktop.Stop()):(statusbox("Acci\u00f3n de poder","Enviando consentimiento del usuario ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1405 function powerActionResponseC2(b,c,a,d){200!=d?messagebox("Acci\u00f3n de poder",format("Error # {0}",d)):0!=a.Body.ReturnValue?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Consentimiento del usuario","Consentimiento del usuario exitoso."):(statusbox("Acci\u00f3n de poder","Comprobando estado ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1384 -function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("Acci\u00f3n de poder",format("Error # {0}",d));else{b=d5actionSelect.value;var g=a.Body;g.ConfigurationDataReset=!1;delete g.WinREBootEnabled;delete g.UEFILocalPBABootEnabled;delete g.UEFIHTTPSBootEnabled;delete g.SecureBootControlEnabled;delete g.BootguardStatus;delete g.OptionsCleared;delete g.BIOSLastStatus;delete g.UefiBootParametersArray;delete g.RPEEnabled;999==b?(g.BIOSPause=AvdPowerDlg.BIOSPause,g.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1385 -g.BIOSSetup=AvdPowerDlg.BIOSSetup,g.BootMediaIndex=AvdPowerDlg.BootMediaIndex,g.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,g.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,g.IDERBootDevice=AvdPowerDlg.IDERBootDevice,g.LockKeyboard=AvdPowerDlg.LockKeyboard,g.LockPowerButton=AvdPowerDlg.LockPowerButton,g.LockResetButton=AvdPowerDlg.LockResetButton,g.LockSleepButton=AvdPowerDlg.LockSleepButton,g.ReflashBIOS=AvdPowerDlg.ReflashBIOS,g.UseIDER=AvdPowerDlg.UseIDER,g.UseSOL=AvdPowerDlg.UseSOL,
1386 -g.UseSafeMode=AvdPowerDlg.UseSafeMode,g.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=g.SecureErase&&(g.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==g.SecureErase&&AvdPowerDlg.RSEPassword&&(g.RSEPassword=AvdPowerDlg.RSEPassword)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1387 -0!=(amtPowerBootCapabilities.PlatformErase&1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(g.BIOSPause=!1,g.EnforceSecureBoot=!1,g.BIOSSetup=99<b&&104>b,g.BootMediaIndex=0,g.FirmwareVerbosity=0,g.ForcedProgressEvents=!1,g.IDERBootDevice=202==b||203==b?1:0,g.LockKeyboard=!1,g.LockPowerButton=!1,g.LockResetButton=!1,g.LockSleepButton=!1,g.ReflashBIOS=
1388 -!1,g.UseIDER=199<b&&300>b,g.UseSOL=13==currentView&&8!=b&&300>b,g.UseSafeMode=!1,g.UserPasswordBypass=!1,null!=g.SecureErase&&(g.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===g.SecureErase&&0<rsepass.length&&(g.RSEPassword=rsepass)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&
1389 -1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=!1),rsepass=null);console.log("Acci\u00f3n de arranque: "+b);console.log("Configuraci\u00f3n de arranque: "+ObjectToString2(g));statusbox("Acci\u00f3n de poder","Establecer la configuraci\u00f3n de arranque ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,b,c,d){200!=d?messagebox("Acci\u00f3n de poder",
1390 -format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",g,powerActionResponse2,0,1)},0,1)}}
1391 -function powerActionResponse2(b,c,a,d,g){200!=d?messagebox("Acci\u00f3n de poder",format("PONER AMT_BootSettingData, Error # {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("Acci\u00f3n de poder","Configurando el pr\u00f3ximo arranque ..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1392 -function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c41.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c41.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c41").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1406 +function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("Acci\u00f3n de poder",format("Error # {0}",d));else{b=d5actionSelect.value;var e=a.Body;e.ConfigurationDataReset=!1;delete e.WinREBootEnabled;delete e.UEFILocalPBABootEnabled;delete e.UEFIHTTPSBootEnabled;delete e.SecureBootControlEnabled;delete e.BootguardStatus;delete e.OptionsCleared;delete e.BIOSLastStatus;delete e.UefiBootParametersArray;delete e.RPEEnabled;999==b?(e.BIOSPause=AvdPowerDlg.BIOSPause,e.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1407 +e.BIOSSetup=AvdPowerDlg.BIOSSetup,e.BootMediaIndex=AvdPowerDlg.BootMediaIndex,e.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,e.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,e.IDERBootDevice=AvdPowerDlg.IDERBootDevice,e.LockKeyboard=AvdPowerDlg.LockKeyboard,e.LockPowerButton=AvdPowerDlg.LockPowerButton,e.LockResetButton=AvdPowerDlg.LockResetButton,e.LockSleepButton=AvdPowerDlg.LockSleepButton,e.ReflashBIOS=AvdPowerDlg.ReflashBIOS,e.UseIDER=AvdPowerDlg.UseIDER,e.UseSOL=AvdPowerDlg.UseSOL,
1408 +e.UseSafeMode=AvdPowerDlg.UseSafeMode,e.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=e.SecureErase&&(e.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==e.SecureErase&&AvdPowerDlg.RSEPassword&&(e.RSEPassword=AvdPowerDlg.RSEPassword)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1409 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(e.BIOSPause=!1,e.EnforceSecureBoot=!1,e.BIOSSetup=99<b&&104>b,e.BootMediaIndex=0,e.FirmwareVerbosity=0,e.ForcedProgressEvents=!1,e.IDERBootDevice=202==b||203==b?1:0,e.LockKeyboard=!1,e.LockPowerButton=!1,e.LockResetButton=!1,e.LockSleepButton=
1410 +!1,e.ReflashBIOS=!1,e.UseIDER=199<b&&300>b,e.UseSOL=13==currentView&&8!=b&&300>b,e.UseSafeMode=!1,e.UserPasswordBypass=!1,null!=e.SecureErase&&(e.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===e.SecureErase&&0<rsepass.length&&(e.RSEPassword=rsepass)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&
1411 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=!1),rsepass=null);console.log("Acci\u00f3n de arranque: "+b);console.log("Configuraci\u00f3n de arranque: "+ObjectToString2(e));statusbox("Acci\u00f3n de poder","Establecer la configuraci\u00f3n de arranque ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,
1412 +function(a,b,c,d){200!=d?messagebox("Acci\u00f3n de poder",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",e,powerActionResponse2,0,1)},0,1)}}
1413 +function powerActionResponse2(b,c,a,d,e){200!=d?messagebox("Acci\u00f3n de poder",format("PONER AMT_BootSettingData, Error # {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("Acci\u00f3n de poder","Configurando el pr\u00f3ximo arranque ..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1414 +function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c66.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c66.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c66").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1415 c+"</Selector></SelectorSet></ReferenceParameters>",powerActionResponse3)}var targetPowerAction=0;
1394 -function powerActionResponse3(b,c,a,d){console.log("powerActionResponse3("+c+","+a+","+d+")");if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("Acci\u00f3n de poder","Realizando acci\u00f3n de poder ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==b&&(b=
1395 -AvdPowerDlg.Action);targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("Acci\u00f3n de poder","Siguiente conjunto de acciones de arranque.")}}
1396 -function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"Acci\u00f3n de poder completada."),setDialogMode(1,"Acci\u00f3n de poder",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c54",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}
1397 -function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1416 +function powerActionResponse3(b,c,a,d){if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("Acci\u00f3n de poder","Realizando acci\u00f3n de poder ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==b&&(b=AvdPowerDlg.Action);targetPowerAction=b;11==b&&(b=10);
1417 +999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("Acci\u00f3n de poder","Siguiente conjunto de acciones de arranque.")}}function powerActionResponse4(b,c,a,d){200==d&&(QH(61,"Acci\u00f3n de poder completada."),setDialogMode(1,"Acci\u00f3n de poder",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}
1418 +function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c106",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1419 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1420 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1400 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var g=b[c].app?b[c].app:"";a[d][g]||(a[d][g]={});b[c].name&&(a[d][g][b[c].name]=b[c])}xxStorage.content=
1401 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Administre el almacenamiento Intel&reg; AMT para esta computadora.<br><br>";var v,n,g="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,e;for(e in b[c][p]){q++;if(c!=v||p!=n)""!=g&&(a+=g,g="<br>"),v=c,n=p,g=""!=c?g+EscapeHtml(c+
1402 -" / "+p):g+"Ra\u00edz";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+e+'"',g=g+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+e+'",'+C+")><div style=float:right>"),g=g+(" "+AddButton2("Descargar","DownloadFromStorage("+C+',"'+e+'",event)')),g=g+("</div><div style=padding-top:3px><b>"+EscapeHtml(e)+"</b>, <i>"+b[c][p][e].size+" bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==
1403 -q&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=g&&(a+=g);0==d&&(a+="<div style=padding-left:15px><br><i>No se encontraron archivos.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+
1404 -(v?AddButton("Subir...","UploadToStorage()"):""));QH(55,a)}else QH(55,"No se pueden cargar los datos de almacenamiento ...<br/>"+AddButton("Actualizar","PullStorage()"))}
1405 -function showStorageDetails(b,c,a,d){if(!xxdialogMode){var g="",v=xxStorage.content[b][c][a];""!=b&&(g+=addHtmlValue("Vendedor",b));""!=c&&(g+=addHtmlValue("Solicitud",c));g+=addHtmlValue("Nombre",a);g+=addHtmlValue("Talla",v.size+" bytes");v.link&&(g+=addHtmlValue("Enlace",v.link));setDialogMode(11,"Art\u00edculo de almacenamiento",5,showStorageDetailsEx,g,d)}}function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}
1421 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1422 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Administre el almacenamiento Intel&reg; AMT para esta computadora.<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var r=0,g;for(g in b[c][p]){r++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+
1423 +" / "+p):e+"Ra\u00edz";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+g+'",'+C+")><div style=float:right>"),e=e+(" "+AddButton2("Descargar","DownloadFromStorage("+C+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][p][g].size+" bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==
1424 +r&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>No se encontraron archivos.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+
1425 +(v?AddButton("Subir...","UploadToStorage()"):""));QH(56,a)}else QH(56,"No se pueden cargar los datos de almacenamiento ...<br/>"+AddButton("Actualizar","PullStorage()"))}
1426 +function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("Vendedor",b));""!=c&&(e+=addHtmlValue("Solicitud",c));e+=addHtmlValue("Nombre",a);e+=addHtmlValue("Talla",v.size+" bytes");v.link&&(e+=addHtmlValue("Enlace",v.link));setDialogMode(11,"Art\u00edculo de almacenamiento",5,showStorageDetailsEx,e,d)}}function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}
1427 function storageDeleteResponse(b,c){200!=c?messagebox("Almacenamiento",format("No se puede eliminar el archivo (ERR {0}), verifique que la computadora est\u00e9 encendida.",c)):PullStorage()}function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}function DownloadFromStorageEx(b,c,a){200!=c||null==b?console.log(c,"Data = null"):saveAs(data2blob(b),a)}
1428 function OpenFromStorage(b,c){if(!xxdialogMode){haltEvent(c);var a=window.open("http://"+wsstack.comm.host+":"+wsstack.comm.port+"/amt-storage/"+b,"_blank","noopener,noreferrer");a.opener=null;a.focus()}}function PushToStorage(b,c,a){var d=null;7E3<c.length&&(d=[b,c.substring(7E3)],c=c.substring(0,7E3));wsstack.comm.PerformAjax(c,PushToStorageResponse,d,0,"/amt-storage/"+b+(1==a?"?append=":""),"PUT")}
1429 function PushToStorageResponse(b,c,a){200!=c?messagebox("Almacenamiento",format("No se puede enviar el archivo (ERR {0}), verifique que la computadora est\u00e9 encendida.",c)):null!=a?PushToStorage(a[0],a[1],!0):PullStorage()}
@@ -1413,36 +1434,36 @@ a+="</datalist>";a+="<datalist id=mstorageapplicationlist>";for(d in xxStorageAp
1434 function UploadToStorageEx(b,c){if(c)d=new FileReader,d.onload=UploadToStorageEx2,d.filename=Q("mstoragefile").value,d.readAsBinaryString(c);else{var a=Q("mstoragefile");if(1==a.files.length){var d=new FileReader;d.onload=UploadToStorageEx2;d.filename=a.files[0].name;d.readAsBinaryString(a.files[0])}}}
1435 function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0].name:"");b=b.split(" ").join("");var c=b.split("-");3==c.length&&12>c[0].length&&12>c[1].length&&(Q("mstoragevendor").value=c[0],Q("mstorageapplication").value=c[1],b=c[2]);b=b.split("-").join("");b.endsWith(".gz")&&(b=b.substring(0,b.length-3));b.endsWith(".htm")||b.endsWith(".html")?Q("mstoragetype").value="text/html":b.endsWith(".txt")&&(Q("mstoragetype").value="text/plain");11<b.length&&(b=b.substring(0,11));Q("mstoragefilename").value=
1436 b}
1416 -function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var g=Q("mstoragetype").value;""==g&&(g="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1417 -"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+g+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1437 +function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1438 +"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1439 function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," dias").replace("H"," horas").replace("M"," minutos");b=b.replace(" 1 d\u00eda"," 1 d\u00eda").replace(" 1 hora"," 1 hora").replace(" 1 minuto "," 1 minuto ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1419 -function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gestionar alarmas de despertador.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,g){if(200==g){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, despertar en "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," a"),void 0!=d[c].Interval&&(a+=" y cada"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+=", eliminar cuando haya terminado"),
1420 -b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("Editar...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>No hay alarmas de despertador registradas.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("Eliminar todas las alarmas","RemoveAllAlarms()")+
1421 -AddButton("A\u00f1adir","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
1422 -function prepareAlarmOccurenceTemplate(b,c,a,d,g){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1423 -g+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"Eliminar todas las alarmas de activaci\u00f3n",3,RemoveAllAlarmsEx,"\u00bfConfirmar la eliminaci\u00f3n de todas las alarmas de activaci\u00f3n?")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,g,v){0==--b&&PullAlarms()})}
1440 +function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gestionar alarmas de despertador.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, despertar en "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," a"),void 0!=d[c].Interval&&(a+=" y cada"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+=", eliminar cuando haya terminado"),
1441 +b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("Editar...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>No hay alarmas de despertador registradas.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton2("Eliminar todas las alarmas","RemoveAllAlarms()",
1442 +xxAlarms?"":"disabled")+AddButton("A\u00f1adir","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(58,b)}},null,!0)}
1443 +function prepareAlarmOccurenceTemplate(b,c,a,d,e){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1444 +e+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"Eliminar todas las alarmas de activaci\u00f3n",3,RemoveAllAlarmsEx,"\u00bfConfirmar la eliminaci\u00f3n de todas las alarmas de activaci\u00f3n?")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,e,v){0==--b&&PullAlarms()})}
1445 function showAddAlarm(b){if(!xxdialogMode){QE("d25alarm_name",!b);if(void 0!=b){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime);Q("d25alarm_name").value=c.ElementName;Q("d25alarm_sdate").value=a.getFullYear()+"-"+_fmttimepad(a.getMonth()+1)+"-"+_fmttimepad(a.getDate());Q("d25alarm_stime").value=a.getHours()+":"+_fmttimepad(a.getMinutes())+":"+_fmttimepad(a.getSeconds());if(c.Interval){var a=c.Interval.Interval.replace("P","").replace("T","").replace("D","D,").replace("H","H,").replace("M","M,").split(","),
1425 -d=[0,0,0],g;for(g in a){var v=a[g].length-1;"D"==a[g][v]&&(d[0]=parseInt(a[g].substring(0,v)));"H"==a[g][v]&&(d[1]=parseInt(a[g].substring(0,v)));"M"==a[g][v]&&(d[2]=parseInt(a[g].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1426 -Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"Agregar nueva alarma",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c54",b)}
1427 -function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),g=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],g[0],g[1],g[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",g=Q("d25alarm_interval").value.split("-");3!=g.length&&(g=[0,0,0]);var g=
1428 -"P"+g[0]+"DT"+g[1]+"H"+g[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,g,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("Agregar alarma",format("No se pudo agregar la alarma. Estado: {0}. <br/> Verifique que la alarma sea para un tiempo futuro.",d)):0!=c.Body.ReturnValue?messagebox("Agregar alarma",format("No se pudo agregar la alarma {0}. <br/> Verifique que la alarma sea para un tiempo futuro.",
1429 -c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+g+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("Editar alarma",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1446 +d=[0,0,0],e;for(e in a){var v=a[e].length-1;"D"==a[e][v]&&(d[0]=parseInt(a[e].substring(0,v)));"H"==a[e][v]&&(d[1]=parseInt(a[e].substring(0,v)));"M"==a[e][v]&&(d[2]=parseInt(a[e].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1447 +Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"Agregar nueva alarma",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c106",b)}
1448 +function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),e=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],e[0],e[1],e[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",e=Q("d25alarm_interval").value.split("-");3!=e.length&&(e=[0,0,0]);var e=
1449 +"P"+e[0]+"DT"+e[1]+"H"+e[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,e,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("Agregar alarma",format("No se pudo agregar la alarma. Estado: {0}. <br/> Verifique que la alarma sea para un tiempo futuro.",d)):0!=c.Body.ReturnValue?messagebox("Agregar alarma",format("No se pudo agregar la alarma {0}. <br/> Verifique que la alarma sea para un tiempo futuro.",
1450 +c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+e+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("Editar alarma",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1451 function showAlertDetails(b){if(!xxdialogMode){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime),a="<div style=text-align:left>"+addHtmlValue("Nombre",c.ElementName)+addHtmlValue("Hora de despertarse",a.toLocaleString().replace(", "," at "));void 0!=c.Interval&&(a+=addHtmlValue("Interno",_fmtinterval(c.Interval.Interval)));a+=addHtmlValue("Despues de despertar",1==c.DeleteOnCompletion?"Eliminar alarma":"Mantener alarma")+"</div>";messagebox(format("Alarma {0}",c.ElementName),a);setDialogMode(11,
1452 "Alarma"+c.ElementName,5,showAlertDetailsDelete,a,b)}}function showAlertDetailsDelete(b,c){2==b&&amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,b,c,v){PullAlarms()})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag;
1432 -function setDialogMode(b,c,a,d,g,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c54",!0);QV("c54",a&1);QV("c53",a&2);QV(58,a&2);QV("c55",a&4);c&&QH(59,c);for(c=1;27>c;c++)QV("dialog"+c,c==b);QV("dialog",b);g&&(11==b?QH(63,g):QH(60,g));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1453 +function setDialogMode(b,c,a,d,e,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c106",!0);QV("c106",a&1);QV("c105",a&2);QV(59,a&2);QV("c107",a&4);c&&QH(60,c);for(c=1;28>c;c++)QV("dialog"+c,c==b);QV("dialog",b);e&&(11==b?QH(64,e):QH(61,e));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1454 function dialogclose(b){var c=xxdialogFunc,a=xxdialogButtons,d=xxdialogTag;setDialogMode();(a&8||b)&&c&&c(b,d)}
1434 -function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(41).offsetWidth&&(QS("Desk")["max-width"]=Q(41).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1435 -"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(60,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(60,c);setDialogMode(1,b)}
1436 -function SaveJsonFile(b,c,a,d){var g="",v={},n=new Date;amtsysstate&&(g="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));g+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1437 -n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+g+".json")}var httpErrorTable={200:"Okay",401:"Error de autenticaci\u00f3n",408:"Error de tiempo de espera",601:"Error de an\u00e1lisis de WSMAN",602:"No se puede analizar el encabezado de respuesta HTTP",603:"Respuesta inesperada de enumeraci\u00f3n HTTP",604:"Respuesta de extracci\u00f3n HTTP inesperada",997:"Reino de resumen inv\u00e1lido"};
1455 +function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(42).offsetWidth&&(QS("Desk")["max-width"]=Q(42).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1456 +"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(61,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(61,c);setDialogMode(1,b)}
1457 +function SaveJsonFile(b,c,a,d){var e="",v={},n=new Date;amtsysstate&&(e="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));e+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1458 +n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+e+".json")}var httpErrorTable={200:"Okay",401:"Error de autenticaci\u00f3n",408:"Error de tiempo de espera",601:"Error de an\u00e1lisis de WSMAN",602:"No se puede analizar el encabezado de respuesta HTTP",603:"Respuesta inesperada de enumeraci\u00f3n HTTP",604:"Respuesta de extracci\u00f3n HTTP inesperada",997:"Reino de resumen inv\u00e1lido"};
1459 function errcheck(b,c){if(null==wsstack||amtstack!=c)return!0;200!=b&&9!=b&&(setDialogMode(),wsstack.comm.FailAllError=999,amtstack.CancelAllQueries(999),QH(5,httpErrorTable[b]?httpErrorTable[b]:format("Error # {0}",b)),401==b&&QH(5,'Error de autenticaci\u00f3n<br /><br /><input type=button value="Set new credentials" onclick=meshcentral2credCallback(true)></input>'),go(100),QS(3).width=0);return 200!=b}
1460 function goiFrame(b,c,a){if(!xxdialogMode){go(c);if(1==b.shiftKey||0==Q(13).src.endsWith(a))Q(13).src=a;QV(14,!1);QV(12,!0)}}function go(b,c){if(!xxdialogMode||1==c){QV(12,!1);QV(14,!0);QV(4,100==b);QV(6,100>b);for(var a=0;80>a;a++){QV("p"+a,a==b);var d=QS("go"+a);d&&(d["background-color"]=a==b?"#abcae1":"");d&&(d["background-color"]=a==b?"gray":"")}currentView=b;center()}}
1440 -function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,g=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:g};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(g=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:g}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(g=parseInt(a[2]));return{host:a[0],http:d,redir:g}}
1461 +function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,e=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:e};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(e=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:e}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(e=parseInt(a[2]));return{host:a[0],http:d,redir:e}}
1462 function addLink(b,c){return"<a style=cursor:pointer;color:blue onclick='"+c+"'>&diams; "+b+"</a>"}function addLinkConditional(b,c,a){return a?addLink(b,c):b}function haltEvent(b){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1}function addOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;Q(b).add(d)}function addDisabledOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;d.disabled=1;Q(b).add(d)}
1442 -function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,g=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:g=1}return 4==c+a+d+g}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("Error de llamada",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}
1463 +function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,e=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:e=1}return 4==c+a+d+e}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("Error de llamada",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}
1464 function TableStart2(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><p><td>"}function TableEntry(b,c){return"<tr><td class=r1><p>"+b+"<td class=r1>"+c}function FullTable(b,c){var a=TableStart();for(i in b)i&&b[i]&&(a+=TableEntry(i,b[i]));return a+TableEnd(c)}function TableEnd(b){return"<tr><td colspan=2><p>"+(b?b:"")+"</table>"}function AddButton(b,c){return"<input type=button value='"+b+"' onclick='"+c+"' style=margin:4px>"}
1465 function AddButton2(b,c,a){return"<input type=button value='"+b+"' onclick='"+c+"' "+a+">"}function AddRefreshButton(b){return'<input type=button name=refreshbtn value="Actualizar" onclick=\'refreshButtons(false);'+b+"' style=margin:4px "+(0==refreshButtonsState?"disabled":"")+">"}function MoreStart(){return'<a style=cursor:pointer;color:blue id=morexxx1 onclick=QV("morexxx1",false);QV("morexxx2",true)>&#x25BC; More</a><div id=morexxx2 style=display:none><br><hr>'}
1445 -function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,g=b.options.length;d<g;d++)a=b.options[d],a.selected&&c.push(a.value);return c}function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}
1466 +function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,e=b.options.length;d<e;d++)a=b.options[d],a.selected&&c.push(a.value);return c}function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}
1467 function guidToStr(b){return b.substring(6,8)+b.substring(4,6)+b.substring(2,4)+b.substring(0,2)+"-"+b.substring(10,12)+b.substring(8,10)+"-"+b.substring(14,16)+b.substring(12,14)+"-"+b.substring(16,20)+"-"+b.substring(20)}function getUrlVars(){for(var b,c=[],a=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),d=0;d<a.length;d++)b=a[d].indexOf("="),0<b&&(c[a[d].substring(0,b)]=a[d].substring(b+1,a[d].length));return c}
1468 function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}
1469 function getDocHeight(){return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight&&0!=document.documentElement.clientHeight?document.documentElement.clientHeight:document.getElementsByTagName("body")[0].clientHeight}function addHtmlValue(b,c){return'<div style=height:20px><div style=float:right;width:220px;overflow:hidden><b title="'+c+'">'+c+"</b></div><div>"+b+"</div></div>"}
public/commander-fr.htm
+908 -887
@@ -1,8 +1,8 @@
1 -<!DOCTYPE html><html lang="fr" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Relier 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>Débranché</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>État du système</a><p id=go14 class=nav1 onclick=go(14)><a>Bureau à distance</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Des dossiers</a><p id=go13 class=nav1 onclick=go(13)><a>Série sur LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Informations matériel</a><p id=go6 class=nav1 onclick=go(6)><a>Journal des événements</a><p id=go15 class=nav1 onclick=go(15)><a>Journal d'audit</a><p id=go21 class=nav1 onclick=go(21)><a>Espace de rangement</a><p id=go8 class=nav1 onclick=go(8)><a>Paramètres réseau</a><p id=go17 class=nav1 onclick=go(17)><a>Paramètres Internet</a><p id=go16 class=nav1 onclick=go(16)><a>Paramètres de sécurité</a><p id=go19 class=nav1 onclick=go(19)><a>Présence d'agent</a><p id=go18 class=nav1 onclick=go(18)><a>Défense du système</a><p id=go11 class=nav1 onclick=go(11)><a>Comptes utilisateur</a><p id=go22 class=nav1 onclick=go(22)><a>Abonnements</a><p id=go23 class=nav1 onclick=go(23)><a>Alarmes de réveil</a><p id=go12 class=nav1 onclick=go(12)><a>Navigateur WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Carte du disque" onclick=iderToggleDiskMap()><input type=button value="Arrêter la session IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Disquette, les blocs font 512 octets.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CD-ROM, les blocs font 2048 octets.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Le firmware de cet ordinateur doit être mis à jour,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>veuillez vérifier ici</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>Chargement...</h1></div><div id=p1 style=display:none><h1>État du système</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Informations matériel</h1><span id=16></span></div><div id=p6 style=display:none><h1>Journal des événements</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Paramètres réseau</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Comptes utilisateur</h1><span id=21></span></div><div id=p12 style=display:none><h1>Navigateur WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><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=Requete style=margin:4px onclick=wsmanQuery()><input type=button value=Clair style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filtre style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminal série sur LAN</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Le port de redirection Intel® AMT ou la fonction série sur LAN est désactivé<span id=26>, cliquez ici pour l'activer.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>L'ordinateur distant n'est pas sous tension, cliquez ici pour lancer une commande d'alimentation.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Actions de puissance ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Démarrer l'opération de montage de disque à distance" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Commencer la capture" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Relier onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Débranché.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Inverser ce que la touche retour enverra" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Basculer la taille du terminal" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Basculer le type d'émulation des touches F1 à F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii étendu" title="Basculer le type d'émulation de terminal" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Retour arrière<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Envoyer onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Pâte disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Bureau à distance</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Le port de redirection Intel® AMT ou la fonctionnalité KVM est désactivé<span id=37>, cliquez ici pour l'activer.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>L'ordinateur distant n'est pas sous tension, cliquez ici pour lancer une commande d'alimentation.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Tourne à gauche" onclick=drotate(-1)>↺</div><div class=rb title="Tourner à droite" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Basculer en mode plein écran" onkeypress="return false" onkeydown="return false" value=Plein onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Enregistrer une capture d'écran du bureau distant" onkeypress="return false" onkeydown="return false" value=Sauver... onclick=deskSaveImage() style=margin-right:3px><input type=button value=Réglages... title="Modifier les paramètres du bureau distant" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Démarrer l'opération de montage de disque à distance" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Modifier l'état d'alimentation de la machine distante" onkeypress="return false" onkeydown="return false" value="Actions de puissance ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Relier onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Débranché.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Gagner<option value=1>Win + Down<option value=2>Gagnez +<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Gagner + Gauche<option value=24>Win + Right<option value=5>Maj + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Envoyer onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Suppr onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Type onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Écran blanc&nbsp;</span><span id=47><input id=48 type=checkbox>Voir seulement&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Journal d'audit</h1><span id=50></span></div><div id=p16 style=display:none><h1>Paramètres de sécurité</h1><span id=51></span></div><div id=p17 style=display:none><h1>Paramètres Internet</h1><span id=52></span></div><div id=p18 style=display:none><h1>Défense du système</h1><span id=53></span></div><div id=p19 style=display:none><h1>Présence d'agent</h1><span id=54></span></div><div id=p21 style=display:none><h1>Espace de rangement</h1><span id=55></span></div><div id=p22 style=display:none><h1>Abonnements aux événements</h1><span id=56></span></div><div id=p23 style=display:none><h1>Alarmes de réveil</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Des dossiers</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value="En haut">&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Tout sélectionner" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Renommer onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Supprimer onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nouveau dossier" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Télécharger onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Couper onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Copie onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Pâte onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Rafraîchir onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descendre par nom<option value=5>Descendre par taille<option value=6>Descendre par date</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 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=60 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>Nom d'utilisateur</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Mot de passe*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirmez le mot de passe</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Réseau<option value=2>Tout</select><div>Autorisation</div></div><div>Autorisations accordées</div><ul id=62 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>* 8 caractères minimum avec majuscules, minuscules, 0-9 et l'un des! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Action de puissance</div></div><div><span style=color:red>Attention:</span>Certaines actions d'alimentation peuvent entraîner une perte de données et déconnecter les sessions de redirection du bureau, du terminal ou du disque.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Code de consentement</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Affichage principal<option value=1>Affichage secondaire<option id=d6ThirdDisplay value=2 style=display:none>Troisième affichage</select><div>Affichage du consentement</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Encodage d'image</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>désactivé<option value=2>Automatic<option value=3>Activée</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Afficher le curseur de la souris locale</label><br><label><input type=checkbox id=d7showcad>Afficher Ctrl-Alt-Suppr</label><br><label><input type=checkbox id=d7limitFrameRate>Taux de trame limite</label><br><label><input type=checkbox id=d7noMouseRotate>Ne faites pas tourner la souris</label><br></div><div>Autres réglages</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Logiciel KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>dix%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualité</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Mise à l'échelle</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=administrateur style=float:right;width:220px><div style=height:20px>Nom d'utilisateur</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Mot de passe</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Port de redirection</label><label id=c15 style=display:block><input type=checkbox id=c16>Bureau à distance KVM</label><label style=display:block><input type=checkbox id=c17>IDE-Redirection<br></label><label style=display:block><input type=checkbox id=c18>Série sur LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Non requis<br></label><label><input type=radio name=d10 id=c20 value=1>Requis pour KVM uniquement<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Toujours requis<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="32 caractères maximum"><div title="32 caractères maximum">Nom de profil</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="32 caractères maximum"><div title="32 caractères maximum">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priorité</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Authentification</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Aucun</select><div>Chiffrement</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longueur entre 8 et 63 caractères"><div title="Longueur entre 8 et 63 caractères">Mot de passe*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longueur entre 8 et 63 caractères"><div title="Longueur entre 8 et 63 caractères">Confirmez le mot de passe</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Cela enregistrera l'intégralité de l'état d'Intel® AMT pour cette machine dans un fichier. Les mots de passe ne seront pas enregistrés, mais certaines données sensibles peuvent être incluses.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>désactivé<br><input type=radio name=d20 id=d20b value=1>Réponse ICMP<br><input type=radio name=d20 id=d20c value=2>Réponse RMCP<br><input type=radio name=d20 id=d20d value=3>Réponse ICMP et RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Synchronisation de l'adresse IP du système d'exploitation</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>adresse IP</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Marque de sous-réseau</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>passerelle</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS principal</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternatif</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>désactivé<option value=1>Désactivé, mise à jour DHCP<option value=2>Activée</select><div>Client DNS dynamique</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Intervalle de mise à jour (minutes)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (secondes)</div></div><div style=font-size:10px><br>L'intervalle par défaut est de 1440 minutes, le TTL par défaut est de 900 secondes.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Power up<option value=10>Réinitialiser<option value=5>Cycle de puissance<option value=8>Éteindre<option id=d24p500 value=500>Réveil du système d'exploitation en veille<option id=d24p501 value=501>Économie d'énergie du système d'exploitation<option value=999>Définir les options de démarrage</select><div>Commande à distance</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pause du BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Appliquer le démarrage sécurisé</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Configuration du BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forcer les événements de progression</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Verrouiller le bouton d'alimentation</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Verrouiller le bouton de réinitialisation</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Verrouiller le bouton de veille</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Verrouiller le clavier</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Contournement du mot de passe du BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflasher le BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Mode sans échec</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Utiliser IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Série sur LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Effacement sécurisé à distance Intel®</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Paramètres de démarrage</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Aucun<option id=ForceDVDBootOption value=1>Forcer le démarrage du CD / DVD<option id=ForcePXEBootOption value=2>Forcer le démarrage PXE<option id=ForceHDBootOption value=3>Forcer l'amorçage du disque dur<option id=ForceDiagBootOption value=4>Forcer le démarrage du diagnostic</select><div>Source de démarrage</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Aucun<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Boot to floppy<option value=1>Démarrage sur CD-ROM</select><div>Périphérique de démarrage IDER</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Défaut du système<option id=c46 value=1>Silencieux<option id=c47 value=2>Verbeux<option id=c48 value=3>Écran blanc</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>Mot de passe RSE</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>Nom de l'alarme</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>Date de réveil (année-mois-jour)</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>Heure de réveil (heure: 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>Intervalle (jours-heures-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>Gardez l'alarme<option value=1>Supprimer à la fin</select></div><div style=padding-top:4px>Après le réveil</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Activée<br></label><label><input type=radio name=d26b id=c50 value=0>désactivé<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Activée<br></label><label><input type=radio name=d26a id=c52 value=0>désactivé<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Annuler style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value="D'accord" style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Supprimer style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="fr" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Relier 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>Débranché</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>État du système</a><p id=go14 class=nav1 onclick=go(14)><a>Bureau à distance</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Des dossiers</a><p id=go13 class=nav1 onclick=go(13)><a>Série sur LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Informations matériel</a><p id=go6 class=nav1 onclick=go(6)><a>Journal des événements</a><p id=go15 class=nav1 onclick=go(15)><a>Journal d'audit</a><p id=go21 class=nav1 onclick=go(21)><a>Espace de rangement</a><p id=go8 class=nav1 onclick=go(8)><a>Paramètres réseau</a><p id=go17 class=nav1 onclick=go(17)><a>Paramètres Internet</a><p id=go16 class=nav1 onclick=go(16)><a>Paramètres de sécurité</a><p id=go19 class=nav1 onclick=go(19)><a>Présence d'agent</a><p id=go18 class=nav1 onclick=go(18)><a>Défense du système</a><p id=go11 class=nav1 onclick=go(11)><a>Comptes utilisateur</a><p id=go22 class=nav1 onclick=go(22)><a>Abonnements</a><p id=go23 class=nav1 onclick=go(23)><a>Alarmes de réveil</a><p id=go12 class=nav1 onclick=go(12)><a>Navigateur WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Carte du disque" onclick=iderToggleDiskMap()><input type=button value="Arrêter la session IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Disquette, les blocs font 512 octets.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CD-ROM, les blocs font 2048 octets.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Le firmware de cet ordinateur doit être mis à jour,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>veuillez vérifier ici</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>Chargement...</h1></div><div id=p1 style=display:none><h1>État du système</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Informations matériel</h1><span id=16></span></div><div id=p6 style=display:none><h1>Journal des événements</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Paramètres réseau</h1><span id=19></span><span id=20></span><span id=21></span></div><div id=p11 style=display:none><h1>Comptes utilisateur</h1><span id=22></span></div><div id=p12 style=display:none><h1>Navigateur WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=23 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=24 type=button value=Requete style=margin:4px onclick=wsmanQuery()><input type=button value=Clair style=margin:4px onclick="QH(25, '')"><input id=c0 placeholder=Filtre style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=25></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminal série sur LAN</h1><br><div id=26 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Le port de redirection Intel® AMT ou la fonction série sur LAN est désactivé<span id=27>, cliquez ici pour l'activer.</span></div></div><div id=28 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>L'ordinateur distant n'est pas sous tension, cliquez ici pour lancer une commande d'alimentation.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=29></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Actions de puissance ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Démarrer l'opération de montage de disque à distance" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Commencer la capture" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Relier onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=30>Débranché.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Inverser ce que la touche retour enverra" onclick="termToggleCr();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Basculer la taille du terminal" onclick="termToggleSize();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Basculer le type d'émulation des touches F1 à F10" onclick="termToggleFx();Q(33).blur()"><input id=34 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii étendu" title="Basculer le type d'émulation de terminal" onclick="termToggleType();Q(34).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Retour arrière<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Envoyer onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=35 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Pâte disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=36><h1>Bureau à distance</h1><br></div><div id=37 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Le port de redirection Intel® AMT ou la fonctionnalité KVM est désactivé<span id=38>, cliquez ici pour l'activer.</span></div></div><div id=39 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>L'ordinateur distant n'est pas sous tension, cliquez ici pour lancer une commande d'alimentation.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=40></span>&nbsp;<div class=rb title="Tourne à gauche" onclick=drotate(-1)>↺</div><div class=rb title="Tourner à droite" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Basculer en mode plein écran" onkeypress="return false" onkeydown="return false" value=Plein onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Enregistrer une capture d'écran du bureau distant" onkeypress="return false" onkeydown="return false" value=Sauver... onclick=deskSaveImage() style=margin-right:3px><input type=button value=Réglages... title="Modifier les paramètres du bureau distant" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Démarrer l'opération de montage de disque à distance" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Modifier l'état d'alimentation de la machine distante" onkeypress="return false" onkeydown="return false" value="Actions de puissance ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Relier onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=41>Débranché.</span></div><tr><td id=42 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onwheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=43 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Gagner<option value=1>Win + Down<option value=2>Gagnez +<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Gagner + Gauche<option value=24>Win + Right<option value=5>Maj + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12<option value=25>Enter</select><input id=DeskWD type=button value=Envoyer onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=44 type=button value=Ctrl-Alt-Suppr onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=45 type=button value=Type onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=46><input id=47 type=checkbox>Écran blanc&nbsp;</span><span id=48><input id=49 type=checkbox>Voir seulement&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=50></span><h1>Journal d'audit</h1><span id=51></span></div><div id=p16 style=display:none><h1>Paramètres de sécurité</h1><span id=52></span></div><div id=p17 style=display:none><h1>Paramètres Internet</h1><span id=53></span></div><div id=p18 style=display:none><h1>Défense du système</h1><span id=54></span></div><div id=p19 style=display:none><h1>Présence d'agent</h1><span id=55></span></div><div id=p21 style=display:none><h1>Espace de rangement</h1><span id=56></span></div><div id=p22 style=display:none><h1>Abonnements aux événements</h1><span id=57></span></div><div id=p23 style=display:none><h1>Alarmes de réveil</h1><span id=58></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Des dossiers</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value="En haut">&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Tout sélectionner" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Renommer onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Supprimer onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nouveau dossier" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Télécharger onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Couper onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Copie onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Pâte onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Rafraîchir onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descendre par nom<option value=5>Descendre par taille<option value=6>Descendre par date</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=59 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=60 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=61 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>Nom d'utilisateur</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Mot de passe*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirmez le mot de passe</div></div><div id=62><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Réseau<option value=2>Tout</select><div>Autorisation</div></div><div>Autorisations accordées</div><ul id=63 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>* 8 caractères minimum avec majuscules, minuscules, 0-9 et l'un des! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Action de puissance</div></div><div><span style=color:red>Attention:</span>Certaines actions d'alimentation peuvent entraîner une perte de données et déconnecter les sessions de redirection du bureau, du terminal ou du disque.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Code de consentement</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Affichage principal<option value=1>Affichage secondaire<option id=d6ThirdDisplay value=2 style=display:none>Troisième affichage</select><div>Affichage du consentement</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Encodage d'image</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>désactivé<option value=2>Automatic<option value=3>Activée</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Afficher le curseur de la souris locale</label><br><label><input type=checkbox id=d7showcad>Afficher Ctrl-Alt-Suppr</label><br><label><input type=checkbox id=d7limitFrameRate>Taux de trame limite</label><br><label><input type=checkbox id=d7noMouseRotate>Ne faites pas tourner la souris</label><br><label><input type=checkbox id=d7kvmrmw>Reverse Mouse Wheel</label><br></div><div>Autres réglages</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Logiciel KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>dix%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualité</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Mise à l'échelle</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=administrateur style=float:right;width:220px><div style=height:20px>Nom d'utilisateur</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Mot de passe</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Port de redirection</label><label id=c15 style=display:block><input type=checkbox id=c16>Bureau à distance KVM</label><label style=display:block><input type=checkbox id=c17>IDE-Redirection<br></label><label style=display:block><input type=checkbox id=c18>Série sur LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Non requis<br></label><label><input type=radio name=d10 id=c20 value=1>Requis pour KVM uniquement<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Toujours requis<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=64></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="32 caractères maximum"><div title="32 caractères maximum">Nom de profil</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="32 caractères maximum"><div title="32 caractères maximum">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priorité</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Authentification</div></div><div style=height:26px><select id=c26 style=float:right;width:200px onclick=updateWifiDialog()><option id=65 value=4>CCMP-AES<option id=66 value=3>TKIP-RC4</select><div>Chiffrement</div></div><div id=c27><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longueur entre 8 et 63 caractères"><div title="Longueur entre 8 et 63 caractères">Mot de passe*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longueur entre 8 et 63 caractères"><div title="Longueur entre 8 et 63 caractères">Confirmez le mot de passe</div></div></div><div id=c30 style=display:none><div id=c31 style=height:26px><select id=c32 style=float:right;width:200px onchange=updateNetAuth2Dialog(event)><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protocole</div></div><div id=c33 style=height:26px><input id=c34 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="32 caractères maximum"><div title="32 caractères maximum">Server Name</div></div><div id=c35 style=height:26px><select id=c36 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c37 style=height:26px><input id=c38 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c39 style=height:26px><input id=c40 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Nom d'utilisateur</div></div><div id=c41 style=height:26px><input id=c42 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuth2Dialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Mot de passe</div></div><div id=c43 style=height:26px><input id=c44 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuth2Dialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c45 style=height:26px><input id=c46 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c47 style=height:26px><input id=c48 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c49 style=height:26px><select id=c50 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Client Certificate</div></div><div id=c51 style=height:26px><select id=c52 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Server Issuer Cert</div></div><div id=c53 style=height:26px><select id=c54 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=1>Activée<option value=0>désactivé</select><div>Active in S0</div></div></div></div><div id=dialog19 style=margin:auto;margin:3px>Cela enregistrera l'intégralité de l'état d'Intel® AMT pour cette machine dans un fichier. Les mots de passe ne seront pas enregistrés, mais certaines données sensibles peuvent être incluses.<br><br><input id=c55 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>désactivé<br><input type=radio name=d20 id=d20b value=1>Réponse ICMP<br><input type=radio name=d20 id=d20c value=2>Réponse RMCP<br><input type=radio name=d20 id=d20d value=3>Réponse ICMP et RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=67><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Synchronisation de l'adresse IP du système d'exploitation</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=68><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c56 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>adresse IP</div></div><div style=height:26px id=69><input id=c57 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Marque de sous-réseau</div></div><div style=height:26px><input id=c58 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>passerelle</div></div><div style=height:26px><input id=c59 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS principal</div></div><div style=height:26px><input id=c60 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternatif</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c61 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>désactivé<option value=1>Désactivé, mise à jour DHCP<option value=2>Activée</select><div>Client DNS dynamique</div></div><div style=height:26px><input id=c62 style=float:right;width:200px><div>Intervalle de mise à jour (minutes)</div></div><div style=height:26px><input id=c63 style=float:right;width:200px><div>TTL (secondes)</div></div><div style=font-size:10px><br>L'intervalle par défaut est de 1440 minutes, le TTL par défaut est de 900 secondes.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c64 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Power up<option value=10>Réinitialiser<option value=5>Cycle de puissance<option value=8>Éteindre<option id=d24p500 value=500>Réveil du système d'exploitation en veille<option id=d24p501 value=501>Économie d'énergie du système d'exploitation<option value=999>Définir les options de démarrage</select><div>Commande à distance</div></div><div style=height:80px><div id=c65 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pause du BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Appliquer le démarrage sécurisé</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Configuration du BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forcer les événements de progression</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Verrouiller le bouton d'alimentation</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Verrouiller le bouton de réinitialisation</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Verrouiller le bouton de veille</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Verrouiller le clavier</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Contournement du mot de passe du BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflasher le BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Mode sans échec</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Utiliser IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Série sur LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Effacement sécurisé à distance Intel®</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Paramètres de démarrage</div></div><div style=height:26px><select id=c66 style=float:right;width:200px onchange=showAdvPowerDlgChange()></select><div>Source de démarrage</div></div><div id=c67 style=height:26px><select id=c68 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Aucun<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c69 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Boot to floppy<option value=1>Démarrage sur CD-ROM</select><div>Périphérique de démarrage IDER</div></div><div style=height:26px><select id=c70 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Défaut du système<option id=c71 value=1>Silencieux<option id=c72 value=2>Verbeux<option id=c73 value=3>Écran blanc</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>Mot de passe RSE</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>Nom de l'alarme</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>Date de réveil (année-mois-jour)</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>Heure de réveil (heure: 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>Intervalle (jours-heures-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>Gardez l'alarme<option value=1>Supprimer à la fin</select></div><div style=padding-top:4px>Après le réveil</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c74 value=2>Activée<br></label><label><input type=radio name=d26b id=c75 value=0>désactivé<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c76 value=1>Activée<br></label><label><input type=radio name=d26a id=c77 value=0>désactivé<br></label></div><div id=dialog27 style=margin:auto;margin:3px><br><div style=height:26px><select id=c78 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>désactivé<option value=1>Activée</select><div>Activée</div></div><div id=c79 style=height:26px><select id=c80 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protocole</div></div><div id=c81 style=height:26px><input id=c82 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="32 caractères maximum"><div title="32 caractères maximum">Server Name</div></div><div id=c83 style=height:26px><select id=c84 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c85 style=height:26px><input id=c86 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c87 style=height:26px><input id=c88 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Nom d'utilisateur</div></div><div id=c89 style=height:26px><input id=c90 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuthDialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Mot de passe</div></div><div id=c91 style=height:26px><input id=c92 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c93 style=height:26px><input id=c94 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c95 style=height:26px><input id=c96 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c97 style=height:26px><select id=c98 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Client Certificate</div></div><div id=c99 style=height:26px><select id=c100 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Server Issuer Cert</div></div><div id=c101 style=height:26px><select id=c102 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>Activée<option value=1>désactivé</select><div>Active in S0</div></div><div id=c103 style=height:26px><input id=c104 style=float:right;width:200px onkeyup=updateNetAuthDialog()><div>PXE Timeout</div></div></div></div><div style=padding:10px;margin-bottom:4px><input id=c105 type=button value=Annuler style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c106 type=button value="D'accord" style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c107 type=button value=Supprimer style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
5 -$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var g=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==g&&$jscomp.global.Object.defineProperty(b,d,g)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
5 +$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var e=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==e&&$jscomp.global.Object.defineProperty(b,d,e)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
6 String.prototype.endsWith||(String.prototype.endsWith=function(b){return-1!==this.indexOf(b,this.length-b.length)});function Q(b){return document.getElementById(b)}function QS(b){try{return Q(b).style}catch(c){}}function QE(b,c){try{Q(b).disabled=!c}catch(a){}}function QV(b,c){try{QS(b).display=c?"":"none"}catch(a){}}function QA(b,c){Q(b).innerHTML+=c}function QH(b,c){Q(b).innerHTML=c}function inputBoxFocus(b){Q(b).focus();var c=Q(b).value;Q(b).value="";Q(b).value=c}
7 function ReadShort(b,c){return(b.charCodeAt(c)<<8)+b.charCodeAt(c+1)}function ReadShortX(b,c){return(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}function ReadInt(b,c){return 16777216*b.charCodeAt(c)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadSInt(b,c){return(b.charCodeAt(c)<<24)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadIntX(b,c){return 16777216*b.charCodeAt(c+3)+(b.charCodeAt(c+2)<<16)+(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}
8 function ShortToStr(b){return String.fromCharCode(b>>8&255,b&255)}function ShortToStrX(b){return String.fromCharCode(b&255,b>>8&255)}function IntToStr(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}function IntToStrX(b){return String.fromCharCode(b&255,b>>8&255,b>>16&255,b>>24&255)}function MakeToArray(b){return b&&null!=b&&"object"!=typeof b?[b]:b}function SplitArray(b){return b.split(",")}function Clone(b){return JSON.parse(JSON.stringify(b))}
@@ -12,153 +12,153 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a,d){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(d?d:32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,u,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.floppyReady)return g.floppyReady=!0,g.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.cdromReady)return g.cdromReady=!0,g.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}g.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,u);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),g.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 -d=0;switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}g.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),u&1);return}g.SendCommandEndResponse(1,5,c,36,0);break;case 27:g.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==g.floppy||176==c&&null==g.cdrom)return g.SendCommandEndResponse(1,
18 -2,c,58,0),-1;g.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}g.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),u&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.floppy&&(d=(g.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.cdrom&&(d=(g.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);g.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),u&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,F,d);a(c,F,d,u);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);g.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return g.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?g.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -u&1):0==N&&(H?g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),u&1):g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),u&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=r;if(16==v||N&&16>v)H+=K;if(30==
22 -v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=A;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));g.SendDataToHost(c,!0,H,u&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");g.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=g.floppy?d=2:176==c&&null!=g.cdrom&&(d=2);g.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),u&1);break;case 76:g.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),g.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),g.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;F=0;160==c?null!=g.floppy&&(F=g.floppy.size>>9):null!=g.cdrom&&(F=g.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?y:R:z;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?q:l:D;break;case 26:176==c&&(H=e);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?g.SendCommandEndResponse(0,5,c,32,0):g.SendDataToHost(c,!0,H,u&1);break;case 81:g.SendDataToHost(c,!0,E,u&1);break;case 172:g.SendDataToHost(c,!0,O,u&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),g.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 -b,x,e){var c=null,y=0;160==a&&(c=g.floppy,null!=g.floppy&&(y=g.floppy.size>>9));176==a&&(c=g.cdrom,null!=g.cdrom&&(y=g.cdrom.size>>11));if(0>x||b+x>y)return g.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return g.SendCommandEndResponse(1,0,a,0,0),0;null!=c&&(g.sectorStats&&g.sectorStats(1,160==a?0:1,y,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==u?H.push({media:c,dev:a,lba:b,len:x,fr:e}):(u=c,T=a,P=b,F=x,d(e)))}function d(a){var b=F,x=P;F>g.iderinfo.readbfr&&(b=g.iderinfo.readbfr);F-=b;P+=b;var e=
26 -new FileReader;e.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));g.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(u=null,N?(g.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),u=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};e.readAsBinaryString?e.readAsBinaryString(u.slice(x,x+b)):e.readAsArrayBuffer(u.slice(x,x+b))}var g={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,q,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,q);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),q&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),q&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);e.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),q&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,F,d);a(c,F,d,q);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);e.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +q&1):0==N&&(H?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),q&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),q&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=u;if(16==v||N&&16>v)H+=K;if(30==
22 +v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=z;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));e.SendDataToHost(c,!0,H,q&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),q&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;F=0;160==c?null!=e.floppy&&(F=e.floppy.size>>9):null!=e.cdrom&&(F=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?A:R:y;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?r:l:D;break;case 26:176==c&&(H=g);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,H,q&1);break;case 81:e.SendDataToHost(c,!0,E,q&1);break;case 172:e.SendDataToHost(c,!0,O,q&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 +b,x,c){var g=null,p=0;160==a&&(g=e.floppy,null!=e.floppy&&(p=e.floppy.size>>9));176==a&&(g=e.cdrom,null!=e.cdrom&&(p=e.cdrom.size>>11));if(0>x||b+x>p)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,p,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==q?H.push({media:g,dev:a,lba:b,len:x,fr:c}):(q=g,T=a,P=b,F=x,d(c)))}function d(a){var b=F,x=P;F>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);F-=b;P+=b;var c=
26 +new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));e.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(q=null,N?(e.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),q=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(q.slice(x,x+b)):c.readAsArrayBuffer(q.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
27 iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,
28 -0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),e=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 -18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),r=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 -0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),A=String.fromCharCode(1,5,3,0),y=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),z=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);g.xxStateChange=function(a){b("IDER-StateChange",a);
31 -0==a&&g.Stop();3==a&&g.Start()};g.Start=function(){b("IDER-Start");b(g.floppy,g.cdrom);g.bytesToAmt=0;g.bytesFromAmt=0;g.inSequence=0;g.outSequence=0;H=[];g.SendCommand(64,ShortToStrX(g.rx_timeout)+ShortToStrX(g.tx_timeout)+ShortToStrX(g.heartbeat)+IntToStrX(g.version));g.sectorStats&&(g.sectorStats(0,0,g.floppy?g.floppy.size>>9:0),g.sectorStats(0,1,g.cdrom?g.cdrom.size>>11:0))};g.Stop=function(){b("IDER-Stop");g.parent.Stop()};g.ProcessData=function(a){g.bytesFromAmt+=a.length;g.acc+=a;null!=v&&
32 -v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",g.acc.length,rstr2hex(g.acc));;){a=g.ProcessDataEx();if(0==a)break;if(g.inSequence!=ReadIntX(g.acc,4)){b("ERROR: Out of sequence",g.inSequence,ReadIntX(g.acc,4));g.Stop();break}g.inSequence++;g.acc=g.acc.substring(a)}};g.SendCommand=function(a,x,e,c){null==x&&(x="");e=50<a&&1==e?2:0;c&&(e+=1);x=String.fromCharCode(a,0,0,e)+IntToStrX(g.outSequence++)+x;g.parent.xxSend(x);g.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 -"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};g.SendCommandEndResponse=function(a,b,x,e,c){a?g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,e,c),!0)};g.SendDataToHost=function(a,b,x,e){var c=e?0:x.length;1==b?g.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,e):g.SendCommand(84,
34 -String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,e)};g.SendGetDataFromHost=function(a,b){g.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};g.SendDisableEnableFeatures=function(a,b){null==b&&(b="");g.SendCommand(72,String.fromCharCode(a)+b)};g.ProcessDataEx=function(){if(8>g.acc.length)return 0;switch(g.acc.charCodeAt(0)){case 65:if(30>g.acc.length)break;var a=g.acc.charCodeAt(29);
35 -if(g.acc.length<30+a)break;g.iderinfo={};g.iderinfo.major=g.acc.charCodeAt(8);g.iderinfo.minor=g.acc.charCodeAt(9);g.iderinfo.fwmajor=g.acc.charCodeAt(10);g.iderinfo.fwminor=g.acc.charCodeAt(11);g.iderinfo.readbfr=ReadShortX(g.acc,16);g.iderinfo.writebfr=ReadShortX(g.acc,18);g.iderinfo.proto=g.acc.charCodeAt(21);g.iderinfo.iana=ReadIntX(g.acc,25);b(g.iderinfo);0!=g.iderinfo.proto&&(b("Unknown proto",g.iderinfo.proto),g.Stop());8192<g.iderinfo.readbfr&&(b("Illegal read buffer size",g.iderinfo.readbfr),
36 -g.Stop());8192<g.iderinfo.writebfr&&(b("Illegal write buffer size",g.iderinfo.writebfr),g.Stop());0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),g.Stop(),8;case 68:return g.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>g.acc.length)break;a=g.acc.charCodeAt(8);null===u?(g.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 -a));return 9;case 73:if(13>g.acc.length)break;var a=g.acc.charCodeAt(8),x=ReadIntX(g.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:g.enabled=x&2?!0:!1;b("IDER Status: "+g.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>g.acc.length)break;b("IDER: ABORT",g.acc.charCodeAt(8));
38 -return 11;case 75:return 8;case 80:if(28>g.acc.length)break;var a=g.acc.charCodeAt(14)&16?176:160,x=g.acc.charCodeAt(14),e=g.acc.substring(16,28),y=g.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(e),y,x);c(a,e,y,x);return 28;case 83:if(14>g.acc.length)break;a=ReadShortX(g.acc,9);if(g.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",g.acc[0]),g.Stop()}return 0};
39 -var H=[],N=!1,u=null,T,P,F;return g},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 -a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,g,v,n){b("SIDER-Start",a,d,g,v,n);c.host=a;c.port=d;c.user=g;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==g?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+g:"")+"&tls1only="+
41 -c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(g){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
28 +0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),r=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 +18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 +0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);
31 +0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;H=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&
32 +v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 +"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,
34 +String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);
35 +if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),
36 +e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===q?(e.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 +a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));
38 +return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),d=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),d,x);c(a,g,d,x);return 28;case 83:if(14>e.acc.length)break;a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};
39 +var H=[],N=!1,q=null,T,P,F;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 +a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+
41 +c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
42 b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);break;
43 -default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,g){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){e.socketState=2;e.socketParseState=0;e.socketAccumulator="";e.socketHeader=null;e.socketData="";
44 -for(i in e.pendingAjaxCall)e.sendRequest(e.pendingAjaxCall[i][0],e.pendingAjaxCall[i][3],e.pendingAjaxCall[i][4])}function p(a){var b=e.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(e.socketAccumulator=b+a;;){if(0==e.socketParseState){b=e.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;e.socketHeader=e.socketAccumulator.substring(0,b).split("\r\n");if(null==e.amtVersion)for(var c in e.socketHeader)0==e.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 -(e.amtVersion=e.socketHeader[c].substring(46));e.socketAccumulator=e.socketAccumulator.substring(b+4);e.socketParseState=1;e.socketData="";e.socketXHeader={Directive:e.socketHeader[0].split(" ")};for(c in e.socketHeader)0!=c&&(b=e.socketHeader[c].indexOf(":"),e.socketXHeader[e.socketHeader[c].substring(0,b).toLowerCase()]=e.socketHeader[c].substring(b+2))}if(1==e.socketParseState){b=-1;if(void 0==e.socketXHeader.connection||"close"!=e.socketXHeader.connection.toLowerCase()||void 0!=e.socketXHeader["transfer-encoding"]&&
46 -"chunked"==e.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=e.socketXHeader["content-length"]){b=parseInt(e.socketXHeader["content-length"]);if(e.socketAccumulator.length<b)break;a=e.socketAccumulator.substring(0,b);e.socketAccumulator=e.socketAccumulator.substring(b);e.socketData=a;b=0}else{var p=e.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(e.socketAccumulator.substring(0,p),16);if(isNaN(b)){e.websocket&&e.websocket.close();break}if(e.socketAccumulator.length<p+2+b+2)break;
47 -a=e.socketAccumulator.substring(p+2,p+2+b);e.socketAccumulator=e.socketAccumulator.substring(p+2+b+2);e.socketData+=a}else b=0;if(0==b){p=e.socketXHeader;b=e.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++e.authcounter){if(e.challengeParams=e.parseDigest(p["www-authenticate"]),null!=e.challengeParams.qop){b=e.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 -e.challengeParams.qop="auth-int":e.challengeParams.qop="auth"}}else p=e.pendingAjaxCall.shift(),e.authcounter=0,e.ActiveAjaxCount--,e.gotNextMessages(b,"success",{status:a},p),e.PerformNextAjax();e.socketParseState=0;e.socketHeader=null}}}}function q(a){0==e.inDataCount&&(e.tlsv1only=1-e.tlsv1only);e.socketState=0;null!=e.socket&&(e.socket.close(),e.socket=null);if(0<e.pendingAjaxCall.length){a=e.pendingAjaxCall.shift();var b=a[5];e.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var e={PendingAjax:[],
49 -ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};e.host=b;e.port=c;e.user=a;e.pass=d;e.tls=g;e.tlsv1only=0;e.inDataCount=0;e.amtVersion=null;e.digestRealmMatch=null;e.digestRealm=null;e.PerformAjax=function(a,b,c,p,d,h){e.ActiveAjaxCount<e.MaxActiveAjaxCount&&0==e.PendingAjax.length?e.PerformAjaxEx(a,b,c,d,h):1==p?e.PendingAjax.unshift([a,b,c,d,h]):e.PendingAjax.push([a,b,c,d,h])};e.PerformNextAjax=function(){if(!(e.ActiveAjaxCount>=
50 -e.MaxActiveAjaxCount||0==e.PendingAjax.length)){var a=e.PendingAjax.shift();e.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);e.PerformNextAjax()}};e.PerformAjaxEx=function(a,b,c,p,d){if(0!=e.FailAllError)e.gotNextMessagesError({status:e.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),e.ActiveAjaxCount++,e.PerformAjaxExNodeJS(a,b,c,p,d)};e.pendingAjaxCall=[];e.PerformAjaxExNodeJS=function(a,b,c,p,d){e.PerformAjaxExNodeJS2(a,
51 -b,c,p,d,5)};e.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=e.FailAllError?(e.ActiveAjaxCount--,999!=e.FailAllError&&e.gotNextMessages(null,"error",{status:0==e.FailAllError?408:e.FailAllError},[a,b,c,p,d]),e.PerformNextAjax()):(e.pendingAjaxCall.push([a,b,c,p,d,h]),0==e.socketState?e.xxConnectHttpSocket():2==e.socketState&&e.sendRequest(a,p,d))};e.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=e.challengeParams){e.digestRealm=e.challengeParams.realm;
52 -if(e.digestRealmMatch&&e.digestRealm!=e.digestRealmMatch){e.FailAllError=997;e.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(e.user+":"+e.challengeParams.realm+":"+e.pass)+":"+e.challengeParams.nonce+":"+n(e.noncecounter)+":"+d+":"+e.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==e.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+e.renderDigest({username:e.user,realm:e.challengeParams.realm,nonce:e.challengeParams.nonce,uri:b,qop:e.challengeParams.qop,
53 -response:c,nc:n(e.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+e.host+":"+e.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==e.socketState&&null!=e.socket&&e.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{e.socket.send(b.buffer)}catch(h){}}};e.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var e=b.trim().split("=");a[e[0]]=e[1].replace(RegExp('"',"g"),"");return a},{})};e.renderDigest=function(a){var b=
54 -[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,e){return b+","+("nc"==e||"qop"==e?e+"="+a[e]:e+'="'+a[e]+'"')},"").substring(1)};e.xxConnectHttpSocket=function(){e.inDataCount=0;e.socketState=1;e.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+e.host+"&port="+e.port+"&tls="+e.tls+"&tls1only="+e.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 -typeof d?"&serverauth=1&user="+a:""));e.socket.binaryType="arraybuffer";e.socket.onopen=l;e.socket.onmessage=p;e.socket.onclose=q};e.gotNextMessages=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](a,c.status,p[2])};e.gotNextMessagesError=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](e,null,{Header:{HttpError:a.status}},a.status,p[2])};e.CancelAllQueries=function(a){for(;0<e.PendingAjax.length;){var b=
56 -e.PendingAjax.shift();b[1](null,a,b[2])}null!=e.websocket&&(e.websocket.close(),e.websocket=null,e.socketState=0)};return e},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
43 +default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){g.socketState=2;g.socketParseState=0;g.socketAccumulator="";g.socketHeader=null;g.socketData="";
44 +for(i in g.pendingAjaxCall)g.sendRequest(g.pendingAjaxCall[i][0],g.pendingAjaxCall[i][3],g.pendingAjaxCall[i][4])}function p(a){var b=g.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(g.socketAccumulator=b+a;;){if(0==g.socketParseState){b=g.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;g.socketHeader=g.socketAccumulator.substring(0,b).split("\r\n");if(null==g.amtVersion)for(var c in g.socketHeader)0==g.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 +(g.amtVersion=g.socketHeader[c].substring(46));g.socketAccumulator=g.socketAccumulator.substring(b+4);g.socketParseState=1;g.socketData="";g.socketXHeader={Directive:g.socketHeader[0].split(" ")};for(c in g.socketHeader)0!=c&&(b=g.socketHeader[c].indexOf(":"),g.socketXHeader[g.socketHeader[c].substring(0,b).toLowerCase()]=g.socketHeader[c].substring(b+2))}if(1==g.socketParseState){b=-1;if(void 0==g.socketXHeader.connection||"close"!=g.socketXHeader.connection.toLowerCase()||void 0!=g.socketXHeader["transfer-encoding"]&&
46 +"chunked"==g.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=g.socketXHeader["content-length"]){b=parseInt(g.socketXHeader["content-length"]);if(g.socketAccumulator.length<b)break;a=g.socketAccumulator.substring(0,b);g.socketAccumulator=g.socketAccumulator.substring(b);g.socketData=a;b=0}else{var p=g.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(g.socketAccumulator.substring(0,p),16);if(isNaN(b)){g.websocket&&g.websocket.close();break}if(g.socketAccumulator.length<p+2+b+2)break;
47 +a=g.socketAccumulator.substring(p+2,p+2+b);g.socketAccumulator=g.socketAccumulator.substring(p+2+b+2);g.socketData+=a}else b=0;if(0==b){p=g.socketXHeader;b=g.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++g.authcounter){if(g.challengeParams=g.parseDigest(p["www-authenticate"]),null!=g.challengeParams.qop){b=g.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 +g.challengeParams.qop="auth-int":g.challengeParams.qop="auth"}}else p=g.pendingAjaxCall.shift(),g.authcounter=0,g.ActiveAjaxCount--,g.gotNextMessages(b,"success",{status:a},p),g.PerformNextAjax();g.socketParseState=0;g.socketHeader=null}}}}function r(a){0==g.inDataCount&&(g.tlsv1only=1-g.tlsv1only);g.socketState=0;null!=g.socket&&(g.socket.close(),g.socket=null);if(0<g.pendingAjaxCall.length){a=g.pendingAjaxCall.shift();var b=a[5];g.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var g={PendingAjax:[],
49 +ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};g.host=b;g.port=c;g.user=a;g.pass=d;g.tls=e;g.tlsv1only=0;g.inDataCount=0;g.amtVersion=null;g.digestRealmMatch=null;g.digestRealm=null;g.PerformAjax=function(a,b,c,p,d,h){g.ActiveAjaxCount<g.MaxActiveAjaxCount&&0==g.PendingAjax.length?g.PerformAjaxEx(a,b,c,d,h):1==p?g.PendingAjax.unshift([a,b,c,d,h]):g.PendingAjax.push([a,b,c,d,h])};g.PerformNextAjax=function(){if(!(g.ActiveAjaxCount>=
50 +g.MaxActiveAjaxCount||0==g.PendingAjax.length)){var a=g.PendingAjax.shift();g.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);g.PerformNextAjax()}};g.PerformAjaxEx=function(a,b,c,p,d){if(0!=g.FailAllError)g.gotNextMessagesError({status:g.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),g.ActiveAjaxCount++,g.PerformAjaxExNodeJS(a,b,c,p,d)};g.pendingAjaxCall=[];g.PerformAjaxExNodeJS=function(a,b,c,p,d){g.PerformAjaxExNodeJS2(a,
51 +b,c,p,d,5)};g.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=g.FailAllError?(g.ActiveAjaxCount--,999!=g.FailAllError&&g.gotNextMessages(null,"error",{status:0==g.FailAllError?408:g.FailAllError},[a,b,c,p,d]),g.PerformNextAjax()):(g.pendingAjaxCall.push([a,b,c,p,d,h]),0==g.socketState?g.xxConnectHttpSocket():2==g.socketState&&g.sendRequest(a,p,d))};g.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=g.challengeParams){g.digestRealm=g.challengeParams.realm;
52 +if(g.digestRealmMatch&&g.digestRealm!=g.digestRealmMatch){g.FailAllError=997;g.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(g.user+":"+g.challengeParams.realm+":"+g.pass)+":"+g.challengeParams.nonce+":"+n(g.noncecounter)+":"+d+":"+g.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==g.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+g.renderDigest({username:g.user,realm:g.challengeParams.realm,nonce:g.challengeParams.nonce,uri:b,qop:g.challengeParams.qop,
53 +response:c,nc:n(g.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+g.host+":"+g.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==g.socketState&&null!=g.socket&&g.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{g.socket.send(b.buffer)}catch(h){}}};g.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};g.renderDigest=function(a){var b=
54 +[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+","+("nc"==c||"qop"==c?c+"="+a[c]:c+'="'+a[c]+'"')},"").substring(1)};g.xxConnectHttpSocket=function(){g.inDataCount=0;g.socketState=1;g.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+g.host+"&port="+g.port+"&tls="+g.tls+"&tls1only="+g.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 +typeof d?"&serverauth=1&user="+a:""));g.socket.binaryType="arraybuffer";g.socket.onopen=l;g.socket.onmessage=p;g.socket.onclose=r};g.gotNextMessages=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](a,c.status,p[2])};g.gotNextMessagesError=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](g,null,{Header:{HttpError:a.status}},a.status,p[2])};g.CancelAllQueries=function(a){for(;0<g.PendingAjax.length;){var b=
56 +g.PendingAjax.shift();b[1](null,a,b[2])}null!=g.websocket&&(g.websocket.close(),g.websocket=null,g.socketState=0)};return g},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
57 function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;
58 d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?
59 d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,
60 0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):d.Stop(2);
61 -else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),e=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),q=q+(e+
62 -1),e=0,e=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(e=n[q],e=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),w="00000002:"+C+":"+e+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(q+=e.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 -p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(e.length)+e);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
61 +else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var r=0,p=n[r],l=a(new Uint8Array(n.buffer.slice(r+1,r+1+p))),r=r+(p+1),g=n[r],p=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),r=r+(g+
62 +1),g=0,g=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[r],g=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),w="00000002:"+C+":"+g+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));r=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(r+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(r)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 +p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
64 break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;
65 break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&
66 1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+
67 "/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=
68 --1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,g,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
68 +-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
69 b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b="",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";
70 var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";
71 -b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,g,v);q.PerformAjax=function(a,b,c,p,d){null==d&&(d="");q.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" '+
72 -d+"><Header><a:Action>"+a,function(a,c,e){var p=q.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(q,p.Header.ResourceURI,p,c,e)}else b(q,null,{Header:{HttpError:c}},601,e)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,h,g,l,B){var x="",A="";
73 -g="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 -B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",A='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=g&&(g="<a:ReferenceParameters><m:arg>"+g+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+
75 -"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+g+"</e:NotifyTo>"+A+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=
76 -function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 -q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=q.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var g in b)if(b.hasOwnProperty(g)&&0!==g.indexOf("__")&&0!==g.indexOf("@")&&null!=b[g]&&"function"!==typeof b[g])if("object"===typeof b[g]&&
78 -b[g].ReferenceParameters){a+="<r:"+g+"><a:Address>"+b[g].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[g].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[g].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+g+">"}else if(Array.isArray(b[g]))for(B=0;B<b[g].length;B++)a+=
79 -"<r:"+g+">"+b[g][B].toString()+"</r:"+g+">";else a+="<r:"+g+">"+b[g].toString()+"</r:"+g+">";b=a+("</r:"+h+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var h=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
80 -p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var g in b)a+="<g:"+g+">"+b[g]+"</g:"+g+">";q.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
81 -p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>",b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,
82 -h){var g="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])g+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else g+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,g,p,d,k,h)};q.ExecMethodXml=function(a,b,c,d,m,k,h){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
83 -p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>',
84 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var g=a.getElementsByTagName("Body")[0];g||(g=a.getElementsByTagName("a:Body")[0]);
86 -if(!g)return null;if(0<g.childNodes.length){k=g.childNodes[0].localName;var q=k.indexOf("_OUTPUT");-1!=q&&q==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(g.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",g,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
87 -function AmtStackCreateService(b){function c(){var a=e.GetPendingActions();C<a&&(C=a);null!=e.onProcessChanged&&w!=a&&(w=a,e.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,z,h,k){200!=z?(c(e,a,null,z,h),g(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?e.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,e,p,z){d(a,p,c,e,[],z,h,k)}):(c(e,a,null,603,h),g(1))}function d(a,b,p,h,z,E,k,m){if(200!=E)p(e,a,null,E,k),g(1);else if(null==b||"PullResponse"!=b.Header.Method)p(e,
88 -a,null,604,k),g(1);else{for(var r in b.Body.Items)if(b.Body.Items[r]instanceof Array)for(var q in b.Body.Items[r])"function"!=typeof b.Body.Items[r][q]&&z.push(b.Body.Items[r][q]);else"function"!=typeof b.Body.Items[r]&&z.push(b.Body.Items[r]);b.Body.EnumerationContext?e.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,e,A){d(a,e,p,c,z,A,k,1)}):(g(1),p(e,a,z,E,k),c())}}function g(a){e.ActiveEnumsCount-=a;e.ActiveEnumsCount>=e.MaxActiveEnumsCount||0==e.PendingEnums.length?c():(a=e.PendingEnums.shift(),
89 -e.Enum(a[0],a[1],a[2]),g(0))}function v(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]),function(b,c,p,d){null==p||200!=d?a.callback(e,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](e,null,d[2]);else e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,z){if(200!=d||"0"!=c.Body.ReturnValue)z[0](e,
90 -null,z[2]);else{var h,m,g;b=z[2];d=new Date;var r=c.Body.RecordArray;"string"===typeof r&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in r){a=null;try{a=window.atob(r[h])}catch(q){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){g={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),
91 -EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)g.EventData.push(a.charCodeAt(m));g.EntityStr=k[g.Entity];g.Desc=p(g.EventSensorType,g.EventOffset,g.EventData,g.Entity);g.EntityStr||(g.EntityStr="Unknown");b.push(g)}}if(1!=c.Body.NoMoreRecords)e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[z[0],b,z[2]]);else z[0](e,b,z[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Donn\u00e9es invalides";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
92 -r[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
93 -64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
94 -a&&170==c[0])return"Agent de surveillance"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... chang\u00e9 en"+e.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Intrusion de cas";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Une session Serial Over LAN distante a \u00e9t\u00e9 \u00e9tablie.";if(1==c[2])return"La session Serial Over LAN \u00e0 distance est termin\u00e9e. Le contr\u00f4le utilisateur a \u00e9t\u00e9 restaur\u00e9.";if(2==c[2])return"Une session IDE-Redirection distante a \u00e9t\u00e9 \u00e9tablie.";
71 +b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var r={NextMessageId:1,Address:"/wsman"};r.comm=CreateWsmanComm(b,c,a,d,e,v);r.PerformAjax=function(a,b,c,p,d){null==d&&(d="");r.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" '+
72 +d+"><Header><a:Action>"+a,function(a,c,g){var p=r.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(r,p.Header.ResourceURI,p,c,g)}else b(r,null,{Header:{HttpError:c}},601,g)},c,p)};r.CancelAllQueries=function(a){r.comm.CancelAllQueries(a)};r.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};r.ExecSubscribe=function(a,b,c,d,m,k,h,e,l,B){var x="",z="";
73 +e="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 +B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=e&&(e="<a:ReferenceParameters><m:arg>"+e+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+r.Address+
75 +"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+e+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";r.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};r.ExecUnSubscribe=
76 +function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";r.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};r.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 +r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=r.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var e in b)if(b.hasOwnProperty(e)&&0!==e.indexOf("__")&&0!==e.indexOf("@")&&null!=b[e]&&"function"!==typeof b[e])if("object"===typeof b[e]&&
78 +b[e].ReferenceParameters){a+="<r:"+e+"><a:Address>"+b[e].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[e].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[e].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+e+">"}else if(Array.isArray(b[e]))for(B=0;B<b[e].length;B++)a+=
79 +"<r:"+e+">"+b[e][B].toString()+"</r:"+e+">";else a+="<r:"+e+">"+b[e].toString()+"</r:"+e+">";b=a+("</r:"+h+">")}else b="";r.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};r.ExecCreate=function(a,b,c,d,m,k){var h=r.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
80 +p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";r.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};r.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
81 +p(b)+"</Header><Body /></Envelope>";r.PerformAjax(a,c,d,m)};r.ExecGet=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>",b,c,p)};r.ExecMethod=function(a,b,c,p,d,k,
82 +h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])e+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";r.ExecMethodXml(a,b,e,p,d,k,h)};r.ExecMethodXml=function(a,b,c,d,m,k,h){r.PerformAjax(a+"/"+b+"</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
83 +p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};r.ExecEnum=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>',
84 +b,c,p)};r.ExecPull=function(a,b,c,p,d){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 +c,p,d)};r.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var e=a.getElementsByTagName("Body")[0];e||(e=a.getElementsByTagName("a:Body")[0]);
86 +if(!e)return null;if(0<e.childNodes.length){k=e.childNodes[0].localName;var r=k.indexOf("_OUTPUT");-1!=r&&r==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(e.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",e,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return r};
87 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();C<a&&(C=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,g,p,y){d(a,p,c,g,[],y,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,p,h,y,E,k,m){if(200!=E)p(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(g,
88 +a,null,604,k),e(1);else{for(var u in b.Body.Items)if(b.Body.Items[u]instanceof Array)for(var r in b.Body.Items[u])"function"!=typeof b.Body.Items[u][r]&&y.push(b.Body.Items[u][r]);else"function"!=typeof b.Body.Items[u]&&y.push(b.Body.Items[u]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,p,c,y,z,k,1)}):(e(1),p(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
89 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
90 +null,y[2]);else{var h,m,e;b=y[2];d=new Date;var u=c.Body.RecordArray;"string"===typeof u&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in u){a=null;try{a=window.atob(u[h])}catch(r){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){e={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),
91 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)e.EventData.push(a.charCodeAt(m));e.EntityStr=k[e.Entity];e.Desc=p(e.EventSensorType,e.EventOffset,e.EventData,e.Entity);e.EntityStr||(e.EntityStr="Unknown");b.push(e)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Donn\u00e9es invalides";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("One Click Recovery: {0}",
92 +u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("One Click Recovery: {0}",h[c[2]]):format("One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&64==c[1]){if(1==
93 +c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
94 +a&&170==c[0])return"Agent de surveillance"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... chang\u00e9 en"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Intrusion de cas";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Une session Serial Over LAN distante a \u00e9t\u00e9 \u00e9tablie.";if(1==c[2])return"La session Serial Over LAN \u00e0 distance est termin\u00e9e. Le contr\u00f4le utilisateur a \u00e9t\u00e9 restaur\u00e9.";if(2==c[2])return"Une session IDE-Redirection distante a \u00e9t\u00e9 \u00e9tablie.";
95 if(3==c[2])return"Session IDE-Redirection distante termin\u00e9e. Le contr\u00f4le utilisateur a \u00e9t\u00e9 restaur\u00e9."}if(36==a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="c\u00e2bl\u00e9"),4294967293==a?"Tous les filtres de paquets re\u00e7us ont \u00e9t\u00e9 mis en correspondance sur"+b+" interface.":4294967292==a?"Tous les filtres de paquets sortants ont \u00e9t\u00e9 mis en correspondance sur"+b+" interface.":4294967290==a?"Le filtre de paquets usurp\u00e9 a \u00e9t\u00e9 mis en correspondance sur"+
96 b+" interface.":"Filtre"+a+" a \u00e9t\u00e9 appari\u00e9 sur"+b+" interface.";if(192==a)return 0==c[2]?"Politique de s\u00e9curit\u00e9 invoqu\u00e9e. Une partie ou la totalit\u00e9 du trafic r\u00e9seau (TX) a \u00e9t\u00e9 arr\u00eat\u00e9e.":2==c[2]?"Politique de s\u00e9curit\u00e9 invoqu\u00e9e. Une partie ou la totalit\u00e9 du trafic r\u00e9seau (RX) a \u00e9t\u00e9 arr\u00eat\u00e9e.":"Politique de s\u00e9curit\u00e9 invoqu\u00e9e.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"Demande de connexion \u00e0 distance par l'utilisateur.";
97 if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"Erreur EAC: essayez d'obtenir la posture alors que NAC dans Intel\ufffd AMT est d\u00e9sactiv\u00e9.";if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"Erreur HWA: erreur g\u00e9n\u00e9rale"}return 6==a?"Authentification \u00e9chou\u00e9e"+(c[1]+(c[2]<<8))+" fois. Le syst\u00e8me peut \u00eatre attaqu\u00e9.":30==a?"Pas de support de d\u00e9marrage":32==a?"Blocage du syst\u00e8me d'exploitation ou interruption d'alimentation":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":
98 -"\u00c9chec de d\u00e9marrage du syst\u00e8me":37==a?"Le microprogramme du syst\u00e8me a d\u00e9marr\u00e9 (au moins un processeur s\u2019ex\u00e9cute correctement).":"Type de capteur inconnu #"+a}function q(a,b,c,p,d){if(200!=p)d[0](e,[],p);else{var h,k,m=d[1],g=new Date,r;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,
99 -0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>Port par d\u00e9faut KVM</i>",h=5);r=ReadInt(a,h);
100 -b.Time=new Date(1E3*(r+60*g.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);r=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+r);h+=r;r=a.charCodeAt(h++);b.Ex=a.substring(h,h+r);b.ExStr=e.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)e.AMT_AuditLog_ReadRecords(m.length+1,q,[d[0],m]);else d[0](e,m,p)}}var e={};e.wsman=b;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/"];
101 -e.PendingEnums=[];e.PendingBatchOperations=0;e.ActiveEnumsCount=0;e.MaxActiveEnumsCount=1;e.onProcessChanged=null;var C=0,w=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,b,p,d,z,h,k,m,g,r){e.wsman.ExecSubscribe(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,y,A,z)},0,h,k,m,g,r);c()};e.UnSubscribe=function(a,b,p,d,z){e.wsman.ExecUnSubscribe(e.CompleteName(a),
102 -function(d,z,h,k){c();b(e,a,h,k,p)},0,d,z);c()};e.Get=function(a,b,p,d){e.wsman.ExecGet(e.CompleteName(a),function(d,h,k,m){c();b(e,a,k,m,p)},0,d);c()};e.Put=function(a,b,p,d,z,h){e.wsman.ExecPut(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z,h);c()};e.Create=function(a,b,p,d,z){e.wsman.ExecCreate(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Delete=function(a,b,p,d,z){e.wsman.ExecDelete(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Exec=function(a,
103 -b,p,d,z,h,k){e.wsman.ExecMethod(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.ExecWithXml=function(a,b,p,d,z,h,k){e.wsman.ExecMethodXml(e.CompleteName(a),b,execArgumentsToXml(p),function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.Enum=function(b,p,d,h){e.ActiveEnumsCount<e.MaxActiveEnumsCount?(e.ActiveEnumsCount++,e.wsman.ExecEnum(e.CompleteName(b),function(e,d,y,h,k){c();a(b,y,p,d,h,k)},d,h)):e.PendingEnums.push([b,p,d,h]);c()};
104 -e.BatchEnum=function(a,b,p,d,z,h){z={_pending:b.length};e.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],g=e.Enum;"*"==m[0]&&(g=e.Get,m=m.substring(1));g(m,function(b,z,A,h,k){e.PendingBatchOperations--;c();k[2][z]={response:null==A?null:A.Body,responses:A,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(e,e,a,k[2],h,d))},[a,b,z,g==e.Get?"Get":"Enum"],h)}};e.BatchGet=function(a,b,p,e,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:e,pri:d});c()};e.CompleteName=function(a){if(0==
105 -a.indexOf("AMT_"))return e.pfx[0]+a;if(0==a.indexOf("CIM_"))return e.pfx[1]+a;if(0==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,b){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>',
106 -null,null,b)};e.RequestOSPowerStateChange=function(a,b){e.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
107 -null,null,b)};e.SetBootConfigRole=function(a,b){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>',
108 -a,b)};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,b){e.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
109 -k,m,g){e.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,g)};e.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){e.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};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=
110 -function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){e.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};e.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA",
111 -"DeleteAllActions",{_method_dummy:a},b)};e.AMT_AuditLog_ClearLog=function(a){e.Exec("AMT_AuditLog","ClearLog",{},a)};e.AMT_AuditLog_RequestStateChange=function(a,b,c){e.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_AuditLog_ReadRecords=function(a,b,c){e.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};e.AMT_AuditLog_SetAuditLock=function(a,b,c,p){e.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};e.AMT_AuditLog_ExportAuditLogSignature=
112 -function(a,b){e.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};e.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){e.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule",
113 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){e.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};e.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){e.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};e.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService",
114 -"GetUserAclEntryEx",{Handle:a},b,c)};e.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){e.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};e.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){e.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};e.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
115 -{Username:a,DigestPassword:b},c)};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,b,c,p){e.Exec("AMT_AuthorizationService",
116 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};e.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){e.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};e.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_EndpointAccessControlService_GetPosture=function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};e.AMT_EndpointAccessControlService_GetPostureHash=
117 -function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};e.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){e.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};e.AMT_EndpointAccessControlService_GetEacOptions=function(a){e.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};e.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
118 -PostureHashAlgorithm:b},c)};e.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};e.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};e.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){e.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};e.AMT_GeneralSettings_AMTAuthenticate=
119 -function(a,b){e.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};e.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){e.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};e.AMT_KerberosSettingData_GetCredentialCacheState=function(a){e.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};e.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){e.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
120 -b)};e.AMT_MessageLog_CancelIteration=function(a,b){e.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};e.AMT_MessageLog_RequestStateChange=function(a,b,c){e.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_MessageLog_ClearLog=function(a){e.Exec("AMT_MessageLog","ClearLog",{},a)};e.AMT_MessageLog_GetRecords=function(a,b,c,p){e.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};e.AMT_MessageLog_GetRecord=function(a,
121 -b,c){e.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};e.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){e.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};e.AMT_MessageLog_PositionToFirstRecord=function(a,b){e.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};e.AMT_MessageLog_FreezeLog=function(a,b){e.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};e.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){e.Exec("AMT_PublicKeyManagementService",
122 -"AddCRL",{Url:a,SerialNumbers:b},c)};e.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){e.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};e.AMT_PublicKeyManagementService_AddCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddKey=
123 -function(a,b){e.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};e.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};e.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};e.AMT_PublicKeyManagementService_GenerateKeyPair=
124 -function(a,b,c){e.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};e.AMT_RedirectionService_RequestStateChange=function(a,b){e.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};e.AMT_RedirectionService_TerminateSession=function(a,b){e.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};e.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,g){e.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
125 -Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},g)};e.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){e.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};e.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){e.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){e.Exec("AMT_SetupAndConfigurationService",
126 -"CommitChanges",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_Unprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};e.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
127 -e.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};e.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){e.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};e.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){e.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){e.Exec("AMT_SetupAndConfigurationService",
128 -"GetProvisioningAuditRecord",{},a)};e.AMT_SetupAndConfigurationService_GetUuid=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};e.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){e.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};e.AMT_SystemDefensePolicy_GetTimeout=
129 -function(a){e.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};e.AMT_SystemDefensePolicy_SetTimeout=function(a,b){e.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};e.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){e.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};e.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){e.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};e.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
130 -function(a,b){e.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};e.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){e.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};e.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){e.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WebUIService_RequestStateChange=function(a,b,c){e.Exec("AMT_WebUIService",
131 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
132 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};e.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};e.CIM_Account_RequestStateChange=function(a,b,c){e.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
133 -c)};e.CIM_AccountManagementService_CreateAccount=function(a,b,c){e.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};e.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){e.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};e.CIM_BootService_SetBootConfigRole=function(a,b,c){e.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};e.CIM_BootService_RequestStateChange=function(a,b,c,p){e.Exec("CIM_BootService","RequestStateChange",
134 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};e.CIM_Card_ConnectorPower=function(a,b,c){e.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};e.CIM_Card_IsCompatible=function(a,b){e.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};e.CIM_Chassis_IsCompatible=function(a,b){e.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};e.CIM_Fan_SetSpeed=function(a,b){e.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};e.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){e.Exec("CIM_KVMRedirectionSAP",
135 -"RequestStateChange",{RequestedState:a},c)};e.CIM_MediaAccessDevice_LockMedia=function(a,b){e.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};e.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){e.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_MediaAccessDevice_Reset=function(a){e.Exec("CIM_MediaAccessDevice","Reset",{},a)};e.CIM_MediaAccessDevice_EnableDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};e.CIM_MediaAccessDevice_OnlineDevice=
136 -function(a,b){e.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};e.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};e.CIM_MediaAccessDevice_SaveProperties=function(a){e.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};e.CIM_MediaAccessDevice_RestoreProperties=function(a){e.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};e.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){e.Exec("CIM_MediaAccessDevice","RequestStateChange",
137 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_PhysicalFrame_IsCompatible=function(a,b){e.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};e.CIM_PhysicalPackage_IsCompatible=function(a,b){e.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};e.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){e.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.CIM_PowerSupply_SetPowerState=function(a,
138 -b,c){e.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_PowerSupply_Reset=function(a){e.Exec("CIM_PowerSupply","Reset",{},a)};e.CIM_PowerSupply_EnableDevice=function(a,b){e.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};e.CIM_PowerSupply_OnlineDevice=function(a,b){e.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};e.CIM_PowerSupply_QuiesceDevice=function(a,b){e.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};e.CIM_PowerSupply_SaveProperties=function(a){e.Exec("CIM_PowerSupply",
139 -"SaveProperties",{},a)};e.CIM_PowerSupply_RestoreProperties=function(a){e.Exec("CIM_PowerSupply","RestoreProperties",{},a)};e.CIM_PowerSupply_RequestStateChange=function(a,b,c){e.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Processor_SetPowerState=function(a,b,c){e.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Processor_Reset=function(a){e.Exec("CIM_Processor","Reset",{},a)};e.CIM_Processor_EnableDevice=function(a,b){e.Exec("CIM_Processor",
140 -"EnableDevice",{Enabled:a},b)};e.CIM_Processor_OnlineDevice=function(a,b){e.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};e.CIM_Processor_QuiesceDevice=function(a,b){e.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Processor_SaveProperties=function(a){e.Exec("CIM_Processor","SaveProperties",{},a)};e.CIM_Processor_RestoreProperties=function(a){e.Exec("CIM_Processor","RestoreProperties",{},a)};e.CIM_Processor_RequestStateChange=function(a,b,c){e.Exec("CIM_Processor","RequestStateChange",
141 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RecordLog_ClearLog=function(a){e.Exec("CIM_RecordLog","ClearLog",{},a)};e.CIM_RecordLog_RequestStateChange=function(a,b,c){e.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RedirectionService_RequestStateChange=function(a,b,c){e.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Sensor_SetPowerState=function(a,b,c){e.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
142 -c)};e.CIM_Sensor_Reset=function(a){e.Exec("CIM_Sensor","Reset",{},a)};e.CIM_Sensor_EnableDevice=function(a,b){e.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};e.CIM_Sensor_OnlineDevice=function(a,b){e.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};e.CIM_Sensor_QuiesceDevice=function(a,b){e.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Sensor_SaveProperties=function(a){e.Exec("CIM_Sensor","SaveProperties",{},a)};e.CIM_Sensor_RestoreProperties=function(a){e.Exec("CIM_Sensor","RestoreProperties",
143 -{},a)};e.CIM_Sensor_RequestStateChange=function(a,b,c){e.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_StatisticalData_ResetSelectedStats=function(a,b){e.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};e.CIM_Watchdog_KeepAlive=function(a){e.Exec("CIM_Watchdog","KeepAlive",{},a)};e.CIM_Watchdog_SetPowerState=function(a,b,c){e.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Watchdog_Reset=function(a){e.Exec("CIM_Watchdog",
144 -"Reset",{},a)};e.CIM_Watchdog_EnableDevice=function(a,b){e.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};e.CIM_Watchdog_OnlineDevice=function(a,b){e.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};e.CIM_Watchdog_QuiesceDevice=function(a,b){e.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};e.CIM_Watchdog_SaveProperties=function(a){e.Exec("CIM_Watchdog","SaveProperties",{},a)};e.CIM_Watchdog_RestoreProperties=function(a){e.Exec("CIM_Watchdog","RestoreProperties",{},a)};e.CIM_Watchdog_RequestStateChange=
145 -function(a,b,c){e.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_WiFiPort_SetPowerState=function(a,b,c){e.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_WiFiPort_Reset=function(a){e.Exec("CIM_WiFiPort","Reset",{},a)};e.CIM_WiFiPort_EnableDevice=function(a,b){e.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};e.CIM_WiFiPort_OnlineDevice=function(a,b){e.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};e.CIM_WiFiPort_QuiesceDevice=function(a,
146 -b){e.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};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,b,c){e.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){e.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
147 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};e.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};e.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){e.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},h)};e.IPS_HostBasedSetupService_UpgradeClientToAdmin=
148 -function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};e.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){e.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};e.IPS_KVMRedirectionSettingData_TerminateSession=function(a){e.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){e.Exec("IPS_KVMRedirectionSettingData",
149 -"DataChannelRead",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){e.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};e.IPS_OptInService_StartOptIn=function(a){e.Exec("IPS_OptInService","StartOptIn",{},a)};e.IPS_OptInService_CancelOptIn=function(a){e.Exec("IPS_OptInService","CancelOptIn",{},a)};e.IPS_OptInService_SendOptInCode=function(a,b){e.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};e.IPS_OptInService_StartService=function(a){e.Exec("IPS_OptInService",
150 -"StartService",{},a)};e.IPS_OptInService_StopService=function(a){e.Exec("IPS_OptInService","StopService",{},a)};e.IPS_OptInService_RequestStateChange=function(a,b,c){e.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){e.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.IPS_ProvisioningRecordLog_RequestStateChange=
151 -function(a,b,c){e.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_ProvisioningRecordLog_ClearLog=function(a,b){e.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};e.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){e.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};e.IPS_SecIOService_RequestStateChange=function(a,b,c){e.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
152 -TimeoutPeriod:b},c)};e.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){e.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};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",
153 -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",
154 -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",
155 -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",
156 -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,b){e.AMT_MessageLog_PositionToFirstRecord(n,
157 -[a,b,[]])};var D="Non sp\u00e9cifi\u00e9. ; Aucune m\u00e9moire syst\u00e8me n'est physiquement install\u00e9e dans le syst\u00e8me. ; Aucune m\u00e9moire syst\u00e8me utilisable, toute la m\u00e9moire install\u00e9e a rencontr\u00e9 une d\u00e9faillance irr\u00e9cup\u00e9rable. ; D\u00e9faillance irr\u00e9cup\u00e9rable du disque dur / ATAPI / IDE. ; D\u00e9faillance irr\u00e9cup\u00e9rable de la carte syst\u00e8me. ; Disquette irr\u00e9cup\u00e9rable \u00e9chec du sous-syst\u00e8me. ; \u00c9chec du contr\u00f4leur de disque dur irr\u00e9cup\u00e9rable. ; \u00c9chec du clavier PS / 2 ou USB irr\u00e9cup\u00e9rable. ; Support de d\u00e9marrage amovible introuvable. ; \u00c9chec du contr\u00f4leur vid\u00e9o irr\u00e9cup\u00e9rable. ; Aucun p\u00e9riph\u00e9rique vid\u00e9o d\u00e9tect\u00e9. ; Corruption de la ROM du micrologiciel (BIOS) d\u00e9tect\u00e9e. ; Inad\u00e9quation de la tension du processeur (les processeurs qui partagent la m\u00eame alimentation ont des exigences de tension non adapt\u00e9es) ; \u00c9chec de correspondance de la vitesse du processeur".split(";"),
98 +"\u00c9chec de d\u00e9marrage du syst\u00e8me":37==a?"Le microprogramme du syst\u00e8me a d\u00e9marr\u00e9 (au moins un processeur s\u2019ex\u00e9cute correctement).":"Type de capteur inconnu #"+a}function r(a,b,c,p,d){if(200!=p)d[0](g,[],p);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,
99 +0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>Port par d\u00e9faut KVM</i>",h=5);u=ReadInt(a,h);
100 +b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,r,[d[0],m]);else d[0](g,m,p)}}var g={};g.wsman=b;g.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/"];
101 +g.PendingEnums=[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var C=0,w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,p,d,y,h,k,m,e,u){g.wsman.ExecSubscribe(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,A,z,y)},0,h,k,m,e,u);c()};g.UnSubscribe=function(a,b,p,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),
102 +function(d,y,h,k){c();b(g,a,h,k,p)},0,d,y);c()};g.Get=function(a,b,p,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,p)},0,d);c()};g.Put=function(a,b,p,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,p,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,p,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Exec=function(a,
103 +b,p,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,p,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,p,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(g,d,A,h,k){c();a(b,A,p,d,h,k)},d,h)):g.PendingEnums.push([b,p,d,h]);c()};
104 +g.BatchEnum=function(a,b,p,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],e=g.Enum;"*"==m[0]&&(e=g.Get,m=m.substring(1));e(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(g,g,a,k[2],h,d))},[a,b,y,e==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,p,g,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:g,pri:d});c()};g.CompleteName=function(a){if(0==
105 +a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.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>',
106 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
107 +null,null,b)};g.SetBootConfigRole=function(a,b){g.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>',
108 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
109 +k,m,e){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,e)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
110 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
111 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,p){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};g.AMT_AuditLog_ExportAuditLogSignature=
112 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule",
113 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
114 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
115 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){g.Exec("AMT_AuthorizationService",
116 +"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
117 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
118 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
119 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
120 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,p){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};g.AMT_MessageLog_GetRecord=function(a,
121 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
122 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
123 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
124 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,e){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
125 +Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},e)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
126 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
127 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
128 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
129 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
130 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
131 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){console.log(JSON.stringify({WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},null,2));g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=
132 +function(a,b,c,p,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},
133 +b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,
134 +Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,p){g.Exec("CIM_BootService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c,p,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan",
135 +"SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=
136 +function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",
137 +{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",
138 +{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply",
139 +"QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply","SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor",
140 +"Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor","EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=
141 +function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,
142 +b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=
143 +function(a){g.Exec("CIM_Sensor","RestoreProperties",{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},
144 +c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog","Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog",
145 +"RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",
146 +{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){g.Exec("IPS_HostBasedSetupService",
147 +"Setup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,
148 +DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=
149 +function(a){g.Exec("IPS_KVMRedirectionSettingData","DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};
150 +g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService","StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,
151 +Time:c,TimeoutPeriod:p},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=
152 +function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",
153 +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",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",
154 +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",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",
155 +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",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",
156 +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",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",
157 +4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,[a,b,[]])};var D="Non sp\u00e9cifi\u00e9. ; Aucune m\u00e9moire syst\u00e8me n'est physiquement install\u00e9e dans le syst\u00e8me. ; Aucune m\u00e9moire syst\u00e8me utilisable, toute la m\u00e9moire install\u00e9e a rencontr\u00e9 une d\u00e9faillance irr\u00e9cup\u00e9rable. ; D\u00e9faillance irr\u00e9cup\u00e9rable du disque dur / ATAPI / IDE. ; D\u00e9faillance irr\u00e9cup\u00e9rable de la carte syst\u00e8me. ; Disquette irr\u00e9cup\u00e9rable \u00e9chec du sous-syst\u00e8me. ; \u00c9chec du contr\u00f4leur de disque dur irr\u00e9cup\u00e9rable. ; \u00c9chec du clavier PS / 2 ou USB irr\u00e9cup\u00e9rable. ; Support de d\u00e9marrage amovible introuvable. ; \u00c9chec du contr\u00f4leur vid\u00e9o irr\u00e9cup\u00e9rable. ; Aucun p\u00e9riph\u00e9rique vid\u00e9o d\u00e9tect\u00e9. ; Corruption de la ROM du micrologiciel (BIOS) d\u00e9tect\u00e9e. ; Inad\u00e9quation de la tension du processeur (les processeurs qui partagent la m\u00eame alimentation ont des exigences de tension non adapt\u00e9es) ; \u00c9chec de correspondance de la vitesse du processeur".split(";"),
158 m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS 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(";"),
159 k="Non sp\u00e9cifi\u00e9 ; Autre ; Inconnu ; Processeur ; Disque ; P\u00e9riph\u00e9rique ; Module de gestion du syst\u00e8me ; Carte syst\u00e8me ; Module de m\u00e9moire ; Module processeur ; Alimentation \u00e9lectrique ; Ajouter dans la carte ; Carte du panneau avant ; Carte du panneau arri\u00e8re ; Carte du syst\u00e8me d'alimentation ; Fond de panier du lecteur ; Expansion interne du syst\u00e8me carte ; Autre carte syst\u00e8me ; Carte processeur ; Unit\u00e9 d'alimentation ; Module d'alimentation ; Carte de gestion de l'alimentation ; Carte du panneau arri\u00e8re du ch\u00e2ssis ; Ch\u00e2ssis syst\u00e8me ; Ch\u00e2ssis secondaire ; Autre carte de ch\u00e2ssis ; Baie d'unit\u00e9 de disque ; Baie p\u00e9riph\u00e9rique ; Baie de p\u00e9riph\u00e9rique ; Refroidissement par ventilateur ; Unit\u00e9 de refroidissement ; Interconnexion par c\u00e2ble ; P\u00e9riph\u00e9rique m\u00e9moire ; Logiciel de gestion du syst\u00e8me ; BIOS ; Intel (r) ME ; Bus syst\u00e8me ; Groupe ; Intel (r) ME ; Environnement externe ; Batterie ; Lame de traitement ; Commutateur de connectivit\u00e9 ; Processeur / module de m\u00e9moire ; Module d'E / S ; Module d'E / S du processeur ; Micrologiciel du contr\u00f4leur de gestion ; Canal IPMI ; Bus PCI ; Bus PCI express ; Bus SCSI ; Bus SATA / SAS ; Bus frontal du processeur".split(";");
160 -e.RealmNames=";; Redirection ;; Asset Hardware ; Remote Control ; Storage ; Event Manager ; Storage Admin ; Agent Presence Local ; Agent Presence Remote ; Disjoncteur ; Time Network ; Information g\u00e9n\u00e9rale ; Firmware Update ; EIT ; LocalUN ; Endpoint Access Control ; Endpoint Access Control Admin ; Lecteur de journal des \u00e9v\u00e9nements ; Journal d'audit ; Domaine ACL ;;; Syst\u00e8me local".split(";");e.WatchdogCurrentStates={1:"Pas commenc\u00e9",2:"Arr\u00eat\u00e9",4:"Fonctionnement",
161 -8:"Expir\u00e9",16:"Suspendu"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),r=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),K={1:"",2:"HTTPS",4:"Local PBA",
160 +g.RealmNames=";; Redirection ;; Asset Hardware ; Remote Control ; Storage ; Event Manager ; Storage Admin ; Agent Presence Local ; Agent Presence Remote ; Disjoncteur ; Time Network ; Information g\u00e9n\u00e9rale ; Firmware Update ; EIT ; LocalUN ; Endpoint Access Control ; Endpoint Access Control Admin ; Lecteur de journal des \u00e9v\u00e9nements ; Journal d'audit ; Domaine ACL ;;; Syst\u00e8me local".split(";");g.WatchdogCurrentStates={1:"Pas commenc\u00e9",2:"Arr\u00eat\u00e9",4:"Fonctionnement",
161 +8:"Expir\u00e9",16:"Suspendu"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),K={1:"",2:"HTTPS",4:"Local PBA",
162 8:"WinRE"},B={16:"Administrateur de la s\u00e9curit\u00e9",17:"RCO",18:"Gestionnaire de redirection",19:"Gestionnaire de mise \u00e0 jour du micrologiciel",20:"Journal d'audit de s\u00e9curit\u00e9",21:"Heure du r\u00e9seau",22:"L'administration du r\u00e9seau",23:"Administration du stockage",24:"Responsable de l'\u00e9v\u00e9nement",25:"Gestionnaire de disjoncteurs",26:"Gestionnaire de pr\u00e9sence d'agent",27:"Configuration sans fil",28:"EAC",29:"KVM",30:"\u00c9v\u00e9nements de participation des utilisateurs",
163 32:"Masquage d'\u00e9cran",33:"\u00c9v\u00e9nements de surveillance",1600:"Provisioning Started",1601:"Approvisionnement termin\u00e9",1602:"Entr\u00e9e ACL ajout\u00e9e",1603:"Entr\u00e9e ACL modifi\u00e9e",1604:"Entr\u00e9e ACL supprim\u00e9e",1605:"Acc\u00e8s ACL avec des informations d'identification non valides",1606:"\u00c9tat d'entr\u00e9e ACL",1607:"\u00c9tat TLS modifi\u00e9",1608:"Jeu de certificats du serveur TLS",1609:"Certificat de serveur TLS Supprimer",1610:"Certificat racine s\u00e9curis\u00e9 TLS ajout\u00e9",
164 1611:"Suppression du certificat racine de confiance TLS",1612:"Jeu de cl\u00e9s pr\u00e9partag\u00e9es TLS",1613:"Param\u00e8tres Kerberos modifi\u00e9s",1614:"Cl\u00e9 principale Kerberos modifi\u00e9e",1615:"R\u00e9initialisation des compteurs d'usure du flash",1616:"Groupe d'alimentation modifi\u00e9",1617:"D\u00e9finir le mode d'authentification du domaine",1618:"Mettre \u00e0 niveau le client en mode de contr\u00f4le administrateur",1619:"D\u00e9provisionnement d\u00e9marr\u00e9",1700:"Mise sous tension effectu\u00e9e",
@@ -168,109 +168,109 @@ e.RealmNames=";; Redirection ;; Asset Hardware ; Remote Control ; Storage ; Even
168 2302:"Stockage FPACL modifi\u00e9",2303:"Op\u00e9ration d'\u00e9criture de stockage",2400:"Alerte abonn\u00e9e",2401:"Alerte d\u00e9sinscription",2402:"Journal des \u00e9v\u00e9nements effac\u00e9",2403:"Journal des \u00e9v\u00e9nements gel\u00e9",2500:"Filtre CB ajout\u00e9",2501:"Filtre CB retir\u00e9",2502:"Politique CB ajout\u00e9e",2503:"Politique CB supprim\u00e9e",2504:"Ensemble de r\u00e8gles par d\u00e9faut CB",2505:"Jeu d'options heuristiques CB",2506:"\u00c9tat heuristique CB effac\u00e9",
169 2600:"Agent de surveillance ajout\u00e9",2601:"Agent de surveillance supprim\u00e9",2602:"Ensemble d'actions Agent Watchdog",2700:"Profil sans fil ajout\u00e9",2701:"Profil sans fil supprim\u00e9",2702:"Profil sans fil mis \u00e0 jour",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",2800:"EAC Posture Signer SET",2801:"EAC activ\u00e9",2802:"EAC d\u00e9sactiv\u00e9",2803:"\u00c9tat de posture de l'EAC",
170 2804:"Options de configuration EAC",2900:"Activation KVM activ\u00e9e",2901:"Activation KVM d\u00e9sactiv\u00e9e",2902:"Mot de passe KVM modifi\u00e9",2903:"Consentement KVM r\u00e9ussi",2904:"\u00c9chec du consentement KVM",3E3:"Modification de la politique d'adh\u00e9sion",3001:"Envoyer un \u00e9v\u00e9nement de code de consentement",3002:"D\u00e9marrer l'\u00e9v\u00e9nement bloqu\u00e9 par opt-in",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};
171 -e.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Acc\u00e8s ME invalide","Acc\u00e8s MEBx non valide"][b.charCodeAt(0)];if(1606==a){var c=["d\u00e9sactiv\u00e9","Activ\u00e9e"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"\u00c9loign\u00e9"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local"+["NoAuth",
172 -"ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?e.RealmNames[ReadInt(b,0)]+","+["NoAuth","Auth","d\u00e9sactiv\u00e9"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","MEI local","WSMAN local","WSAMN distant"][b.charCodeAt(0)]:1900==a?"De"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \u00e0"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==
173 -a?"De"+["Aucun","KVM","Tout"][b.charCodeAt(0)]+" \u00e0"+["Aucun","KVM","Tout"][b.charCodeAt(1)]:3001==a?["Succ\u00e8s","\u00c9chec 3 fois"][b.charCodeAt(0)]:null};e.GetAuditLog=function(a){e.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return e}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
171 +g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Acc\u00e8s ME invalide","Acc\u00e8s MEBx non valide"][b.charCodeAt(0)];if(1606==a){var c=["d\u00e9sactiv\u00e9","Activ\u00e9e"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"\u00c9loign\u00e9"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local"+["NoAuth",
172 +"ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?g.RealmNames[ReadInt(b,0)]+","+["NoAuth","Auth","d\u00e9sactiv\u00e9"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","MEI local","WSMAN local","WSAMN distant"][b.charCodeAt(0)]:1900==a?"De"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \u00e0"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==
173 +a?"De"+["Aucun","KVM","Tout"][b.charCodeAt(0)]+" \u00e0"+["Aucun","KVM","Tout"][b.charCodeAt(1)]:3001==a?["Succ\u00e8s","\u00c9chec 3 fois"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,r,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
174 function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
175 -function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",g=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+g+v+">"));return a+("</r:"+b+">")}
175 +function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">";if("string"==typeof c)a+=c;else for(var v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
176 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
177 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
178 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
179 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function g(a,b){var c,p,e,d,x,h,k,m,g,q=b&&b.split("/"),w=r.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){q=q.slice(0,q.length-1);a=a.split("/");x=a.length-1;r.nodeIdCompat&&A.test(a[x])&&(a[x]=a[x].replace(A,""));a=q.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
180 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((q||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(q)for(g=q.length;0<g;--g)if(e=w[q.slice(0,g).join("/")])if(e=e[p]){d=e;h=x;break}if(d)break;!k&&l&&l[p]&&(k=l[p],m=x)}!d&&k&&(d=k,h=m);d&&(c.splice(0,h,d),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return g(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
181 -a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function e(a){return function(){return r&&r.config&&r.config[a]||{}}}var C,w,D,m,k={},h={},r={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,A=/\.js$/;D=function(a,b){var c,d=q(a),e=d[0];a=d[1];e&&(e=g(e,b),c=p(e));e?a=c&&c.normalize?c.normalize(a,n(b)):g(a,b):(a=g(a,b),d=q(a),
182 -e=d[0],a=d[1],e&&(c=p(e)));return{f:e?e+"!"+a:a,n:a,pr:e,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:e(a)}}};C=function(a,b,c,e){var x,g,A,r,q=[];g=typeof c;var w;e=e||a;if("undefined"===g||"function"===g){b=!b.length&&c.length?["require","exports","module"]:b;for(r=0;r<b.length;r+=1)if(A=D(b[r],e),g=A.f,"require"===g)q[r]=m.require(a);else if("exports"===g)q[r]=m.exports(a),
183 -w=!0;else if("module"===g)x=q[r]=m.module(a);else if(B.call(k,g)||B.call(h,g)||B.call(K,g))q[r]=p(g);else if(A.p)A.p.load(A.n,v(e,!0),l(g),{}),q[r]=k[g];else throw Error(a+" missing "+g);b=c?c.apply(k[a],q):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,e,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){r=a;r.deps&&w(r.deps,r.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
184 -typeof c&&(c=e,e=x);e?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(e.isArrayBuffer(a)||e.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
185 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var e=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)e.nextTick=process.nextTick,e.setImmediate="function"===typeof setImmediate?setImmediate:e.nextTick;else if("function"===typeof setImmediate)e.setImmediate=setImmediate,e.nextTick=function(a){return setImmediate(a)};
186 -else{e.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];e.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
187 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var d=e.setImmediate;e.setImmediate=function(e){15<Date.now()-b?(b=Date.now(),d(e)):(a.push(e),1===a.length&&p.setAttribute("a",c=!c))}}e.nextTick=e.setImmediate}})();e.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};e.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};e.isArrayBufferView=function(a){return a&&
188 -e.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};e.ByteBuffer=c;e.ByteStringBuffer=c;e.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};e.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};e.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};e.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
189 -e.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};e.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};e.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(e.encodeUtf8(a))};e.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
190 -255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
191 -8&255))};e.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};e.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};e.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
192 -e.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};e.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};e.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
193 -16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};e.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24Le=
194 -function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};e.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};e.ByteStringBuffer.prototype.getSignedInt=
195 -function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};e.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
196 -a)};e.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};e.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};e.ByteStringBuffer.prototype.copy=function(){var a=e.createBuffer(this.data);a.read=this.read;return a};e.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};e.ByteStringBuffer.prototype.clear=
197 -function(){this.data="";this.read=0;return this};e.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};e.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.ByteStringBuffer.prototype.toString=function(){return e.decodeUtf8(this.bytes())};e.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
198 -0;this.growSize=b.growSize||1024;var c=e.isArrayBuffer(a),p=e.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};e.DataBuffer.prototype.length=function(){return this.write-this.read};e.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
199 -e.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),p=new Uint8Array(this.length()+b);p.set(c);this.data=new DataView(p.buffer);return this};e.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};e.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
200 -return this};e.DataBuffer.prototype.putBytes=function(a,b){if(e.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var d=new Uint8Array(this.data.buffer,this.write);d.set(c);this.write+=p;return this}if(e.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),d=new Uint8Array(this.data.buffer),d.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof e.DataBuffer||"object"===typeof a&&"number"===
201 -typeof a.read&&"number"===typeof a.write&&e.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),d=new Uint8Array(a.data.byteLength,this.write),d.set(c),this.write+=c.byteLength,this;a instanceof e.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.hex.decode(a,c,this.write),this;if("base64"===
202 -b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=e.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=e.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
203 -b);}throw Error("Invalid parameter: "+a);};e.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};e.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};e.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};e.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
204 -e.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};e.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};e.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};e.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
205 -a,!0);this.write+=4;return this};e.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};e.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};e.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};e.DataBuffer.prototype.getInt24=
206 -function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};e.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};e.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};e.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};e.DataBuffer.prototype.getInt32Le=function(){var a=
207 -this.data.getInt32(this.read,!0);this.read+=4;return a};e.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};e.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
208 -e.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};e.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};e.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};e.DataBuffer.prototype.copy=function(){return new e.DataBuffer(this)};e.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
209 -new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};e.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};e.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};e.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
210 -this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return e.binary.raw.encode(b);if("hex"===a)return e.binary.hex.encode(b);if("base64"===a)return e.binary.base64.encode(b);if("utf8"===a)return e.text.utf8.decode(b);if("utf16"===a)return e.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};e.createBuffer=function(a,b){void 0!==a&&"utf8"===
211 -(b||"raw")&&(a=e.encodeUtf8(a));return new e.ByteBuffer(a)};e.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};e.xorBytes=function(a,b,c){for(var p="",e="",d="",h=0,k=0;0<c;--c,++h)e=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(p+=d,d="",k=0),d+=String.fromCharCode(e),++k;return p+d};e.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};e.bytesToHex=
212 -function(a){return e.createBuffer(a).toHex()};e.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var d=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];e.encode64=function(a,b){for(var c="",p="",e,d,h,k=0;k<a.length;)e=
213 -a.charCodeAt(k++),d=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,b)+"\r\n",c=c.substr(b));return p+
214 -c};e.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,p,e,h,k=0;k<a.length;)c=d[a.charCodeAt(k++)-43],p=d[a.charCodeAt(k++)-43],e=d[a.charCodeAt(k++)-43],h=d[a.charCodeAt(k++)-43],b+=String.fromCharCode(c<<2|p>>4),64!==e&&(b+=String.fromCharCode((p&15)<<4|e>>2),64!==h&&(b+=String.fromCharCode((e&3)<<6|h)));return b};e.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};e.decodeUtf8=function(a){return decodeURIComponent(escape(a))};e.binary={raw:{},hex:{},base64:{}};
215 -e.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};e.binary.raw.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(a.length));for(var e=c=c||0,d=0;d<a.length;++d)p[e++]=a.charCodeAt(d);return b?e-c:p};e.binary.hex.encode=e.bytesToHex;e.binary.hex.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var e=0,d=c;a.length&1&&(e=1,p[d++]=parseInt(a[0],16));for(;e<a.length;e+=2)p[d++]=parseInt(a.substr(e,2),16);return b?d-c:p};e.binary.base64.encode=
216 -function(a,b){for(var c="",p="",e,d,h,k=0;k<a.byteLength;)e=a[k++],d=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,
217 -b)+"\r\n",c=c.substr(b));return p+c};e.binary.base64.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var e,h,k,m,g=0,r=c;g<a.length;)e=d[a.charCodeAt(g++)-43],h=d[a.charCodeAt(g++)-43],k=d[a.charCodeAt(g++)-43],m=d[a.charCodeAt(g++)-43],p[r++]=e<<2|h>>4,64!==k&&(p[r++]=(h&15)<<4|k>>2,64!==m&&(p[r++]=(k&3)<<6|m));return b?r-c:p.subarray(0,r)};e.text={utf8:{},utf16:{}};e.text.utf8.encode=function(a,b,c){a=e.encodeUtf8(a);
218 -var p=b;p||(p=new Uint8Array(a.length));for(var d=c=c||0,h=0;h<a.length;++h)p[d++]=a.charCodeAt(h);return b?d-c:p};e.text.utf8.decode=function(a){return e.decodeUtf8(String.fromCharCode.apply(null,a))};e.text.utf16.encode=function(a,b,c){var p=b;p||(p=new Uint8Array(2*a.length));for(var e=new Uint16Array(p.buffer),d=c=c||0,h=c,k=0;k<a.length;++k)e[h++]=a.charCodeAt(k),d+=2;return b?d-c:p};e.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};e.deflate=function(a,
219 -b,c){b=e.decode64(a.deflate(e.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};e.inflate=function(a,b,c){a=a.inflate(e.encode64(b)).rval;return null===a?null:e.decode64(a)};var g=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=e.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
220 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(e.decode64(c)));return c},m=function(a,b,c,p){var e=l(a,b);null===e&&(e={});e[c]=p;g(a,b,e)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var p=l(a,b);if(null!==p&&c in p){delete p[c];c=!0;for(var e in p){c=!1;break}c&&(p=null);g(a,b,p)}},r=function(a,b){g(a,b,null)},K=function(a,b,
221 -c){var p=null;"undefined"===typeof c&&(c=["web","flash"]);var e,d=!1,h=null,k;for(k in c){e=c[k];try{if("flash"===e||"both"===e){if(null===b[0])throw Error("Flash local storage not available.");p=a.apply(this,b);d="flash"===e}if("web"===e||"both"===e)b[0]=localStorage,p=a.apply(this,b),d=!0}catch(m){h=m}if(d)break}if(!d)throw h;return p};e.setItem=function(a,b,c,p,e){K(m,arguments,e)};e.getItem=function(a,b,c,p){return K(k,arguments,p)};e.removeItem=function(a,b,c,p){K(h,arguments,p)};e.clearItems=
222 -function(a,b,c){K(r,arguments,c)};e.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;e.getQueryVariables=function(a){var b=function(a){var b=
223 -{};a=a.split("&");for(var c=0;c<a.length;c++){var p=a[c].indexOf("="),e;0<p?(e=a[c].substring(0,p),p=a[c].substring(p+1)):(e=a[c],p=null);e in b||(b[e]=[]);e in Object.prototype||null===p||b[e].push(unescape(p))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};e.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
224 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:e.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};e.makeRequest=function(a){var b=e.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var p;"undefined"===typeof a?p=b.query:(p=b.query[a])&&"undefined"!==typeof c&&(p=p[c]);return p},getQueryLast:function(a,b){var p=c.getQuery(a);return p?p[p.length-1]:b}};return c};e.makeLink=function(a,
225 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};e.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var p=0,e=b.length;p<e;){var d=b[p++];if(p==e)a[d]=c;else{var h=d in a;if(!h||h&&"object"!==typeof a[d]||h&&null===a[d])a[d]={};a=a[d]}}};e.getPath=function(a,b,c){for(var p=0,e=b.length,d=!0;d&&p<e&&"object"===typeof a&&null!==a;){var h=b[p++];(d=h in a)&&(a=a[h])}return d?a:c};e.deletePath=function(a,b){if("object"===
226 -typeof a&&null!==a)for(var c=0,p=b.length;c<p;){var e=b[c++];if(c==p)delete a[e];else{if(!(e in a)||"object"!==typeof a[e]||null===a[e])break;a=a[e]}}};e.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};e.format=function(a){var b=/%./g,c,p,e=0,d=[];for(p=0;c=b.exec(a);)switch(p=a.substring(p,b.lastIndex-2),0<p.length&&d.push(p),p=b.lastIndex,c=c[0][1],c){case "s":case "o":e<arguments.length?d.push(arguments[e++ +1]):d.push("<?>");break;case "%":d.push("%");break;default:d.push("<#"+
227 -c+"?>")}d.push(a.substring(p));return d.join("")};e.formatNumber=function(a,b,c,p){var e=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;p=void 0===p?".":p;c=0>a?"-":"";var d=parseInt(a=Math.abs(+a||0).toFixed(e),10)+"",h=3<d.length?d.length%3:0;return c+(h?d.substr(0,h)+p:"")+d.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+p)+(e?b+Math.abs(a-d).toFixed(e).slice(2):"")};e.formatSize=function(a){return a=1073741824<=a?e.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?e.formatNumber(a/1048576,2,".","")+
228 -" MiB":1024<=a?e.formatNumber(a/1024,0)+" KiB":e.formatNumber(a,0)+" bytes"};e.bytesFromIP=function(a){return-1!==a.indexOf(".")?e.bytesFromIPv4(a):-1!==a.indexOf(":")?e.bytesFromIPv6(a):null};e.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=e.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};e.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
229 -2*(8-a.length+b),p=e.createBuffer(),d=0;8>d;++d)if(a[d]&&0!==a[d].length){var h=e.hexToBytes(a[d]);2>h.length&&p.putByte(0);p.putBytes(h)}else p.fillWithByte(0,c),c=0;return p.getBytes()};e.bytesToIP=function(a){return 4===a.length?e.bytesToIPv4(a):16===a.length?e.bytesToIPv6(a):null};e.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};e.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,d=0;d<a.length;d+=
230 -2){for(var h=e.bytesToHex(a[d]+a[d+1]);"0"===h[0]&&"0"!==h;)h=h.substr(1);if("0"===h){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(h)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};e.estimateCores=function(a,b){function c(a,k,m){if(0===k){var g=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);e.cores=
231 -Math.max(1,g);URL.revokeObjectURL(h);return b(null,e.cores)}p(m,function(b,p){a.push(d(m,p));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],e=0;e<a;++e){var z=new Worker(h);z.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(z)}for(e=0;e<a;++e)c[e].postMessage(e)}function d(a,b){for(var c=[],p=0;p<a;++p)for(var e=b[p],h=c[p]=[],z=0;z<a;++z)if(p!==z){var k=b[z];(e.st>k.st&&e.st<k.et||k.st>e.st&&k.st<e.et)&&h.push(z)}return c.reduce(function(a,
232 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in e&&!a.update)return b(null,e.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return e.cores=navigator.hardwareConcurrency,b(null,e.cores);if("undefined"===typeof Worker)return e.cores=1,b(null,e.cores);if("undefined"===typeof Blob)return e.cores=2,b(null,e.cores);var h=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
233 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var q=0;q<g.length;++q)g[q](c);
234 -return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
179 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,g,x,h,k,m,e,r=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){r=r.slice(0,r.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=r.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
180 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((r||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(r)for(e=r.length;0<e;--e)if(d=w[r.slice(0,e).join("/")])if(d=d[p]){g=d;h=x;break}if(g)break;!k&&l&&l[p]&&(k=l[p],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
181 +a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function r(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var C,w,D,m,k={},h={},u={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=r(a),g=d[0];a=d[1];g&&(g=e(g,b),c=p(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=r(a),
182 +g=d[0],a=d[1],g&&(c=p(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};C=function(a,b,c,g){var x,e,z,u,r=[];e=typeof c;var w;g=g||a;if("undefined"===e||"function"===e){b=!b.length&&c.length?["require","exports","module"]:b;for(u=0;u<b.length;u+=1)if(z=D(b[u],g),e=z.f,"require"===e)r[u]=m.require(a);else if("exports"===e)r[u]=m.exports(a),
183 +w=!0;else if("module"===e)x=r[u]=m.module(a);else if(B.call(k,e)||B.call(h,e)||B.call(K,e))r[u]=p(e);else if(z.p)z.p.load(z.n,v(g,!0),l(e),{}),r[u]=k[e];else throw Error(a+" missing "+e);b=c?c.apply(k[a],r):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
184 +typeof c&&(c=g,g=x);g?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(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(b){for(var p=
185 +0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.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)};
186 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
187 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}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&&
188 +d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
189 +d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
190 +255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
191 +8&255))};d.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};d.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};d.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
192 +d.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};d.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};d.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
193 +16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};d.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24Le=
194 +function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};d.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};d.ByteStringBuffer.prototype.getSignedInt=
195 +function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
196 +a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
197 +function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
198 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
199 +d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
200 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
201 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
202 +b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
203 +b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
204 +d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
205 +a,!0);this.write+=4;return this};d.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};d.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};d.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};d.DataBuffer.prototype.getInt24=
206 +function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};d.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};d.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};d.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};d.DataBuffer.prototype.getInt32Le=function(){var a=
207 +this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};d.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
208 +d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
209 +new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
210 +this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
211 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
212 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
213 +a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
214 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
215 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
216 +function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
217 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,u=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[u++]=p<<2|g>>4,64!==h&&(d[u++]=(g&15)<<4|h>>2,64!==k&&(d[u++]=(h&3)<<6|k));return b?u-c:d.subarray(0,u)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
218 +var p=b;p||(p=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)p[y++]=a.charCodeAt(h);return b?y-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
219 +b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
220 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},K=function(a,b,
221 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){K(m,arguments,p)};d.getItem=function(a,b,c,d){return K(k,arguments,d)};d.removeItem=function(a,b,c,d){K(h,arguments,d)};d.clearItems=
222 +function(a,b,c){K(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;d.getQueryVariables=function(a){var b=function(a){var b=
223 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
224 +0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
225 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
226 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
227 +c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
228 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
229 +2*(8-a.length+b),p=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&p.putByte(0);p.putBytes(k)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,h=0;h<a.length;h+=
230 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],e=b.length;m&&e===m.end+1?(m.end=e,m.end-m.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:e,end:e})}b.push(k)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,e){if(0===m){var u=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
231 +Math.max(1,u);URL.revokeObjectURL(k);return b(null,d.cores)}p(e,function(b,d){a.push(h(e,d));c(a,m-1,e)})}function p(a,b){for(var c=[],d=[],g=0;g<a;++g){var h=new Worker(k);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(g=0;g<a;++g)c[g].postMessage(g)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],g=c[d]=[],y=0;y<a;++y)if(d!==y){var k=b[y];(p.st>k.st&&p.st<k.et||k.st>p.st&&k.st<p.et)&&g.push(y)}return c.reduce(function(a,
232 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
233 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var r=0;r<e.length;++r)e[r](c);
234 +return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
235 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
236 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
237 this.mode.start(c)};c.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()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
238 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
239 -c.defined.cipher=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
240 -4<b.length){var d=b;b=a.util.createBuffer();for(var e=0;e<d.length;++e)b.putByte(d[e])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function g(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
238 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
239 +c.defined.cipher=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
240 +4<b.length){var d=b;b=a.util.createBuffer();for(var g=0;g<d.length;++g)b.putByte(d[g])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
241 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
242 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.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);
243 this._outBlock=Array(this._ints)};w.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=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
244 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
245 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
246 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32()^this._outBlock[d],b.putInt32(this._inBlock[d]);else{var e=(this.blockSize-p)%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]);
247 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
248 -p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32(),b.putInt32(this._inBlock[d]^this._outBlock[d]);else{var e=(this.blockSize-p)%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);
249 -if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
250 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)b.putInt32(a.getInt32()^this._outBlock[d]),this._inBlock[d]=this._outBlock[d];else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(d=0;d<this._ints;++d)this._partialOutput.putInt32(a.getInt32()^
251 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
252 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var g=0;g<
253 -this._ints;++g)b.putInt32(a.getInt32()^this._outBlock[g]);else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);0<q&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
246 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
247 +if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
248 +d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
249 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
250 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
251 +this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
252 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var e=0;e<
253 +this._ints;++e)b.putInt32(a.getInt32()^this._outBlock[e]);else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);0<r&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<r&&!c)return b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
254 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
255 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.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,
256 -this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(g(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=g(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
257 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var g=0;g<this._ints;++g)b.putInt32(this._outBlock[g]^=a.getInt32());this._cipherLength+=this.blockSize}else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();
258 -for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);if(0===q||c){c?(g=p%this.blockSize,this._cipherLength+=g,this._partialOutput.truncate(this.blockSize-g)):this._cipherLength+=this.blockSize;for(g=0;g<this._ints;++g)this._outBlock[g]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),
259 -this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
260 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var e=this._aDataLength.concat(g(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,e);e=[];this.cipher.encrypt(this._j0,e);for(var q=0;q<
261 -this._ints;++q)this.tag.putInt32(this._s[q]^e[q]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],p=b.slice(0),d=0;128>d;++d)a[d/32|0]&1<<31-d%32&&(c[0]^=p[0],c[1]^=p[1],c[2]^=p[2],c[3]^=p[3]),this.pow(p,p);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,p=3;0<p;--p)b[p]=a[p]>>>1|(a[p-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
262 -[0,0,0,0],c=0;32>c;++c){var p=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=p[0];b[1]^=p[1];b[2]^=p[2];b[3]^=p[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,p=4*c,c=16*c,d=Array(c),e=0;e<c;++e){var g=[0,0,0,0];g[e/p|0]=1<<b-1<<(p-1-e%p)*b;d[e]=this.generateSubHashTable(this.multiply(g,a),b)}return d};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
263 -p=c>>>1,d=Array(c);d[p]=a.slice(0);for(var e=p>>>1;0<e;)this.pow(d[2*e],d[e]=[]),e>>=1;for(e=2;e<p;){for(var g=1;g<e;++g){var q=d[e],w=d[g];d[e+g]=[q[0]^w[0],q[1]^w[1],q[2]^w[2],q[3]^w[3]]}e*=2}d[0]=[0,0,0,0];for(e=p+1;e<c;++e)g=d[e^p],d[e]=[a[0]^g[0],a[1]^g[1],a[2]^g[2],a[3]^g[3]];return d}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=
264 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
265 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);r=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,e,g,k,q,u,b=0;256>b;++b){q=p^p<<1^p<<2^p<<3^p<<4;q=q>>8^q&255^99;h[c]=q;r[q]=c;u=a[q];e=a[c];g=a[e];k=a[g];u^=u<<24^q<<16^q<<8^q;g=(e^g^k)<<24^(c^
266 -k)<<16^(c^g^k)<<8^c^e^k;for(var w=0;4>w;++w)B[w][c]=u,x[w][q]=g,u=u<<24|u>>>8,g=g<<24|g>>>8;0===c?c=p=1:(c=e^a[a[a[e^k]]],p^=a[a[p]])}}function g(a,b){for(var c=a.slice(0),p,d=1,e=c.length,m=k*(e+6+1),q=e;q<m;++q)p=c[q-1],0===q%e?(p=h[p>>>16&255]<<24^h[p>>>8&255]<<16^h[p&255]<<8^h[p>>>24]^K[d]<<24,d++):6<e&&4===q%e&&(p=h[p>>>24]<<24^h[p>>>16&255]<<16^h[p>>>8&255]<<8^h[p&255]),c[q]=c[q-e]^p;if(b){for(var d=x[0],e=x[1],r=x[2],w=x[3],l=c.slice(0),m=c.length,q=0,F=m-k;q<m;q+=k,F-=k)if(0===q||q===m-k)l[q]=
267 -c[F],l[q+1]=c[F+3],l[q+2]=c[F+2],l[q+3]=c[F+1];else for(var B=0;B<k;++B)p=c[F+B],l[q+(3&-B)]=d[h[p>>>24]]^e[h[p>>>16&255]]^r[h[p>>>8&255]]^w[h[p&255]];c=l}return c}function w(a,b,c,p){var d=a.length/4-1,e,g,k,m,q;p?(e=x[0],g=x[1],k=x[2],m=x[3],q=r):(e=B[0],g=B[1],k=B[2],m=B[3],q=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[p?3:1]^a[1];C=b[2]^a[2];b=b[p?1:3]^a[3];for(var n=3,v=1;v<d;++v)L=e[w>>>24]^g[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=e[l>>>24]^g[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=e[C>>>24]^
268 -g[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=e[b>>>24]^g[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=q[w>>>24]<<24^q[l>>>16&255]<<16^q[C>>>8&255]<<8^q[b&255]^a[++n];c[p?3:1]=q[l>>>24]<<24^q[C>>>16&255]<<16^q[b>>>8&255]<<8^q[w&255]^a[++n];c[2]=q[C>>>24]<<24^q[b>>>16&255]<<16^q[w>>>8&255]<<8^q[l&255]^a[++n];c[p?1:3]=q[b>>>24]<<24^q[w>>>16&255]<<16^q[l>>>8&255]<<8^q[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
269 -a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;e.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!1,mode:p});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!0,mode:p});a.start(b);return a};a.aes.createDecryptionCipher=
256 +this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
257 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var e=0;e<this._ints;++e)b.putInt32(this._outBlock[e]^=a.getInt32());this._cipherLength+=this.blockSize}else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();
258 +for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(0===r||c){c?(e=p%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<r&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),
259 +this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
260 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var u=0;u<
261 +this._ints;++u)this.tag.putInt32(this._s[u]^g[u]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
262 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),g=0;g<c;++g){var e=[0,0,0,0];e[g/d|0]=1<<b-1<<(d-1-g%d)*b;p[g]=this.generateSubHashTable(this.multiply(e,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
263 +d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(p[2*g],p[g]=[]),g>>=1;for(g=2;g<d;){for(var e=1;e<g;++e){var r=p[g],w=p[e];p[g+e]=[r[0]^w[0],r[1]^w[1],r[2]^w[2],r[3]^w[3]]}g*=2}p[0]=[0,0,0,0];for(g=d+1;g<c;++g)e=p[g^d],p[g]=[a[0]^e[0],a[1]^e[1],a[2]^e[2],a[3]^e[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=
264 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
265 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,g,e,k,r,q,b=0;256>b;++b){r=p^p<<1^p<<2^p<<3^p<<4;r=r>>8^r&255^99;h[c]=r;u[r]=c;q=a[r];g=a[c];e=a[g];k=a[e];q^=q<<24^r<<16^r<<8^r;e=(g^e^k)<<24^(c^
266 +k)<<16^(c^e^k)<<8^c^g^k;for(var w=0;4>w;++w)B[w][c]=q,x[w][r]=e,q=q<<24|q>>>8,e=e<<24|e>>>8;0===c?c=p=1:(c=g^a[a[a[g^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,g=c.length,m=k*(g+6+1),r=g;r<m;++r)d=c[r-1],0===r%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^K[p]<<24,p++):6<g&&4===r%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[r]=c[r-g]^d;if(b){for(var p=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),m=c.length,r=0,F=m-k;r<m;r+=k,F-=k)if(0===r||r===m-k)l[r]=
267 +c[F],l[r+1]=c[F+3],l[r+2]=c[F+2],l[r+3]=c[F+1];else for(var B=0;B<k;++B)d=c[F+B],l[r+(3&-B)]=p[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,g,e,k,m,r;d?(g=x[0],e=x[1],k=x[2],m=x[3],r=u):(g=B[0],e=B[1],k=B[2],m=B[3],r=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[d?3:1]^a[1];C=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)L=g[w>>>24]^e[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^e[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=g[C>>>24]^
268 +e[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^e[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=r[w>>>24]<<24^r[l>>>16&255]<<16^r[C>>>8&255]<<8^r[b&255]^a[++n];c[d?3:1]=r[l>>>24]<<24^r[C>>>16&255]<<16^r[b>>>8&255]<<8^r[w&255]^a[++n];c[2]=r[C>>>24]<<24^r[b>>>16&255]<<16^r[w>>>8&255]<<8^r[l&255]^a[++n];c[d?1:3]=r[b>>>24]<<24^r[w>>>16&255]<<16^r[l>>>8&255]<<8^r[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
269 +a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;g.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
270 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
271 -c;for(var c=a.util.createBuffer(),e=0;e<d.length;++e)c.putByte(d[e])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,e=0;e<h;++e)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=g(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return g(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
272 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,r,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
273 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
271 +c;for(var c=a.util.createBuffer(),g=0;g<d.length;++g)c.putByte(d[g])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,g=0;g<h;++g)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
272 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
273 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
274 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
275 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
276 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -284,336 +284,336 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
284 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
285 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
286 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
287 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var q=0;q<g.length;++q)g[q](c);return c.oids}},
288 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
289 -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};c.create=function(b,c,d,e){if(a.util.isArray(e)){for(var h=[],g=0;g<e.length;++g)void 0!==e[g]&&h.push(e[g]);e=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(e),value:e}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,g){void 0===g&&(g=!0);
290 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,r=d(b);if(b.length()<r){if(g)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+r,m;r=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<r){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===r-(b.read-
291 -x))++x,--r}catch(A){}b.read=x}if(l)if(l=[],void 0===r)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,g))}else for(x=b.length();0<r;)l.push(c.fromDer(b,g)),r-=x-b.length(),x=b.length();else{if(void 0===r){if(g)throw Error("Non-constructed ASN.1 object of indefinite length.");r=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<r;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(r)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
292 -e=b.tagClass|b.type,g=a.util.createBuffer();if(b.composed){b.constructed?e|=32:g.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&g.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)g.putInt16(b.value.charCodeAt(h));else g.putBytes(b.value);d.putByte(e);if(127>=g.length())d.putByte(g.length()&127);else{h=g.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(g);
293 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,e,h,g,q=2;q<b.length;++q){d=!0;e=[];h=parseInt(b[q],10);do g=h&127,h>>>=7,d||(g|=128),e.push(g),d=!1;while(0<h);for(d=e.length-1;0<=d;--d)c.putByte(e[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var e=0;0<b.length();)d=b.getByte(),e<<=7,d&128?e+=d&127:(c+="."+(e+d),e=0);
294 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,e=parseInt(a.substr(4,2),10),p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,e);b.setUTCHours(p,g,q,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
295 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,e=parseInt(a.substr(6,2),10),p=parseInt(a.substr(8,2),10),g=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),x=0,l=0,y=!1;"Z"===a.charAt(a.length-1)&&(y=!0);var R=a.length-5,z=a.charAt(R);if("+"===z||"-"===z)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===z&&(l*=-1),y=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
296 -10));y?(b.setUTCFullYear(c,d,e),b.setUTCHours(p,g,q,x),b.setTime(+b+l)):(b.setFullYear(c,d,e),b.setHours(p,g,q,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
287 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var r=0;r<e.length;++r)e[r](c);return c.oids}},
288 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
289 +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};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
290 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
291 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
292 +g=b.tagClass|b.type,e=a.util.createBuffer();if(b.composed){b.constructed?g|=32:e.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&e.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)e.putInt16(b.value.charCodeAt(h));else e.putBytes(b.value);d.putByte(g);if(127>=e.length())d.putByte(e.length()&127);else{h=e.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(e);
293 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,r=2;r<b.length;++r){d=!0;g=[];h=parseInt(b[r],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
294 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),r=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(r=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(g,e,r,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
295 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),r=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
296 +10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(g,e,r,x),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(g,e,r,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
297 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
298 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,e,g){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)g&&(b.tagClass!==d.tagClass&&g.push("["+d.name+'] Expected tag class "'+d.tagClass+
299 -'", got "'+b.tagClass+'"'),b.type!==d.type&&g.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var r=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[r]&&((h=c.validate(b.value[r],d.value[l],e,g))?++r:d.value[l].optional&&(h=!0)),!h&&g&&g.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
300 -b.value.length+'"');h&&e&&(d.capture&&(e[d.capture]=b.value),d.captureAsn1&&(e[d.captureAsn1]=b))}else g&&g.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var g=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,e){var k="";d=d||0;e=e||2;0<d&&(k+="\n");for(var h="",r=0;r<d*e;++r)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
298 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
299 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
300 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
301 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
302 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
303 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",r=0;r<b.value.length;++r)void 0!==b.value[r]&&(l+=1,B+=c.prettyPrint(b.value[r],d+1,e),r+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
304 -c.Type.OCTETSTRING?(g.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:g.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
305 -c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<g.length;++q)g[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
303 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,B+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
304 +c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
305 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var r=0;r<e.length;++r)e[r](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
306 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[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];m=[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];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
307 -Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var e,p,h,g,z,E,q,l=c.length();64<=l;){p=a.h0;h=a.h1;g=a.h2;z=a.h3;for(q=0;16>q;++q)b[q]=c.getInt32Le(),e=z^h&(g^z),e=p+e+k[q]+b[q],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;32>q;++q)e=g^z&(h^g),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;48>q;++q)e=h^g^z,e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;64>q;++q)e=g^(h|~z),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;a.h0=a.h0+p|0;a.h1=a.h1+h|0;a.h2=a.h2+g|0;a.h3=
308 -a.h3+z|0;l-=64}}var g=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=g;g.create=function(){h||c();var b=null,g=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);g=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
309 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],z=m.fullMessageLength.length-1;0<=z;--z)m.fullMessageLength[z]+=q[1],q[1]=q[0]+(m.fullMessageLength[z]/4294967296>>>0),m.fullMessageLength[z]>>>=0,q[0]=q[1]/4294967296>>>0;g.putBytes(c);d(b,k,g);(2048<g.read||0===g.length())&&g.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(g.bytes());c.putBytes(l.substr(0,
310 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,q=0,z=m.fullMessageLength.length-1;0<=z;--z)h=8*m.fullMessageLength[z]+q,q=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=
311 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
312 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,A,y,w,z=d.length();64<=z;){p=a.h0;g=a.h1;q=a.h2;l=a.h3;A=a.h4;for(w=0;16>w;++w)e=d.getInt32(),b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;20>w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;32>
313 -w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;40>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;60>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g&q|l&(g^q),e=(p<<5|p>>>27)+y+A+2400959708+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;80>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>
314 -27)+y+A+3395469782+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;a.h0=a.h0+p|0;a.h1=a.h1+g|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+A|0;z-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),e=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
315 -0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,e=0;e<c;++e)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var w=g.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
316 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],A=0;A<h.fullMessageLength.length;++A)w=8*h.fullMessageLength[A+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
317 -h4:b.h4};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var g=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
318 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,y,w,z,E,O,H,C,u,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
319 -for(;64>l;++l)e=b[l-2],e=(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10,p=b[l-15],p=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,b[l]=e+b[l-7]+p+b[l-16]|0;y=a.h0;w=a.h1;z=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;u=a.h7;for(l=0;64>l;++l)e=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),g=C^O&(H^C),p=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),q=y&w|z&(y^w),e=u+e+g+n[l]+b[l],p+=q,u=C,C=H,H=O,O=E+e|0,E=z,z=w,w=y,y=e+p|0;a.h0=a.h0+y|0;a.h1=a.h1+w|0;a.h2=a.h2+z|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+u|0;v-=
320 -64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.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,
321 -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],l=!0);var b=null,d=a.util.createBuffer(),e=Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,
322 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){r.messageLength=0;r.fullMessageLength=r.messageLength64=[];for(var c=r.messageLengthSize/4,e=0;e<c;++e)r.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return r}};r.start();r.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var x=g.length;r.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=r.fullMessageLength.length-
323 -1;0<=w;--w)r.fullMessageLength[w]+=x[1],x[1]=x[0]+(r.fullMessageLength[w]/4294967296>>>0),r.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return r};r.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,r.blockLength-(r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize&r.blockLength-1)));a.util.createBuffer();for(var w,x,A=8*r.fullMessageLength[0],y=0;y<r.fullMessageLength.length;++y)w=
324 -8*r.fullMessageLength[y+1],x=w/4294967296>>>0,A+=x,l.putInt32(A>>>0),A=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return r};var g=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
325 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
326 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,k,q,z,E,l,w,C,u,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)q=b[S-2],w=q[0],q=q[1],e=((w>>>19|q<<13)^(q>>>29|w<<3)^w>>>6)>>>0,p=((w<<13|q>>>19)^(q<<3|w>>>29)^(w<<26|q>>>6))>>>0,q=b[S-15],w=q[0],q=q[1],g=((w>>>1|q<<31)^(w>>>8|q<<24)^w>>>7)>>>0,k=((w<<31|q>>>1)^(w<<24|q>>>8)^(w<<25|q>>>7))>>>0,w=b[S-7],C=b[S-
327 -16],q=p+w[1]+k+C[1],b[S][0]=e+w[0]+g+C[0]+(q/4294967296>>>0)>>>0,b[S][1]=q>>>0;w=a[0][0];C=a[0][1];u=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)e=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,q=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,p=(ba^D&(J^ba))>>>0,z=(W^V&(aa^W))>>>0,g=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
328 -E=(w&u|v&(w^u))>>>0,l=(C&n|F&(C^n))>>>0,q=G+q+z+m[S][1]+b[S][1],e=I+e+p+m[S][0]+b[S][0]+(q/4294967296>>>0)>>>0,p=q>>>0,q=k+l,g=g+E+(q/4294967296>>>0)>>>0,k=q>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,q=L+p,D=Y+e+(q/4294967296>>>0)>>>0,V=q>>>0,Y=v,L=F,v=u,F=n,u=w,n=C,q=p+k,w=e+g+(q/4294967296>>>0)>>>0,C=q>>>0;q=a[0][1]+C;a[0][0]=a[0][0]+w+(q/4294967296>>>0)>>>0;a[0][1]=q>>>0;q=a[1][1]+n;a[1][0]=a[1][0]+u+(q/4294967296>>>0)>>>0;a[1][1]=q>>>0;q=a[2][1]+F;a[2][0]=a[2][0]+v+(q/4294967296>>>0)>>>0;a[2][1]=q>>>0;
329 -q=a[3][1]+L;a[3][0]=a[3][0]+Y+(q/4294967296>>>0)>>>0;a[3][1]=q>>>0;q=a[4][1]+V;a[4][0]=a[4][0]+D+(q/4294967296>>>0)>>>0;a[4][1]=q>>>0;q=a[5][1]+aa;a[5][0]=a[5][0]+J+(q/4294967296>>>0)>>>0;a[5][1]=q>>>0;q=a[6][1]+W;a[6][0]=a[6][0]+ba+(q/4294967296>>>0)>>>0;a[6][1]=q>>>0;q=a[7][1]+G;a[7][0]=a[7][0]+I+(q/4294967296>>>0)>>>0;a[7][1]=q>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var g=a.sha384=a.sha512.sha384=a.sha512.sha384||
330 -{};g.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=g;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
307 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var p,g,h,e,y,E,r,l=c.length();64<=l;){g=a.h0;h=a.h1;e=a.h2;y=a.h3;for(r=0;16>r;++r)b[r]=c.getInt32Le(),p=y^h&(e^y),p=g+p+k[r]+b[r],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;32>r;++r)p=e^y&(h^e),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;48>r;++r)p=h^e^y,p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;64>r;++r)p=e^(h|~y),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;a.h0=a.h0+g|0;a.h1=a.h1+h|0;a.h2=a.h2+e|0;a.h3=
308 +a.h3+y|0;l-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
309 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var r=c.length;m.messageLength+=r;for(var r=[r/4294967296>>>0,r>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=r[1],r[1]=r[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,r[0]=r[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
310 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,r=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+r,r=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
311 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
312 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;r=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;32>
313 +w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&r|l&(e^r),p=(g<<5|g>>>27)+A+z+2400959708+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>
314 +27)+A+z+3395469782+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+r|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
315 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
316 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
317 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
318 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,A,w,y,E,O,H,C,q,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
319 +for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=p+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;q=a.h7;for(l=0;64>l;++l)p=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),e=C^O&(H^C),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),r=A&w|y&(A^w),p=q+p+e+n[l]+b[l],g+=r,q=C,C=H,H=O,O=E+p|0,E=y,y=w,w=A,A=p+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+q|0;v-=
320 +64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.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,
321 +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],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
322 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
323 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
324 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
325 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
326 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,k,r,y,E,l,w,C,q,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)r=b[S-2],w=r[0],r=r[1],p=((w>>>19|r<<13)^(r>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|r>>>19)^(r<<3|w>>>29)^(w<<26|r>>>6))>>>0,r=b[S-15],w=r[0],r=r[1],e=((w>>>1|r<<31)^(w>>>8|r<<24)^w>>>7)>>>0,k=((w<<31|r>>>1)^(w<<24|r>>>8)^(w<<25|r>>>7))>>>0,w=b[S-7],C=b[S-
327 +16],r=g+w[1]+k+C[1],b[S][0]=p+w[0]+e+C[0]+(r/4294967296>>>0)>>>0,b[S][1]=r>>>0;w=a[0][0];C=a[0][1];q=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)p=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,r=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(J^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
328 +E=(w&q|v&(w^q))>>>0,l=(C&n|F&(C^n))>>>0,r=G+r+y+m[S][1]+b[S][1],p=I+p+g+m[S][0]+b[S][0]+(r/4294967296>>>0)>>>0,g=r>>>0,r=k+l,e=e+E+(r/4294967296>>>0)>>>0,k=r>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,r=L+g,D=Y+p+(r/4294967296>>>0)>>>0,V=r>>>0,Y=v,L=F,v=q,F=n,q=w,n=C,r=g+k,w=p+e+(r/4294967296>>>0)>>>0,C=r>>>0;r=a[0][1]+C;a[0][0]=a[0][0]+w+(r/4294967296>>>0)>>>0;a[0][1]=r>>>0;r=a[1][1]+n;a[1][0]=a[1][0]+q+(r/4294967296>>>0)>>>0;a[1][1]=r>>>0;r=a[2][1]+F;a[2][0]=a[2][0]+v+(r/4294967296>>>0)>>>0;a[2][1]=r>>>0;
329 +r=a[3][1]+L;a[3][0]=a[3][0]+Y+(r/4294967296>>>0)>>>0;a[3][1]=r>>>0;r=a[4][1]+V;a[4][0]=a[4][0]+D+(r/4294967296>>>0)>>>0;a[4][1]=r>>>0;r=a[5][1]+aa;a[5][0]=a[5][0]+J+(r/4294967296>>>0)>>>0;a[5][1]=r>>>0;r=a[6][1]+W;a[6][0]=a[6][0]+ba+(r/4294967296>>>0)>>>0;a[6][1]=r>>>0;r=a[7][1]+G;a[7][0]=a[7][0]+I+(r/4294967296>>>0)>>>0;a[7][1]=r>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
330 +{};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
331 3609767458],[1899447441,602891725],[3049323471,3964484399],[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],
332 [1555081692,3175218132],[1996064986,2198950837],[2554220882,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,
333 106217008],[3516065817,3606008344],[3600352804,1432725776],[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],
334 [3515267271,566280711],[3940187606,3454069534],[4118630271,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]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
335 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,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,
336 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],e=null,g=a.util.createBuffer(),x=Array(80),A=0;80>A;++A)x[A]=Array(2);var y={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){y.messageLength=
337 -0;y.fullMessageLength=y.messageLength128=[];for(var b=y.messageLengthSize/4,c=0;c<b;++c)y.fullMessageLength.push(0);g=a.util.createBuffer();e=Array(d.length);for(c=0;c<d.length;++c)e[c]=d[c].slice(0);return y}};y.start();y.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;y.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=y.fullMessageLength.length-1;0<=k;--k)y.fullMessageLength[k]+=h[1],h[1]=h[0]+(y.fullMessageLength[k]/4294967296>>>0),y.fullMessageLength[k]>>>=0,h[0]=
338 -h[1]/4294967296>>>0;g.putBytes(b);c(e,x,g);(2048<g.read||0===g.length())&&g.compact();return y};y.digest=function(){var d=a.util.createBuffer();d.putBytes(g.bytes());d.putBytes(l.substr(0,y.blockLength-(y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize&y.blockLength-1)));a.util.createBuffer();for(var z,k,m=8*y.fullMessageLength[0],r=0;r<y.fullMessageLength.length;++r)z=8*y.fullMessageLength[r+1],k=z/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=z;z=Array(e.length);for(r=0;r<e.length;++r)z[r]=
339 -e[r].slice(0);c(z,x,d);d=a.util.createBuffer();k="SHA-512"===b?z.length:"SHA-384"===b?z.length-2:z.length-4;for(r=0;r<k;++r)d.putInt32(z[r][0]),r===k-1&&"SHA-512/224"===b||d.putInt32(z[r][1]);return d};return y};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
340 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
341 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md}},l=a;a=function(b,
342 -c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,g={start:function(g,m){if(null!==g)if("string"===typeof g)if(g=g.toLowerCase(),g in a.md.algorithms)b=
343 -a.md.algorithms[g].create();else throw Error('Unknown hash algorithm "'+g+'"');else b=g;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
344 -d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};g.digest=g.getMac;return g}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
345 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<g.length;++q)g[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],e=function(a,
346 -b){return" "+b},p=0;p<a.values.length;++p)d.push(a.values[p].replace(/^(\S+\r\n)/,e));b+=d.join(",")+"\r\n";d=0;a=-1;for(p=0;p<b.length;++p,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=p-a-1,a=-1,++p;else if(" "===b[p]||"\t"===b[p]||","===b[p])a=p;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var e="-----BEGIN "+b.type+"-----\r\n",g;b.procType&&(g={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
347 -e+=c(g));b.contentDomain&&(g={name:"Content-Domain",values:[b.contentDomain]},e+=c(g));b.dekInfo&&(g={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&g.values.push(b.dekInfo.parameters),e+=c(g));if(b.headers)for(g=0;g<b.headers.length;++g)e+=c(b.headers[g]);b.procType&&(e+="\r\n");e+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return e+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
348 -e=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,g=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var q={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(q);if(h[2]){for(var l=h[2].split(g),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var A=l[x];if(!/\s/.test(A[0]))break;h+=A;B=x}if(h=h.match(e)){for(var x={name:h[1],values:[]},A=h[2].split(","),y=0;y<A.length;++y)x.values.push(A[y].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
349 -"Content-Domain"!==x.name)if(q.dekInfo||"DEK-Info"!==x.name)q.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:A[0],parameters:A[1]||null}}else q.contentDomain=A[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
350 -q.procType={version:A[0],type:A[1]}}}++B}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
351 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
352 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,e){var p=32===a.length?3:9;e=3===p?e?[30,-2,-2]:[0,32,2]:e?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=b[0],q=b[1];b=(g>>>4^q)&252645135;q^=b;g^=b<<4;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(g>>>1^q)&1431655765;for(var q=q^b,g=g^b<<1,g=g<<1|g>>>31,q=q<<1|q>>>31,H=0;H<p;H+=3){for(var C=e[H+1],u=e[H+2],T=e[H];T!=C;T+=u){var P=q^a[T],F=(q>>>4|q<<28)^a[T+1];b=g;
353 -g=q;q=b^(n[P>>>24&63]|k[P>>>16&63]|r[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=g;g=q;q=b}g=g>>>1|g<<31;q=q>>>1|q<<31;b=(g>>>1^q)&1431655765;q^=b;g^=b<<1;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(g>>>4^q)&252645135;c[0]=g^b<<4;c[1]=q^b}function g(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var g=
354 -null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;e.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return g({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return g({key:a,
336 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
337 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
338 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
339 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
340 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
341 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md}},l=a;a=function(b,
342 +c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
343 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
344 +d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
345 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var r=0;r<e.length;++r)e[r](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
346 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
347 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
348 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var r={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(r);if(h[2]){for(var l=h[2].split(e),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;B=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(r.procType)if(r.contentDomain||
349 +"Content-Domain"!==x.name)if(r.dekInfo||"DEK-Info"!==x.name)r.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');r.dekInfo={algorithm:z[0],parameters:z[1]||null}}else r.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
350 +r.procType={version:z[0],type:z[1]}}}++B}if("ENCRYPTED"===r.procType&&!r.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
351 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
352 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,g){var p=32===a.length?3:9;g=3===p?g?[30,-2,-2]:[0,32,2]:g?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],r=b[1];b=(e>>>4^r)&252645135;r^=b;e^=b<<4;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(e>>>1^r)&1431655765;for(var r=r^b,e=e^b<<1,e=e<<1|e>>>31,r=r<<1|r>>>31,H=0;H<p;H+=3){for(var C=g[H+1],q=g[H+2],T=g[H];T!=C;T+=q){var P=r^a[T],F=(r>>>4|r<<28)^a[T+1];b=e;
353 +e=r;r=b^(n[P>>>24&63]|k[P>>>16&63]|u[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=e;e=r;r=b}e=e>>>1|e<<31;r=r>>>1|r<<31;b=(e>>>1^r)&1431655765;r^=b;e^=b<<1;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(e>>>4^r)&252645135;c[0]=e^b<<4;c[1]=r^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
354 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
355 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
356 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[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],
357 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],r=[0,268435456,8,268435464,0,268435456,
356 +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],
357 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],r=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
358 8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],F=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],B=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],L=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
359 1,C=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],K=0,D,W=0;W<n;W++){var I=b.getInt32(),G=b.getInt32();D=(I>>>4^G)&252645135;G^=D;I^=D<<4;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>2^G)&858993459;G^=D;I^=D<<2;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=(G>>>8^I)&16711935;I^=D;G^=D<<8;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=I<<8|G>>>20&240;for(var I=G<<24|G<<8&16711680|G>>>8&65280|G>>>24&240,G=D,S=0;S<v.length;++S){v[S]?(I=I<<2|I>>>26,G=G<<2|G>>>26):(I=I<<1|I>>>27,G=G<<1|G>>>27);
360 -var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|e[I>>>20&15]|g[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|q[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|r[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
360 +var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|g[I>>>20&15]|e[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|r[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|u[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
361 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[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,
362 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,
363 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[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,
364 8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[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],h=[256,34078976,34078720,1107296512,
365 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,
366 -524288,0,1074266112,34078976,1073742080],r=[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,
366 +524288,0,1074266112,34078976,1073742080],u=[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,
367 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[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,
368 67108866,67110912,2048,2097154],B=[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,
369 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<g.length;++q)g[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,
370 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,g;e&&!a.disableNativeCode&&(g=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,q){function l(){if(N>A)return q(null,z);n.start(null,
371 -null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();u=2;B()}function B(){if(u<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++u,a.util.setImmediate(B);z+=N<A?E:E.substr(0,y);++N;l()}"function"===typeof h&&(q=h,h=null);if(e&&!a.disableNativeCode&&g.pbkdf2&&(null===h||"object"!==typeof h)&&(4<g.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),q?4===g.pbkdf2Sync.length?g.pbkdf2(b,
372 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):g.pbkdf2(b,c,d,k,h,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===g.pbkdf2Sync.length?g.pbkdf2Sync(b,c,d,k).toString("binary"):g.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
373 -if(q)return q(b);throw b;}var A=Math.ceil(k/x),y=k-(A-1)*x,n=a.hmac.create();n.start(h,b);var z="",E,O,H;if(!q){for(var N=1;N<=A;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var u=2;u<=d;++u)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;z+=N<A?E:E.substr(0,y)}return z}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
374 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
375 -"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
376 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function g(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
377 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)e.putInt32(k[h])}catch(z){if(!("undefined"!==typeof QuotaExceededError&&z instanceof QuotaExceededError))throw z;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
378 -e.putByte(String.fromCharCode(k&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),q=0;32>q;++q)h[q]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(g(k.key,h(k.seed)));k.seed=z(g(k.key,k.seed));
379 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,q=k.plugin.formatKey,z=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var z=c(k.key,
380 -k.seed);k.generated+=z.length;q.putBytes(z);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,g(a))}catch(c){b(c)}},k.seedFileSync=g);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
369 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var r=0;r<e.length;++r)e[r](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
370 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},g="undefined"!==typeof process&&process.versions&&process.versions.node,e;g&&!a.disableNativeCode&&(e=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,r){function l(){if(N>z)return r(null,y);n.start(null,
371 +null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();q=2;B()}function B(){if(q<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++q,a.util.setImmediate(B);y+=N<z?E:E.substr(0,A);++N;l()}"function"===typeof h&&(r=h,h=null);if(g&&!a.disableNativeCode&&e.pbkdf2&&(null===h||"object"!==typeof h)&&(4<e.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),r?4===e.pbkdf2Sync.length?e.pbkdf2(b,
372 +c,d,k,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):e.pbkdf2(b,c,d,k,h,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):4===e.pbkdf2Sync.length?e.pbkdf2Sync(b,c,d,k).toString("binary"):e.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
373 +if(r)return r(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,n=a.hmac.create();n.start(h,b);var y="",E,O,H;if(!r){for(var N=1;N<=z;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var q=2;q<=d;++q)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;y+=N<z?E:E.substr(0,A)}return y}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
374 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
375 +"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,g=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(g=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
376 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function e(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var g=
377 +a.util.createBuffer();if(c)for(;g.length()<b;){var h=Math.max(1,Math.min(b-g.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)g.putInt32(k[h])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(g.length()<b)for(c=Math.floor(65536*Math.random());g.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
378 +g.putByte(String.fromCharCode(k&255));return g.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),r=0;32>r;++r)h[r]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function g(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(g)});l=e(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=r(e(k.key,h(k.seed)));k.seed=y(e(k.key,k.seed));
379 +a.util.setImmediate(g)}if(!d)return k.generateSync(b);var e=k.plugin.cipher,h=k.plugin.increment,r=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;g()};k.generateSync=function(b){var c=k.plugin.cipher,g=k.plugin.increment,e=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var r=a.util.createBuffer();r.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
380 +k.seed);k.generated+=y.length;r.putBytes(y);k.key=e(c(k.key,g(k.seed)));k.seed=h(c(k.key,k.seed))}return r.getBytes(b)};g?(k.seedFile=function(a,b){g.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return g.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,e(a))}catch(c){b(c)}},k.seedFileSync=e);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
381 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
382 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<g.length;++q)g[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
383 -0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},g=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
384 -b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,g,!1);l.putInt32(g[0]);l.putInt32(g[1]);l.putInt32(g[2]);l.putInt32(g[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
385 -process.versions.node,h=null;if("undefined"!==typeof window){var r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(h=function(a){return r.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
386 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<g.length;++q)g[q](c);
387 -return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
382 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var r=0;r<e.length;++r)e[r](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
383 +0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
384 +b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
385 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
386 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var r=0;r<e.length;++r)e[r](c);
387 +return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
388 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,
389 -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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
390 -1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var g=function(b,c,g){var k=!1,h=null,q=null,l=null,n,x,A,y,v=[];b=a.rc2.expandKey(b,c);for(A=0;64>A;A++)v.push(b.getInt16Le());g?(n=function(a){for(A=0;4>A;A++){a[A]+=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);var b=a[A],c=d[A];a[A]=b<<c&65535|(b&65535)>>16-c;y++}},x=function(a){for(A=0;4>A;A++)a[A]+=v[a[(A+3)%4]&63]}):(n=function(a){for(A=3;0<=A;A--){var b=a[A],c=d[A];a[A]=
391 -(b&65535)>>c|b<<16-c&65535;a[A]-=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);y--}},x=function(a){for(A=3;0<=A;A--)a[A]-=v[a[(A+3)%4]&63]});var z=null;return z={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();q=c||new a.util.createBuffer;l=b;z.output=q},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(A=0;4>A;A++){var c=h.getInt16Le();null!==l&&(g?c^=l.getInt16Le():l.putInt16Le(c));
392 -b.push(c&65535)}y=g?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(A=0;4>A;A++)null!==l&&(g?l.putInt16Le(b[A]):b[A]^=l.getInt16Le()),q.putInt16Le(b[A])}},finish:function(a){var b=!0;if(g)if(a)b=a(8,h,!g);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,z.update());!g&&(b=0===h.length())&&(a?b=a(8,q,!g):(a=q.length(),c=q.at(a-1),c>a?b=!1:q.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
393 -a.rc2.createEncryptionCipher=function(a,b){return g(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return g(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
394 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
395 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function g(a,b,c,d,e,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+e;e=Math.floor(h/67108864);c.data[d++]=h&67108863}return e}function l(a,b,c,d,e,p){var g=b&32767;for(b>>=15;0<=--p;){var h=this.data[a]&32767,z=this.data[a++]>>15,k=b*h+z*g,h=g*h+((k&32767)<<15)+c.data[d]+(e&1073741823);e=(h>>>30)+(k>>>15)+b*z+(e>>>30);c.data[d++]=h&1073741823}return e}function n(a,b,
396 -c,d,e,g){var p=b&16383;for(b>>=14;0<=--g;){var h=this.data[a]&16383,z=this.data[a++]>>14,k=b*h+z*p,h=p*h+((k&16383)<<14)+c.data[d]+e;e=(h>>28)+(k>>14)+b*z;c.data[d++]=h&268435455}return e}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function r(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
397 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function A(a,b){return a^b}function y(a,b){return a&~b}function R(){}function z(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
398 -navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=g,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],u;H=48;for(u=0;9>=u;++u)N[H++]=u;H=97;for(u=10;36>u;++u)N[H++]=u;H=65;for(u=10;36>u;++u)N[H++]=u;r.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};r.prototype.revert=function(a){return a};r.prototype.reduce=
399 -function(a){a.divRemTo(this.m,null,a)};r.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};r.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
389 +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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var g=b,e=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=e;128>n;n++)g.putByte(c[g.at(n-
390 +1)+g.at(n-e)&255]);g.setAt(128-l,c[g.at(128-l)&h]);for(n=127-l;0<=n;n--)g.setAt(n,c[g.at(n+1)^g.at(n+l)]);return g};var e=function(b,c,e){var k=!1,h=null,r=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
391 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();r=c||new a.util.createBuffer;l=b;y.output=r},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
392 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),r.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,r,!e):(a=r.length(),c=r.at(a-1),c>a?b=!1:r.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
393 +a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
394 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
395 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,g,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+g;g=Math.floor(h/67108864);c.data[d++]=h&67108863}return g}function l(a,b,c,d,g,e){var p=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,y=this.data[a++]>>15,k=b*h+y*p,h=p*h+((k&32767)<<15)+c.data[d]+(g&1073741823);g=(h>>>30)+(k>>>15)+b*y+(g>>>30);c.data[d++]=h&1073741823}return g}function n(a,b,
396 +c,d,g,e){var p=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,y=this.data[a++]>>14,k=b*h+y*p,h=p*h+((k&16383)<<14)+c.data[d]+g;g=(h>>28)+(k>>14)+b*y;c.data[d++]=h&268435455}return g}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
397 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
398 +navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=e,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],q;H=48;for(q=0;9>=q;++q)N[H++]=q;H=97;for(q=10;36>q;++q)N[H++]=q;H=65;for(q=10;36>q;++q)N[H++]=q;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
399 +function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
400 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
401 -c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var e=a.length,p=!1,g=0;0<=--e;){var h=8==d?a[e]&255:m(a,e);0>h?"-"==a.charAt(e)&&(p=!0):(p=!1,0==g?this.data[this.t++]=h:g+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-g)-1)<<g,this.data[this.t++]=
402 -h>>this.DB-g):this.data[this.t-1]|=h<<g,g+=d,g>=this.DB&&(g-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<g&&(this.data[this.t-1]|=(1<<this.DB-g)-1<<g));this.clamp();p&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
403 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,e=(1<<d)-1,g=Math.floor(a/this.DB),p=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+g+1]=this.data[h]>>d|p,p=(this.data[h]&e)<<c;for(h=g-1;0<=h;--h)b.data[h]=0;b.data[g]=p;b.t=this.t+g+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,e=this.DB-d,g=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var p=
404 -c+1;p<this.t;++p)b.data[p-c-1]|=(this.data[p]&g)<<e,b.data[p-c]=this.data[p]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&g)<<e);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
405 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),e=a.abs(),g=d.t;for(b.t=g+e.t;0<=--g;)b.data[g]=0;for(g=0;g<e.t;++g)b.data[g+d.t]=d.am(0,e.data[g],b,g,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
406 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,g){var p=a.abs();if(!(0>=p.t)){var z=this.abs();if(z.t<p.t)null!=b&&b.fromInt(0),null!=g&&this.copyTo(g);else{null==g&&(g=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),z.lShiftTo(l,g)):(p.copyTo(k),z.copyTo(g));p=k.t;z=k.data[p-1];if(0!=z){var E=z*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),u=this.FV/E,E=(1<<this.F1)/E,y=1<<this.F2,r=g.t,x=r-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=g.compareTo(w)&&
407 -(g.data[g.t++]=1,g.subTo(w,g));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=g.data[--r]==z?this.DM:Math.floor(g.data[r]*u+(g.data[r-1]+y)*E);if((g.data[r]+=k.am(0,O,g,x,0,p))<O)for(k.dlShiftTo(x,w),g.subTo(w,g);g.data[r]<--O;)g.subTo(w,g)}null!=b&&(g.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));g.t=p;g.clamp();0<l&&g.rShiftTo(l,g);0>m&&c.ZERO.subTo(g,g)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
408 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var g=d(),p=d(),z=b.convert(this),k=h(a)-1;for(z.copyTo(g);0<=--k;)if(b.sqrTo(g,p),0<(a&1<<k))b.mulTo(p,z,g);else var m=g,g=p,p=m;return b.revert(g)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
401 +c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var g=a.length,e=!1,p=0;0<=--g;){var h=8==d?a[g]&255:m(a,g);0>h?"-"==a.charAt(g)&&(e=!0):(e=!1,0==p?this.data[this.t++]=h:p+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-p)-1)<<p,this.data[this.t++]=
402 +h>>this.DB-p):this.data[this.t-1]|=h<<p,p+=d,p>=this.DB&&(p-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<p&&(this.data[this.t-1]|=(1<<this.DB-p)-1<<p));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
403 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,g=(1<<d)-1,p=Math.floor(a/this.DB),e=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+p+1]=this.data[h]>>d|e,e=(this.data[h]&g)<<c;for(h=p-1;0<=h;--h)b.data[h]=0;b.data[p]=e;b.t=this.t+p+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,g=this.DB-d,p=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var e=
404 +c+1;e<this.t;++e)b.data[e-c-1]|=(this.data[e]&p)<<g,b.data[e-c]=this.data[e]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&p)<<g);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,g=Math.min(a.t,this.t);c<g;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
405 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),g=a.abs(),e=d.t;for(b.t=e+g.t;0<=--e;)b.data[e]=0;for(e=0;e<g.t;++e)b.data[e+d.t]=d.am(0,g.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
406 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,e){var p=a.abs();if(!(0>=p.t)){var y=this.abs();if(y.t<p.t)null!=b&&b.fromInt(0),null!=e&&this.copyTo(e);else{null==e&&(e=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),y.lShiftTo(l,e)):(p.copyTo(k),y.copyTo(e));p=k.t;y=k.data[p-1];if(0!=y){var E=y*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),q=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=e.t,x=u-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=e.compareTo(w)&&
407 +(e.data[e.t++]=1,e.subTo(w,e));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=e.data[--u]==y?this.DM:Math.floor(e.data[u]*q+(e.data[u-1]+A)*E);if((e.data[u]+=k.am(0,O,e,x,0,p))<O)for(k.dlShiftTo(x,w),e.subTo(w,e);e.data[u]<--O;)e.subTo(w,e)}null!=b&&(e.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));e.t=p;e.clamp();0<l&&e.rShiftTo(l,e);0>m&&c.ZERO.subTo(e,e)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
408 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var e=d(),p=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(e);0<=--k;)if(b.sqrTo(e,p),0<(a&1<<k))b.mulTo(p,y,e);else var l=e,e=p,p=l;return b.revert(e)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
409 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 b=(1<<a)-1,c,d=!1,e="",g=this.t,p=this.DB-g*this.DB%a;if(0<g--)for(p<this.DB&&0<(c=this.data[g]>>p)&&(d=!0,e="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=g;)p<a?(c=(this.data[g]&(1<<p)-1)<<a-p,c|=this.data[--g]>>(p+=this.DB-a)):(c=this.data[g]>>(p-=a)&b,0>=p&&(p+=this.DB,--g)),0<c&&(d=!0),d&&(e+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?e:"0"};c.prototype.negate=function(){var a=
410 d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
411 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new r(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=z;R.prototype.revert=z;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
411 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
412 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)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var T=[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,
413 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],P=67108864/T[T.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
414 -b),c=k(b),g=d(),p=d(),h="";for(this.divRemTo(c,g,p);0<g.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,g.divRemTo(c,g,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,z=0;z<a.length;++z){var k=m(a,z);0>k?"-"==a.charAt(z)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
414 +b),c=k(b),e=d(),p=d(),h="";for(this.divRemTo(c,e,p);0<e.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,e.divRemTo(c,e,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
415 this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var e=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<e?d[0]&(1<<e)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,e,g=Math.min(a.t,this.t);for(d=
416 0;d<g;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){e=a.s&this.DM;for(d=g;d<this.t;++d)c.data[d]=b(this.data[d],e);c.t=this.t}else{e=this.s&this.DM;for(d=g;d<a.t;++d)c.data[d]=b(e,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
417 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
418 0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var e;for(e=c.t-this.t;d<e;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(e=Math.min(a.t,b);d<e;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
419 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var z=1;z++<d&&0!=
419 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var y=1;y++<d&&0!=
420 p.compareTo(b);)if(p=p.modPowInt(2,this),0==p.compareTo(c.ONE))return!1;if(0!=p.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.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]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
421 function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,e=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[e++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==e&&
422 -(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,A,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
423 -y,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
422 +(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
423 +A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
424 0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,e=0;0!=d;)d&=d-1,++e;a+=e}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
425 -y)};c.prototype.flipBit=function(a){return this.changeBit(a,A)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
426 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),g,p=k(1),z;if(0>=c)return p;g=18>c?1:48>c?3:144>c?4:768>c?5:6;z=8>c?new r(b):b.isEven()?new E(b):new v(b);var m=[],l=3,q=g-1,u=(1<<g)-1;m[1]=z.convert(this);if(1<g)for(c=d(),z.sqrTo(m[1],c);l<=u;)m[l]=d(),z.mulTo(c,m[l-2],m[l]),l+=2;for(var y=a.t-1,x,w=!0,O=d(),c=h(a.data[y])-1;0<=y;){c>=q?x=a.data[y]>>c-q&u:(x=(a.data[y]&(1<<c+1)-1)<<q-c,0<y&&(x|=a.data[y-1]>>this.DB+c-q));for(l=g;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--y);
427 -if(w)m[x].copyTo(p),w=!1;else{for(;1<l;)z.sqrTo(p,O),z.sqrTo(O,p),l-=2;0<l?z.sqrTo(p,O):(l=p,p=O,O=l);z.mulTo(O,m[x],p)}for(;0<=y&&0==(a.data[y]&1<<c);)z.sqrTo(p,O),l=p,p=O,O=l,0>--c&&(c=this.DB-1,--y)}return z.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),g=k(1),p=k(0),h=k(0),z=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(g.isEven()&&p.isEven()||(g.addTo(this,g),p.subTo(a,p)),g.rShiftTo(1,
428 -g)):p.isEven()||p.subTo(a,p),p.rShiftTo(1,p);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&z.isEven()||(h.addTo(this,h),z.subTo(a,z)),h.rShiftTo(1,h)):z.isEven()||z.subTo(a,z),z.rShiftTo(1,z);0<=d.compareTo(e)?(d.subTo(e,d),b&&g.subTo(h,g),p.subTo(z,p)):(e.subTo(d,e),b&&h.subTo(g,h),z.subTo(p,z))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=z.compareTo(a))return z.subtract(a);if(0>z.signum())z.addTo(a,z);else return z;return 0>z.signum()?z.add(a):z};c.prototype.pow=function(a){return this.exp(a,
425 +A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
426 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),e,p=k(1),y;if(0>=c)return p;e=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var l=[],m=3,r=e-1,q=(1<<e)-1;l[1]=y.convert(this);if(1<e)for(c=d(),y.sqrTo(l[1],c);m<=q;)l[m]=d(),y.mulTo(c,l[m-2],l[m]),m+=2;for(var A=a.t-1,x,w=!0,O=d(),c=h(a.data[A])-1;0<=A;){c>=r?x=a.data[A]>>c-r&q:(x=(a.data[A]&(1<<c+1)-1)<<r-c,0<A&&(x|=a.data[A-1]>>this.DB+c-r));for(m=e;0==(x&1);)x>>=1,--m;0>(c-=m)&&(c+=this.DB,--A);
427 +if(w)l[x].copyTo(p),w=!1;else{for(;1<m;)y.sqrTo(p,O),y.sqrTo(O,p),m-=2;0<m?y.sqrTo(p,O):(m=p,p=O,O=m);y.mulTo(O,l[x],p)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(p,O),m=p,p=O,O=m,0>--c&&(c=this.DB-1,--A)}return y.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),p=k(1),g=k(0),h=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(p.isEven()&&g.isEven()||(p.addTo(this,p),g.subTo(a,g)),p.rShiftTo(1,
428 +p)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&y.isEven()||(h.addTo(this,h),y.subTo(a,y)),h.rShiftTo(1,h)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(e)?(d.subTo(e,d),b&&p.subTo(h,p),g.subTo(y,g)):(e.subTo(d,e),b&&h.subTo(p,h),y.subTo(g,y))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
429 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
430 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
431 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<g.length;++l)g[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
430 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
431 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<e.length;++l)e[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
432 0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var l=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+l);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
433 v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
434 v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
435 2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
436 -0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs1}},
437 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?g(a,b,p,h):d(a,b,p,h)}function d(b,c,g,k){var m=l(b,c),z=0,q=n(m.bitLength());"millerRabinTests"in
438 -g&&(q=g.millerRabinTests);var r=10;"maxBlockTime"in g&&(r=g.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(q))return k(null,m);m.dAddOffset(h[z++%8],0)}while(0>r||+new Date-v<r);a.util.setImmediate(function(){d(b,c,g,k)})}function g(b,c,h,m){function q(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}z.bitLength()>b&&(z=l(b,c));h=z.toString(16);e.target.postMessage({hex:h,workLoad:r});
439 -z.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var z=l(b,c),E=h.workers,r=h.workLoad||100,n=30*r/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;q()});q()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(r).byteValue(),0);return c}
440 -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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],r=new k(null);r.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
441 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
442 -0;l<g.length;++l)g[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
436 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
437 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?e(a,b,p,h):d(a,b,p,h)}function d(b,c,e,k){var m=l(b,c),y=0,r=n(m.bitLength());"millerRabinTests"in
438 +e&&(r=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(r))return k(null,m);m.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,m){function r(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}y.bitLength()>b&&(y=l(b,c));h=y.toString(16);e.target.postMessage({hex:h,workLoad:u});
439 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;r()});r()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
440 +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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
441 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
442 +0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
443 Error("Message is too long for PKCS#1 v1.5 padding."),g.length=b.length,g.max=d-11,g;g.putByte(0);g.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var h=0;h<d;++h)g.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),h=0;h<d;++h)e=l.charCodeAt(h),0===e?++k:g.putByte(e);d=k}g.putByte(0);g.putBytes(b);return g}function d(b,c,e,g){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var h=b.getByte(),k=b.getByte();if(0!==h||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
444 -typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function g(b,c,d){function e(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
445 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var g=b.p;b.p=b.q;b.q=g}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,e()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,e()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
446 -(g=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,g,b.p,b.q,g.mod(b.p1),g.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);e()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
447 -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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,r=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
444 +typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
445 +b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,r,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
446 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var r={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(r.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
447 +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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
448 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},B={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
449 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
450 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
451 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},A=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
452 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},y=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
451 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
452 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
453 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
454 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
455 -b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,g,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
456 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,g).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,g):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
455 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
456 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,e):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
457 c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:g,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},g=+new Date,p,k=0;null===a.keys&&
458 -(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(r[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
458 +(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
459 null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(p=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,p,a.p,a.q,
460 p.mod(a.p1),p.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});p=+new Date;k+=p-g;g=p}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
461 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var e=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(e,0),e.keys;g(e,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,g){var l={n:b,e:g,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
461 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var g=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(g,0),g.keys;e(g,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
462 b,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+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
463 -l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,g,k,l,m,q,r){var x={n:b,e:c,d:g,p:k,q:l,dP:m,dQ:q,qInv:r,decrypt:function(b,c,g){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,g)}};else if(-1!==["RAW","NONE",
464 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:y},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
463 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,l,m,r,u){var x={n:b,e:c,d:e,p:k,q:l,dP:m,dQ:r,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
464 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
465 [k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,B,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
466 -c.errors=d,c;var e,g,l,q,y,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();y=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
467 -16),new m(e,16),new m(g,16),new m(l,16),new m(q,16),new m(y,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
468 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,A,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
466 +c.errors=d,c;var e,g,l,r,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();r=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
467 +16),new m(e,16),new m(g,16),new m(l,16),new m(r,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
468 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
469 c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
470 -!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||
471 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<g.length;++l)g[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
472 -b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var g=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encryptionOid"},
473 -{name:"AlgorithmIdentifier.parameters",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
474 -tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:g.Class.UNIVERSAL,
475 -type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"salt"},
476 -{name:"pkcs-12PbeParams.iterations",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var e=a.random.getBytesSync(d.saltSize),h=d.count,k=g.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var z,q;switch(d.algorithm){case "aes128":z=m=16;d=n["aes128-CBC"];q=a.aes.createEncryptionCipher;break;case "aes192":m=24;
477 -z=16;d=n["aes192-CBC"];q=a.aes.createEncryptionCipher;break;case "aes256":m=32;z=16;d=n["aes256-CBC"];q=a.aes.createEncryptionCipher;break;case "des":z=m=8;d=n.desCBC;q=a.des.createEncryptionCipher;break;default:throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;}var v=a.pkcs5.pbkdf2(c,e,h,m);c=a.random.getBytesSync(z);h=q(v);h.start(c);h.update(g.toDer(b));h.finish();b=h.output.getBytes();e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,
478 -g.Type.OID,!1,g.oidToDer(n.pkcs5PBES2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n.pkcs5PBKDF2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(d).getBytes()),g.create(g.Class.UNIVERSAL,
479 -g.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(e),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(g.toDer(b)),h.finish(),b=h.output.getBytes(),e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,
480 -!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]);else throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[e,g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,e={},h=[];if(!g.validate(b,m,e,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=g.derToOid(e.encryptionOid);
481 -h=l.pbe.getCipher(h,e.encryptionParams,c);e=a.util.createBuffer(e.encryptedData);h.update(e);h.finish()&&(d=g.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:g.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
482 -b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return g.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var e,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
483 -h=24;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
484 -e.substr(0,8),h);c=k(c);c.start(e);c.update(g.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(e).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,e=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==e.type&&"PRIVATE KEY"!==e.type&&"RSA PRIVATE KEY"!==e.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".'),
485 -d.headerType=d,d;if(e.procType&&"ENCRYPTED"===e.procType.type){var h,k;switch(e.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
486 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+e.dekInfo.algorithm+'".'),d.algorithm=e.dekInfo.algorithm,d;}var m=a.util.hexToBytes(e.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(e.body));if(k.finish())d=k.output.getBytes();else return d}else d=
487 -e.body;d="ENCRYPTED PRIVATE KEY"===e.type?l.decryptPrivateKeyInfo(g.fromDer(d),c):g.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,q=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var u=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,q);
488 -var C=q*Math.ceil(u/q);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%u));C=q*Math.ceil(b/q);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<q;l++)D.putByte(C.at(l%m));var Y=Math.ceil(u/q)+Math.ceil(b/q),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(q)),
470 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
471 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
472 +b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
473 +{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"}]},k={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",
474 +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,
475 +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"}]}]},h={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"},
476 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var g=a.random.getBytesSync(d.saltSize),h=d.count,k=e.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,r;switch(d.algorithm){case "aes128":y=m=16;d=n["aes128-CBC"];r=a.aes.createEncryptionCipher;break;case "aes192":m=24;
477 +y=16;d=n["aes192-CBC"];r=a.aes.createEncryptionCipher;break;case "aes256":m=32;y=16;d=n["aes256-CBC"];r=a.aes.createEncryptionCipher;break;case "des":y=m=8;d=n.desCBC;r=a.des.createEncryptionCipher;break;default:throw g=Error("Cannot encrypt private key. Unknown encryption algorithm."),g.algorithm=d.algorithm,g;}var v=a.pkcs5.pbkdf2(c,g,h,m);c=a.random.getBytesSync(y);h=r(v);h.start(c);h.update(e.toDer(b));h.finish();b=h.output.getBytes();g=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
478 +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,
479 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(g),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(e.toDer(b)),h.finish(),b=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,
480 +!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,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,g={},h=[];if(!e.validate(b,m,g,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=e.derToOid(g.encryptionOid);
481 +h=l.pbe.getCipher(h,g.encryptionParams,c);g=a.util.createBuffer(g.encryptedData);h.update(g);h.finish()&&(d=e.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
482 +b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var g,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
483 +h=24;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
484 +g.substr(0,8),h);c=k(c);c.start(g);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(g).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,g=a.pem.decode(b)[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".'),
485 +d.headerType=d,d;if(g.procType&&"ENCRYPTED"===g.procType.type){var h,k;switch(g.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
486 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+g.dekInfo.algorithm+'".'),d.algorithm=g.dekInfo.algorithm,d;}var m=a.util.hexToBytes(g.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(g.body));if(k.finish())d=k.output.getBytes();else return d}else d=
487 +g.body;d="ENCRYPTED PRIVATE KEY"===g.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,r=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var q=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,r);
488 +var C=r*Math.ceil(q/r);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%q));C=r*Math.ceil(b/r);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<r;l++)D.putByte(C.at(l%m));var Y=Math.ceil(q/r)+Math.ceil(b/r),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(r)),
489 V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);L.putBuffer(ea)}v=L;n.putBuffer(C)}n.truncate(n.length()-g);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
490 -"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var e={};b=[];if(!g.validate(c,k,e,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=g.derToOid(e.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=g.derToOid(e.encOid);if(b!==l.oids["aes128-CBC"]&&
491 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=e.kdfSalt;var m=a.util.createBuffer(e.kdfIterationCount),m=m.getInt(m.length()<<3),q;switch(l.oids[b]){case "aes128-CBC":q=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":q=24;h=a.aes.createDecryptionCipher;break;
492 -case "aes256-CBC":q=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":q=24;h=a.des.createDecryptionCipher;break;case "desCBC":q=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,q);e=e.encIv;h=h(b);h.start(e);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var e={},k=[];if(!g.validate(c,h,e,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(e.salt),e=a.util.createBuffer(e.iterations),
493 -e=e.getInt(e.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,e,m);d=l.pbe.generatePkcs12Key(d,k,2,e,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
494 -typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
495 -0;l<g.length;++l)g[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
496 -a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var g={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
490 +"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var g={};b=[];if(!e.validate(c,k,g,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=e.derToOid(g.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=e.derToOid(g.encOid);if(b!==l.oids["aes128-CBC"]&&
491 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=g.kdfSalt;var m=a.util.createBuffer(g.kdfIterationCount),m=m.getInt(m.length()<<3),r;switch(l.oids[b]){case "aes128-CBC":r=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":r=24;h=a.aes.createDecryptionCipher;break;
492 +case "aes256-CBC":r=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":r=24;h=a.des.createDecryptionCipher;break;case "desCBC":r=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,r);g=g.encIv;h=h(b);h.start(g);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
493 +g=g.getInt(g.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,g,m);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
494 +typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
495 +0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
496 +a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
497 tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",
498 -tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(g)};d.encryptedDataValidator={name:"EncryptedData",
499 -tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(g)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
498 +tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(e)};d.encryptedDataValidator={name:"EncryptedData",
499 +tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(e)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
500 captureAsn1:"digestAlgorithms"},a,{name:"SignedData.Certificates",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,capture:"signerInfos",optional:!0,value:[{name:"SignerInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:c.Class.UNIVERSAL,
501 type:c.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
502 value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,
503 constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]}]}]};d.recipientInfoValidator={name:"RecipientInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,
504 constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
505 -value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
506 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
507 -["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var g=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());g.putBuffer(b.digest())}g.truncate(g.length()-d);return g.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
508 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
509 -Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
510 -{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
511 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,g=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,x=Math.ceil(v/8),A=b.digest().getBytes();
512 -if(x<g+m+2)throw Error("Message is too long to encrypt.");var y;y=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(A);n.putBytes(y);c.start();c.update(n.getBytes());A=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-g-2);n.putByte(1);n.putBytes(y);var R=n.getBytes(),z=x-g-1,E=d.generate(A,z);y="";for(n=0;n<z;n++)y+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;y=String.fromCharCode(y.charCodeAt(0)&~v)+y.substr(1);
513 -return y+A+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<g+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-g-1,v=k.substr(0,n);k=k.substr(n,g);var y=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&y))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),z="";for(q=0;q<n;q++)z+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
514 -z=String.fromCharCode(z.charCodeAt(0)&~y)+z.substr(1);l=l-g-m-2;for(q=0;q<l;q++)if(0!==z.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==z.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=z.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,
515 -module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
505 +value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
506 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
507 +["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var e=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());e.putBuffer(b.digest())}e.truncate(e.length()-d);return e.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
508 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
509 +Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
510 +{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
511 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,r){var n,v=r-1,x=Math.ceil(v/8),z=b.digest().getBytes();
512 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
513 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var r;r=l-1;l=Math.ceil(r/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-r&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(r=0;r<n;r++)y+=String.fromCharCode(v.charCodeAt(r)^R.charCodeAt(r));
514 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(r=0;r<l;r++)if(0!==y.charCodeAt(r))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
515 +module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
516 ["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
517 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function g(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
518 -v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===r.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
517 +var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
518 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
519 typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
520 (e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
521 -"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in r?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
521 +"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
522 d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
523 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
524 -d.extension=b,d;return b}function n(a,b){switch(a){case r["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
524 +d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
525 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
526 !1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
527 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},r=h.oids,v={};v.CN=r.commonName;v.commonName="CN";v.C=r.countryName;v.countryName="C";v.L=r.localityName;v.localityName="L";v.ST=r.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=r.organizationName;v.organizationName="O";v.OU=r.organizationalUnitName;v.organizationalUnitName="OU";v.E=r.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
527 +h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
528 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
529 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
530 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
531 {name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},B,{name:"Certificate.TBSCertificate.issuerUniqueID",
532 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
533 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
534 -{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},A={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
534 +{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
535 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
536 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
537 -tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},y={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
537 +tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
538 tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},B,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
539 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
540 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in r&&(g.name=r[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
541 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in r&&(p.name=r[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===r.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==r["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:r.sha1},mgf:{algorithmOid:r.mgf1,hash:{algorithmOid:r.sha1}},
542 -saltLength:20});c={};a=[];if(!k.validate(b,A,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
540 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
541 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
542 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
543 b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
544 return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
545 body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
546 break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
547 c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
548 -null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){g([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){g(a);
549 -b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){g(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
550 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
551 -e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in r)switch(r[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
552 -e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case r.sha1WithRSAEncryption:l=void 0;break;case r["RSASSA-PSS"]:d=r[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=r[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
553 -e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=r[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
554 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=r.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
555 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,x,e,l))throw e=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),e.errors=l,e;if("string"!==typeof e.certSignature){for(var l="\x00",m=0;m<e.certSignature.length;++m)l+=k.toDer(e.certSignature[m]).getBytes();e.certSignature=l}var l=k.derToOid(e.publicKeyOid),y=h.createCertificate();y.version=e.certVersion?e.certVersion.charCodeAt(0):
556 -0;m=a.util.createBuffer(e.certSerialNumber);y.serialNumber=m.toHex();y.signatureOid=a.asn1.derToOid(e.certSignatureOid);y.signatureParameters=R(y.signatureOid,e.certSignatureParams,!0);y.siginfo.algorithmOid=a.asn1.derToOid(e.certinfoSignatureOid);y.siginfo.parameters=R(y.siginfo.algorithmOid,e.certinfoSignatureParams,!1);m=a.util.createBuffer(e.certSignature);++m.read;y.signature=m.getBytes();m=[];void 0!==e.certValidity1UTCTime&&m.push(k.utcTimeToDate(e.certValidity1UTCTime));void 0!==e.certValidity2GeneralizedTime&&
557 -m.push(k.generalizedTimeToDate(e.certValidity2GeneralizedTime));void 0!==e.certValidity3UTCTime&&m.push(k.utcTimeToDate(e.certValidity3UTCTime));void 0!==e.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(e.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
558 -y.validity.notBefore=m[0];y.validity.notAfter=m[1];y.tbsCertificate=e.tbsCertificate;if(d){y.md=null;if(y.signatureOid in r)switch(l=r[y.signatureOid],l){case "sha1WithRSAEncryption":y.md=a.md.sha1.create();break;case "md5WithRSAEncryption":y.md=a.md.md5.create();break;case "sha256WithRSAEncryption":y.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":y.md=a.md.sha512.create();break;case "RSASSA-PSS":y.md=a.md.sha256.create()}if(null===y.md)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
559 -e.signatureOid=y.signatureOid,e;m=k.toDer(y.tbsCertificate);y.md.update(m.getBytes())}m=a.md.sha1.create();y.issuer.getField=function(a){return c(y.issuer,a)};y.issuer.addField=function(a){g([a]);y.issuer.attributes.push(a)};y.issuer.attributes=h.RDNAttributesAsArray(e.certIssuer,m);e.certIssuerUniqueId&&(y.issuer.uniqueId=e.certIssuerUniqueId);y.issuer.hash=m.digest().toHex();m=a.md.sha1.create();y.subject.getField=function(a){return c(y.subject,a)};y.subject.addField=function(a){g([a]);y.subject.attributes.push(a)};
560 -y.subject.attributes=h.RDNAttributesAsArray(e.certSubject,m);e.certSubjectUniqueId&&(y.subject.uniqueId=e.certSubjectUniqueId);y.subject.hash=m.digest().toHex();y.extensions=e.certExtensions?h.certificateExtensionsFromAsn1(e.certExtensions):[];l===h.oids.rsaEncryption&&(y.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo));return y};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
561 -return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in r)if(c.name=r[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
548 +null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
549 +b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
550 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
551 +e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
552 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
553 +e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
554 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
555 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),q=h.createCertificate();q.version=g.certVersion?g.certVersion.charCodeAt(0):
556 +0;m=a.util.createBuffer(g.certSerialNumber);q.serialNumber=m.toHex();q.signatureOid=a.asn1.derToOid(g.certSignatureOid);q.signatureParameters=R(q.signatureOid,g.certSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;q.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
557 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
558 +q.validity.notBefore=m[0];q.validity.notAfter=m[1];q.tbsCertificate=g.tbsCertificate;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===q.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
559 +g.signatureOid=q.signatureOid,g;m=k.toDer(q.tbsCertificate);q.md.update(m.getBytes())}m=a.md.sha1.create();q.issuer.getField=function(a){return c(q.issuer,a)};q.issuer.addField=function(a){e([a]);q.issuer.attributes.push(a)};q.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(q.issuer.uniqueId=g.certIssuerUniqueId);q.issuer.hash=m.digest().toHex();m=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};
560 +q.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(q.subject.uniqueId=g.certSubjectUniqueId);q.subject.hash=m.digest().toHex();q.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return q};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
561 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
562 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
563 -k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in r?c[r[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
564 -g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,y,e,l))throw e=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),e.errors=l,e;if("string"!==typeof e.csrSignature){for(var l=
565 -"\x00",m=0;m<e.csrSignature.length;++m)l+=k.toDer(e.csrSignature[m]).getBytes();e.csrSignature=l}l=k.derToOid(e.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var u=h.createCertificationRequest();u.version=e.csrVersion?e.csrVersion.charCodeAt(0):0;u.signatureOid=a.asn1.derToOid(e.csrSignatureOid);u.signatureParameters=R(u.signatureOid,e.csrSignatureParams,!0);u.siginfo.algorithmOid=a.asn1.derToOid(e.csrSignatureOid);u.siginfo.parameters=R(u.siginfo.algorithmOid,
566 -e.csrSignatureParams,!1);l=a.util.createBuffer(e.csrSignature);++l.read;u.signature=l.getBytes();u.certificationRequestInfo=e.certificationRequestInfo;if(d){u.md=null;if(u.signatureOid in r)switch(l=r[u.signatureOid],l){case "sha1WithRSAEncryption":u.md=a.md.sha1.create();break;case "md5WithRSAEncryption":u.md=a.md.md5.create();break;case "sha256WithRSAEncryption":u.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":u.md=a.md.sha512.create();break;case "RSASSA-PSS":u.md=a.md.sha256.create()}if(null===
567 -u.md)throw e=Error("Could not compute certification request digest. Unknown signature OID."),e.signatureOid=u.signatureOid,e;l=k.toDer(u.certificationRequestInfo);u.md.update(l.getBytes())}l=a.md.sha1.create();u.subject.getField=function(a){return c(u.subject,a)};u.subject.addField=function(a){g([a]);u.subject.attributes.push(a)};u.subject.attributes=h.RDNAttributesAsArray(e.certificationRequestInfoSubject,l);u.subject.hash=l.digest().toHex();u.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo);
568 -u.getAttribute=function(a){return c(u,a)};u.addAttribute=function(a){g([a]);u.attributes.push(a)};u.attributes=h.CRIAttributesAsArray(e.certificationRequestInfoAttributes||[]);return u};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
569 -null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){g([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){g(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){g(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
570 -e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in r)switch(r[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
571 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case r["RSASSA-PSS"]:c=r[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=r[b.signatureParameters.mgf.algorithmOid];
572 -if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=r[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
563 +k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
564 +g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
565 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var q=h.createCertificationRequest();q.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;q.signatureOid=a.asn1.derToOid(g.csrSignatureOid);q.signatureParameters=R(q.signatureOid,g.csrSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,
566 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;q.signature=l.getBytes();q.certificationRequestInfo=g.certificationRequestInfo;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===
567 +q.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=q.signatureOid,g;l=k.toDer(q.certificationRequestInfo);q.md.update(l.getBytes())}l=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};q.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);q.subject.hash=l.digest().toHex();q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
568 +q.getAttribute=function(a){return c(q,a)};q.addAttribute=function(a){e([a]);q.attributes.push(a)};q.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return q};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
569 +null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
570 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
571 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
572 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
573 h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
574 k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
575 !1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
576 return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
577 return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
578 -h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return g.certs[b.hash]||
579 -null}var g={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in g.certs?(c=g.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):g.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
580 -for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)g.addCertificate(b[l]);return g};h.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"};
581 -h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var q=c.shift(),y=null,r=!1;if(g<q.validity.notBefore||g>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:g};if(null===k){y=c[0]||b.getIssuer(q);null===y&&q.isIssuer(q)&&(r=!0,y=q);if(y){var n=y;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){y=n.shift();
582 -try{x=y.verify(q)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||y&&!r||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&y&&!q.isIssuer(y)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<q.extensions.length;++x){var w=q.extensions[x];!w.critical||w.name in n||(k=
583 -{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||y&&!r)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
584 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
585 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
586 -c.defined.x509=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
587 -[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function g(b,c,h,q){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
588 -for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],r,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},u=null,u=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(u.tagClass!==m.Class.UNIVERSAL||u.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");u=d(u).value;break;case k.oids.encryptedData:var A=q,x={},B=[];if(!m.validate(u,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
589 -b.errors=B,b;u=m.derToOid(x.contentType);if(u!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=u,b;u=m.derToOid(x.encAlgorithm);u=k.pbe.getCipher(u,x.encParameter,A);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);u.update(x);if(!u.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");u=u.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
590 -l(u,h,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var q,r,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
591 -k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:q=A;r=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
592 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(x,q,g,h))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=h,a;r()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
593 -a.pkcs12||{},r={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
594 -r,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
578 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
579 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
580 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.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"};
581 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var r=c.shift(),A=null,u=!1;if(g<r.validity.notBefore||g>r.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:r.validity.notBefore,notAfter:r.validity.notAfter,now:g};if(null===k){A=c[0]||b.getIssuer(r);null===A&&r.isIssuer(r)&&(u=!0,A=r);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
582 +try{x=A.verify(r)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(r)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&A&&!r.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<r.extensions.length;++x){var w=r.extensions[x];!w.critical||w.name in n||(k=
583 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=r.getExtension("basicConstraints"),r=r.getExtension("keyUsage"),null!==r&&(r.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
584 +null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==r&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));r=null===k?!0:k.error;l=d?d(r,m,e):r;if(!0===l)k=null;else{!0===r&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
585 +if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
586 +c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
587 +[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,r){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
588 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},q=null,q=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(q.tagClass!==m.Class.UNIVERSAL||q.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");q=d(q).value;break;case k.oids.encryptedData:var z=r,x={},B=[];if(!m.validate(q,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
589 +b.errors=B,b;q=m.derToOid(x.contentType);if(q!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=q,b;q=m.derToOid(x.encAlgorithm);q=k.pbe.getCipher(q,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);q.update(x);if(!q.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");q=q.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
590 +l(q,h,r);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var r,u,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
591 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:r=z;u=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
592 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==r&&!m.validate(x,r,g,h))throw a=Error("Cannot read PKCS#12 "+r.name),a.errors=h,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
593 +a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
594 +u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
595 tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},B={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
596 value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
597 -capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},A={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
598 -h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var r={};if(!m.validate(b,v,r,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:r.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
599 -(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==r.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=r.version.charCodeAt(0),l;if(m.derToOid(r.contentType)!==k.oids.data)throw l=
600 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(r.contentType),l;b=r.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(r.mac){var w=null,A=0,u=m.derToOid(r.macAlgorithm);switch(u){case k.oids.sha1:w=a.md.sha1.create();A=20;break;case k.oids.sha256:w=a.md.sha256.create();A=32;break;case k.oids.sha384:w=a.md.sha384.create();A=48;break;case k.oids.sha512:w=a.md.sha512.create();
601 -A=64;break;case k.oids.md5:w=a.md.md5.create(),A=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+u);var u=new a.util.ByteBuffer(r.macSalt),B="macIterations"in r?parseInt(a.util.bytesToHex(r.macIterations),16):1,A=h.generateKey(n,u,3,B,A,w),u=a.hmac.create();u.start(w,A);u.update(b.value);if(u.getMac().getBytes()!==r.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}g(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
602 -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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(q)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);q=[];null!==
603 -g&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
604 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));g=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],n=0;n<q.length;++n){c=q[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
605 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
597 +capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
598 +h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
599 +(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
600 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var w=null,z=0,q=m.derToOid(u.macAlgorithm);switch(q){case k.oids.sha1:w=a.md.sha1.create();z=20;break;case k.oids.sha256:w=a.md.sha256.create();z=32;break;case k.oids.sha384:w=a.md.sha384.create();z=48;break;case k.oids.sha512:w=a.md.sha512.create();
601 +z=64;break;case k.oids.md5:w=a.md.md5.create(),z=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+q);var q=new a.util.ByteBuffer(u.macSalt),B="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,z=h.generateKey(n,q,3,B,z,w),q=a.hmac.create();q.start(w,z);q.update(b.value);if(q.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
602 +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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var r=a.util.isArray(c)?c[0]:c;"string"===typeof r&&(r=k.certificateFromPem(r));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(r)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);r=[];null!==
603 +g&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
604 +0<r.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,r));g=[];r=[];null!==c&&(r=a.util.isArray(c)?c:[c]);for(var u=[],n=0;n<r.length;++n){c=r[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
605 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);u.push(c)}0<u.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,u),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
606 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
607 [m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var v;e.useMac&&(g=a.md.sha1.create(),v=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,v,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),v=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
608 !0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,v.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
609 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
610 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
611 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var g=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
612 -g.headerType=b.type;throw g;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,g){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:g})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
613 -typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
609 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
610 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
611 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
612 +e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
613 +typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
614 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var g=a.util.createBuffer(),h=b.length>>1,l=h+(b.length&1),k=b.substr(0,l),l=b.substr(h,l);b=a.util.createBuffer();h=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);h.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
615 -for(var q=0;q<m;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
616 -a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},g=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
615 +for(var r=0;r<m;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(r=0;r<c;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
616 +a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
617 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
618 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
619 certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};m.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};m.CipherSuites={};m.getCipherSuite=function(a){var b=null,c;for(c in m.CipherSuites){var d=m.CipherSuites[c];if(d.id[0]===a.charCodeAt(0)&&d.id[1]===a.charCodeAt(1)){b=d;break}}return b};
@@ -624,41 +624,41 @@ send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protoco
624 b.session.compressionMethod=g?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.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,
625 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
626 (a.expect=B,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
627 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:z,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
627 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
628 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
629 !1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
630 -l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:z:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:z)):b.error(b,{message:e?"No server certificate provided.":
631 -"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=r;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
630 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
631 +"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
632 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
633 try{var g=b.session.sp;g.pre_master_secret=d.decrypt(c);var h=b.session.clientHelloVersion;if(h.major!==g.pre_master_secret.charCodeAt(0)||h.minor!==g.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){g.pre_master_secret=a.random.getBytes(48)}b.expect=O;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
634 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
635 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(g){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=O;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
636 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
637 -return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=y;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
637 +return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
638 data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=B;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
639 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:H;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var g=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
640 e.putBuffer(b.session.sha1.digest());var h=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,h?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(g);b.session.sha1.update(g);if(b.session.resuming&&h||!b.session.resuming&&!h)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
641 -data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?A:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
641 +data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?z:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
642 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
643 "Bad certificate.";break;case m.Alert.Description.unsupported_certificate:d="Unsupported certificate.";break;case m.Alert.Description.certificate_revoked:d="Certificate revoked.";break;case m.Alert.Description.certificate_expired:d="Certificate expired.";break;case m.Alert.Description.certificate_unknown:d="Certificate unknown.";break;case m.Alert.Description.illegal_parameter:d="Illegal parameter.";break;case m.Alert.Description.unknown_ca:d="Unknown certificate authority.";break;case m.Alert.Description.access_denied:d=
644 "Access denied.";break;case m.Alert.Description.decode_error:d="Decode error.";break;case m.Alert.Description.decrypt_error:d="Decrypt error.";break;case m.Alert.Description.export_restriction:d="Export restriction.";break;case m.Alert.Description.protocol_version:d="Unsupported protocol version.";break;case m.Alert.Description.insufficient_security:d="Insufficient security.";break;case m.Alert.Description.internal_error:d="Internal error.";break;case m.Alert.Description.user_canceled:d="User canceled.";
645 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt24();if(g>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var h=d.bytes(g+
646 4);d.read+=4;e in J[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(h),b.session.sha1.update(h)),J[b.entity][b.expect][e](b,c,g)):
647 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt16(),d=d.getBytes(g);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||g>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
648 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,r=3,v=4,B=5,x=6,A=7,y=8,R=1,z=2,E=3,O=4,H=5,N=6,u=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];ea[m.ConnectionEnd.server]=[[u,P,F,u,L],[u,
649 -P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[u,u,m.handleServerHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,P,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,L,u,u,u,u,u,u],
650 -[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];J[m.ConnectionEnd.server]=[[u,m.handleClientHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,P,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleClientKeyExchange,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleCertificateVerify,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,
651 -u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
648 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,B=5,x=6,z=7,A=8,R=1,y=2,E=3,O=4,H=5,N=6,q=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];ea[m.ConnectionEnd.server]=[[q,P,F,q,L],[q,
649 +P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[q,q,m.handleServerHello,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,P,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,L,q,q,q,q,q,q],
650 +[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q]];J[m.ConnectionEnd.server]=[[q,m.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,P,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.handleClientKeyExchange,q,q,q,q],[q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,m.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,
651 +q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[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]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
652 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};g&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
653 cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
654 a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
655 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=g;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
655 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
656 }return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
657 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
658 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
657 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var r=a.util.createBuffer();
658 +n(r,2,k);n(l,2,r);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
659 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var g=
660 -null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(q.bytes(),!1));
661 -var y=a.util.createBuffer();n(y,3,q);e.putBuffer(y)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
660 +null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var r=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(r.bytes(),!1));
661 +var u=a.util.createBuffer();n(u,3,r);e.putBuffer(u)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(q){return b.error(b,{message:"Could not send certificate list.",cause:q,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
662 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
663 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(g){b.error(b,{message:"Could not get private key.",cause:g,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
664 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var g=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(g))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -680,199 +680,199 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_versio
680 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_message}})),c.record.ready=!0));c=b}if(!h.fail&&null!==h.record&&h.record.ready)if(b=h.record,d=b.type-m.ContentType.change_cipher_spec,e=ea[h.entity][h.expect],d in e)e[d](h,b);else m.handleUnexpected(h,b)}return c};h.prepare=function(b){m.queue(h,m.createRecord(h,{type:m.ContentType.application_data,data:a.util.createBuffer(b)}));return m.flush(h)};h.prepareHeartbeatRequest=function(b,c){b instanceof a.util.ByteBuffer&&
681 (b=b.bytes());"undefined"===typeof c&&(c=b.length);h.expectedHeartbeatPayload=b;m.queue(h,m.createRecord(h,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_request,b,c)}));return m.flush(h)};h.close=function(a){if(!h.fail&&h.sessionCache&&h.session){var b={id:h.session.id,version:h.session.version,sp:h.session.sp};b.sp.keys=null;h.sessionCache.setSession(b.id,b)}if(h.open){h.open=!1;h.input.clear();if(h.isConnected||h.handshaking)h.isConnected=h.handshaking=!1,
682 m.queue(h,m.createAlert(h,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(h);h.closed(h)}h.reset(a)};return h};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
683 -return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<g.length;++l)g[l](c);return c.tls}},
684 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,g,l){g=g.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
685 -g?l.keys.server_write_key:l.keys.client_write_key),iv:g?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",g?l.keys.client_write_key:l.keys.server_write_key),iv:g?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var e=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
686 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(g)&&(b.fragment=k.output,b.length=b.fragment.length(),e=!0);return e}function g(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
687 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,q=a.random.getBytesSync(g),y=e.output.length();y>=g?(b.fragment=e.output.getBytes(y-g),q=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
688 -b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;y=a.hmac.create();y.start("SHA1",e);y.update(q);q=y.digest().getBytes();y.start(null,null);y.update(g);g=y.digest().getBytes();return q===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
683 +return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
684 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
685 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
686 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
687 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,r=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),r=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
688 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(r);r=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return r===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
689 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
690 -20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<g.length;++l)g[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
691 -typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
692 -a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
693 -function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<g.length;++l)g[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
694 -(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<q;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var g=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(g.getBytesSync(h)),
695 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));h-=q.length;0<h&&(q=a.util.fillString(String.fromCharCode(0),h)+q);h=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:h,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
696 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<g.length;++l)g[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
697 -"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],g=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var g=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):g<=c[m.level].index&&
690 +20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
691 +typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
692 +a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
693 +function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
694 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,r=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<r;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),r;do r=(new d(a.util.bytesToHex(e.getBytesSync(h)),
695 +16)).mod(c.n);while(r.equals(d.ZERO));r=a.util.hexToBytes(r.toString(16));h-=r.length;0<h&&(r=a.util.fillString(String.fromCharCode(0),h)+r);h=c.encrypt(r,"NONE");r=b.generate(r,l);return{encapsulation:h,key:r}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
696 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
697 +"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
698 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
699 a.log.logMessage({timestamp:new Date,level:b,category:c,message:d,arguments:e})}})(n[l]);a.log.makeLogger=function(b){b={flags:0,f:b};a.log.setLevel(b,"none");return b};a.log.setLevel=function(b,c){var d=!1;if(b&&!(b.flags&a.log.LEVEL_LOCKED))for(var e=0;e<a.log.levels.length;++e)if(c==a.log.levels[e]){b.level=c;d=!0;break}return d};a.log.lock=function(b,c){b.flags="undefined"===typeof c||c?b.flags|a.log.LEVEL_LOCKED:b.flags&~a.log.LEVEL_LOCKED};a.log.addLogger=function(a){d.push(a)};if("undefined"!==
700 -typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},g=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else g=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};g=a.log.makeLogger(g);a.log.setLevel(g,"debug");a.log.addLogger(g)}else console={log:function(){}};
701 -null!==g&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(g,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(g));a.log.consoleLogger=g}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
702 -c.defined.log=!0;for(var l=0;l<g.length;++l)g[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!r.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
703 -b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:r.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
704 -r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.encryptedContent.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]),r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function g(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
705 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.digestAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(r.create(r.Class.UNIVERSAL,
706 -r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.signatureAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]));c.value.push(r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=r.create(r.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
707 -r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?r.utcTimeToDate(e):r.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?r.create(r.Class.UNIVERSAL,r.Type.UTCTIME,!1,r.dateToUtcTime(e)):
708 -r.create(r.Class.UNIVERSAL,r.Type.GENERALIZEDTIME,!1,r.dateToGeneralizedTime(e))}return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[c])])}function m(b){return[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,
709 -r.Type.OCTETSTRING,!1,b.parameter.getBytes())]),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!r.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(r.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
710 -0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:r.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
700 +typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},e=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else e=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};e=a.log.makeLogger(e);a.log.setLevel(e,"debug");a.log.addLogger(e)}else console={log:function(){}};
701 +null!==e&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(e,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(e));a.log.consoleLogger=e}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
702 +c.defined.log=!0;for(var l=0;l<e.length;++l)e[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!u.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
703 +b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:u.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
704 +u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.encryptedContent.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]),u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function e(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
705 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.digestAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(u.create(u.Class.UNIVERSAL,
706 +u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.signatureAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]));c.value.push(u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=u.create(u.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
707 +u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?u.utcTimeToDate(e):u.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?u.create(u.Class.UNIVERSAL,u.Type.UTCTIME,!1,u.dateToUtcTime(e)):
708 +u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
709 +u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
710 +0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
711 c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
712 -break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var r=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
713 -b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=r.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:r.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!r.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=r.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
712 +break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
713 +b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
714 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
715 -c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
716 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.signerInfos));return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),
715 +c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
716 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
717 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
718 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
719 -signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(r.create(r.Class.CONTEXT_SPECIFIC,
720 -0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(g).getBytes()),r.create(r.Class.UNIVERSAL,
721 -r.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=r.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=r.toDer(d);h.getByte();r.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
722 -}else{e.authenticatedAttributesAsn1=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=r.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
718 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var r=c[m];if(!l&&r.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&r.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
719 +signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
720 +0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
721 +u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
722 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var r=e.authenticatedAttributes[m];r.type===a.pki.oids.messageDigest?r.value=c[e.digestAlgorithm].digest():r.type!==a.pki.oids.signingTime||r.value||(r.value=k);h.value.push(n(r));e.authenticatedAttributesAsn1.value.push(n(r))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
723 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
724 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,
725 -!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,g(b.recipients)),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
724 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
725 +!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
726 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
727 }h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
728 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
729 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
730 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
731 -Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function g(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
732 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=g(w.bytes()),b.truncate(b.length()-
733 -x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(g("\x00\x00\x00\x00",l)),x.putBuffer(g("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=g("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
734 -h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,g){g=g||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+g};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
735 -function(b,g){g=g||{};var l=g.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===g.encoding)return l=l.toHex(),g.delimiter?l.match(/.{2}/g).join(g.delimiter):l;if("binary"===g.encoding)return l.getBytes();if(g.encoding)throw Error('Unknown encoding "'+g.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
736 -(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<g.length;++l)g[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
737 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var g={};a.debug.set("forge.task","queues",g);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
730 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
731 +Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
732 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
733 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
734 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
735 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
736 +(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
737 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
738 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
739 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
740 -this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",g)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
740 +this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
741 (c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
742 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
743 this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
744 a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
745 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in g?0===g[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):g[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(g[b.type].shift(),0===g[b.type].length?delete g[b.type]:g[b.type][0].start()):a.log.error("forge.task",
746 -"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in g?g[a.type].push(b):(g[b.type]=[b],m(b))};a.task.cancel=function(a){a in g&&(g[a]=[g[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
747 -a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<g.length;++l)g[l](c);return c.task}},
748 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
749 -return}var g,v=function(a,b){b.exports=function(b){var c=g.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){g="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
745 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
746 +"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
747 +a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
748 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
749 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
750 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});
751 -function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var g=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),g=g.substring(0,g.length-24),v=0;v<c.length;v++)if(g===c[v].DERKey||g==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
752 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),g=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(g,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
753 -var e=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,e,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,g){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,g)}
754 -function amtcert_createCertificate(b,c,a,d,g){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
755 -value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==g?g={name:"extKeyUsage",serverAuth:!0}:g.name="extKeyUsage",
756 -n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},g,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
757 -function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,g=b.length;d<g;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
751 +function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),e=e.substring(0,e.length-24),v=0;v<c.length;v++)if(e===c[v].DERKey||e==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
752 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),r=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(r).getBytes();
753 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
754 +function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
755 +value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
756 +n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
757 +function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,e=b.length;d<e;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
758 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
759 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
760 -require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var g="";a.on("data",function(a){null!=g&&(g+=a.toString("binary"));5E5<g.length&&(g=null)});a.on("end",function(){certUrlCache[b]={data:btoa(g),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,g)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
761 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,e,k,m,q){var r=a[b++];q={};var u=0,B=0;if(0==r){if(2==h.bpp)for(e=0;e<m;e++)n(a[b++]+(a[b++]<<8),e);else for(e=0;e<m;e++)v(a[b++],e);g(h.spare,c,d)}else if(1==r)h.graymode?(r=a[b++],h.lowcolor&&(r<<=4),h.canvas.fillStyle="rgb("+r+","+r+","+r+")"):(r=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(r&224)+","+((r&28)<<3)+","+D((r&3)<<6):(r>>8&248)+","+(r>>3&252)+","+
762 -((r&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,e,k);else if(1<r&&17>r){k=4;B=15;if(2==h.bpp){for(e=0;e<r;e++)q[e]=a[b++]+(a[b++]<<8);2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)n(q[r>>e&B],u++)}else{for(e=0;e<r;e++)q[e]=a[b++];2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)v(q[r>>e&B],u++)}g(h.spare,c,d)}else if(128==r){if(2==h.bpp)for(;u<m&&b<a.byteLength;){r=a[b++]+(a[b++]<<8);B=1;do B+=e=a[b++];while(255==e);if(0==
763 -h.rotation)p(r,u,B),u+=B;else for(;0<=--B;)n(r,u++)}else for(;u<m&&b<a.byteLength;){r=a[b++];B=1;do B+=e=a[b++];while(255==e);if(0==h.rotation)l(r,u,B),u+=B;else for(;0<=--B;)v(r,u++)}g(h.spare,c,d)}else if(129<r){if(2==h.bpp)for(e=0;e<r-128;e++)q[e]=a[b++]+(a[b++]<<8);else for(e=0;e<r-128;e++)q[e]=a[b++];for(;u<m&&b<a.byteLength;){B=1;e=a[b++];r=q[e%128];if(127<e){do B+=e=a[b++];while(255==e)}if(0==h.rotation)2==h.bpp?p(r,u,B):l(r,u,B),u+=B;else if(2==h.bpp)for(;0<=--B;)n(r,u++);else for(;0<=--B;)v(r,
764 -u++)}g(h.spare,c,d)}}function g(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
760 +require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
761 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,r){var u=a[b++];r={};var q=0,B=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
762 +((u&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;B=15;if(2==h.bpp){for(g=0;g<u;g++)r[g]=a[b++]+(a[b++]<<8);2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(r[u>>g&B],q++)}else{for(g=0;g<u;g++)r[g]=a[b++];2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(r[u>>g&B],q++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;q<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);B=1;do B+=g=a[b++];while(255==g);if(0==
763 +h.rotation)p(u,q,B),q+=B;else for(;0<=--B;)n(u,q++)}else for(;q<m&&b<a.byteLength;){u=a[b++];B=1;do B+=g=a[b++];while(255==g);if(0==h.rotation)l(u,q,B),q+=B;else for(;0<=--B;)v(u,q++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)r[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)r[g]=a[b++];for(;q<m&&b<a.byteLength;){B=1;g=a[b++];u=r[g%128];if(127<g){do B+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?p(u,q,B):l(u,q,B),q+=B;else if(2==h.bpp)for(;0<=--B;)n(u,q++);else for(;0<=--B;)v(u,
764 +q++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
765 h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
766 b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
767 -1]=e,h.spare.data[b+2]=a,b+=4}function q(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function e(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
768 -2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):r[c.code];
769 -null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
770 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
771 -0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
772 -h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var e=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)e=12,h.state=1,h.parent&&delete h.parent.connectTime,
773 -h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)e=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){e=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;e=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
767 +1]=e,h.spare.data[b+2]=a,b+=4}function r(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
768 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];null!=c&&h.sendkey(c,
769 +a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);173==c&&(d=45);186==c&&
770 +(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=0;h.spareh2=0;
771 +h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=h.rwidth=
772 +h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
773 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
774 h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
775 0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
776 -50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);e=4;break;case 2:e=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)e=0;else if(b=l.getUint32(4)+8,c.byteLength<b)e=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
776 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
777 0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
778 -h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}e=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),e=l.getUint16(4),q=l.getUint16(6),p=e*q,r=l.getUint32(8);if(17>r){if(1>e||64<e||1>q||
779 -64<q)return console.log("Invalid tile size ("+e+","+q+"), disconnecting."),h.Stop();if(h.sparew!=e||h.spareh!=q){h.sparew=h.sparew2=e;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=e;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==r){h.canvas.canvas.width=h.rwidth=h.width=e;h.canvas.canvas.height=h.rheight=
780 -h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));e=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==r){r=12;e=12+p*h.bpp;if(h.acc.byteLength<e)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(r,!0),w),r+=2;else for(w=0;w<p;w++)v(h.acc[r++],w);g(h.spare,b,c)}else if(16==r){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
781 -16+w)break;r=16;if(5<w&&0==h.acc[r]&&l.getUint16(r+1,!0)==w-5)d(h.acc,r+5,b,c,e,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(r,r+w-0)))),0<l.length){for(var r=l,N=new Uint8Array(r.length),u=0,C=r.length;u<C;++u)N[u]=r.charCodeAt(u);d(N,0,b,c,e,q,p,l.length)}else console.log("Invalid deflate data");e=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==e)break;h.acc=e!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(e)):
778 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),r=l.getUint16(6),p=g*r,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>r||
779 +64<r)return console.log("Invalid tile size ("+g+","+r+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=r){h.sparew=h.sparew2=g;h.spareh=h.spareh2=r;if(1==h.rotation||3==h.rotation)h.sparew2=r,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
780 +h.height=r;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
781 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,r,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,N=new Uint8Array(u.length),q=0,C=u.length;q<C;++q)N[q]=u.charCodeAt(q);d(N,0,b,c,g,r,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
782 null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
783 function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
784 -h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,C(0,0),w(0,0));h.width=h.canvas.canvas.width;
785 -h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var r={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
785 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
786 NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
787 F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
788 h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
789 h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var K=!1,B=!1;h.GrabMouseInput=function(){if(1!=K){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;K=!0}};h.UnGrabMouseInput=function(){if(0!=K){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;K=!1}};h.GrabKeyInput=function(){1!=B&&(document.onkeyup=
790 h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,B=!0)};h.UnGrabKeyInput=function(){0!=B&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,B=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
791 0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){h.ReverseMouseWheel&&(b*=-1);var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/
792 -Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,g=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-g[0])*d;h.my=(event.pageY-g[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=q(h.mx,h.my),h.my=e(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
792 +Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=r(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
793 h.mNagleTimer=null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=
794 -0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;
795 -a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,g="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?g:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");
796 -a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&
797 -a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var g=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<g&&0!=a.State)for(a.PendingOperations.push([g,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];
798 -if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&
799 -255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),g=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),n=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,n,b,e,g,n,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);
800 -a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();
801 -if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,e=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,
802 -4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),e=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+
803 -q+" Y="+e);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,e);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,e);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,
804 -4));break;case 11:c=0;q={};e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<e)for(c=((b.charCodeAt(6+2*e)&255)<<8)+(b.charCodeAt(7+2*e)&255),n=0;n<e;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,
805 -4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);g=v[b];d&&(a.CanvasId.style.cursor=g)}return w+D}}};a.MouseButton=
806 -{NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,
807 -Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?
808 -d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,
809 -a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,
810 -67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,g;for(g in a.TouchArray)g==b?e=c:1==a.TouchArray[g].f?(e=65542,a.TouchArray[g].f=3):e=2==a.TouchArray[g].f?262144:131078,d+=String.fromCharCode(g)+a.intToStr(e)+a.shortToStr(a.TouchArray[g].x)+a.shortToStr(a.TouchArray[g].y),2==a.TouchArray[g].f&&
811 -delete a.TouchArray[g];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,g=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-g[0])*e,d=(c.pageY-
812 -g[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var n=g=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?g=a.MouseButton.LEFT:2==c.which?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT:c.button&&(0==c.button?g=a.MouseButton.LEFT:1==c.button?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?n=-120*c.detail:c.wheelDelta&&(n=3*c.wheelDelta));var v="",v=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,
813 -a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,n/256&255,n&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?g:2*g&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(v),a.Alternate=1):a.Alternate=0:a.send(v)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",
814 -b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,
815 -a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&
816 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&
817 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&
818 -(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&
819 -a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};
820 -a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,g=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]=
821 -{x:e,y:g});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
822 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<
823 -b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/
824 -a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=
825 -a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
826 -null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=
827 -null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;
828 -if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||
829 -3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,
830 -0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};
831 -a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;
832 -d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var g=new FileReader,v=!1,n=[];g.readAsBinaryString?g.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:g.readAsBinaryString(new Blob([n.shift()]))}:g.readAsArrayBuffer&&(g.onloadend=function(a){d.xxOnSocketData(a.target.result);
833 -0==n.length?v=!1:g.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(g.readAsBinaryString)v=!0,g.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,g.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=
834 -function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=
835 -a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");
836 -d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(u[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<
837 -b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){y[m][D]=a;A[m][D]=(e<<6)+(C<<12)+q}function g(){for(var a=(e<<6)+(C<<12)+q,b=D;b<l.width;b++)y[m][b]=" ",A[m][b]=a}function v(a){for(var b=(e<<6)+(C<<12)+q,c=0;c<l.width;c++)y[a][c]=" ",A[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)y[b]=y[b+a],A[b]=A[b+a];for(b=E[1]-a+1;b<=
838 -E[1];b++)for(y[b]=[],A[b]=[],a=0;a<l.width;a++)y[b][a]=" ",A[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,e=7,C=0,w=!0,D=0,m=0,k=0,h=0,r=0,K=[],B=0,x=0,A=[],y=[],R=!1,z=!0,E,O=!1,H=[],
839 -N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){y[c]=[];A[c]=[];for(var d=0;d<l.width;d++)y[c][d]=" ",A[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=
840 -decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(r){case 0:switch(n){case 27:r=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":r=2;break;case "(":r=4;break;case ")":r=5;break;case "]":r=6;break;case "=":O=!0;r=0;break;case ">":O=!1;r=0;break;case "7":k=D;h=m;r=0;break;case "8":D=k;m=h;r=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var u=0;u<l.width;u++)y[n][u]=y[n-1][u],A[n][u]=A[n-1][u];for(n=
841 -E[0]+1-1;n>E[0]-1;n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;r=0;break;default:console.log("unknown terminal short code",p),r=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,u=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(z=!1);break;case "h":25==n[0]&&(z=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==u&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==
842 -u&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==u&&(0==n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==u&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==u&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==u&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==u&&(p=n[0]);for(J=D;J<l.width-p;J++)y[m][J]=y[m][J+p],A[m][J]=A[m][J+p];for(J=l.width-p;J<l.width;J++)y[m][J]=" ",A[m][J]=448;break;case "L":J=1;1==u&&(J=n[0]);0==J&&(J=1);
843 -for(n=E[1];n>=m+J;n--)y[n]=y[n-J],A[n]=A[n-J];for(n=m;n<m+J;n++)for(y[n]=[],A[n]=[],p=0;p<l.width;p++)y[n][p]=" ",A[n][p]=448;break;case "J":if(1==u&&2==n[0])l.TermClear((C<<12)+(e<<6)),m=D=0,H=[];else if(0==u||1==u&&0==n[0])for(g(),J=m+1;J<l.height;J++)v(J);else if(1==u&&1==n[0])for(g(),J=0;J<m-1;J++)v(J);break;case "H":2==u?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<u;J++)n[J]&&0!=n[J]?1==n[J]?
844 -8>e&&(e+=8):2==n[J]||22==n[J]?8<=e&&(e-=8):7==n[J]?q=2:27==n[J]?q=0:30<=n[J]&&37>=n[J]?(p=8<=e,e=n[J]-30,p&&8>=e&&(e+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?e=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,e=7,q=0);break;case "K":if(0!=u&&(1!=u||n[0]&&0!=n[0])){if(1==u)if(1==n[0])for(n=(e<<6)+(C<<12)+q,u=0;u<D;u++)y[m][u]=" ",A[m][u]=n;else 2==n[0]&&v(m)}else g();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==u&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-
845 -1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=E[1]);break;case "S":p=1;1==u&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "M":p=1;1==u&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "T":p=1;1==u&&(p=n[0]);for(n=E[1];n>E[0]+
846 -p;n--)for(u=0;u<l.width;u++)y[n][u]=y[n-p][u],A[n][u]=A[n-p][u];for(n=E[0]+p;n>E[0];n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "X":p=1;J=D;R=m;for(1==u&&(p=n[0]);0<p&&R<l.height;)y[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}r=0}break;case 4:r=0;break;case 5:r=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(u=parseInt(n[0]),(0==u||2==u)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,
847 -l.title=n[1]);r=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var u=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
848 -9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,
849 -9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)y[b][c]=" ",A[b][c]=a;H=[]};l.TermResetScreen=function(){q=0;e=7;C=0;w=z=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);
850 -N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};
851 -l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,
852 -79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,
853 -91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;
854 -var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
855 -a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=A[b][h],D==h&&m==b&&z&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=y[b][h],d){case "&":a+="&amp;";
794 +0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=
795 +700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
796 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
797 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
798 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
799 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
800 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
801 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,r=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
802 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),r=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+r+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
803 +a.ProcessPictureMsg(c,r,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(r,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;r={};g=((b.charCodeAt(4)&255)<<8)+
804 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);r[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,r,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
805 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
806 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
807 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&
808 +7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==
809 +a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&
810 +a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+
811 +a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
812 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
813 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
814 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
815 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
816 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
817 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
818 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
819 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
820 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
821 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
822 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
823 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
824 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
825 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
826 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
827 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
828 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
829 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
830 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
831 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
832 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
833 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
834 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
835 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
836 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(q[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
837 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(C<<12)+r}function e(){for(var a=(g<<6)+(C<<12)+r,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(C<<12)+r,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
838 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),r=0,g=7,C=0,w=!0,D=0,m=0,k=0,h=0,u=0,K=[],B=0,x=0,z=[],A=[],R=!1,y=!0,E,O=!1,H=[],N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
839 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=
840 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":O=!0;u=0;break;case ">":O=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var q=0;q<l.width;q++)A[n][q]=A[n-1][q],z[n][q]=z[n-1][q];for(n=E[0]+1-1;n>E[0]-1;n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;u=0;break;
841 +default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,q=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==q&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==q&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==q&&(0==
842 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==q&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==q&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==q&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==q&&(p=n[0]);for(J=D;J<l.width-p;J++)A[m][J]=A[m][J+p],z[m][J]=z[m][J+p];for(J=l.width-p;J<l.width;J++)A[m][J]=" ",z[m][J]=448;break;case "L":J=1;1==q&&(J=n[0]);0==J&&(J=1);for(n=E[1];n>=m+J;n--)A[n]=A[n-J],z[n]=z[n-J];for(n=m;n<m+J;n++)for(A[n]=[],
843 +z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==q&&2==n[0])l.TermClear((C<<12)+(g<<6)),m=D=0,H=[];else if(0==q||1==q&&0==n[0])for(e(),J=m+1;J<l.height;J++)v(J);else if(1==q&&1==n[0])for(e(),J=0;J<m-1;J++)v(J);break;case "H":2==q?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<q;J++)n[J]&&0!=n[J]?1==n[J]?8>g&&(g+=8):2==n[J]||22==n[J]?8<=g&&(g-=8):7==n[J]?r=2:27==n[J]?r=0:30<=n[J]&&
844 +37>=n[J]?(p=8<=g,g=n[J]-30,p&&8>=g&&(g+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?g=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,g=7,r=0);break;case "K":if(0!=q&&(1!=q||n[0]&&0!=n[0])){if(1==q)if(1==n[0])for(n=(g<<6)+(C<<12)+r,q=0;q<D;q++)A[m][q]=" ",z[m][q]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==q&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
845 +E[1]);break;case "S":p=1;1==q&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "M":p=1;1==q&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "T":p=1;1==q&&(p=n[0]);for(n=E[1];n>E[0]+p;n--)for(q=0;q<l.width;q++)A[n][q]=A[n-p][q],z[n][q]=z[n-p][q];for(n=
846 +E[0]+p;n>E[0];n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "X":p=1;J=D;R=m;for(1==q&&(p=n[0]);0<p&&R<l.height;)A[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(q=parseInt(n[0]),(0==q||2==q)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=
847 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var q=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
848 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
849 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;H=[]};l.TermResetScreen=function(){r=0;g=7;C=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
850 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
851 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
852 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
853 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
854 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
855 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
856 break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<H.length&&(H=H.slice(H.length-800));c=H.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
857 l.Init();return l},ZLIB=ZLIB||{};
858 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
859 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
860 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,x,A,B,D,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=A=1;15>=p;p++)if(A<<=1,A-=M[p],0>A)return-1;if(0<A&&(0==
861 -b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(q=0;q<n;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=r,fa=K,ga=ca=0,U=-1}q=D=0;p=d;S=c;n=w;x=0;W=-1;B=1<<w;I=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[q]<U?G.val=e[q]:e[q]>U?(G.op=fa[ga+e[q]],G.val=Z[ca+e[q]]):G.op=96;A=1<<p-x;d=C=1<<n;do C-=A,m[S+(D>>>x)+C]=G;while(0!=C);for(A=1<<p-1;D&A;)A>>>=1;
862 -0!=A?(D&=A-1,D+=A):D=0;q++;if(0==--M[p]){if(p==v)break;p=g[l+e[q]]}if(p>w&&(D&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(A=1<<n;n+x<v;){A-=M[n+x];if(0>=A)break;n++;A<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=D&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=D&&(m[S+D]={op:64,bits:p-x,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function g(){var a;this.total=this.check=
860 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,r,v,w,x,z,D,B,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(r=0;r<n;r++)M[g[l+r]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
861 +b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(r=0;r<n;r++)0!=g[l+r]&&(e[x[g[l+r]]++]=r);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=u,fa=K,ga=ca=0,U=-1}r=B=0;p=d;S=c;n=w;x=0;W=-1;D=1<<w;I=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[r]<U?G.val=e[r]:e[r]>U?(G.op=fa[ga+e[r]],G.val=Z[ca+e[r]]):G.op=96;z=1<<p-x;d=C=1<<n;do C-=z,m[S+(B>>>x)+C]=G;while(0!=C);for(z=1<<p-1;B&z;)z>>>=1;
862 +0!=z?(B&=z-1,B+=z):B=0;r++;if(0==--M[p]){if(p==v)break;p=g[l+e[r]]}if(p>w&&(B&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(z=1<<n;n+x<v;){z-=M[n+x];if(0>=z)break;n++;z<<=1}D+=1<<n;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:p-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
863 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
864 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function e(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function C(a,b){return a.hold&
865 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
864 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function r(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!r(a))return!1;return!0}function C(a,b){return a.hold&
865 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
866 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
867 -e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new g;ZLIB.inflateReset(b,
868 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,g,h,k,r,u=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);g={};n(a,g);h=g.have;k=g.left;
869 -P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!e(g,16))break a;if(d.wrap&2&&35615==g.hold){d.check=a.checksum_function(0,null,0,0);v(a,g.hold);p(g);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(g,8)<<8)+(g.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(g,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(g,4);u=C(g,4)+8;if(0==d.wbits)d.wbits=u;else if(u>d.wbits){a.msg="invalid window size";d.mode=
870 -29;break}d.dmax=1<<u;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=g.hold&512?9:11;p(g);break;case 1:if(!e(g,16))break a;d.flags=g.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=g.hold>>>8&1);d.flags&512&&v(a,g.hold);p(g);d.mode=2;case 2:if(!e(g,32))break a;null!==d.head&&(d.head.time=g.hold);d.flags&512&&(r=g.hold,a.state.check=a.checksum_function(a.state.check,
871 -[r&255,r>>>8&255,r>>>16&255,r>>>24&255],0,4));p(g);d.mode=3;case 3:if(!e(g,16))break a;null!==d.head&&(d.head.xflags=g.hold&255,d.head.os=g.hold>>>8);d.flags&512&&v(a,g.hold);p(g);d.mode=4;case 4:if(d.flags&1024){if(!e(g,16))break a;d.length=g.hold;null!==d.head&&(d.head.extra_len=g.hold);d.flags&512&&v(a,g.hold);p(g);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(r=d.length,r>g.have&&(r=g.have),r&&(null!==d.head&&null!==d.head.extra&&(u=d.head.extra_len-
872 -d.length,d.head.extra+=a.input_data.substring(g.next,g.next+(u+r>d.head.extra_max?d.head.extra_max-u:r))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r)),g.have-=r,g.next+=r,d.length-=r),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==g.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");r=0;do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=u,d.length++)}while(r<g.have);d.flags&
873 -512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==g.have)break a;r=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=u,d.length++)}while(r<g.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=
874 -r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!e(g,16))break a;if(g.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(g)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!e(g,32))break a;a.adler=d.check=m(g.hold);p(g);d.mode=10;case 10:if(0==d.havedict)return l(g),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
875 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(g);d.mode=26;break}if(!e(g,3))break a;d.last=C(g,1);w(g,1);switch(C(g,2)){case 0:d.mode=13;break;case 1:r=d;u=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
867 +e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
868 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,q=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
869 +P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);q=C(e,4)+8;if(0==d.wbits)d.wbits=q;else if(q>d.wbits){a.msg="invalid window size";d.mode=
870 +29;break}d.dmax=1<<q;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
871 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(q=d.head.extra_len-
872 +d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(q+u>d.head.extra_max?d.head.extra_max-q:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=q,d.length++)}while(u<e.have);d.flags&
873 +512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=q,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
874 +u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
875 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=C(e,1);w(e,1);switch(C(e,2)){case 0:d.mode=13;break;case 1:u=d;q=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
876 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
877 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
878 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -895,28 +895,28 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
895 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
896 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
897 {op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
898 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);r.lencode=0;r.distcode=512;for(u=0;512>u;u++)r.codes[u]=B[u];for(u=0;32>u;u++)r.codes[u+512]=x[u];r.lenbits=9;r.distbits=5;
899 -d.mode=19;if(c==ZLIB.Z_TREES){w(g,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(g,2);break;case 13:D(g);if(!e(g,32))break a;if((g.hold&65535)!=(g.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=g.hold&65535;p(g);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(r=d.length){r>g.have&&(r=g.have);r>g.left&&(r=g.left);if(0==r)break a;a.output_data+=a.input_data.substring(g.next,g.next+r);a.next_out+=r;g.have-=
900 -r;g.next+=r;g.left-=r;d.length-=r;break}d.mode=11;break;case 16:if(!e(g,14))break a;d.nlen=C(g,5)+257;w(g,5);d.ndist=C(g,5)+1;w(g,5);d.ncode=C(g,4)+4;w(g,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!e(g,3))break a;r=C(g,3);d.lens[A[d.have++]]=r;w(g,3)}for(;19>d.have;)d.lens[A[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
901 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(16>r.val)w(g,r.bits),d.lens[d.have++]=r.val;else{if(16==r.val){if(!e(g,r.bits+2))break a;w(g,r.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}u=d.lens[d.have-1];r=3+C(g,2);w(g,2)}else if(17==r.val){if(!e(g,r.bits+3))break a;w(g,r.bits);u=0;r=3+C(g,3);w(g,3)}else{if(!e(g,r.bits+7))break a;w(g,r.bits);u=0;r=11+C(g,7);w(g,7)}if(d.have+r>d.nlen+d.ndist){a.msg=
902 -"invalid bit length repeat";d.mode=29;break}for(;r--;)d.lens[d.have++]=u}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=g.have&&258<=g.left){l(g);r=a;var F=K=u=void 0,Y=void 0,L=void 0,
903 -ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,u=r.state,K=r.input_data,F=r.next_in,Y=F+r.avail_in-5,L=r.next_out,ea=L-(k-r.avail_out),V=L+(r.avail_out-257),J=u.wsize,aa=u.whave,ba=u.wnext,W=u.window,I=u.hold,G=u.bits,S=u.codes,Z=u.lencode,ca=u.distcode,fa=(1<<u.lenbits)-1,ga=(1<<u.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
904 -G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)r.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
905 -u.sane){r.msg="invalid distance too far back";u.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,r.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)r.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);r.output_data+=r.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),X-=3;X&&(r.output_data+=r.output_data.charAt(U++),
906 -1<X&&(r.output_data+=r.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{r.msg="invalid distance code";u.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?u.mode=11:(r.msg="invalid literal/length code",u.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;r.next_in=F;r.next_out=L;r.avail_in=F<Y?5+(Y-F):5-(F-Y);r.avail_out=L<V?257+(V-L):257-(L-V);u.hold=I;u.bits=G;n(a,g);11==d.mode&&(d.back=-1);
907 -break}for(d.back=0;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(r.op&&0==(r.op&240)){for(u=r;;){r=d.codes[d.lencode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;d.length=r.val;if(0==r.op){d.mode=25;break}if(r.op&32){d.back=-1;d.mode=11;break}if(r.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=r.op&15;d.mode=21;case 21:if(d.extra){if(!e(g,d.extra))break a;
908 -d.length+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){r=d.codes[d.distcode+C(g,d.distbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(0==(r.op&240)){for(u=r;;){r=d.codes[d.distcode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;if(r.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=r.val;d.extra=r.op&15;d.mode=23;case 23:if(d.extra){if(!e(g,d.extra))break a;
909 -d.offset+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==g.left)break a;r=k-g.left;if(d.offset>r){r=d.offset-r;if(r>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}r>d.wnext?(r-=d.wnext,u=d.wsize-r):u=d.wnext-r;K=-1;r>d.length&&(r=d.length)}else u=-1,K=a.next_out-d.offset,r=d.length;r>g.left&&(r=g.left);g.left-=r;d.length-=r;if(0<=u)a.output_data+=d.window.substring(u,u+r),a.next_out+=r;else{a.next_out+=r;do a.output_data+=a.output_data.charAt(K++);while(--r)}0==
910 -d.length&&(d.mode=20);break;case 25:if(0==g.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;g.left--;d.mode=20;break;case 26:if(d.wrap){if(!e(g,32))break a;k-=g.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=g.left;if((d.flags?g.hold:m(g.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(g)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!e(g,32))break a;if(g.hold!=(d.total&4294967295)){a.msg="incorrect length check";
911 -d.mode=29;break}p(g)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(g);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))g=a.state,r=a.output_data.length,null===g.window&&(g.window=""),0==g.wsize&&(g.wsize=1<<g.wbits),g.window=r>=g.wsize?a.output_data.substring(r-g.wsize):g.whave+r<g.wsize?g.window+a.output_data:g.window.substring(g.whave-(g.wsize-r))+a.output_data,g.whave=g.window.length,
912 -g.wnext=g.whave<g.wsize?g.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
898 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(q=0;512>q;q++)u.codes[q]=B[q];for(q=0;32>q;q++)u.codes[q+512]=x[q];u.lenbits=9;u.distbits=5;
899 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
900 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=C(e,5)+257;w(e,5);d.ndist=C(e,5)+1;w(e,5);d.ncode=C(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=C(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
901 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}q=d.lens[d.have-1];u=3+C(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);q=0;u=3+C(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);q=0;u=11+C(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
902 +"invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=q}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var F=K=q=void 0,Y=void 0,L=void 0,
903 +ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,q=u.state,K=u.input_data,F=u.next_in,Y=F+u.avail_in-5,L=u.next_out,ea=L-(k-u.avail_out),V=L+(u.avail_out-257),J=q.wsize,aa=q.whave,ba=q.wnext,W=q.window,I=q.hold,G=q.bits,S=q.codes,Z=q.lencode,ca=q.distcode,fa=(1<<q.lenbits)-1,ga=(1<<q.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
904 +G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)u.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
905 +q.sane){u.msg="invalid distance too far back";q.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)u.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);u.output_data+=u.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),X-=3;X&&(u.output_data+=u.output_data.charAt(U++),
906 +1<X&&(u.output_data+=u.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{u.msg="invalid distance code";q.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?q.mode=11:(u.msg="invalid literal/length code",q.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;u.next_in=F;u.next_out=L;u.avail_in=F<Y?5+(Y-F):5-(F-Y);u.avail_out=L<V?257+(V-L):257-(L-V);q.hold=I;q.bits=G;n(a,e);11==d.mode&&(d.back=-1);
907 +break}for(d.back=0;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(u.op&&0==(u.op&240)){for(q=u;;){u=d.codes[d.lencode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
908 +d.length+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+C(e,d.distbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(0==(u.op&240)){for(q=u;;){u=d.codes[d.distcode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
909 +d.offset+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,q=d.wsize-u):q=d.wnext-u;K=-1;u>d.length&&(u=d.length)}else q=-1,K=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=q)a.output_data+=d.window.substring(q,q+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(K++);while(--u)}0==
910 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
911 +d.mode=29;break}p(e)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
912 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
913 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
914 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
915 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
916 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
917 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;a%=65521;n%=65521}return a|n<<16}function c(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b[c],65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),
918 a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b[c++],n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=
919 -a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,g,v){return"string"===typeof d?b(a,d,g,v):c(a,d,g,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
919 +a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,e,v){return"string"===typeof d?b(a,d,e,v):c(a,d,e,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
920 65521);131042<=v&&(v-=131042);65521<=v&&(v-=65521);return c|v<<16}})();"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-crc32.js");
921 (function(){function b(a,b){var c,n=0;for(c=0;b;)b&1&&(c^=a[n]),b>>=1,n++;return c}function c(a,c){var v;for(v=0;32>v;v++)a[v]=b(c,c[v])}var a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,
922 3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,
@@ -925,32 +925,32 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
925 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
926 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
927 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
928 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,g,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^g}})();
929 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),g=b.webkitRequestFileSystem,v=b.requestFileSystem||g||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
930 -b.chrome?c():setTimeout(c,500)},q=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(g){n(g)}}},e=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},C=function(n,m,k){k||(n=e(n));var h=this;k=n.type;var r=!1,w,B,x=function(){q(h,["writestart","progress","write","writeend"])},A=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
931 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(r||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},y=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},z;h.readyState=h.INIT;m||(m="download");if(a)w=
932 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(z=n.slice||n.webkitSlice,n=z.call(n,0,n.size,"application/octet-stream"),r=!0);g&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||g)B=b;v?(l+=n.size,v(b.TEMPORARY,l,y(function(a){a.root.getDirectory("saved",C,y(function(a){var b=function(){a.getFile(m,C,y(function(a){a.createWriter(y(function(b){b.onwriteend=
933 -function(b){B.location.href=a.toURL();h.readyState=h.DONE;q(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&A()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),A)}),A)};a.getFile(m,{create:!1},y(function(a){a.remove();b()}),y(function(a){a.code===a.NOT_FOUND_ERR?b():A()}))}),A)}),A)):A()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
934 -b,c){c||(a=e(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
928 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,r;if(0>=v)return a;p=Array(32);r=Array(32);r[0]=3988292384;for(n=l=1;32>n;n++)r[n]=l,l<<=1;c(p,r);c(r,p);do{c(p,r);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(r,p);v&1&&(a=b(r,a));v>>=1}while(0!=v);return a^e}})();
929 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
930 +b.chrome?c():setTimeout(c,500)},r=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(g){n(g)}}},g=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},C=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){r(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
931 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
932 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",C,A(function(a){var b=function(){a.getFile(m,C,A(function(a){a.createWriter(A(function(b){b.onwriteend=
933 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;r(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
934 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;r(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
935 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
936 -var version="0.9.3",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
936 +var version="0.9.7",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
937 null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Chargement...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetAuth NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
938 StatusStrs=["D\u00e9branch\u00e9","De liaison...","Installer...","Li\u00e9"],t,t2,rsepass=null;
939 -function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
940 -applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
941 -haltEvent,!1);document.addEventListener("dragleave",haltEvent,!1);document.addEventListener("drop",documentFileSelectHandler,!1);Q("p16").addEventListener("dragover",haltEvent,!1);Q("p16").addEventListener("dragleave",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",
942 -p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
939 +function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(23).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
940 +urlvars.kvmenc&&(c=parseInt(urlvars.kvmenc),"number"==typeof c&&(desktopsettings.encflags=c));urlvars.kvmdec&&(c=parseInt(urlvars.kvmdec),"number"==typeof c&&(desktopsettings.decimationMode=c));applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(34).value=terminalEmulations[terminal.m.terminalEmulation];Q(31).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",
941 +haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);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",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);
942 +document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
943 function documentFileSelectHandler(b){haltEvent(b);for(var c=!0,a=0;a<b.dataTransfer.files.length;a++)0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".img")&&0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".iso")&&(c=!1);1==c&&null!=b.dataTransfer&&0<currentView&&100>currentView&&(1==b.dataTransfer.files.length||2==b.dataTransfer.files.length)?(a=c=null,b.dataTransfer.files[0].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[0]),b.dataTransfer.files[0].name.toLowerCase().endsWith(".img")&&
944 (c=b.dataTransfer.files[0]),2==b.dataTransfer.files.length&&(b.dataTransfer.files[1].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[1]),b.dataTransfer.files[1].name.toLowerCase().endsWith(".img")&&(c=b.dataTransfer.files[1])),null==c&&null==a||iderStart3(c,a,1)):null!=b.dataTransfer&&1==b.dataTransfer.files.length&&(c=b.dataTransfer.files[0].name.toLowerCase(),21==currentView&&UploadToStorage(b.dataTransfer.files[0],c))}
945 function connectButtonfunction(){wsstack&&0!=wsstack.socketState?disconnect():meshcentral2credCallback()}function connectButtonfunctionEx(){currentMeshNode=parent.getCurrentNode();connect(currentMeshNode._id,16992,null,null,0);Q("xconnectbutton1").value="D\u00e9connecter"}function getCurrentMeshNode(){return currentMeshNode}function setConnectionState(b){QE("xconnectbutton1",b);0==b&&disconnect()}function setFrameHeight(b){}function setAuthCallback(b){meshcentral2credCallback=b}
946 function setUrlVar(b,c){urlvars||(urlvars={});urlvars[b]=c}function cleanup(){c3.value="Commencer la capture";terminal.m.capture&&delete terminal.m.capture;terminal.Stop();desktop.disconnectCode=0;desktop.Stop()}
947 -function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
948 -function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
949 -function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
950 -function connect(b,c,a,d,g,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,g);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(28,"");QH(39,"");amtversion=amtversionmin=amtFirstPull=
951 -0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(21,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(49,"");
952 -QH(50,LoadingHtml);xxCertificates=null;QH(51,LoadingHtml);QH(24,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(52,LoadingHtml);QH(54,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
953 -!1;QH(53,LoadingHtml);QE(43,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(48,!1),Q(48).checked=!0);QE(44,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
947 +function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
948 +function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
949 +function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
950 +function connect(b,c,a,d,e,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,e);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(29,"");QH(40,"");amtversion=amtversionmin=amtFirstPull=
951 +0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(22,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(50,"");
952 +QH(51,LoadingHtml);xxCertificates=null;QH(52,LoadingHtml);QH(25,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(53,LoadingHtml);QH(55,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
953 +!1;QH(54,LoadingHtml);QE(44,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(49,!1),Q(49).checked=!0);QE(45,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
954 function disconnect(){null!=desktopPollTimer&&(clearInterval(desktopPollTimer),desktopPollTimer=null);fullscreen&&deskToggleFull();iderStop();StopDefenseStatsTimer();dialogclose(0);amtstack&&(amtstack.onProcessChanged=null,amtstack.CancelAllQueries(999),amtstack=null);cleanup();wsstack=null;delete amtstack;onProcessChanged(0,1);go(101);Q("xconnectbutton1").value="Relier";QH(5,"D\u00e9branch\u00e9");go(100)}
955 function onProcessChanged(b,c){QS(3).width=100*b/c+"%";0==b&&refreshButtons(!0);0==b&&amtstack&&(0<amtversion&&0==(amtFirstPull&64)?(amtFirstPull|=64,PullPowerPolicy(),subscriptionsFilters=null,PullEventSubscriptions(),PullWatchdog(),5<amtversion&&(PullCertificates(),PullRemoteAccess())):0==(amtFirstPull&1)?PullHardware():0==(amtFirstPull&16)?PullEventLog():0==(amtFirstPull&32)&&PullAuditLog())}
956 function checkAmtVersion(b){var c=b.split(".");b=parseInt(c[0]);var a=parseInt(c[1]),c=parseInt(c[2]),c=1E3*a+c,d=0;5>=b||12<=b?d=1:6==b&&2061<=c?d=1:7==b&&1091<=c?d=1:8==b&&1071<=c?d=1:9==b?5>a&&1041<=c?d=1:5061<=c&&(d=1):10==b&&55<=c?d=1:11==b&&(5>a&&25<=c?d=1:6027<=c&&(d=1));return 0==d}
@@ -959,35 +959,36 @@ function processSystemVersion(b,c,a,d){if(200==d||400==d){if(200==d){amtlogicale
959 1==urlvars.sol&&(go(13),connectTerminal())}else errcheck(d,b)}var refreshButtonsState=!0;function refreshButtons(b){if(refreshButtonsState!=b){refreshButtonsState=b;for(var c=0,a=document.getElementsByTagName("input");c<a.length;c++)"refreshbtn"==a[c].name&&(a[c].disabled=!b)}}
960 function PullPowerState(){amtstack&&0==amtstack.GetPendingActions()&&amtsysstate&&amtsysstate.CIM_ServiceAvailableToElement&&amtstack.Enum("CIM_ServiceAvailableToElement",function(b,c,a,d){200==d&&(amtsysstate.CIM_ServiceAvailableToElement.responses=a,9<amtversion&&null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?
961 amtstack.Get("IPS_PowerManagementService",function(a,b,c,d){200==d&&(amtsysstate.IPS_PowerManagementService.response=c.Body,updateSystemStatus())}):updateSystemStatus())})}
962 -function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c=["CIM_ServiceAvailableToElement","*AMT_GeneralSettings","AMT_EthernetPortSettings","*AMT_RedirectionService","CIM_ElementSettingData"];5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");15<amtversion&&1==amtstack.wsman.comm.xtls&&
963 -c.push("*CIM_BootService");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
962 +function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c="CIM_ServiceAvailableToElement *AMT_GeneralSettings AMT_EthernetPortSettings *AMT_RedirectionService CIM_ElementSettingData *AMT_BootCapabilities".split(" ");5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");
963 +15<amtversion&&c.push("*CIM_BootService");2<amtversion&&c.push("*AMT_8021XProfile");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
964 function processSystemStatus(b,c,a,d){if(void 0==a.IPS_ScreenConfigurationService||400==a.IPS_ScreenConfigurationService.status)a.IPS_ScreenConfigurationService=null;if(void 0==a.IPS_KVMRedirectionSettingData||400==a.IPS_KVMRedirectionSettingData.status)a.IPS_KVMRedirectionSettingData=null;if(void 0==a.CIM_KVMRedirectionSAP||400==a.CIM_KVMRedirectionSAP.status)a.CIM_KVMRedirectionSAP=null;if(void 0==a.IPS_OptInService||400==a.IPS_OptInService.status)a.IPS_OptInService=null;void 0!=a.AMT_RedirectionService&&
965 -200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var g in a)null!=a[g]&&a[g].status>d&&(d=a[g].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"Synchroniser l'horloge",3,syncClockEx,"Synchroniser l'horloge Intel AMT avec cet ordinateur?")}
965 +200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var e in a)null!=a[e]&&a[e].status>d&&(d=a[e].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"Synchroniser l'horloge",3,syncClockEx,"Synchroniser l'horloge Intel AMT avec cet ordinateur?")}
966 function syncClockEx(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(b,c,a,d){200!=d?messagebox("","Impossible de r\u00e9gler l'heure, \u00e9tat ="+d):0!=a.Body.ReturnValue?messagebox("","Impossible de r\u00e9gler l'heure, erreur: "+a.Body.ReturnValueStr):(b=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(a.Body.Ta0,b,b,function(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}))})}
967 var DMTFPowerStates=";;Allumer;Sommeil l\u00e9ger;Sommeil profond;Cycle d'alimentation (Soft off);Arr\u00eat - Difficile;Hibernation (Off soft);Arr\u00eat progressif;Cycle d'alimentation (hors tension);R\u00e9initialisation du bus principal;Interruption de diagnostic (NMI);N'est pas applicable;Off - doux gracieux;Off - Gracieux dur;R\u00e9initialisation du bus ma\u00eetre gracieuse;Cycle d'alimentation (Off - Soft graceful);Cycle d'alimentation (Off - Hard graceful);Interruption de diagnostic (INIT)".split(";");
968 -function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),g="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Inconnue</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Allumer"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
969 -3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", Branch\u00e9",", Sur la batterie"][v.PowerSource]);d+=TableEntry("Puissance",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Aucun</i>":EscapeHtml(c);d+=TableEntry("Nom et domaine",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?
968 +function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Inconnue</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Allumer"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
969 +3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(29,n),QH(40,n));v.PowerSource&&(n+=[", Branch\u00e9",", Sur la batterie"][v.PowerSource]);d+=TableEntry("Puissance",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Aucun</i>":EscapeHtml(c);d+=TableEntry("Nom et domaine",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?
970 d+=TableEntry("ID syst\u00e8me",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("ID syst\u00e8me",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" activ\u00e9 en mode de contr\u00f4le administrateur (ACM)",4==l.ProvisioningMode&&(n=" activ\u00e9 en mode de contr\u00f4le client (CCM)",
971 -b=9));d+=TableEntry("Intel&reg; ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=
972 -amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),e=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),e=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||
973 -6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(g+=", Port de redirection");q&&(g+=", S\u00e9rie sur LAN");n&&(g+=", IDE-Redirect");e&&(g+=", KVM");""==g&&(g=" Aucun");d+=TableEntry("Fonctionnalit\u00e9s actives",addLinkConditional(g.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,g="Affichage principal",7<amtversion&&void 0!==
974 -n.DefaultScreen&&255>n.DefaultScreen&&(g=["Affichage principal","Affichage secondaire","3e affichage"][n.DefaultScreen]),g='<span title="'+format("L'affichage \u00e0 distance par d\u00e9faut est {0}",g.toLowerCase())+'">'+g+"</span>",1==n.Is5900PortEnabled&&(g+=", Port 5900 activ\u00e9"),1==n.OptInPolicy&&(g+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"opt-in secondes":"deuxi\u00e8me opt-in")),g+=","+n.SessionTimeout+" minute"+(0<n.SessionTimeout?"s":"")+" expiration de la session",9<amtversion&&
975 -null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(g+=", Masquage autoris\u00e9"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Bureau \u00e0 distance",addLinkConditional(g,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!e);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&
976 -null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(g="\u00c9tat inconnu",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(g="Non requis"),1==p&&(g="Requis pour KVM uniquement"),4294967295==p&&(g="Toujours requis"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(g=addLinkConditional(g,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consentement de l'utilisateur",g));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=
977 -amtsysstate.CIM_BootService.response.EnabledState&&(g={0:"Inconnue",1:"Autre",2:"Activ\u00e9e",3:"d\u00e9sactiv\u00e9",4:"\u00c9teindre",5:"N'est pas applicable",6:"Activ\u00e9 mais hors ligne",7:"En test",8:"Diff\u00e9r\u00e9",9:"Au repos",10:"D\u00e9part",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(g[32768]="OCR & RPE Disabled",g[32769]="OCR Enabled, RPE Disabled"),n=g[amtsysstate.CIM_BootService.response.EnabledState]?g[amtsysstate.CIM_BootService.response.EnabledState]:
978 -"Inconnue",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)if(g[C].SettingData&&1==g[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==g[C].SettingData.ReferenceParameters.ResourceURI)for(p=g[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==
979 -p&&(d+=TableEntry("Politique d'alimentation",addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Date et heure",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));g=AddRefreshButton("PullSystemStatus()")+" ";g+=AddButton("Actions de puissance ...","showPowerActionDlg()")+" ";g+=AddButton("Enregistrer l'\u00e9tat ...","saveEntireAmtState()")+
980 -" ";d+=TableEnd(g);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" La modification des param\u00e8tres r\u00e9seau peut rendre cette page indisponible.");d=d+"<br><h2>r\u00e9glages g\u00e9n\u00e9raux</h2>"+TableStart();
981 -g="";"<i>Aucun</i>"!=c&&(1==v.SharedFQDN&&(g=", partag\u00e9 avec OS"),0==v.SharedFQDN&&(g=", diff\u00e9rent du syst\u00e8me d'exploitation"));d+=TableEntry("Nom et domaine",addLinkConditional(c+g,"showEditNameDlg(1)",xxAccountAdminName));c="d\u00e9sactiv\u00e9";1==v.DDNSUpdateEnabled?c="Activ\u00e9 chacun"+v.DDNSPeriodicUpdateInterval+" minutes, TTL est"+v.DDNSTTL+" minutes":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Mise \u00e0 jour par serveur DHCP");d+=TableEntry("DNS dynamique",addLinkConditional(c,
982 -"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Interface sans fil":"Interface filaire")+"</h2>";d+=TableStart();d+=TableEntry("\u00c9tat du lien",1==c.LinkIsUp?"Le lien est en place":"Le lien est en panne");if(c.LinkPolicy){c.LinkPolicy=
983 -MakeToArray(c.LinkPolicy);g=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&g.push("S0 / AC"),14==c.LinkPolicy[C]&&g.push("Sx / AC"),16==c.LinkPolicy[C]&&g.push("S0 / DC"),224==c.LinkPolicy[C]&&g.push("Sx / DC");0==g.length&&g.push("");d+=TableEntry("Politique de lien",addLinkConditional(0==g.length?"Indisponible":"Disponible en: "+g.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("Adresse Mac",c.MACAddress));amtwirelessif==a&&xxWireless&&
984 -xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("Etat",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("\u00c9tat de la radio",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>Aucun</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&
985 -(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"Activ\u00e9e":"d\u00e9sactiv\u00e9","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",
986 -addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"Activ\u00e9e":"d\u00e9sactiv\u00e9","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("R\u00e9pondre au ping",addLinkConditional(["d\u00e9sactiv\u00e9","R\u00e9ponse ICMP","R\u00e9ponse RMCP","R\u00e9ponse ICMP et RMCP"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),
987 -g=1==c.DHCPEnabled?"Automatique \u00e0 l'aide du serveur DHCP":"Adresse IP statique",1==c.IpSyncEnabled&&(g+=", IP sync with OS"),d+=TableEntry("\u00c9tat IPv4",addLinkConditional(g,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("Adresse IPv4",isIpAddress(c.IPAddress,"Aucun"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("Passerelle / masque IPv4",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Aucun")));g=c.PrimaryDNS;isIpAddress(g)&&(c.SecondaryDNS&&(g+=" / "+c.SecondaryDNS),d+=TableEntry("Serveur de nom de domaine IPv4",
988 -g));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="d\u00e9sactiv\u00e9",w,g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)g[C].SettingData&&g[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==g[C].IsCurrent);1==w&&(p=(g=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Adresses activ\u00e9es, automatiques et manuelles":
971 +b=9));d+=TableEntry("Intel&reg; ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(28,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(39,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=
972 +amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,r=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||
973 +6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(e+=", Port de redirection");r&&(e+=", S\u00e9rie sur LAN");n&&(e+=", IDE-Redirect");g&&(e+=", KVM");""==e&&(e=" Aucun");d+=TableEntry("Fonctionnalit\u00e9s actives",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Affichage principal",7<amtversion&&void 0!==
974 +n.DefaultScreen&&255>n.DefaultScreen&&(e=["Affichage principal","Affichage secondaire","3e affichage"][n.DefaultScreen]),e='<span title="'+format("L'affichage \u00e0 distance par d\u00e9faut est {0}",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+=", Port 5900 activ\u00e9"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"opt-in secondes":"deuxi\u00e8me opt-in")),e+=","+n.SessionTimeout+" minute"+(0<n.SessionTimeout?"s":"")+" expiration de la session",9<amtversion&&
975 +null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+=", Masquage autoris\u00e9"),QV(46,n),Q(47).checked=!1):QV(46,!1),d+=TableEntry("Bureau \u00e0 distance",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(26,!p||!r);QV(27,xxAccountAdminName);QV(37,!p||!g);QV(38,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&
976 +null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="\u00c9tat inconnu",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(e="Non requis"),1==p&&(e="Requis pour KVM uniquement"),4294967295==p&&(e="Toujours requis"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consentement de l'utilisateur",e));null!=amtsysstate.AMT_BootCapabilities.response.PlatformErase&&0<
977 +amtsysstate.AMT_BootCapabilities.response.PlatformErase&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"Inconnue",1:"Autre",2:"Activ\u00e9e",3:"d\u00e9sactiv\u00e9",4:"\u00c9teindre",5:"N'est pas applicable",6:"Activ\u00e9 mais hors ligne",7:"En test",8:"Diff\u00e9r\u00e9",9:"Au repos",10:"D\u00e9part",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",
978 +e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:"Inconnue",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)if(e[C].SettingData&&1==e[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[C].SettingData.ReferenceParameters.ResourceURI)for(p=
979 +e[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,r=0;r<AmtSystemPowerSchemes.length;r++)AmtSystemPowerSchemes[r].SchemeGUID==p&&(d+=TableEntry("Politique d'alimentation",addLinkConditional(AmtSystemPowerSchemes[r].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Date et heure",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+
980 +" ";e+=AddButton("Actions de puissance ...","showPowerActionDlg()")+" ";e+=AddButton("Enregistrer l'\u00e9tat ...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" La modification des param\u00e8tres r\u00e9seau peut rendre cette page indisponible.");
981 +d=d+"<br><h2>r\u00e9glages g\u00e9n\u00e9raux</h2>"+TableStart();e="";"<i>Aucun</i>"!=c&&(1==v.SharedFQDN&&(e=", partag\u00e9 avec OS"),0==v.SharedFQDN&&(e=", diff\u00e9rent du syst\u00e8me d'exploitation"));d+=TableEntry("Nom et domaine",addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));c="d\u00e9sactiv\u00e9";1==v.DDNSUpdateEnabled?c="Activ\u00e9 chacun"+v.DDNSPeriodicUpdateInterval+" minutes, TTL est"+v.DDNSTTL+" minutes":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Mise \u00e0 jour par serveur DHCP");
982 +d+=TableEntry("DNS dynamique",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Interface sans fil":"Interface filaire")+"</h2>";d+=TableStart();d+=TableEntry("\u00c9tat du lien",1==c.LinkIsUp?"Le lien est en place":
983 +"Le lien est en panne");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);e=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&e.push("S0 / AC"),14==c.LinkPolicy[C]&&e.push("Sx / AC"),16==c.LinkPolicy[C]&&e.push("S0 / DC"),224==c.LinkPolicy[C]&&e.push("Sx / DC");0==e.length&&e.push("");d+=TableEntry("Politique de lien",addLinkConditional(0==e.length?"Indisponible":"Disponible en: "+e.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("Adresse Mac",
984 +c.MACAddress));amtwirelessif==a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("Etat",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("\u00c9tat de la radio",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>Aucun</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&
985 +"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"Activ\u00e9e":"d\u00e9sactiv\u00e9","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&
986 +null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"Activ\u00e9e":"d\u00e9sactiv\u00e9","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("R\u00e9pondre au ping",addLinkConditional(["d\u00e9sactiv\u00e9","R\u00e9ponse ICMP","R\u00e9ponse RMCP",
987 +"R\u00e9ponse ICMP et RMCP"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-FAST/TLS".split(" "),p="d\u00e9sactiv\u00e9",amtsysstate.AMT_8021XProfile.responses.Body.Enabled&&(p="Activ\u00e9e,"+e[amtsysstate.AMT_8021XProfile.responses.Body.AuthenticationProtocol]),d+=TableEntry("802.1x",addLinkConditional(p,"editNetAuthProfile()",xxAccountAdminName)),
988 +e=1==c.DHCPEnabled?"Automatique \u00e0 l'aide du serveur DHCP":"Adresse IP statique",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("\u00c9tat IPv4",addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("Adresse IPv4",isIpAddress(c.IPAddress,"Aucun"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("Passerelle / masque IPv4",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Aucun")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("Serveur de nom de domaine IPv4",
989 +e));if(5<amtversion&&200==amtsysstate.IPS_IPv6PortSettings.status){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="d\u00e9sactiv\u00e9",w,e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)e[C].SettingData&&e[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[C].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Adresses activ\u00e9es, automatiques et manuelles":
990 "Activ\u00e9, adresses automatiques");d+=TableEntry("\u00c9tat IPv6",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("Adresse IPv6",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=
990 -TableEntry("Adresse IPv6","Aucun");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("Routeur par d\u00e9faut IPv6",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(g=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(g+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("Serveur de nom de domaine IPv6",g))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),
991 +TableEntry("Adresse IPv6","Aucun");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("Routeur par d\u00e9faut IPv6",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("Serveur de nom de domaine IPv6",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),
992 0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
993 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
994 "")+">Available in S0/DC - Powered on & on battery</label><br>";a+="<label><input type=checkbox id=d11p4 value=224 "+(0<=c.LinkPolicy.indexOf(224)?"checked":"")+">Available in Sx/DC - Sleeping & on battery</label><br>";setDialogMode(11,"Politique de lien",3,showLinkPolicyDlgEx,a,b)}}
@@ -997,30 +998,30 @@ function showAuthCsme(){if(!xxdialogMode){var b;b="<div style=margin-top:8px>Int
998 for(var c in amtstack.amtauth.Certificates){var a=amtstack.amtauth.Certificates[c];b+="<tr><td style=width:32px;vertical-align:top><img src=images-commander/cert1.png height=32 width=32 />";b+="<td style=padding-bottom:6px><b>"+EscapeHtml(a.subject.getField("CN").value)+(!0===a.xTrusted?", <span style=color:#080>De confiance</span>":"")+"</b><br />";a.subject.getField("OU")&&(b+=EscapeHtml(a.subject.getField("OU").value)+"<br />");b+=amtstack.amtauth.CertificatesDer[c].length+" octets,<a style=cursor:pointer;color:blue onclick=downloadAuthCert("+
999 c+")>T\u00e9l\u00e9charger</a>";a.xCrl&&(b+="<br />CRL "+a.xCrl.length+" octets,<a style=cursor:pointer;color:blue onclick=downloadCertCrl("+c+")>T\u00e9l\u00e9charger</a>")}setDialogMode(11,"Authentic CSME",1,null,b+"</table><div>")}}function downloadCertCrl(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.Certificates[b].xCrl),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".crl")}
1000 function downloadAuthCert(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.CertificatesDer[b]),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".cer")}var IntelAmtEntireState,IntelAmtEntireStateCalls;
1000 -function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c30.value="amtstate"+b+".json";setDialogMode(19,"Enregistrer l'int\u00e9gralit\u00e9 de l'\u00e9tat Intel&reg; AMT",3,saveEntireAmtStateOk)}}
1001 -function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(60,"Fetching entire state, please wait...");setDialogMode(1,"Enregistrer l'int\u00e9gralit\u00e9 de l'\u00e9tat Intel&reg; AMT",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
1002 -function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c30.value))}
1001 +function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c55.value="amtstate"+b+".json";setDialogMode(19,"Enregistrer l'int\u00e9gralit\u00e9 de l'\u00e9tat Intel&reg; AMT",3,saveEntireAmtStateOk)}}
1002 +function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(61,"Fetching entire state, please wait...");setDialogMode(1,"Enregistrer l'int\u00e9gralit\u00e9 de l'\u00e9tat Intel&reg; AMT",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
1003 +function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c55.value))}
1004 function showDesktopSettingsDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_KVMRedirectionSettingData.response,c;c="<div style=text-align:left><div style=height:26px;margin-top:4px><select id=subddisplay style=float:right;width:200px><option value=0>Affichage principal</option><option value=1>Affichage secondaire</option>";9<amtversion&&(c+="<option value=2>3e affichage</option>");c+='</select><div style=padding-top:4px>Affichage par d\u00e9faut</div></div><div style=height:26px;margin-top:4px><input id=subsessiontimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>D\u00e9lai d\'expiration de la session (minutes)</div></div>';
1005 1==b.OptInPolicy&&(c+='<div style=height:26px;margin-top:4px><input id=suboptintimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>D\u00e9lai d\'expiration (secondes)</div></div>');c+="<div style=height:26px;margin-top:4px><select id=subdlegacy style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>D\u00e9sactiv\u00e9, recommand\u00e9</option><option value=1>Visionneuses KVM h\u00e9rit\u00e9es activ\u00e9es</option></select><div style=padding-top:4px>Port 5900</div></div>";
1006 c+="<div style=height:26px;margin-top:4px id=subspassx><input id=subspass type=password autocomplete=off style=float:right;width:200px maxlength=8 onkeyup=showDesktopSettingsDlgUpdate()><div style=padding-top:4px>Mot de passe 5900 (8 caract\u00e8res)</div></div>";9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(c+="<div style=height:26px;margin-top:4px><select id=subsb style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>d\u00e9sactiv\u00e9</option><option value=1>Activ\u00e9e</option></select><div style=padding-top:4px title=\"Cette fonctionnalit\u00e9 n'est pas souvent prise en charge\">Masquage d'\u00e9cran</div></div>");
1007 c+="</div>";setDialogMode(11,"Param\u00e8tres du bureau \u00e0 distance",3,showDesktopSettingsDlgOk,c);Q("subddisplay").value=b.DefaultScreen;Q("subsessiontimeout").value=b.SessionTimeout;1==b.OptInPolicy&&(Q("suboptintimeout").value=b.OptInPolicyTimeout);Q("subdlegacy").value=1==b.Is5900PortEnabled?1:0;9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(Q("subsb").value=amtsysstate.IPS_ScreenConfigurationService.response.EnabledState);showDesktopSettingsDlgUpdate()}}
1007 -function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c54",b)}
1008 +function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c106",b)}
1009 function showDesktopSettingsDlgOk(){var b=Clone(amtsysstate.IPS_KVMRedirectionSettingData.response);b.DefaultScreen=Q("subddisplay").value;b.SessionTimeout=Q("subsessiontimeout").value;b.Is5900PortEnabled=1==Q("subdlegacy").value;1==b.OptInPolicy&&(b.OptInPolicyTimeout=Q("suboptintimeout").value);1==b.Is5900PortEnabled&&(b.RFBPassword=Q("subspass").value);amtstack.Put("IPS_KVMRedirectionSettingData",b,showDesktopSettingsDlgOk2);b=Clone(amtsysstate.IPS_ScreenConfigurationService.response);b.EnabledState=
1010 parseInt(Q("subsb").value);amtstack.Put("IPS_ScreenConfigurationService",b,showDesktopSettingsDlgOk3)}function showDesktopSettingsDlgOk2(b,c,a,d){200==d?PullSystemStatus():messagebox("Param\u00e8tres du bureau \u00e0 distance",format("Erreur {0}, impossible de d\u00e9finir des valeurs.",d))}
1011 function showDesktopSettingsDlgOk3(b,c,a,d){200!=d?messagebox("Erreur",format("La suppression de l'\u00e9cran n'a pas pu \u00eatre d\u00e9finie, la suppression peut ne pas \u00eatre prise en charge sur ce syst\u00e8me ({0}).",d)):amtstack.Get("IPS_ScreenConfigurationService",function(a,b,c,d){200==d&&(amtsysstate.IPS_ScreenConfigurationService.response=c.Body,updateSystemStatus())},0,1)}
1012 function PullEventLog(b){1==b&&xxdialogMode||(amtFirstPull|=16,amtstack.Enum("AMT_MessageLog",processMessageLog0),amtstack.GetMessageLog(processMessageLog1))}var processMessageLog0responses=null;
1013 function processMessageLog0(b,c,a,d){200==d&&(d&&QV("go6",!0),a&&(processMessageLog0responses=a),b="",c="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>",null!=processMessageLog0responses&&(b=1==processMessageLog0responses[0].IsFrozen?AddButton("Annuler le gel du journal","FreezeLog(0)"):AddButton("Figer le journal","FreezeLog(1)")),c+=TableEnd('<div style=float:right><input id=eventFilter placeholder="Filtre" style=margin:4px onkeyup=eventFilter()>&nbsp;</div><div>&nbsp;'+
1014 AddRefreshButton("PullEventLog(1)")+AddButton("Effacer le journal","ClearLog()")+AddButton("Sauver...","SaveEventLog()")+b),QH(17,c+"<br>"))}function SaveEventLog(){xxdialogMode||null==eventmessages||SaveJsonFile("IntelAmtEventlog","events","Intel AMT Event Log",eventmessages)}var eventmessages=null;
1014 -function processMessageLog1(b,c){eventmessages=c;var a,d=0,g;g="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>La source</b><td class=r1><b>La description</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);g+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1015 -a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}g+=TableEnd(0==d?"&nbsp;":"");QH(18,g+"<br>");processMessageLog0()}
1016 -function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(60,"Effacer le journal des \u00e9v\u00e9nements?"),setDialogMode(1,"Journal des \u00e9v\u00e9nements",3,ClearLogEx))}function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("Journal des \u00e9v\u00e9nements","Impossible d'effacer, erreur: "+d):PullEventLog()})}
1017 -function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("Temps",c.Time.toLocaleString());a+=addHtmlValue("La source",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("La description",c.Desc);a+=MoreStart();a+=addHtmlValue("Adresse de l'appareil",c.DeviceAddress);a+=addHtmlValue("Entit\u00e9",c.Entity);a+=addHtmlValue("Instance d'entit\u00e9",c.EntityInstance);var d="",g;for(g in c.EventData)0<d.length&&(d+=","),d+=c.EventData[g];a+=addHtmlValue("Les donn\u00e9es",
1015 +function processMessageLog1(b,c){eventmessages=c;var a,d=0,e;e="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>La source</b><td class=r1><b>La description</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);e+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1016 +a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}e+=TableEnd(0==d?"&nbsp;":"");QH(18,e+"<br>");processMessageLog0()}
1017 +function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(61,"Effacer le journal des \u00e9v\u00e9nements?"),setDialogMode(1,"Journal des \u00e9v\u00e9nements",3,ClearLogEx))}function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("Journal des \u00e9v\u00e9nements","Impossible d'effacer, erreur: "+d):PullEventLog()})}
1018 +function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("Temps",c.Time.toLocaleString());a+=addHtmlValue("La source",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("La description",c.Desc);a+=MoreStart();a+=addHtmlValue("Adresse de l'appareil",c.DeviceAddress);a+=addHtmlValue("Entit\u00e9",c.Entity);a+=addHtmlValue("Instance d'entit\u00e9",c.EntityInstance);var d="",e;for(e in c.EventData)0<d.length&&(d+=","),d+=c.EventData[e];a+=addHtmlValue("Les donn\u00e9es",
1019 d);a+=addHtmlValue("D\u00e9calage",c.EventOffset);a+=addHtmlValue("Type de capteur",c.EventSensorType);a+=addHtmlValue("Gravit\u00e9",c.EventSeverity);a+=addHtmlValue("Type de Source",c.EventSourceType);a+=addHtmlValue("Type",c.EventType);a+=addHtmlValue("Num\u00e9ro de capteur",c.SensorNumber);a+=MoreEnd();a+="</div>";messagebox(format("D\u00e9tails de l'\u00e9v\u00e9nement # {0}",b+1),a)}}
1020 function eventFilter(){var b=Q("eventFilter").value.toLowerCase(),c;for(c in eventmessages)QV("xamtevent"+c,""==b||0<=eventmessages[c].Desc.toLowerCase().indexOf(b)||0<=eventmessages[c].EntityStr.toLowerCase().indexOf(b))}var subscriptionsFilters=null,subscriptionsListeners=null;
1021 function PullEventSubscriptions(){null==subscriptionsFilters&&amtstack.Enum("CIM_FilterCollection",processEventSubscriptions0);amtstack.BatchEnum(null,["CIM_ListenerDestination","CIM_FilterCollectionSubscription"],processEventSubscriptions1)}function processEventSubscriptions0(b,c,a,d){408!=d&&400!=d&&(d&&errcheck(d,b)||(subscriptionsFilters=a))}
1021 -function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez les abonn\u00e9s aux \u00e9v\u00e9nements.<br><br>";for(var g in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[g].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[g],
1022 -b+='<div class=itemBar onclick="showSubscriptionDetails('+g+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>Aucun abonnement trouv\u00e9.</i></div><br>");g="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(g+=AddButton("Nouvel abonnement","newSubscriptionButton()"));b+="<br><td class=r1>"+
1023 -TableEnd(g+"</div>");QH(56,b)}}var subscriptionDeliveryModes={2:"Pousser",3:"Poussez avec ACK",4:"\u00c9v\u00e9nements",5:"Tirer"};
1022 +function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez les abonn\u00e9s aux \u00e9v\u00e9nements.<br><br>";for(var e in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[e].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[e],
1023 +b+='<div class=itemBar onclick="showSubscriptionDetails('+e+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>Aucun abonnement trouv\u00e9.</i></div><br>");e="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(e+=AddButton("Nouvel abonnement","newSubscriptionButton()"));b+="<br><td class=r1>"+
1024 +TableEnd(e+"</div>");QH(57,b)}}var subscriptionDeliveryModes={2:"Pousser",3:"Poussez avec ACK",4:"\u00c9v\u00e9nements",5:"Tirer"};
1025 function showSubscriptionDetails(b){if(!xxdialogMode){var c=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[b].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),a=subscriptionsListeners.CIM_ListenerDestination.responses[b],d;d="<div style=text-align:left>"+addHtmlValue("Destination",a.Destination);d+=addHtmlValue("Filtre",c);d+=addHtmlValue("Mode de livraison",subscriptionDeliveryModes[a.DeliveryMode]);setDialogMode(11,"Abonnement"+(b+1),xxAccountAdminName?
1026 5:1,deleteSubscriptionButton,d+"</div>",b)}}
1027 function deleteSubscriptionButton(b,c){2==b&&amtstack.UnSubscribe("CIM_FilterCollectionSubscription",PullEventSubscriptions,null,1,{Filter:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_FilterCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+subscriptionsListeners.CIM_FilterCollectionSubscription.responses[c].Filter.ReferenceParameters.SelectorSet.Selector.Value+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference>",
@@ -1028,94 +1029,94 @@ Handler:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/a
1029 function newSubscriptionButton(){if(!xxdialogMode&&null!=subscriptionsFilters){var b;b="<div style=height:26px;margin-top:4px><select id=subtype style=float:right;width:260px><option value=Push>Pousser</option><option value=PushWithAck>Poussez avec ACK</option></select><div style=padding-top:4px>Type</div></div><div style=height:26px;margin-top:4px><select id=subfilter style=float:right;width:260px>";for(var c in subscriptionsFilters)b+='<option value="'+subscriptionsFilters[c].InstanceID+'">'+subscriptionsFilters[c].CollectionName.substring(13)+
1030 "</option>";b+="</select><div style=padding-top:4px>Filtre</div></div>";b+='<div style=height:26px;margin-top:4px><input id=suburl style=float:right;width:260px maxlength=253 onkeyup=newSubscriptionUpdate() value="http://"><div style=padding-top:4px>URL</div></div>';b+="<div style=height:26px;margin-top:4px><select id=subauth style=float:right;width:260px onchange=newSubscriptionUpdate()><option value=0>Aucun</option><option value=1>Dig\u00e9rer</option></select><div style=padding-top:4px>Authentification</div></div>";
1031 b+="<div style=height:26px;margin-top:4px id=subxuser><input id=subuser style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>Nom d'utilisateur</div></div>";b+="<div style=height:26px;margin-top:4px id=subxpass><input id=subpass style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>Mot de passe</div></div>";b+="<div style=height:26px;margin-top:4px><input id=subargs style=float:right;width:260px maxlength=128><div style=padding-top:4px>Arguments</div></div>";
1031 -setDialogMode(11,"Ajouter un abonnement \u00e0 un \u00e9v\u00e9nement",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c54",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1032 +setDialogMode(11,"Ajouter un abonnement \u00e0 un \u00e9v\u00e9nement",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c106",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1033 function newSubscriptionButtonOk(){var b=0==Q("subuser").value.length?void 0:Q("subuser").value,c=0==Q("subpass").value.length?void 0:Q("subpass").value;amtstack.Subscribe("CIM_FilterCollection",Q("subtype").value,Q("suburl").value,newSubscriptionButtonOk2,null,1,{InstanceID:Q("subfilter").value},0<Q("subargs").value.length?Q("subargs").value:null,b,c)}function newSubscriptionButtonOk2(b,c,a,d){200==d&&PullEventSubscriptions()}
1034 function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AMT_AuditLog",processAuditLog0))}var auditLog=null,auditLogEnabledStates="Inconnue;Autre;Activ\u00e9e;d\u00e9sactiv\u00e9;\u00c9teindre;N'est pas applicable;Activ\u00e9 mais hors ligne;En test;Diff\u00e9r\u00e9;Au repos;D\u00e9part".split(";");
1034 -function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"d\u00e9sactiv\u00e9":"Activ\u00e9e",c&2&&(b+=", Ferm\u00e9 \u00e0 cl\u00e9"),c&4&&(b+=", Presque plein"),c&8&&(b+=", Plein"),c&16&&(b+=", NoKey"),c="<h1>Param\u00e8tres du journal d'audit</h1>"+TableStart(),c+=TableEntry("Etat",b),c+=TableEntry("Espace de rangement",a[0].CurrentNumberOfRecords+" enregistrement (s),"+a[0].PercentageFree+"% gratuit"),c+=TableEntry("\u00c9craser la politique",2==a[0].OverwritePolicy?"S'enveloppe lorsqu'il est plein":
1035 -"N'\u00e9crase jamais"),c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1036 -function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filtre" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Sauver...","SaveAuditLog()")+AddButton("Effacer le journal","ClearAuditLog()"))+"<br>");if(0==c.length)d="Aucun \u00e9v\u00e9nement de journal d'audit trouv\u00e9.";else{var g=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Temps</b><td class=r1 style=width:260px><b>Initiateur</b><td class=r1><b>Action</b>";
1037 -for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;g++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1038 -minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==g?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Journal d'audit Intel AMT",auditLog)}
1039 -function ClearAuditLog(b){QH(60,"Effacer le journal d'audit?");setDialogMode(1,"Journal d'audit",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1035 +function processAuditLog0(b,c,a,d){200==d&&a&&0<a.length&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"d\u00e9sactiv\u00e9":"Activ\u00e9e",c&2&&(b+=", Ferm\u00e9 \u00e0 cl\u00e9"),c&4&&(b+=", Presque plein"),c&8&&(b+=", Plein"),c&16&&(b+=", NoKey"),c="<h1>Param\u00e8tres du journal d'audit</h1>"+TableStart(),c+=TableEntry("Etat",b),c+=TableEntry("Espace de rangement",a[0].CurrentNumberOfRecords+" enregistrement (s),"+a[0].PercentageFree+"% gratuit"),c+=TableEntry("\u00c9craser la politique",2==a[0].OverwritePolicy?
1036 +"S'enveloppe lorsqu'il est plein":"N'\u00e9crase jamais"),c+=TableEnd(),QH(50,c),amtstack.GetAuditLog(processAuditLog1))}
1037 +function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filtre" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Sauver...","SaveAuditLog()")+AddButton("Effacer le journal","ClearAuditLog()"))+"<br>");if(0==c.length)d="Aucun \u00e9v\u00e9nement de journal d'audit trouv\u00e9.";else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Temps</b><td class=r1 style=width:260px><b>Initiateur</b><td class=r1><b>Action</b>";
1038 +for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1039 +minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(51,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Journal d'audit Intel AMT",auditLog)}
1040 +function ClearAuditLog(b){QH(61,"Effacer le journal d'audit?");setDialogMode(1,"Journal d'audit",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1041 function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("Journal d'audit","Erreur: "+d)}
1041 -function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Temps",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Initiateur",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Adresse",a.NetAddress));d+=addHtmlValue("Application",a.AuditApp);d+=addHtmlValue("un \u00e9v\u00e9nement",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Donn\u00e9es \u00e9tendues",a.ExStr);else if(0<a.Ex.length){var g="";for(c in a.Ex)0<g.length&&(g+=","),g+=
1042 -a.Ex.charCodeAt(c);""!=g&&(d+=addHtmlValue("Valeurs de donn\u00e9es",g));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("Cha\u00eene de donn\u00e9es",a.Ex.substring(2)))}messagebox("\u00c9v\u00e9nement d'audit #"+(b+1)+" D\u00e9tails",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1042 +function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Temps",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Initiateur",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Adresse",a.NetAddress));d+=addHtmlValue("Application",a.AuditApp);d+=addHtmlValue("un \u00e9v\u00e9nement",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Donn\u00e9es \u00e9tendues",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=","),e+=
1043 +a.Ex.charCodeAt(c);""!=e&&(d+=addHtmlValue("Valeurs de donn\u00e9es",e));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("Cha\u00eene de donn\u00e9es",a.Ex.substring(2)))}messagebox("\u00c9v\u00e9nement d'audit #"+(b+1)+" D\u00e9tails",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1044 function PullCertificates(){amtstack.BatchEnum(null,["AMT_PublicKeyCertificate","AMT_PublicPrivateKeyPair","AMT_TLSSettingData","AMT_TLSCredentialContext"],processCerts1)}
1044 -function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var g in xxCertificates)xxCertificates[g].InstanceID==b&&(xxTlsCurrentCert=
1045 -g)}for(g in xxCertificates)xxCertificates[g].TrustedRootCertficate=1==xxCertificates[g].TrustedRootCertficate,xxCertificates[g].X509Certificate=window.atob(xxCertificates[g].X509Certificate),xxCertificates[g].XIssuer=parseCertName(xxCertificates[g].Issuer),xxCertificates[g].XSubject=parseCertName(xxCertificates[g].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1045 +function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var e in xxCertificates)xxCertificates[e].InstanceID==b&&(xxTlsCurrentCert=
1046 +e)}for(e in xxCertificates)xxCertificates[e].TrustedRootCertficate=1==xxCertificates[e].TrustedRootCertficate,xxCertificates[e].X509Certificate=window.atob(xxCertificates[e].X509Certificate),xxCertificates[e].XIssuer=parseCertName(xxCertificates[e].Issuer),xxCertificates[e].XSubject=parseCertName(xxCertificates[e].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1047 function parseCertName(b){var c={},a=b.split(","),d;for(d in a)b=a[d].indexOf("="),c[a[d].substring(0,b)]=a[d].substring(b+1);return c}
1048 function getTlsSecurityState(b){if(0==xxTlsSettings[b].Enabled)return"d\u00e9sactiv\u00e9";var c=(1==xxTlsSettings[b].MutualAuthentication?"TLS d'authentification mutuelle":"TLS d'authentification de serveur")+(1==xxTlsSettings[b].AcceptNonSecureConnections?" et non TLS":"");1==xxTlsSettings[b].MutualAuthentication&&xxTlsSettings[b].TrustedCN&&(b=MakeToArray(xxTlsSettings[b].TrustedCN),0<b.length&&(c+=", "+(1<b.length?"Trusted names":"Trusted name")+": "+b.join(", ")+"."));return c}
1049 function updateCertificates(){if(null!=xxCertificates){var b="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,c=1-b,a=TableStart(),a=a+TableEntry("S\u00e9curit\u00e9 TLS \u00e0 distance",addLinkConditional(getTlsSecurityState(c),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEntry("S\u00e9curit\u00e9 TLS locale",addLinkConditional(getTlsSecurityState(b),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEnd(),a=a+("<br>"+TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez les certificats Intel&reg; AMT pour cet ordinateur.<br><br>");
1050 if(0==xxCertificates.length&&0==xxCertPrivateKeys.length)a+="<div style=padding-left:15px><br><i>Aucun certificat trouv\u00e9.</i></div><br>";else{for(var d in xxCertificates)b="",xxCertificates[d].TrustedRootCertficate&&(b=", Racine de confiance"),xxCertificates[d].XPrivateKey&&(b=", Cl\u00e9 priv\u00e9e"),d==xxTlsCurrentCert&&(b+=", TLS cert"),a+="<div class=itemBar onclick=showCertDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(xxCertificates[d].XSubject.CN)+"</b><i>"+b+"</i></div></div>";
1050 -for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>Paire de cl\u00e9s priv\u00e9es non affect\u00e9es #"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("Ajouter un certificat ...","addCertButton()")+AddButton("D\u00e9livrer un certificat ...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(51,a)}}
1051 +for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>Paire de cl\u00e9s priv\u00e9es non affect\u00e9es #"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("Ajouter un certificat ...","addCertButton()")+AddButton("D\u00e9livrer un certificat ...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(52,a)}}
1052 function showKeyPairDetails(b){setDialogMode(11,"Paire de cl\u00e9s #"+b,5,function(c){2==c&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertPrivateKeys[b].InstanceID},PullCertificates,0,1)},"Il s'agit d'une paire de cl\u00e9s de certificat public / priv\u00e9 qui n'appartient \u00e0 aucun certificat. Cette entr\u00e9e doit \u00eatre temporaire.")}
1053 var xxCertSubjectNames={CN:"Nom commun",O:"Organisation",OU:"Unit\u00e9 organisationnelle",S:"\u00c9tat / Province",ST:"\u00c9tat / Province",L:"Localit\u00e9",C:"Pays",SN:"Nom de famille",GN:"Pr\u00e9nom"};
1054 function showCertDetails(b){if(!xxdialogMode){var c=xxCertificates[b],a;a="<br>"+addHtmlValue("Certificat",c.X509Certificate.length+" octets,<a style=cursor:pointer;color:blue onclick=downloadCert("+b+")>T\u00e9l\u00e9charger</a>");a+=addHtmlValue("Racine de confiance",c.TrustedRootCertficate?"Oui":"Non");0==c.TrustedRootCertficate&&c.XPrivateKey&&(a+=addHtmlValue("Cl\u00e9 priv\u00e9e","Pr\u00e9sent"));a+='<br><div style="border-bottom:1px solid gray"><i>Objet du certificat</i></div><br>';for(var d in c.XSubject)c.XSubject[d]&&
1055 (a+=addHtmlValue(xxCertSubjectNames[d]?xxCertSubjectNames[d]:d,EscapeHtml(c.XSubject[d])));a+='<br><div style="border-bottom:1px solid gray"><i>Certificat d\'\u00e9metteur</i></div><br>';for(d in c.XIssuer)c.XIssuer[d]&&(a+=addHtmlValue(xxCertSubjectNames[d]?xxCertSubjectNames[d]:d,EscapeHtml(c.XIssuer[d])));setDialogMode(11,"Certificat -"+EscapeHtml(c.XSubject.CN),5,function(a){2==a&&(xxCertificates[b].XPrivateKey&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertificates[b].XPrivateKey.InstanceID},
1056 function(){},0,1),amtstack.Delete("AMT_PublicKeyCertificate",xxCertificates[b],certificateRemoved,0,1))},a)}}function downloadCert(b){saveAs(data2blob(xxCertificates[b].X509Certificate),xxCertificates[b].XSubject.CN+".cer")}function cert_FileSelectHandler(b){haltEvent(b);1==b.dataTransfer.files.length&&(b.dataTransfer.files[0].name.toLowerCase().endsWith(".p12")?issueCertButton(b.dataTransfer.files):addCertButton(b.dataTransfer.files))}var xxDragDropCertFiles=null;
1057 function addCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen onchange=addCertButtonUpdate() type=file style=float:right;width:260px accept=".cer,.pem">',xxDragDropCertFiles&&(b='<input style=float:right;width:260px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b="<div style=height:10px></div>"+("<div style=height:26px;margin-top:4px>"+b+"<div style=padding-top:4px>Fichier de certificat</div></div>")+"<div style=height:26px;margin-top:4px><select id=certtype style=float:right;width:260px><option value=1>Certificat racine de confiance</option><option value=0>Certificat de cha\u00eene</option></select><div style=padding-top:4px>Type de certificat</div></div>",
1057 -setDialogMode(11,"Ajouter un certificat",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c54",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1058 +setDialogMode(11,"Ajouter un certificat",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c106",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1059 function addCertButtonOk2(b){b=b.target.result;var c=b.indexOf("-----BEGIN CERTIFICATE-----");0<=c?(b=b.substring(c+27),c=b.indexOf("-----END CERTIFICATE-----"),0<=c&&(b=b.substring(0,c)),b=b.replace(/\r\n/g,"")):b=btoa(b);1==getSelectElement("certtype").value?amtstack.AMT_PublicKeyManagementService_AddTrustedRootCertificate(b,certificateAdded):amtstack.AMT_PublicKeyManagementService_AddCertificate(b,certificateAdded)}
1060 function issueCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen type=file style=float:right;width:230px onchange=issueCertButtonUpdate() accept=".p12">',xxDragDropCertFiles&&(b='<input style=float:right;width:230px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b=""+("<div styleheight:26px;margin-top:14px>"+b+"<div style=padding-top:4px>Certificate file</div></div>")+"<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certopenpass type=password autocomplete=off style=float:right;width:230px><div style=padding-top:4px>Mot de passe du certificat</div></div>",
1061 b+='<br><div style="border-bottom:1px solid gray"><i>Certificat Intel&reg; AMT</i></div>',b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certcn style=float:right;width:230px><div style=padding-top:4px>Nom commun</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certo style=float:right;width:230px><div style=padding-top:4px>Organisation</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certst style=float:right;width:230px><div style=padding-top:4px>\u00c9tat / Province</div></div>",
1062 b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certc style=float:right;width:230px><div style=padding-top:4px>Pays</div></div>",b+='<div>Utilisations du certificat</div><ul 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">',b+="<li><label><input type=checkbox id=d11_cu4 checked>Serveur TLS (HTTPS)</label></li>",b+="<li><label><input type=checkbox id=d11_cu5>Client TLS (HTTPS)</label></li>",
1063 b+="<li><label><input type=checkbox id=d11_cu6>Protection des e-mails</label></li>",b+="<li><label><input type=checkbox id=d11_cu7>Signature du code</label></li>",b+="<li><label><input type=checkbox id=d11_cu8>Horodatage</label></li>",b+="</ul>",setDialogMode(11,"D\u00e9livrer un certificat",3,issueCertButtonOk,b),issueCertButtonUpdate())}
1063 -function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c54",c)}
1064 +function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c106",c)}
1065 function issueCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length?(b=new FileReader,b.onload=issueCertButtonOk2,b.readAsBinaryString(c[0])):issueCertButtonOk3(null)}function issueCertButtonOk2(b){0==amtcert_loadP12File(b.target.result,Q("certopenpass").value,issueCertButtonOk3)&&messagebox("D\u00e9livrer un certificat","Impossible de d\u00e9crypter / d\u00e9coder le certificat.")}
1066 function issueCertButtonOk3(b,c,a){xxCaPrivateKey=b;xxCaSubjectAttributes=c;amtstack.AMT_PublicKeyManagementService_GenerateKeyPair(0,2048,GenerateKeyPairResponse)}
1067 function GenerateKeyPairResponse(b,c,a,d){200!=d?messagebox("D\u00e9livrer un certificat","Impossible de g\u00e9n\u00e9rer la paire de cl\u00e9s. Statut: "+d):0!=a.Body.ReturnValue?messagebox("D\u00e9livrer un certificat","Impossible de g\u00e9n\u00e9rer la paire de cl\u00e9s,"+a.Body.ReturnValueStr):amtstack.Enum("AMT_PublicPrivateKeyPair",GenerateKeyPairResponse2,a.Body.KeyPair.ReferenceParameters.SelectorSet.Selector.Value)}
1067 -function GenerateKeyPairResponse2(b,c,a,d,g){if(200!=d)messagebox("D\u00e9livrer un certificat","Impossible de g\u00e9n\u00e9rer la paire de cl\u00e9s. Statut: "+d);else{b=null;for(var v in a)a[v].InstanceID==g&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};g={CN:"Certificat racine non approuv\u00e9"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in g={},xxCaSubjectAttributes)g[xxCaSubjectAttributes[v].shortName]=
1068 -xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,g,v);null==v?messagebox("D\u00e9livrer un certificat","Impossible de signer le certificat."):(v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,
1068 +function GenerateKeyPairResponse2(b,c,a,d,e){if(200!=d)messagebox("D\u00e9livrer un certificat","Impossible de g\u00e9n\u00e9rer la paire de cl\u00e9s. Statut: "+d);else{b=null;for(var v in a)a[v].InstanceID==e&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};e={CN:"Certificat racine non approuv\u00e9"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in e={},xxCaSubjectAttributes)e[xxCaSubjectAttributes[v].shortName]=
1069 +xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,e,v);null==v?messagebox("D\u00e9livrer un certificat","Impossible de signer le certificat."):(v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,
1070 v.length-25),GenerateKeyPairResponse4))}}function GenerateKeyPairResponse4(b,c,a,d){200!=d?messagebox("D\u00e9livrer un certificat","Impossible de g\u00e9n\u00e9rer la paire de cl\u00e9s. Statut: "+d):PullCertificates()}function certificateAdded(b,c,a,d){200!=d||0!=a.Body.ReturnValue?messagebox("Ajouter un certificat","Impossible d'ajouter le certificat, erreur"+(200!=d?d:a.Body.ReturnValueStr)):PullCertificates()}
1071 function certificateRemoved(b,c,a,d){200!=d?messagebox("Supprimer le certificat","Impossible de supprimer le certificat, erreur"+d):PullCertificates()}function getInputElement(b){var c=document.getElementsByTagName("input");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}function getSelectElement(b){var c=document.getElementsByTagName("select");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}
1071 -function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>Aucun certificat, TLS d\u00e9sactiv\u00e9</option>";for(var c in xxCertificates)0!=xxCertificates[c].TrustedRootCertficate||!xxCertificates[c].XPrivateKey||null!=xxTlsCurrentCert&&xxTlsCurrentCert!=c||(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>Certificat</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1072 +function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>Aucun certificat, TLS d\u00e9sactiv\u00e9</option>";for(var c in xxCertificates)0==xxCertificates[c].TrustedRootCertficate&&xxCertificates[c].XPrivateKey&&(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>Certificat</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1073 b+="<option value=2>Mutual-auth TLS only</option><option value=3>Mutual-auth, non-TLS allowed</option>";b+='</select><div style=padding-top:4px>Security</div></div><div style=height:26px id=d11rcn title="Liste s\u00e9par\u00e9e par des virgules des noms communs de certificats qui seront autoris\u00e9s \u00e0 se connecter \u00e0 distance."><input id=d11_rcn style=float:right;width:260px onkeyup=showSetTlsSecurityDlgUpdate() placeholder="nom1, nom2"><div style=padding-top:4px>CN distants</div></div>';
1074 setDialogMode(11,"Param\u00e8tres TLS",3,showSetTlsSecurityDlgOk,b);if(0==xxTLSCredentialContext.length||0==xxTlsSettings[0].Enabled||0==xxTlsSettings[1].Enabled)getSelectElement("tlscert").value=-1;else for(c in b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value,xxCertificates)xxCertificates[c].InstanceID==b&&(getSelectElement("tlscert").value=c);c=1-("Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1);getSelectElement("tlsremote").value=(1==
1074 -xxTlsSettings[c].MutualAuthentication?2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c54",b)}
1075 +xxTlsSettings[c].MutualAuthentication?2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c106",b)}
1076 var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1077 function showSetTlsSecurityDlgOk(){var b=getSelectElement("tlscert").value,c=getSelectElement("tlsremote").value,a=Clone(xxTlsSettings);setTlsSecurityPendingCalls=0;setTlsSecurityDeleteCredentialContext=null;if(-1!=b){if(0<xxTLSCredentialContext.length){var d=Clone(xxTLSCredentialContext[0]);d.ElementInContext.ReferenceParameters.SelectorSet.Selector.Value=xxCertificates[b].InstanceID;amtstack.Put("AMT_TLSCredentialContext",d,setTlsSecurityResponse,0,1)}else amtstack.Create("AMT_TLSCredentialContext",
1078 {ElementInContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[b].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",ElementProvidingContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_TLSProtocolEndpointCollection")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters>'},
1078 -setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,g=1-d;a[g].Enabled=-1!=b;a[g].MutualAuthentication=2<=c;a[g].AcceptNonSecureConnections=1==c%2;a[g].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1079 +setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,e=1-d;a[e].Enabled=-1!=b;a[e].MutualAuthentication=2<=c;a[e].AcceptNonSecureConnections=1==c%2;a[e].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1080 b,c,d){200!=d?messagebox("","Impossible de r\u00e9gler l'heure, \u00e9tat ="+d):0!=c.Body.ReturnValue?messagebox("","Impossible de r\u00e9gler l'heure, erreur: "+c.Body.ReturnValueStr):(a=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(c.Body.Ta0,a,a,function(){setTlsSecurityResponse()}))}));setTlsSecurityPendingCalls+=2;amtstack.Put("AMT_TLSSettingData",a[0],setTlsSecurityResponse,0,1,a[0]);amtstack.Put("AMT_TLSSettingData",a[1],setTlsSecurityResponse,
1081 0,1,a[1]);statusbox("Param\u00e8tres TLS","Application de nouveaux param\u00e8tres de s\u00e9curit\u00e9 ...")}function splitDomains(b){b=b.split(",");if(0!=b.length){for(var c in b)if(b[c]=b[c].trim(),0<=b[c].indexOf(" ")||0==b[c].length)return;if(!(4<b.length))return b}}
1082 function setTlsSecurityResponse(b,c,a,d){if(b){if(200!=d){messagebox("","Impossible de d\u00e9finir la s\u00e9curit\u00e9 TLS, \u00e9tat ="+d);return}if(a.Body.ReturnValueStr&&!methodcheck(a))return}0==--setTlsSecurityPendingCalls&&amtstack.AMT_SetupAndConfigurationService_CommitChanges(null,setTlsSecurityResponse2)}
1083 function setTlsSecurityResponse2(b,c,a,d){200!=d?messagebox("","Impossible de d\u00e9finir la s\u00e9curit\u00e9 TLS, \u00e9tat ="+d):0!=a.Body.ReturnValue?messagebox("","Impossible de d\u00e9finir la s\u00e9curit\u00e9 TLS, erreur: "+a.Body.ReturnValueStr):setTimeout(setTlsSecurityResponse3,2E3)}
1084 function setTlsSecurityResponse3(){null!=setTlsSecurityDeleteCredentialContext&&amtstack.Delete("AMT_TLSCredentialContext",setTlsSecurityDeleteCredentialContext,function(){});PullCertificates();setDialogMode();amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}var xxWatchdog=null;
1085 function PullWatchdog(){amtstack.BatchEnum(null,["*AMT_AgentPresenceCapabilities","AMT_AgentPresenceWatchdog","AMT_AgentPresenceWatchdogAction","AMT_StateTransitionCondition","CIM_ConcreteDependency"],PullWatchdogResponse)}
1085 -function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var g in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[g],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1086 +function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var e in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[e],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1087 "@Name","PolicyConditionName").Value,d=getItem(xxWatchdog.AMT_AgentPresenceWatchdog.responses,"DeviceID",d),a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,"PolicyConditionName",a),d.transitions||(d.transitions=[]),d.transitions.push(a)),c&&"AMT_StateTransitionCondition"==c.Value&&(a=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyConditionName").Value,b=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyActionName").Value,a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,
1088 "PolicyConditionName",a),b=getItem(xxWatchdog.AMT_AgentPresenceWatchdogAction.responses,"PolicyActionName",b),a.actions||(a.actions=[]),a.actions.push(b));updateWatchdog();QV("go19",!0)}}var watchdogEnabledStates="Inconnue;Autre;Activ\u00e9e;d\u00e9sactiv\u00e9;\u00c9teindre;N'est pas applicable;Activ\u00e9 mais hors ligne;En test;Diff\u00e9r\u00e9;Au repos;D\u00e9part".split(";"),watchdogMonitoredEntity="Inconnue;Autre;Syst\u00e8me op\u00e9rateur;Processus de d\u00e9marrage du syst\u00e8me d'exploitation;Processus d'arr\u00eat du syst\u00e8me d'exploitation;Processus de d\u00e9marrage du micrologiciel;Processus de d\u00e9marrage du BIOS;Application;Processeur de service".split(";");
1089 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("Nombre maximum",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" chiens de garde");b+=TableEntry("Nombre total maximum d'actions",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" Actions");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez les chiens de garde de pr\u00e9sence d'agent Intel&reg; AMT.<br><br>";if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||
1090 0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>Aucun chien de garde de pr\u00e9sence d'agent n'a \u00e9t\u00e9 trouv\u00e9.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));b+="<div class=itemBar onclick=showWatchdogDetails("+
1090 -c+')><input type=button style=float:right value="Ajouter une action ..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="Supprimer des actions ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",g;for(g in a.transitions){var v=a.transitions[g];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);
1091 -v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : \u00c9v\u00e9nement \u00e0 consigner")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Ajouter un chien de garde ...","AddWatchdog()"));b+="<br>";QH(54,b)}}
1091 +c+')><input type=button style=float:right value="Ajouter une action ..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="Supprimer des actions ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);
1092 +v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : \u00c9v\u00e9nement \u00e0 consigner")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Ajouter un chien de garde ...","AddWatchdog()"));b+="<br>";QH(55,b)}}
1093 function getWatchdogTransitionStr(b){if(31==b)return"N'importe quel \u00c9tat";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1094 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("La description",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("Entit\u00e9 surveill\u00e9e",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("\u00c9tat actuel",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("\u00c9tat activ\u00e9",watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("Intervalle de d\u00e9marrage",
1095 b.StartupInterval+" seconde (s)");c+=addHtmlValue("Intervalle de temporisation",b.TimeoutInterval+" seconde (s)");setDialogMode(11,format("Chien de garde {0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
1096 function AddWatchdog(){var b;b="<div style=height:26px;margin-top:4px><input id=wgname style=float:right;width:240px maxlength=16 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Nom</div></div>"+('<div style=height:26px;margin-top:4px><input id=wgguid style=float:right;width:240px maxlength=36 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px title="G\u00e9n\u00e9rer un DeviceID al\u00e9atoire">'+addLink("Reference de l'appareil","GenerateWatchdogGuid()")+"</div></div>");b+="<div style=height:26px;margin-top:4px><input id=wgstart style=float:right;width:240px maxlength=8 placeholder=3600 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>D\u00e9marrage (secondes)</div></div>";
1097 b+="<div style=height:26px;margin-top:4px><input id=wgtimeout style=float:right;width:240px maxlength=8 placeholder=60 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>D\u00e9lai d'expiration (secondes)</div></div>";setDialogMode(11,"Ajouter un chien de garde",3,AddWatchdogOk,b);AddWatchdogUpdate()}function GenerateWatchdogGuid(){var b,c="";for(b=0;16>b;b++)c+=String.fromCharCode(random(255));Q("wgguid").value=guidToStr(rstr2hex(c));AddWatchdogUpdate()}
1097 -function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var g=a.charCodeAt(d);45!=g&&(48<=g&&57>=g||97<=g&&102>=g?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1098 +function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var e=a.charCodeAt(d);45!=e&&(48<=e&&57>=e||97<=e&&102>=e?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1099 function AddWatchdogOk(){var b=Q("wgtimeout").value,c=Q("wgstart").value;""==b&&(b=60);""==c&&(c=3600);b={CreationClassName:0,DeviceID:btoa(hex2rstr(guidToStr(Q("wgguid").value.replace(/-/g,"")).replace(/-/g,""))),StartupInterval:c,SystemCreationClassName:0,SystemName:0,TimeoutInterval:b,MonitoredEntityDescription:Q("wgname").value};amtstack.Create("AMT_AgentPresenceWatchdog",b,AddWatchdogOk2)}
1100 function AddWatchdogOk2(b,c,a,d){200!=d?messagebox("Chien de garde","Impossible d'ajouter le chien de garde, erreur #"+d):PullWatchdog()}
1101 function addWatchdogAction(b,c){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d;d="<table><td style=width:180px>De<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsa"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";d+="<td>\u00c0<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsb"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";setDialogMode(11,"Ajouter une action de surveillance",
1102 3,addWatchdogActionOk,d+"</table><br>Faire une action<br><input id=wgsevent type=checkbox checked onclick=addWatchdogActionUpdate()>\u00c9crire dans le journal des \u00e9v\u00e9nements<br />",a);addWatchdogActionUpdate();haltEvent(b)}function addWatchdogActionUpdate(){var b=0,c=0,a;for(a in amtstack.WatchdogCurrentStates)1==Q("wgsa"+a).checked&&(b+=parseInt(a)),1==Q("wgsb"+a).checked&&(c+=parseInt(a));QE("dlgOkButton",0<b&&0<c&&1==Q("wgsevent").checked)}
1102 -function addWatchdogActionOk(b,c){var a=0,d=0,g;for(g in amtstack.WatchdogCurrentStates)1==Q("wgsa"+g).checked&&(a+=parseInt(g)),1==Q("wgsb"+g).checked&&(d+=parseInt(g));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Watchdog Action","Impossible d'ajouter une action de surveillance, erreur #"+d):PullWatchdog()}
1103 +function addWatchdogActionOk(b,c){var a=0,d=0,e;for(e in amtstack.WatchdogCurrentStates)1==Q("wgsa"+e).checked&&(a+=parseInt(e)),1==Q("wgsb"+e).checked&&(d+=parseInt(e));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Watchdog Action","Impossible d'ajouter une action de surveillance, erreur #"+d):PullWatchdog()}
1104 function deleteWatchdogActions(b,c){setDialogMode(11,"Supprimer les actions du chien de garde",3,deleteWatchdogActionsOk,"Supprimer toutes les actions de ce chien de garde?",xxWatchdog.AMT_AgentPresenceWatchdog.responses[c]);haltEvent(b)}function deleteWatchdogActionsOk(b,c){amtstack.AMT_AgentPresenceWatchdog_DeleteAllActions(deleteWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
1105 function deleteWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Watchdog Action","Impossible de supprimer les actions du chien de garde, erreur #"+d):PullWatchdog()}
1106 var xxSystemDefense=null,xxSystemDefenceLinkedPolicy={},xxUpdatingDefenseStats=!1,xxFilterStatistics=[{},{}],xxFilterStatisticsTimer=null,xxFilterStatisticsTimerActive=!1,xxSystemDefenceFilterEthernetTypes={2048:"Tous les paquets IP",2054:"Tous les paquets ARP"},xxSystemDefenceFilterIPTypes={4:"IPv4",6:"IPv6"},xxSystemDefenceFilterDesc={0:"Autoriser, compter",1:"Drop, Count",2:"Limite de taux",3:"Autoriser",4:"Laissez tomber"},xxSystemDefenceFilters={HdrProtocolID:1,HdrDestAddress:2,HdrDestMask:2,
1107 HdrSrcAddress:2,HdrSrcMask:2,HdrSrcPortStart:1,HdrSrcPortEnd:1,HdrDestPortStart:1,HdrDestPortEnd:1,HdrSrcAddressEndOfRange:2,"HdrDestAddressEndOfRange ":2,TCPFlagsOn:3,TCPFlagsOff:3};function PullSystemDefense(){amtFirstPull|=4;amtstack.BatchEnum(null,["AMT_SystemDefensePolicy","AMT_NetworkPortSystemDefensePolicy","AMT_Hdr8021Filter","AMT_IPHeadersFilter","AMT_NetworkFilter"],PullSystemDefenseResponse)}
1108 function PullSystemDefenseResponse(b,c,a,d){200==d&&(xxSystemDefense=a,updateSystemDefense(),QV("go18",!0),urlvars.norefresh&&UpdateDefenseStats())}
1109 function updateSystemDefense(){if(null!=xxSystemDefense){var b="";xxSystemDefenceLinkedPolicy={};for(var c in xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses){var a=xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses[c],d=+getItem(a.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value.substring(27),a=getItem(xxSystemDefense.AMT_SystemDefensePolicy.responses,"InstanceID",a.Dependent.ReferenceParameters.SelectorSet.Selector.Value);xxSystemDefenceLinkedPolicy[d]=
1109 -a}b+=TableStart();c="<i>Aucun</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("Strat\u00e9gie c\u00e2bl\u00e9e par d\u00e9faut",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],g;for(g in a)d=a[g],d=1==d?d+" paquet":d+" paquets",b+=TableEntry((0==c?"Filaire":"Sans fil")+g,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>G\u00e9rez les politiques de d\u00e9fense du syst\u00e8me Intel&reg; AMT.<br><br>";
1110 +a}b+=TableStart();c="<i>Aucun</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("Strat\u00e9gie c\u00e2bl\u00e9e par d\u00e9faut",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],e;for(e in a)d=a[e],d=1==d?d+" paquet":d+" paquets",b+=TableEntry((0==c?"Filaire":"Sans fil")+e,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>G\u00e9rez les politiques de d\u00e9fense du syst\u00e8me Intel&reg; AMT.<br><br>";
1111 if(0==xxSystemDefense.AMT_SystemDefensePolicy.responses.length)b+="<div style=padding-left:15px><i>Aucune politique de d\u00e9fense du syst\u00e8me trouv\u00e9e.</i></div><br>";else for(c in xxSystemDefense.AMT_SystemDefensePolicy.responses)a=xxSystemDefense.AMT_SystemDefensePolicy.responses[c],d="",a.FilterCreationHandles&&(a.FilterCreationHandles=MakeToArray(a.FilterCreationHandles),d=a.FilterCreationHandles.length,d=", "+d+" filter"+(1<d?"s":"")),b+="<div class=itemBar onclick=showPolicyDetails("+
1112 c+")><div style=padding-top:3px><b>"+EscapeHtml(a.PolicyName)+"</b>"+d+"</div></div>";b+="<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez les filtres de d\u00e9fense du syst\u00e8me Intel&reg; AMT.<br><br>";if(0==xxSystemDefense.AMT_Hdr8021Filter.responses.length&&0==xxSystemDefense.AMT_IPHeadersFilter.responses.length)b+="<div style=padding-left:15px><i>Aucun filtre de d\u00e9fense du syst\u00e8me n'a \u00e9t\u00e9 trouv\u00e9.</i></div><br>";else{for(c in xxSystemDefense.AMT_Hdr8021Filter.responses)a=
1113 xxSystemDefense.AMT_Hdr8021Filter.responses[c],(d=xxSystemDefenceFilterEthernetTypes[a.HdrProtocolID8021])||(d="Protocole Ethernet"+a.HdrProtocolID8021),d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile],2==a.FilterProfile&&(d+=" \u00e0"+a.FilterProfileData+" paquet / s"),1==a.ActionEventOnMatch&&(d+=", \u00c9v\u00e9nement sur match"),b+="<div class=itemBar onclick=showFilterDetails(0,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+
1113 -"</div></div>";for(c in xxSystemDefense.AMT_IPHeadersFilter.responses){a=xxSystemDefense.AMT_IPHeadersFilter.responses[c];(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="Protocole Ethernet"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" \u00e0"+a.FilterProfileData+" paquet / s");1==a.ActionEventOnMatch&&(d+=", \u00c9v\u00e9nement sur match");var v=0;for(g in xxSystemDefenceFilters)a[g]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+
1114 -c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("Ajouter un filtre ...","AddDefenseFilter()")+AddButton("Ajouter une strat\u00e9gie ...","AddDefensePolicy()"));QH(53,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,
1114 +"</div></div>";for(c in xxSystemDefense.AMT_IPHeadersFilter.responses){a=xxSystemDefense.AMT_IPHeadersFilter.responses[c];(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="Protocole Ethernet"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" \u00e0"+a.FilterProfileData+" paquet / s");1==a.ActionEventOnMatch&&(d+=", \u00c9v\u00e9nement sur match");var v=0;for(e in xxSystemDefenceFilters)a[e]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+
1115 +c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("Ajouter un filtre ...","AddDefenseFilter()")+AddButton("Ajouter une strat\u00e9gie ...","AddDefensePolicy()"));QH(54,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,
1116 5E3)))}}function StopDefenseStatsTimer(){null!=xxFilterStatisticsTimer&&(clearInterval(xxFilterStatisticsTimer),xxFilterStatisticsTimer=null);xxFilterStatisticsTimerActive=!1}
1117 function UpdateDefenseStats(b){if(b||1!=xxFilterStatisticsTimerActive)xxFilterStatisticsTimerActive=!0,b=b?b:0,xxSystemDefenceLinkedPolicy[b]?amtstack.AMT_SystemDefensePolicy_UpdateStatistics('<a:Address></a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+b+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",!1,UpdateDefenseStats2,b,0,{InstanceID:xxSystemDefenceLinkedPolicy[b].InstanceID}):
1117 -(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,g){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,g):StopDefenseStatsTimer()}
1118 -function UpdateDefenseStats3(b,c,a,d,g){b=0;if(200==d){xxFilterStatistics[g]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[g][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1118 +(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,e){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,e):StopDefenseStatsTimer()}
1119 +function UpdateDefenseStats3(b,c,a,d,e){b=0;if(200==d){xxFilterStatistics[e]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[e][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1120 function changeDefaultPolicy(b){if(!xxdialogMode){var c;c="<div style=height:26px;margin-top:4px><select id=policySelection style=float:right;width:266px><option value=-1>Aucun";for(var a in xxSystemDefense.AMT_SystemDefensePolicy.responses)c+="<option value="+a+(xxSystemDefenceLinkedPolicy[b]&&xxSystemDefense.AMT_SystemDefensePolicy.responses[a].InstanceID==xxSystemDefenceLinkedPolicy[b].InstanceID?" selected":"")+">"+xxSystemDefense.AMT_SystemDefensePolicy.responses[a].PolicyName;setDialogMode(11,
1121 "Politique de d\u00e9fense du syst\u00e8me par d\u00e9faut",3,changeDefaultPolicyOk,c+"</select><div style=padding-top:4px>Politique par d\u00e9faut</div></div>",b)}}
1122 function changeDefaultPolicyOk(b,c){var a=Q("policySelection").value,d=xxSystemDefenceLinkedPolicy[c];d&&amtstack.Delete("AMT_NetworkPortSystemDefensePolicy",'<w:SelectorSet><w:Selector Name="Antecedent"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">CIM_EthernetPort</w:Selector><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+c+
@@ -1128,117 +1129,136 @@ function AddDefenseFilter(){if(!xxdialogMode){var b;b="<div style=height:26px;ma
1129 b+="<div style=height:26px;margin-top:4px><select id=filterprofile style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=0>Autoriser, compter<option value=1>Drop, Count<option value=2>Limite de taux<option value=3>Autoriser<option value=4>Laissez tomber</select><div style=padding-top:4px>action</div></div>";b+="<div style=height:26px;margin-top:4px id=filterdatadiv><input id=filterdata style=float:right;width:260px maxlength=8 onkeyup=AddDefenseFilterUpdate()><div style=padding-top:4px>Paquets / seconde</div></div>";
1130 b+="<div style=height:26px;margin-top:4px><select id=filteraction style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=false>Ne fais rien<option value=1>\u00c9v\u00e9nement sur match</select><div style=padding-top:4px>Journal des \u00e9v\u00e9nements</div></div>";setDialogMode(11,"Ajouter un filtre de d\u00e9fense du syst\u00e8me",3,AddDefenseFilterOk,b);AddDefenseFilterUpdate()}}
1131 function AddDefenseFilterOk(){if(1>=Q("filtertype").value){var b=0==Q("filtertype").value?2048:2054,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrProtocolID8021:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value};2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_Hdr8021Filter",c,AddDefenseFilterOk2)}else{var b=2==Q("filtertype").value?
1131 -4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var g=a[d].indexOf("="),v=a[d].substring(0,g),g=a[d].substring(g+1),n=xxSystemDefenceFilters[v];n||(v="Hdr"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(g=g.split("."),4==g.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(g[0]),
1132 -parseInt(g[1]),parseInt(g[2]),parseInt(g[3]))))):c[v]=g)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c54",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1132 +4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var e=a[d].indexOf("="),v=a[d].substring(0,e),e=a[d].substring(e+1),n=xxSystemDefenceFilters[v];n||(v="Hdr"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(e=e.split("."),4==e.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(e[0]),
1133 +parseInt(e[1]),parseInt(e[2]),parseInt(e[3]))))):c[v]=e)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c106",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1134 function AddDefenseFilterOk2(b,c,a,d){200!=d?messagebox("Ajouter un filtre de d\u00e9fense du syst\u00e8me","Impossible d'ajouter le filtre, erreur #"+d):PullSystemDefense()}
1134 -function showFilterDetails(b,c){if(!xxdialogMode){var a,d,g,v;0==b?(v="AMT_Hdr8021Filter",g="Trafic Ethernet",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="Protocole Ethernet"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",g="Trafic IP",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="Tous les protocoles IP"+d.HdrIPVersion));var n;n=""+addHtmlValue("Nom",EscapeHtml(d.Name));n+=addHtmlValue("Type",g);n+=addHtmlValue("Trafic correspondant",
1135 -a);n+=addHtmlValue("Direction",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,g=d[l],b=xxSystemDefenceFilters[l],2==b&&4==g.length&&(g=hex2rstr(g),g=g.charCodeAt(0)+"."+g.charCodeAt(1)+"."+g.charCodeAt(2)+"."+g.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("Filtre"+a,g));n+=addHtmlValue("\u00c9v\u00e9nement sur match",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,"Filtre Ethernet #"+d.InstanceID,
1135 +function showFilterDetails(b,c){if(!xxdialogMode){var a,d,e,v;0==b?(v="AMT_Hdr8021Filter",e="Trafic Ethernet",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="Protocole Ethernet"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",e="Trafic IP",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="Tous les protocoles IP"+d.HdrIPVersion));var n;n=""+addHtmlValue("Nom",EscapeHtml(d.Name));n+=addHtmlValue("Type",e);n+=addHtmlValue("Trafic correspondant",
1136 +a);n+=addHtmlValue("Direction",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,e=d[l],b=xxSystemDefenceFilters[l],2==b&&4==e.length&&(e=hex2rstr(e),e=e.charCodeAt(0)+"."+e.charCodeAt(1)+"."+e.charCodeAt(2)+"."+e.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("Filtre"+a,e));n+=addHtmlValue("\u00c9v\u00e9nement sur match",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,"Filtre Ethernet #"+d.InstanceID,
1137 5,showFilterDetailsOk,n,[v,d])}}function showFilterDetailsOk(b,c){2==b&&amtstack.Delete(c[0],c[1],deleteDefenseFilter)}function deleteDefenseFilter(b,c,a,d){200!=d?messagebox("Supprimer le filtre","Impossible de supprimer le filtre, assurez-vous qu'il n'est pas utilis\u00e9."):PullSystemDefense()}var xxAddDefensePolicyFilters;
1138 function AddDefensePolicy(){if(!xxdialogMode){xxAddDefensePolicyFilters=[];var b;b='<div style=height:26px;margin-top:4px><input id=policyname title="<policy name>:<policy precedence number>" style=float:right;width:260px maxlength=16 onkeyup=AddDefensePolicyUpdate()><div style=padding-top:4px>Nom</div></div><div style=height:26px;margin-top:4px><select id=policytx title="Action par d\u00e9faut \u00e0 entreprendre pour le trafic sortant" style=float:right;width:133px><option value=0>Allow<option value=1>Laissez tomber<option value=2>Autoriser, compter<option value=3>Drop, Count<option value=4>Autoriser, compter, \u00e9v\u00e9nement<option value=5>Drop, Count, Event</select><select id=policyrx style=float:right;width:133px title="Action par d\u00e9faut \u00e0 entreprendre pour le trafic entrant"><option value=0>Autoriser<option value=1>Laissez tomber<option value=2>Autoriser, compter<option value=3>Drop, Count<option value=4>Autoriser, compter, \u00e9v\u00e9nement<option value=5>Drop, Count, Event</select><div style=padding-top:4px>TX / RX par d\u00e9faut</div></div>';b+=
1139 "<div id=policyFilters></div>";if(0<xxSystemDefense.AMT_Hdr8021Filter.responses.length||0<xxSystemDefense.AMT_IPHeadersFilter.responses.length){b+="<div style=height:26px;margin-top:4px><div style=float:right><select id=xfilter style=width:186px>";for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];b+="<option value="+a.InstanceID+">"+a.Name}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],
1140 b+="<option value="+a.InstanceID+">"+a.Name;b+="</select><input id=addFilterButton type=button value=Add style=width:80px onclick=addFilterButton()></div><div style=padding-top:4px>Ajouter un filtre</div></div>"}setDialogMode(11,"Ajouter une strat\u00e9gie de d\u00e9fense du syst\u00e8me",3,AddDefensePolicyOk,b);AddDefensePolicyUpdate()}}
1141 function addFilterButton(){0<=xxAddDefensePolicyFilters.indexOf(Q("xfilter").value)||(xxAddDefensePolicyFilters.push(Q("xfilter").value),AddDefensePolicyUpdate())}function removeFilterButton(b){xxAddDefensePolicyFilters.splice(b,1);AddDefensePolicyUpdate()}
1141 -function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c54",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>Cette politique ne contient aucun filtre.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Retirer","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+GetFilterById(xxAddDefensePolicyFilters[c]).Name+
1142 +function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c106",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>Cette politique ne contient aucun filtre.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Retirer","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+GetFilterById(xxAddDefensePolicyFilters[c]).Name+
1143 "</b></div></div>";QH("policyFilters",b)}}function GetFilterById(b){for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];if(a.InstanceID==b)return a}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)if(a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],a.InstanceID==b)return a}
1144 function AddDefensePolicyOk(){var b=Q("policytx").value,c=Q("policyrx").value,a=0,d=Q("policyname").value.split(":");2==d.length&&(a=parseInt(d[1]));b={"InstanceID ":0,PolicyName:d[0],PolicyPrecedence:a,TxDefaultCount:1<b,TxDefaultDrop:1==b%2,TxDefaultMatchEvent:3<b,RxDefaultCount:1<c,RxDefaultDrop:1==c%2,RxDefaultMatchEvent:3<c};0<xxAddDefensePolicyFilters.length&&(b.FilterCreationHandles=xxAddDefensePolicyFilters);amtstack.Create("AMT_SystemDefensePolicy",b,AddDefensePolicyOk2)}
1145 function AddDefensePolicyOk2(b,c,a,d){200!=d?messagebox("Ajouter une strat\u00e9gie de d\u00e9fense du syst\u00e8me","Impossible d'ajouter la strat\u00e9gie, erreur #"+d):PullSystemDefense()}
1146 function showPolicyDetails(b){if(!xxdialogMode){var c=xxSystemDefense.AMT_SystemDefensePolicy.responses[b],a;a=""+addHtmlValue("Nom",EscapeHtml(c.PolicyName));0!=c.PolicyPrecedence&&(a+=addHtmlValue("Priorit\u00e9",c.PolicyPrecedence));var d=1==c.TxDefaultDrop?"Laissez tomber":"Autoriser";1==c.TxDefaultCount&&(d+=", Compter");1==c.TxDefaultMatchEvent&&(d+=", Un \u00e9v\u00e9nement");a+=addHtmlValue("Action TX par d\u00e9faut",d);d=1==c.RxDefaultDrop?"Drop":"Allow";1==c.RxDefaultCount&&(d+=", Count");
1147 1==c.RxDefaultMatchEvent&&(d+=", Event");a+=addHtmlValue("Action RX par d\u00e9faut",d);if(c.FilterCreationHandles)for(b in c.FilterCreationHandles)a+=addHtmlValue("Filtre #"+(+b+1),GetFilterById(c.FilterCreationHandles[b]).Name);setDialogMode(11,format("Politique #",c.InstanceID.substring(20)),5,showPolicyDetailsOk,a,c)}}function showPolicyDetailsOk(b,c){2==b&&amtstack.Delete("AMT_SystemDefensePolicy",c,deleteDefensePolicy)}
1147 -function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("Supprimer la politique","Impossible de supprimer la strat\u00e9gie, assurez-vous qu'elle n'est pas utilis\u00e9e."):PullSystemDefense()}var xxWireless;function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService *AMT_BootCapabilities".split(" "),processWireless)}
1148 -function wifiRefresh(){xxdialogMode||PullWireless()}var xxWifiState={3:"d\u00e9sactiv\u00e9",32768:"Activ\u00e9 dans S0",32769:"Activ\u00e9 dans S0, Sx / AC"},xxRadioState={2:"Allum\u00e9, connect\u00e9",3:"De",6:"Activ\u00e9, d\u00e9connect\u00e9"},xxWifiAuthenticationMethod={1:"Autre",2:"Ouvert",3:"Cl\u00e9 partag\u00e9e",4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE"},xxWifiEncryptionMethod={1:"Autre",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"Aucun"};
1148 +function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("Supprimer la politique","Impossible de supprimer la strat\u00e9gie, assurez-vous qu'elle n'est pas utilis\u00e9e."):PullSystemDefense()}var xxWireless;function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService CIM_IEEE8021xSettings".split(" "),processWireless)}
1149 +function wifiRefresh(){xxdialogMode||PullWireless()}
1150 +var xxWifiState={3:"d\u00e9sactiv\u00e9",32768:"Activ\u00e9 dans S0",32769:"Activ\u00e9 dans S0, Sx / AC"},xxRadioState={2:"Allum\u00e9, connect\u00e9",3:"De",6:"Activ\u00e9, d\u00e9connect\u00e9"},xxWifiAuthenticationMethod={1:"Autre",2:"Ouvert",3:"Cl\u00e9 partag\u00e9e",4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE IEEE 802.1x",32769:"WPA3 OWE IEEE 802.1x"},xxWifiEncryptionMethod={1:"Autre",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"Aucun"};
1151 function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1150 -function showWirelessInfo(){if(xxWireless){var b,c,a="",d,g;if(xxWireless.CIM_WiFiPortCapabilities.response){g="<br><h2>Profils sans fil</h2>"+TableStart2();g+="<tr><td class=r2 style=padding-left:15px><br>Profils sans fil qu'Intel&reg; AMT utilisera pour la connectivit\u00e9 r\u00e9seau.<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b&&(g+="<div class=itemBar onclick=showWifiDetails("+
1151 -c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+" &nbsp; ",xxAccountAdminName&&(g+=AddButton2("Retirer",'wifiRemoveButton("'+c+'")')),g+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>",a++);0==a&&(g+="<i>Aucun profil sans fil pr\u00e9sent</i><br>");g+="<br><td class=r2>";g=xxAccountAdminName?g+TableEnd(AddButton("Nouveau profile","showWifiNewProfile()")):g+TableEnd("");
1152 -QH(20,g+"<br>")}}}function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"\u00c9tat sans fil",3,wifiStateDlg,b)}}
1152 +function showWirelessInfo(){if(xxWireless){var b,c,a="",d,e;if(xxWireless.CIM_WiFiPortCapabilities.response){e="<br><h2>Profils sans fil</h2>"+TableStart2();e+="<tr><td class=r2 style=padding-left:15px><br>Profils sans fil qu'Intel&reg; AMT utilisera pour la connectivit\u00e9 r\u00e9seau.<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)if(d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b){var v="",n=null,l="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");
1153 +if(xxWireless.CIM_IEEE8021xSettings.responses)for(var p in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[p].ElementName==d.ElementName&&(n=xxWireless.CIM_IEEE8021xSettings.responses[p]);n&&(v=", "+l[n.AuthenticationProtocol]);e+="<div class=itemBar onclick=showWifiDetails("+c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+v+" &nbsp; ";xxAccountAdminName&&
1154 +(e+=AddButton2("Retirer",'wifiRemoveButton("'+c+'")'));e+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>";a++}0==a&&(e+="<i>Aucun profil sans fil pr\u00e9sent</i><br>");e+="<br><td class=r2>";e=xxAccountAdminName?e+TableEnd(AddButton("Nouveau profile","showWifiNewProfile()")):e+TableEnd("");QH(20,e+"<br>")}}}
1155 +function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"\u00c9tat sans fil",3,wifiStateDlg,b)}}
1156 function wifiStateDlg(){amtstack.CIM_WiFiPort_RequestStateChange(document.querySelector("input[name=d11]:checked").value,null,function(){amtstack.Get("CIM_WiFiPort",function(b,c,a,d){200==d&&(xxWireless.CIM_WiFiPort.response=a.Body,showWirelessInfo())})})}
1157 function showWifiSyncDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d11 id=wl0 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">d\u00e9sactiv\u00e9</label><br>");b+="<label><input type=radio name=d11 id=wl0 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">Activ\u00e9e</label><br>";setDialogMode(11,"Local Profile Sync",3,showWifiSyncDlgEx,b)}}
1155 -function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,g){200==g&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1158 +function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,e){200==e&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1159 function showUefiWifiCoExDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d12 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Disabled</label><br>");b+="<label><input type=radio name=d12 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Enabled</label><br>";setDialogMode(11,"UEFI Wifi CoEx Profile Sharing",3,UefiWifiCoExDlg,b)}}
1157 -function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,g){200==g&&PullWireless()})}
1158 -function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("Nom de profil",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",b.SSID);c+=addHtmlValue("Authentification",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("Chiffrement",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("Priorit\u00e9",b.Priority);messagebox("Profil sans fil",c+"</div>")}}
1159 -function wifiRemoveButton(b){xxdialogMode||(QH(60,format('Supprimer le profil sans fil "{0}"?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"Profil sans fil",3,function(){removeWifiButtonEx(b)}))}function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1160 -function removeWifiEntryResponse(b,c,a,d,g){methodcheck(a)||amtstack.Enum("CIM_WiFiEndpointSettings",function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c,showWirelessInfo())})}
1161 -function showWifiNewProfile(){if(!xxdialogMode){var b="";for(i=1;256>i;i++){var c=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==i&&(c=0);c&&(b+="<option value="+i+">"+i)}QH("c24",b);QV("c26",13<amtversion);c25.value=6;c27.value=4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"Ajouter un profil sans fil",3,function(){addWifiProfile()});updateWifiDialog()}}
1162 -function addWifiProfile(){amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},{__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c27.value,SSID:c23.value,Priority:c24.value,
1163 -PSKPassPhrase:c28.value},null,null,null,removeWifiEntryResponse)}
1164 -function updateWifiDialog(){var b=!0,c=c25.value,a=c27.value;QV(66,4>c);QV(65,3<c);QV(64,3<c);QV(67,4>c);4>c&&(3==a||4==a)&&(c27.value=2);3<c&&(2==a||5==a)&&(c27.value=3);32768==c&&(c27.value=4);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);QE("c54",1==b&&0<c22.value.length&&0<c23.value.length&&7<c28.value.length&&
1165 -c28.value==c29.value)}function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1160 +function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,e){200==e&&PullWireless()})}
1161 +function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("Nom de profil",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",EscapeHtml(b.SSID));c+=addHtmlValue("Authentification",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("Chiffrement",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("Priorit\u00e9",b.Priority);var a=null,d="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");
1162 +if(xxWireless.CIM_IEEE8021xSettings.responses)for(var e in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[e].ElementName==b.ElementName&&(a=xxWireless.CIM_IEEE8021xSettings.responses[e]);a&&(c=c+'<div style="width:100%;border-bottom:1px solid #000;margin-bottom:5px;margin-top:5px">802.11x</div>'+addHtmlValue("Authentification",d[a.AuthenticationProtocol]),a.Domain&&(c+=addHtmlValue("Domain",EscapeHtml(a.Domain))),a.Username&&(c+=addHtmlValue("Nom d'utilisateur",
1163 +EscapeHtml(a.Username))));c+="</div>";messagebox("Profil sans fil",c)}}function wifiRemoveButton(b){xxdialogMode||(QH(61,format('Supprimer le profil sans fil "{0}"?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"Profil sans fil",3,function(){removeWifiButtonEx(b)}))}function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1164 +function removeWifiEntryResponse(b,c,a,d,e){methodcheck(a)||amtstack.BatchEnum("",["CIM_WiFiEndpointSettings","CIM_IEEE8021xSettings"],function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c.CIM_WiFiEndpointSettings.responses,xxWireless.CIM_IEEE8021xSettings.responses=c.CIM_IEEE8021xSettings.responses,showWirelessInfo())})}
1165 +function showWifiNewProfile(){if(!xxdialogMode){for(var b="",c=1;256>c;c++){var a=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==c&&(a=0);a&&(b+="<option value="+c+">"+c)}QH("c24",b);var b="<option value=-1>"+EscapeHtml("Aucun")+"</option>",a="<option value=-1>"+EscapeHtml("Aucun")+"</option>",c;for(c in xxCertificates)xxCertificates[c].TrustedRootCertficate?a+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+
1166 +"</option>":xxCertificates[c].XPrivateKey&&(b+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+"</option>");QH("c50",b);QH("c52",a);c="<option value=32769>WPA3 OWE IEEE 802.1x</option><option value=32768>WPA3 SAE IEEE 802.1x</option>";c+="<option value=7>WPA2 IEEE 802.1x</option>";c+="<option value=5>WPA IEEE 802.1x</option>";c+="<option value=6>WPA2 PSK</option>";c+="<option value=4>WPA PSK</option>";QH("c25",c);c25.value=6;c26.value=
1167 +4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"Ajouter un profil sans fil",3,function(){addWifiProfile()});updateWifiDialog()}}
1168 +function addWifiProfile(){var b,c,a,d={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c26.value,SSID:c23.value,Priority:c24.value};if(4==c25.value||6==c25.value)d.PSKPassPhrase=c28.value;if(5==c25.value||7==c25.value||32768==c25.value||
1169 +32769==c25.value)b={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_IEEE8021xSettings"),ElementName:"8021x-"+c22.value,InstanceID:"8021x-"+c22.value,ActiveInS0:1==Q("c54").value,AuthenticationProtocol:Q("c32").value},""!=Q("c44").value&&(b.RoamingIdentity=Q("c44").value),""!=Q("c34").value&&(b.ServerCertificateName=Q("c34").value,b.ServerCertificateNameComparison=Q("c36").value),
1170 +""!=Q("c40").value&&(b.Username=Q("c40").value),""!=Q("c42").value&&(b.Password=Q("c42").value),""!=Q("c38").value&&(b.Domain=Q("c38").value),3<Q("c32").value&&(b.ProtectedAccessCredential=Q("c46").value,b.PACPassword=Q("c48").value),0<=parseInt(Q("c50").value)&&(c='<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">'+
1171 +xxCertificates[parseInt(Q("c50").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>"),0<=parseInt(Q("c52").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">'+
1172 +xxCertificates[parseInt(Q("c52").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>");console.log("wifiepsettinginput",JSON.stringify(d,null,2));console.log("netAuthProfile",JSON.stringify(b,null,2));console.log("netAuthSettingsClientCert",c);console.log("netAuthSettingsServerCaCert",a);amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},d,b,c,a,removeWifiEntryResponse)}
1173 +function updateWifiDialog(){var b=!0,c=c25.value,a=c26.value;4>c&&(3==a||4==a)&&(c26.value=2);3<c&&(2==a||5==a)&&(c26.value=3);if(32768==c||32769==c)c26.value=4;QV("c27",4==c||6==c);QV("c30",5==c||7==c||32768==c||32769==c);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);0==c22.value.length&&0==c23.value.length&&(b=!1);4!=c&&6!=c||
1174 +!(8>c28.value.length||63<c28.value.length||c28.value!=c29.value)||(b=!1);QE("c106",b);updateNetAuthDialog()}function updateNetAuth2Dialog(){QV("c35",""!=Q("c33").value);QV("c45",3<Q("c32").value);QV("c47",3<Q("c32").value)}
1175 +function editNetAuthProfile(){if(!xxdialogMode){var b="<option value=-1>"+EscapeHtml("Aucun")+"</option>",c="<option value=-1>"+EscapeHtml("Aucun")+"</option>",a;for(a in xxCertificates)xxCertificates[a].TrustedRootCertficate?c+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>":xxCertificates[a].XPrivateKey&&(b+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>");QH("c98",b);QH("c100",c);b=amtsysstate.AMT_8021XProfile.responses.Body;
1176 +Q("c78").value=b.Enabled?1:0;Q("c102").value=b.ActiveInS0?1:0;Q("c104").value=b.PxeTimeout;if(b.Enabled){Q("c80").value=b.AuthenticationProtocol;Q("c92").value=b.RoamingIdentity?b.RoamingIdentity:"";Q("c82").value=b.ServerCertificateName?b.ServerCertificateName:"";Q("c84").value=b.ServerCertificateNameComparison?b.ServerCertificateNameComparison:0;Q("c88").value=b.Username?b.Username:
1177 +"";Q("c90").value=b.Password?b.Password:"";Q("c86").value=b.Domain?b.Domain:"";Q("c94").value=b.ProtectedAccessCredential?b.ProtectedAccessCredential:"";Q("c96").value=b.PACPassword?b.PACPassword:"";var d=c=-1;b.ServerCertificateIssuer&&(c=b.ServerCertificateIssuer.ReferenceParameters.SelectorSet.Selector.Value);b.ClientCertificate&&(d=b.ClientCertificate.ReferenceParameters.SelectorSet.Selector.Value);for(a in xxCertificates)xxCertificates[a].InstanceID==
1178 +c&&(Q("c100").value=a),xxCertificates[a].InstanceID==d&&(Q("c98").value=a)}setDialogMode(27,"802.1x Profile",3,function(){setNetAuthProfile()});updateNetAuthDialog()}}
1179 +function updateNetAuthDialog(){QV("c79",1==Q("c78").value);QV("c81",1==Q("c78").value);QV("c83",1==Q("c78").value&&""!=Q("c82").value);QV("c85",1==Q("c78").value);QV("c87",1==Q("c78").value);QV("c89",1==Q("c78").value);QV("c91",1==Q("c78").value);QV("c93",1==Q("c78").value&&
1180 +3<Q("c80").value);QV("c95",1==Q("c78").value&&3<Q("c80").value);QV("c97",1==Q("c78").value);QV("c99",1==Q("c78").value);QV("c101",1==Q("c78").value);QV("c103",1==Q("c78").value)}
1181 +function setNetAuthProfile(){var b=Clone(amtsysstate.AMT_8021XProfile.responses.Body);b.Enabled=1==Q("c78").value;b.Enabled&&(b.ActiveInS0=1==Q("c102").value,b.AuthenticationProtocol=Q("c80").value,""!=Q("c92").value?b.RoamingIdentity=Q("c92").value:delete b.RoamingIdentity,""!=Q("c82").value?(b.ServerCertificateName=Q("c82").value,b.ServerCertificateNameComparison=Q("c84").value):
1182 +(delete b.ServerCertificateName,delete b.ServerCertificateNameComparison),""!=Q("c88").value?b.Username=Q("c88").value:delete b.Username,""!=Q("c90").value?b.Password=Q("c90").value:delete b.Password,""!=Q("c86").value?b.Domain=Q("c86").value:delete b.Domain,3<Q("c80").value?(b.ProtectedAccessCredential=Q("c94").value,b.PACPassword=Q("c96").value):(delete b.ProtectedAccessCredential,delete b.PACPassword),
1183 +0<=parseInt(Q("c98").value)?b.ClientCertificate="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c98").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ClientCertificate,0<=parseInt(Q("c100").value)?b.ServerCertificateIssuer="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+
1184 +amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c100").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ServerCertificateIssuer,b.PxeTimeout=Q("c104").value);amtstack.Put("AMT_8021XProfile",b,setNetAuthProfileEx)}
1185 +function setNetAuthProfileEx(b,c,a,d){200==d?(amtsysstate.AMT_8021XProfile.responses.Body=amtsysstate.AMT_8021XProfile.response=a.Body,updateSystemStatus()):a.Header.WsmanError?messagebox("802.1x Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("802.1x Error","Error, Status = "+d)}
1186 +function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1187 var DMTFCPUStatus="Inconnue;Activ\u00e9e;D\u00e9sactiv\u00e9 par l'utilisateur;D\u00e9sactiv\u00e9 par le BIOS (erreur POST);Tourner au ralenti;Autre".split(";"),DMTFMemType="Inconnue;Autre;DRACHME;DRAM synchrone;Cache DRAM;EDO;EDRAM;VRAM;SRAM;RAM;ROM;\u00c9clat;EEPROM;FEPROM;EPROM;CDRAM;3DRAM;SDRAM;SGRAM;RDRAM;DDR;DDR-2;BRAM;FB-DIMM;DDR3;FBD2;DDR4;LPDDR;LPDDR2;LPDDR3;LPDDR4".split(";"),DMTFMemFormFactor=";Autre;Inconnue;SIMM;siroter;Puce;TREMPER;ZIP;Carte propri\u00e9taire;DIMM;TSOP;Rang\u00e9e de jetons;RIMM;SODIMM;SRIMM;FB-DIM".split(";"),
1188 DMTFProcFamilly={191:"Processeur Intel&reg; Core &trade; 2 Duo",192:"Processeur Intel&reg; Core &trade; 2 Solo",193:"Processeur Intel&reg; Core &trade; 2 Extreme",194:"Processeur Intel&reg; Core &trade; 2 Quad",195:"Processeur mobile Intel&reg; Core &trade; 2 Extreme",196:"Processeur mobile Intel&reg; Core &trade; 2 Duo",197:"Processeur mobile Intel&reg; Core &trade; 2 Solo",198:"Processeur Intel&reg; Core &trade; i7",199:"Processeur Intel&reg; Celeron&reg; double c\u0153ur"},HardwareInventory;
1168 -function processHardware(b,c,a,d){if(200==d){var g;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("Sauver...","SaveHardwareLog()")+" Les informations sur le mat\u00e9riel sont collect\u00e9es au d\u00e9marrage du syst\u00e8me.");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>Plate-forme</h2>"+
1189 +function processHardware(b,c,a,d){if(200==d){var e;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("Sauver...","SaveHardwareLog()")+" Les informations sur le mat\u00e9riel sont collect\u00e9es au d\u00e9marrage du syst\u00e8me.");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>Plate-forme</h2>"+
1190 FullTable({"Mod\u00e8le informatique":c.Model,Fabricant:c.Manufacturer,Version:c.Version,"Num\u00e9ro de s\u00e9rie":c.SerialNumber,"ID syst\u00e8me":guidToStr(a.CIM_SystemPackaging.responses[0].PlatformGUID).toLowerCase()},"");b+="<br><h2>Plinthe</h2>";b+=FullTable({Fabricant:d.Manufacturer,"Nom du produit":d.Model,Version:d.Version,"Num\u00e9ro de s\u00e9rie":d.SerialNumber,"\u00c9tiquette d'inventaire":d.Tag,"Rempla\u00e7able?":1==d.CanBeFRUed?"Yes":"No"},"");b+="<br><h2>BIOS</h2>";b+=FullTable({Vendeur:a.CIM_BIOSElement.response.Manufacturer,
1170 -Version:v,"Date de sortie":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",{timeZone:"UTC"})},"");b+="<br>";for(g in a.CIM_Processor.responses)c=a.CIM_Processor.responses[g],d=a.CIM_Chip.responses[g],b+="<h2>Processeur "+(parseInt(g)+1)+"</h2>",b+=FullTable({Fabricant:trademarks(d.Manufacturer),Famille:DMTFProcFamilly[c.Family],Version:trademarks(d.Version),"Vitesse de prise maximale":c.MaxClockSpeed+" MHz",Statut:DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(g in a.CIM_PhysicalMemory.responses)c=
1171 -a.CIM_PhysicalMemory.responses[g],b+="<h2>Module de m\u00e9moire "+(+g+1)+"</h2>",b+=FullTable({"\u00c9tiquette de banque":c.BankLabel,Fabricant:c.Manufacturer,"Num\u00e9ro de s\u00e9rie":c.SerialNumber,Taille:parseInt(c.Capacity/1048576)+" MB","Facteur de forme":DMTFMemFormFactor[c.FormFactor],Type:DMTFMemType[c.MemoryType],"\u00c9tiquette d'inventaire":c.Tag,"Num\u00e9ro d'article":c.PartNumber},"");b+="<br>";for(g in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[g],d=a.CIM_PhysicalPackage.responses[+g+
1172 -1],b+="<h2>Supports de stockage "+(parseInt(g)+1)+"</h2>",b+=FullTable({"Mod\u00e8le":d.Model,"Num\u00e9ro de s\u00e9rie":""==d.SerialNumber?"Unknown":d.SerialNumber,Taille:parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" MB"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(g in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[g].PackageType&&(c=a.CIM_PhysicalPackage.responses[g]);null!=c&&(b+="<h2>Battery</h2>",g=(new Date(c.ManufactureDate.Datetime)).toDateString(),
1173 -a={"Device name":a.CIM_Battery.response.DeviceID,Fabricant:c.Manufacturer,"Manufacture date":g,"Num\u00e9ro de s\u00e9rie":c.SerialNumber,Type:"Autre;Inconnue;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],"Design capacity":a.CIM_Battery.response.DesignCapacity+" mWatt-hours","Design voltage":a.CIM_Battery.response.DesignVoltage+" mVolts"},c.OtherIdentifyingInfo&&(a["Other Info"]=c.OtherIdentifyingInfo),b+=FullTable(a,
1191 +Version:v,"Date de sortie":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",{timeZone:"UTC"})},"");b+="<br>";for(e in a.CIM_Processor.responses)c=a.CIM_Processor.responses[e],d=a.CIM_Chip.responses[e],b+="<h2>Processeur "+(parseInt(e)+1)+"</h2>",b+=FullTable({Fabricant:trademarks(d.Manufacturer),Famille:DMTFProcFamilly[c.Family],Version:trademarks(d.Version),"Vitesse de prise maximale":c.MaxClockSpeed+" MHz",Statut:DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(e in a.CIM_PhysicalMemory.responses)c=
1192 +a.CIM_PhysicalMemory.responses[e],b+="<h2>Module de m\u00e9moire "+(+e+1)+"</h2>",b+=FullTable({"\u00c9tiquette de banque":c.BankLabel,Fabricant:c.Manufacturer,"Num\u00e9ro de s\u00e9rie":c.SerialNumber,Taille:parseInt(c.Capacity/1048576)+" MB","Facteur de forme":DMTFMemFormFactor[c.FormFactor],Type:DMTFMemType[c.MemoryType],"\u00c9tiquette d'inventaire":c.Tag,"Num\u00e9ro d'article":c.PartNumber},"");b+="<br>";for(e in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[e],d=a.CIM_PhysicalPackage.responses[+e+
1193 +1],b+="<h2>Supports de stockage "+(parseInt(e)+1)+"</h2>",b+=FullTable({"Mod\u00e8le":d.Model,"Num\u00e9ro de s\u00e9rie":""==d.SerialNumber?"Unknown":d.SerialNumber,Taille:parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" MB"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(e in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[e].PackageType&&(c=a.CIM_PhysicalPackage.responses[e]);null!=c&&(b+="<h2>Battery</h2>",e=(new Date(c.ManufactureDate.Datetime)).toDateString(),
1194 +a={"Device name":a.CIM_Battery.response.DeviceID,Fabricant:c.Manufacturer,"Manufacture date":e,"Num\u00e9ro de s\u00e9rie":c.SerialNumber,Type:"Autre;Inconnue;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],"Design capacity":a.CIM_Battery.response.DesignCapacity+" mWatt-hours","Design voltage":a.CIM_Battery.response.DesignVoltage+" mVolts"},c.OtherIdentifyingInfo&&(a["Other Info"]=c.OtherIdentifyingInfo),b+=FullTable(a,
1195 ""))}b+="<br>";QH(16,b);updateSystemStatus()}}function SaveHardwareLog(){!xxdialogMode&&HardwareInventory&&SaveJsonFile("IntelAmtHardware","hardware","Informations sur le mat\u00e9riel Intel AMT",HardwareInventory)}var AmtSystemPowerSchemes=null;function PullPowerPolicy(){amtstack.Enum("AMT_SystemPowerScheme",powerPolicyResponse)}function powerPolicyResponse(b,c,a,d){AmtSystemPowerSchemes=a;updateSystemStatus()}
1196 function showPowerPolicyDlg(b){if(!xxdialogMode){for(var c="",a=0;a<AmtSystemPowerSchemes.length;a++)c+='<input type=radio name=powerpolicy value="'+AmtSystemPowerSchemes[a].InstanceID+'" '+(AmtSystemPowerSchemes[a].SchemeGUID==b?" checked":"")+">"+AmtSystemPowerSchemes[a].Description+"<br>";setDialogMode(11,"Politique d'alimentation Intel&reg; AMT",3,showPowerPolicyDlgOk,c)}}
1197 function showPowerPolicyDlgOk(){for(var b=null,c=0,a=document.getElementsByTagName("input");c<a.length;c++)"powerpolicy"==a[c].name&&a[c].checked&&(b=a[c].value);amtstack.AMT_SystemPowerScheme_SetPowerScheme(showPowerPolicyDlgOkDone,b)}function showPowerPolicyDlgOkDone(b,c,a,d){200==d&&PullSystemStatus()}var xxAccountAdminName,xxAccountRealmInfo,xxAccountEnabledInfo={},xxAccountFetch,showHiddenAccounts=!1;
1198 function PullUserInfo(){xxAccountFetch=1;delete xxAccountAdminName;xxAccountRealmInfo={};amtstack.AMT_AuthorizationService_GetAdminAclEntry(getAdminAclEntryResponse);amtstack.AMT_AuthorizationService_EnumerateUserAclEntries(1,enumerateUserAclEntriesResponse)}function getAdminAclEntryResponse(b,c,a,d){200==d&&(xxAccountRealmInfo[-1]={AccessPermission:999,DigestUsername:a.Body.Username,Realms:null},xxAccountAdminName=a.Body.Username,updateAccounts())}
1178 -function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var g in a.Body.Handles)b=a.Body.Handles[g],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1179 -function getUserAclEntryExResponse(b,c,a,d,g){xxAccountFetch--;200==d&&(a.Body.Handle=g,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[g]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,g){200==d&&(xxAccountEnabledInfo[g]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,g){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(g,getAclEnabledStateResponse,g))}
1180 -function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez les comptes d'utilisateurs Intel&reg; AMT pour cet ordinateur.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,g=!1,v=0;a.DigestUsername?(d=a.DigestUsername,g="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!g){var n="";if(999!=
1181 -a.AccessPermission){2==v&&(n+="D\u00e9sactiv\u00e9,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Royaumes[c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="Auditeur,");n=0<=a.Realms.indexOf(3)?n+"Administrateur":1==l?n+"1 royaume":n+(l+" royaumes")}else n+="Administrateur",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!g&&xxAccountAdminName&&
1199 +function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var e in a.Body.Handles)b=a.Body.Handles[e],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1200 +function getUserAclEntryExResponse(b,c,a,d,e){xxAccountFetch--;200==d&&(a.Body.Handle=e,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[e]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,e){200==d&&(xxAccountEnabledInfo[e]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,e){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(e,getAclEnabledStateResponse,e))}
1201 +function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez les comptes d'utilisateurs Intel&reg; AMT pour cet ordinateur.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,e=!1,v=0;a.DigestUsername?(d=a.DigestUsername,e="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!e){var n="";if(999!=
1202 +a.AccessPermission){2==v&&(n+="D\u00e9sactiv\u00e9,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Royaumes[c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="Auditeur,");n=0<=a.Realms.indexOf(3)?n+"Administrateur":1==l?n+"1 royaume":n+(l+" royaumes")}else n+="Administrateur",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!e&&xxAccountAdminName&&
1203 (b+=" "+AddButton2("\u00c9diter...","changeAccountButton(event,"+a.Handle+")"));b+='</div><div style=padding-top:3px;width:330px;float:left;overflow-x:hidden title="'+d+'"><b>'+d+"</b></div><div style=padding-top:3px>"+n+"</div></div>"}}c='<div style=float:right;margin-right:8px><a title="Basculer les comptes cach\u00e9s" style=color:gray;cursor:pointer onclick=toggleAccountButton()>'+(showHiddenAccounts?"&#x25B2;":"&#x25BC;")+"</a></div><div>&nbsp;"+AddRefreshButton("xxAccountFetch=999;PullUserInfo()");
1183 -xxAccountAdminName&&(c+=AddButton("Nouveau compte","newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1204 +xxAccountAdminName&&(c+=AddButton("Nouveau compte","newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(22,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1205 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"Modifier le compte",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1206 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"Nouveau compte",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1186 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,g=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Erreur de compte","Param\u00e8tres invalides");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1187 -l,n,g,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,g,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}
1188 -function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Administrateur</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1189 -function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["Local seulement","R\u00e9seau uniquement","Tout (local et r\u00e9seau)"];
1190 -function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,g=c.DigestUsername;g||(g=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("Nom",g);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("Etat",1==xxAccountEnabledInfo[b].Enabled?"Activ\u00e9e":"d\u00e9sactiv\u00e9"));if(g==xxAccountAdminName)a+=addHtmlValue("Autorisation","Administrateur");else{var a=a+addHtmlValue("Autorisation",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v=
1191 -"Administrateur",0<=c.Realms.indexOf(20)&&(v+=", Auditeur");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="Aucun");a+=addHtmlValue("Royaumes","")+"<b>"+v+"</b>"}messagebox("Compte"+g,a+"</div>")}}
1192 -function wsmanQuery(){QH(24,"");var b=getSelectedOptions(Q(22)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(23,!1),c&&0<c.length&&amtstack.BatchEnum("Navigateur",c,browserResponse,null,!0))}
1193 -function browserResponse(b,c,a,d){QE(23,!0);b="";for(var g in a)c=a[g],b+="<h2>"+g+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(Vide)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>Erreur #"+c.status+"</div>"),b+="</div><br>";QH(24,b)}
1207 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Erreur de compte","Param\u00e8tres invalides");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1208 +l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1209 +function updateRealms(b){QV(62,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Administrateur</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(63,c)}}
1210 +function updateAccountDialog(){var b=!0;if("none"!=Q(62).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c106",b)}var xxUserPermissions=["Local seulement","R\u00e9seau uniquement","Tout (local et r\u00e9seau)"];
1211 +function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,e=c.DigestUsername;e||(e=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("Nom",e);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("Etat",1==xxAccountEnabledInfo[b].Enabled?"Activ\u00e9e":"d\u00e9sactiv\u00e9"));if(e==xxAccountAdminName)a+=addHtmlValue("Autorisation","Administrateur");else{var a=a+addHtmlValue("Autorisation",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v=
1212 +"Administrateur",0<=c.Realms.indexOf(20)&&(v+=", Auditeur");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="Aucun");a+=addHtmlValue("Royaumes","")+"<b>"+v+"</b>"}messagebox("Compte"+e,a+"</div>")}}
1213 +function wsmanQuery(){QH(25,"");var b=getSelectedOptions(Q(23)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(24,!1),c&&0<c.length&&amtstack.BatchEnum("Navigateur",c,browserResponse,null,!0))}
1214 +function browserResponse(b,c,a,d){QE(24,!0);b="";for(var e in a)c=a[e],b+="<h2>"+e+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(Vide)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>Erreur #"+c.status+"</div>"),b+="</div><br>";QH(25,b)}
1215 function wsmanFilter(){var b=c0.value.toLowerCase(),c;for(c in AllWsman)QV("WSB-"+AllWsman[c],""==b||0<=AllWsman[c].toLowerCase().indexOf(b))}function connectTerminal(){terminal&&(0==terminal.State?(terminal.tlsv1only=amtstack.wsman.comm.tlsv1only,terminal.Start(currentMeshNode._id,16994,"*","*",0)):terminal.Stop())}
1195 -function onTerminalStateChange(b,c){c4.value=0==c?"Relier":"D\u00e9connecter";Q(29).textContent=StatusStrs[c];QE(34,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection of not supported.");
1196 -break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(31).value="100x30",terminal.m.Init(100,30)):(Q(31).value="80x25",terminal.m.Init(80,25))}
1197 -var terminalEmulations=["Terminal UTF8","ASCII \u00e9tendu","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(33).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(32).value=["Intel (F10 = ESC + [OM)","Alternatif (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1198 -function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(30).value="LF",terminal.m.lineFeed="\n"):(Q(30).value="CR + LF",terminal.m.lineFeed="\r\n")}
1216 +function onTerminalStateChange(b,c){c4.value=0==c?"Relier":"D\u00e9connecter";Q(30).textContent=StatusStrs[c];QE(35,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection is not supported.");
1217 +break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(32).value="100x30",terminal.m.Init(100,30)):(Q(32).value="80x25",terminal.m.Init(80,25))}
1218 +var terminalEmulations=["Terminal UTF8","ASCII \u00e9tendu","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(34).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(33).value=["Intel (F10 = ESC + [OM)","Alternatif (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1219 +function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(31).value="LF",terminal.m.lineFeed="\n"):(Q(31).value="CR + LF",terminal.m.lineFeed="\r\n")}
1220 function terminalCaptureToggle(b){if(!xxdialogMode)if(void 0==terminal.m.capture)terminal.m.capture="",c3.value="Arr\u00eater la capture";else{if(0<terminal.m.capture.length){b="TerminalCapture";var c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);saveAs(data2blob(terminal.m.capture),
1221 b+".txt")}delete terminal.m.capture;c3.value="Commencer la capture"}}function terminal_FileSelectHandler(b){haltEvent(b);if(3==terminal.State&&null!=b.dataTransfer&&1==b.dataTransfer.files.length){var c=new FileReader;c.onload=terminal_onSetupBinRead;c.readAsText(b.dataTransfer.files[0])}}function terminal_onSetupBinRead(b){d3pastetextarea.value=b.target.result;setDialogMode(3,"P\u00e2te",3,termPaste)}var desktopScreenInfo=null,desktopPollTimer=null,webRtcDesktop=null;
1222 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1223 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1203 -function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1204 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1224 +function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&(null==amtsysstate||null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&null!=amtsysstate.IPS_OptInService.response&&0!=amtsysstate.IPS_OptInService.response.OptInRequired)?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&
1225 +null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1226 0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1227 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1228 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1229 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
1230 "\r\n"},webRtcDesktop.webrtc.oniceconnectionstatechange=function(){null==webRtcDesktop||null==webRtcDesktop.webrtc||"disconnected"!=webRtcDesktop.webrtc.iceConnectionState&&"failed"!=webRtcDesktop.webrtc.iceConnectionState||webRtcDesktopReset()},webRtcDesktop.webrtc.createOffer(function(a){webRtcDesktop.webrtcoffer=a;webRtcDesktop.webrtc.setLocalDescription(a,function(){},webRtcDesktopReset)},webRtcDesktopReset,{mandatory:{OfferToReceiveAudio:!1,OfferToReceiveVideo:!1}})):"answer"==a.action&&null!=
1210 -webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=
1211 -setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(42).innerHTML="")}
1231 +webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.m.ReverseMouseWheel=desktopsettings.reverseMouseWheel,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),
1232 +PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(43).innerHTML="")}
1233 function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(desktopScreenInfo=a.IPS_ScreenSettingData.responses.Body,desktopScreenInfo.KVMRSD=a.IPS_KVMRedirectionSettingData.responses.Body,UpdateDesktopDisplayInfo())}
1213 -function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1234 +function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(43).innerHTML=b+"&nbsp;":Q(43).innerHTML=""}
1235 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1215 -function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Relier":"D\u00e9connecter";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Bureau \u00e0 distance","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Bureau \u00e0 distance","The device indicated that this type of connection of not supported."):
1216 -5E4==b.disconnectCode?messagebox("Bureau \u00e0 distance","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("Bureau \u00e0 distance","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
1217 -break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1218 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Param\u00e8tres du bureau \u00e0 distance",3,showDesktopSettingsChanged))}
1219 -function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1220 -1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1221 -function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1222 -15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1236 +function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Relier":"D\u00e9connecter";var d=3==c&&!urlvars.kvmviewonly;QE(44,d);QE("deskkeys",d);QE("DeskWD",d);QE(45,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Bureau \u00e0 distance","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Bureau \u00e0 distance","The device indicated that this type of connection is not supported."):
1237 +5E4==b.disconnectCode?messagebox("Bureau \u00e0 distance","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?a=null!=b.connectTime&&b.connectTime+5E3<Date.now():50002==b.disconnectCode&&messagebox("Bureau \u00e0 distance","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;
1238 +case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1239 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(41).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Param\u00e8tres du bureau \u00e0 distance",3,showDesktopSettingsChanged))}
1240 +function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.reverseMouseWheel=d7kvmrmw.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();
1241 +desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1242 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;d7kvmrmw.checked=desktopsettings.reverseMouseWheel;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",
1243 +12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1244 c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1224 -QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1225 -function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1226 -"8px"),center()))}
1227 -function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"Entr\u00e9e clavier \u00e0 distance",3,showDeskTypeEx,"<div>Saisissez le texte et cliquez sur OK pour le taper \u00e0 distance \u00e0 l'aide d'un clavier anglais am\u00e9ricain. Assurez-vous de placer le curseur distant \u00e0 la bonne position avant de continuer.<div><textarea id=d2typeText style=\"margin-top:5px;width:100%;height:184px;resize:none\" maxlength=2000></textarea>"),Q("d2typeText").focus())}
1245 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(44,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1246 +function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1!=urlvars.kvmonly&&disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(36,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding="8px"),center()))}
1247 +function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(45).blur(),setDialogMode(11,"Entr\u00e9e clavier \u00e0 distance",3,showDeskTypeEx,"<div>Saisissez le texte et cliquez sur OK pour le taper \u00e0 distance \u00e0 l'aide d'un clavier anglais am\u00e9ricain. Assurez-vous de placer le curseur distant \u00e0 la bonne position avant de continuer.<div><textarea id=d2typeText style=\"margin-top:5px;width:100%;height:184px;resize:none\" maxlength=2000></textarea>"),Q("d2typeText").focus())}
1248 var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
1229 -function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(48).checked||desktop.m.sendcad()}
1249 +function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(49).checked||desktop.m.sendcad()}
1250 var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511,0]],2:[[65511,1],[65362,1],[65362,0],[65511,0]],3:[[65511,1],[108,1],[108,0],[65511,0]],4:[[65511,1],[109,1],[109,0],[65511,0]],5:[[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]],6:[[65470,1],[65470,0]],7:[[65471,1],[65471,0]],8:[[65472,1],[65472,0]],9:[[65473,1],[65473,0]],10:[[65474,1],[65474,0]],11:[[65475,1],[65475,0]],12:[[65476,1],[65476,0]],13:[[65477,1],[65477,0]],14:[[65478,1],[65478,0]],15:[[65479,
1231 -1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]]};
1232 -function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1251 +1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]],25:[[65293,1],[65293,0]]};
1252 +function deskSendKeys(){if(!Q(49).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1253 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1234 -function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1235 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1254 +function dmousedown(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1255 +function dmousemove(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1256 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1257 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1258 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1239 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Racine</a>",g=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in g)""!=g[v]&&p24filetreelocation.push(g[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var g=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1240 -70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),e="";null!=l.d&&(e=new Date(l.d),e=e.getMonth()+1+"/"+e.getDate()+"/"+e.getFullYear()+" "+e.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1241 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(g+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+e+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1259 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Racine</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,r;r=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1260 +70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1261 +encodeURIComponent(l.nx)+'")>'+r+"</a></span></div>":(w=r,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+r+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1262 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1263 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1264 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1248,8 +1268,8 @@ function p24setActions(){if(null==p24filetree)QE("p24DeleteFileButton",!1),QE("p
1268 function p24createfolder(){setDialogMode(11,"Nouveau dossier",3,p24createfolderEx,"<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% />");focusTextBox("p24renameinput");p24fileNameCheck()}function p24createfolderEx(){p24files.sendCtrlMsg(JSON.stringify({action:"mkdir",reqid:1,path:p24filetreelocation.join("/")+"/"+Q("p24renameinput").value}));p24folderup(999)}
1269 function p24deletefile(){var b=p24getFileSelCount();setDialogMode(11,"Supprimer",3,p24deletefileEx,1<b?"Delete "+b+" selected items?":"Delete selected item?")}function p24deletefileEx(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);p24files.sendCtrlMsg(JSON.stringify({action:"rm",reqid:1,path:p24filetreelocation.join("/"),delfiles:b}));p24folderup(999)}
1270 function p24renamefile(){for(var b,c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&(b=p24filetree.dir[c[a].value].n);setDialogMode(11,"Renommer",3,p24renamefileEx,'<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% value="'+b+'" />',{action:"rename",path:p24filetreelocation.join("/"),oldname:b});focusTextBox("p24renameinput");p24fileNameCheck()}
1251 -function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c54",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1252 -function p24uploadFile(){setDialogMode(11,"T\u00e9l\u00e9verser un fichier",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c54",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1271 +function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c106",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1272 +function p24uploadFile(){setDialogMode(11,"T\u00e9l\u00e9verser un fichier",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c106",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1273 function p24copyFile(b){var c=document.getElementsByName("fd");p24clipboard=[];p24clipboardCut=b;p24clipboardFolder=p24targetpath;for(b=0;b<c.length;b++)c[b].checked&&"3"==c[b].attributes.file.value&&p24clipboard.push(p24filetree.dir[c[b].value].n);p24updateClipview()}
1274 function p24pasteFile(){var b="";null!=p24clipboard&&0<p24clipboard.length&&(b="Confim "+(0==p24clipboardCut?"copy":"move")+" of "+p24clipboard.length+" entrie"+(1<p24clipboard.length?"s":"")+" to this location?");setDialogMode(11,"P\u00e2te",3,p24pasteFileEx,b)}
1275 function p24pasteFileEx(){p24files.sendCtrlMsg(JSON.stringify({action:0==p24clipboardCut?"copy":"move",reqid:1,scpath:p24clipboardFolder,dspath:p24targetpath,names:p24clipboard}));p24folderup(999);1==p24clipboardCut&&(p24clipboardFolder=p24clipboard=null,p24clipboardCut=0,p24updateClipview())}
@@ -1273,36 +1293,36 @@ function iderStart2(){if(1!=Q("floppyImageInput").files.length&&1!=Q("cdromImage
1293 function iderStart3(b,c,a){iderStop();ider=CreateAmtRedirect(CreateAmtRemoteIder());ider.onStateChanged=onIderStateChange;ider.m.floppy=b;ider.m.cdrom=c;ider.m.iderStart=a;ider.m.sectorStats=iderSectorStats;ider.tlsv1only=amtstack.wsman.comm.tlsv1only;ider.Start(currentMeshNode._id,16994,"*","*",0);QV("IDERDiskMapButton",!0)}
1294 function iderStop(){ider&&(ider.m.Stop(),ider.onStateChanged=null,ider.m.onDialogPrompt=null,delete ider);iderTimer&&(clearInterval(iderTimer),delete iderTimer);iderToggleDiskMap(!1)}function onIderStateChange(b,c){QE("c2",3!=c);QE("c8",3!=c);QE("c1",3!=c);QE("c7",3!=c);QV(9,3==c);center();3==c?(urlvars.norefresh||(iderTimer=setInterval(onIderTimer,500)),onIderTimer()):iderTimer&&(clearInterval(iderTimer),delete iderTimer)}
1295 function onIderTimer(){ider.m.Update&&ider.m.Update();-1==ider.m.bytesFromAmt?iderStop():QH(10,"<b>"+(ider.m.server?"Serveur":"")+"Session IDE-R </b>, Connect\u00e9,"+ider.m.bytesFromAmt+" dans,"+ider.m.bytesToAmt+" en dehors.")}var heatMapWidth=600,heatMapDividor={};
1276 -function iderSectorStats(b,c,a,d,g){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </b>, les blocs font {0} octets.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> Disquette </b>, les blocs font {0} octets.",512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;g/=c;if(0==b)v.height=
1277 -6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+g;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1296 +function iderSectorStats(b,c,a,d,e){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </b>, les blocs font {0} octets.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> Disquette </b>, les blocs font {0} octets.",512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;e/=c;if(0==b)v.height=
1297 +6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+e;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1298 function iderToggleDiskMap(b){var c="none"!=QS("iderHeatmap").display;null==b&&(b=!c);xxdialogMode&&(b=!1);QS("iderHeatmap").display=b?"":"none"}function onIderDialogPrompt(b,c,a){iderCodeBlock&&(document.body.removeChild(iderCodeBlock),delete iderCodeBlock);c.js&&(b=document.createElement("script"),b.text=c.js,iderCodeBlock=document.body.appendChild(b));setDialogMode(11,"Redirection de stockage",a?a:3,onIderDialogPromptOk,c.html)}
1299 function onIderDialogPromptOk(b){1==b?window.iderServerCall?ider.m.dialogPrompt(window.iderServerCall()):ider.m.dialogPrompt():iderStop()}function iderServerStart(){xxdialogMode||(iderStop(),ider=CreateAmtRemoteServerIder(),null!=ider&&(ider.onStateChanged=onIderStateChange,ider.m.sectorStats=iderSectorStats,ider.m.onDialogPrompt=onIderDialogPrompt,ider.tlsv1only=amtstack.wsman.comm.tlsv1only,ider.Start(currentMeshNode._id,16994,"*","*",0)))}
1300 var xxRemoteAccess=null,xxEnvironementDetection=null,xxCiraServers=null,xxUserInitiatedCira=null,xxUserInitiatedEnabledState={32768:"d\u00e9sactiv\u00e9",32769:"BIOS activ\u00e9",32770:"Activation du syst\u00e8me d'exploitation",32771:"BIOS et OS activ\u00e9s"},xxRemoteAccessCredentiaLinks=null,xxMPSUserPass=null,xxPolicies=null;
1301 function PullRemoteAccess(){var b="*AMT_EnvironmentDetectionSettingData AMT_ManagementPresenceRemoteSAP AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule *AMT_UserInitiatedConnectionService AMT_MPSUsernamePassword".split(" ");11<amtversion&&b.push("*IPS_HTTPProxyService","IPS_HTTPProxyAccessPoint");amtstack.BatchEnum(null,b,processRemote1)}
1282 -function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var g in a)200!=a[g].status&&(d=a[g].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1283 -MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(g in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[g],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1302 +function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var e in a)200!=a[e].status&&(d=a[e].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1303 +MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(e in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[e],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1304 "@Name","Name").Value)),b.MpsType=c.MpsType,c=getItem(c.PolicySet.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyRuleName").Value.split(" ")[0],xxPolicies[c].push(b);updateRemoteAccess()}}
1305 function updateRemoteAccess(){if(null!=xxEnvironementDetection){var b,c="d\u00e9sactiv\u00e9",a=xxRemoteAccess.IPS_HTTPProxyService&&xxRemoteAccess.IPS_HTTPProxyAccessPoint;xxEnvironementDetection.DetectionStrings&&0<xxEnvironementDetection.DetectionStrings.length&&(c="Activ\u00e9e,"+xxEnvironementDetection.DetectionStrings.length+" "+(1<xxEnvironementDetection.DetectionStrings.length?"domains":"domain"));b=""+TableStart();b+=TableEntry("D\u00e9tection d'environnement",addLink(c,"editEnvironmentDetection()"));
1306 b+=TableEntry("Options d'initiation de l'utilisateur",addLinkConditional(xxUserInitiatedEnabledState[xxUserInitiatedCira.EnabledState],"editUserInitiatedCira()",xxAccountAdminName));c="<i>Aucun</i>";if(0<xxPolicies.User.length){var c="",d;for(d in xxPolicies.User)0<c.length&&(c+=", "),c+=xxPolicies.User[d].AccessInfo,1==xxPolicies.User[d].MpsType&&(c+=" (CILA)")}b+=TableEntry("Connexion initi\u00e9e par l'utilisateur",addLinkConditional(c,'editMpsPolicy("User")',xxAccountAdminName));c="<i>Aucun</i>";
1287 -if(0<xxPolicies.Alert.length)for(d in c="",xxPolicies.Alert)0<c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("Connexion lanc\u00e9e par l'alerte",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>Aucun</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var g=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,
1288 -"PolicyRuleName","P\u00e9riodique");if(g){var v=atob(g.ExtendedData);0==ReadInt(v,0)&&(c+=format(", chaque {0} seconde",ReadInt(v,4)));1==ReadInt(v,0)&&(g=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+g+":"+v+" daily")}b+=TableEntry("Connexion p\u00e9riodique",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez les serveurs de gestion \u00e0 distance Intel&reg; AMT.<br><br>";
1307 +if(0<xxPolicies.Alert.length)for(d in c="",xxPolicies.Alert)0<c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("Connexion lanc\u00e9e par l'alerte",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>Aucun</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var e=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,
1308 +"PolicyRuleName","P\u00e9riodique");if(e){var v=atob(e.ExtendedData);0==ReadInt(v,0)&&(c+=format(", chaque {0} seconde",ReadInt(v,4)));1==ReadInt(v,0)&&(e=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+e+":"+v+" daily")}b+=TableEntry("Connexion p\u00e9riodique",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez les serveurs de gestion \u00e0 distance Intel&reg; AMT.<br><br>";
1309 if(0==xxCiraServers.length)b+="<div style=padding-left:15px><br><i>Aucun serveur distant trouv\u00e9.</i></div><br>";else for(d in xxCiraServers)c=":"+xxCiraServers[d].Port,xxCiraServers[d].CN&&(c+=", "+xxCiraServers[d].CN),b+="<div class=itemBar onclick=showServerDetails("+d+")><div style=padding-top:3px><b>"+xxCiraServers[d].AccessInfo+"</b>"+EscapeHtml(c)+"</div></div>";if(a)if(b+="<br>G\u00e9rez les proxys HTTP utilis\u00e9s pour les connexions de gestion.<br><br>",c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses,
1310 0==c.length)b+="<div style=padding-left:15px><br><i>Aucun proxy configur\u00e9.</i></div><br>";else for(d in c)b+="<div class=itemBar onclick=showProxyDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(c[d].AccessInfo)+":"+c[d].Port+"</b> / "+EscapeHtml(c[d].NetworkDnsSuffix)+"</div></div>";d="";xxAccountAdminName&&(d=AddButton("Ajouter un serveur ...","AddRemoteAccessServer()"),a&&(d+=AddButton("Ajouter un proxy ...","AddRemoteAccessProxy()")));b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+
1291 -d);QH(52,b)}}var xxEditMpsPolicyType;
1292 -function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="Initi\u00e9 par l'utilisateur");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(Aucun)",g;for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[g].Name?" selected":
1293 -"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>Serveur principal</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>ACEI - Externe<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA - Interne</select><div>Type MPS principal</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";
1294 -c+="<option value=-1>(Aucun)";for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[g].Name?" selected":"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>Serveur secondaire</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>ACEI - Externe<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA - Interne</select><div>Type MPS secondaire</div></div>")}g=
1295 -0;d&&(g=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+g+">";c+="<div>Dur\u00e9e de vie du tunnel (secondes)</div></div>";"Periodic"==b&&(a=0,g=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),g=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),g+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">P\u00e9riodique, intervalle de temps<option value=1"+
1296 -(1==a?" selected":"")+">Moment de la journ\u00e9e, une fois par jour",c+="</select><div>Type de d\u00e9clencheur</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+g+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0} Connexion",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1297 -function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c54",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1311 +d);QH(53,b)}}var xxEditMpsPolicyType;
1312 +function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="Initi\u00e9 par l'utilisateur");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(Aucun)",e;for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[e].Name?" selected":
1313 +"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>Serveur principal</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>ACEI - Externe<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA - Interne</select><div>Type MPS principal</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";
1314 +c+="<option value=-1>(Aucun)";for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[e].Name?" selected":"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>Serveur secondaire</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>ACEI - Externe<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA - Interne</select><div>Type MPS secondaire</div></div>")}e=
1315 +0;d&&(e=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+e+">";c+="<div>Dur\u00e9e de vie du tunnel (secondes)</div></div>";"Periodic"==b&&(a=0,e=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),e=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),e+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">P\u00e9riodique, intervalle de temps<option value=1"+
1316 +(1==a?" selected":"")+">Moment de la journ\u00e9e, une fois par jour",c+="</select><div>Type de d\u00e9clencheur</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+e+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0} Connexion",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1317 +function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c106",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1318 -1!=Q("d2server1").value),QH("ttypelabel",0==Q("d2ttype").value?"Intervalle de d\u00e9clenchement (secondes)":"Heure de la journ\u00e9e (HH: MM)"),QE("d2ttype",-1!=Q("d2server1").value));QE("d2lifetime",-1!=Q("d2server1").value);b&&(QE("d2server1cira",-1<Q("d2server1").value),1<xxCiraServers.length&&QE("d2server2cira",-1<Q("d2server1").value&&-1<Q("d2server2").value))}
1319 function editMpsPolicyOk(){var b=xxEditMpsPolicyType;"User"==b&&(b="User Initiated");getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",b)?amtstack.Delete("AMT_RemoteAccessPolicyRule",{PolicyRuleName:b},editMpsPolicyOk2):editMpsPolicyOk2()}
1300 -function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var g,v;0<=Q("d2server1").value&&(g='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1320 +function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var e,v;0<=Q("d2server1").value&&(e='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1321 xxCiraServers[Q("d2server1").value].Name+"</Selector></SelectorSet></ReferenceParameters>");0<=Q("d2server1").value&&1<xxCiraServers.length&&0<=Q("d2server2").value&&(v='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1302 -xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?g&&(0==Q("d2server1cira").value?d.push(g):n.push(g),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):g&&(d.push(g),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1322 +xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?e&&(0==Q("d2server1cira").value?d.push(e):n.push(e),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):e&&(d.push(e),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1323 function editEnvironmentDetection(b){1!=b&&(editEnvironmentDetectionTmp=xxEnvironementDetection.DetectionStrings?Clone(xxEnvironementDetection.DetectionStrings):[]);var c="";xxAccountAdminName&&(c+="Entrez jusqu'\u00e0 5 suffixes de domaine intranet. Si l'ordinateur se trouve en dehors de ces domaines, les ports locaux Intel&reg; AMT seront ferm\u00e9s et les connexions au serveur distant seront actives.<br><br>");0==editEnvironmentDetectionTmp.length&&(c+="<i>Aucun domaine intranet, d\u00e9tection de l'environnement d\u00e9sactiv\u00e9e.</i><br>");
1324 for(var a in editEnvironmentDetectionTmp)c+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Retirer","editEnvironmentDetectionRemove("+a+")")+'</div><div style=padding-top:3px;max-width:260px;overflow:hidden title="'+editEnvironmentDetectionTmp[a]+'"><b>'+editEnvironmentDetectionTmp[a]+"</b></div></div>";xxAccountAdminName&&5>editEnvironmentDetectionTmp.length&&(c+="<br><input id=edInput placeholder=intranet.org style=width:276px onkeyup=edInputChg() maxlength=63><input type=button id=edAdd value=Add style=width:80px;margin-left:5px onclick=editEnvironmentDetectionAdd()>");
1305 -1==b?QH(63,c):setDialogMode(11,"D\u00e9tection d'environnement",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1325 +1==b?QH(64,c):setDialogMode(11,"D\u00e9tection d'environnement",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1326 function editEnvironmentDetectionDlg2(b,c,a,d){200!=d?messagebox("D\u00e9tection d'environnement",format("\u00c9chec de l'ajout du serveur, \u00e9tat {0}",d)):a.Body.ReturnValue&&0!=a.Body.ReturnValue?messagebox("D\u00e9tection d'environnement",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}function edInputChg(){5>editEnvironmentDetectionTmp.length&&QE("edAdd",0<Q("edInput").value.length)}
1327 function editEnvironmentDetectionAdd(){editEnvironmentDetectionTmp.push(Q("edInput").value);editEnvironmentDetection(1)}function editEnvironmentDetectionRemove(b){editEnvironmentDetectionTmp.splice(b,1);editEnvironmentDetection(1)}
1328 function editUserInitiatedCira(){if(!xxdialogMode){var b="",c;for(c in xxUserInitiatedEnabledState)b+="<input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxUserInitiatedCira.EnabledState==c?"checked":"")+">"+xxUserInitiatedEnabledState[c]+"<br>";setDialogMode(11,"Tunnel initi\u00e9 par l'utilisateur",3,editUserInitiatedCiraDlg,b)}}
@@ -1315,7 +1335,7 @@ function showProxyDetails(b){var c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.respo
1335 function showProxyDetailsOk(b,c){var a=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses[c];2==b&&amtstack.Delete("IPS_HTTPProxyAccessPoint",{Name:a.Name},showProxyDetailsOk2)}function showProxyDetailsOk2(b,c,a,d){408==d?messagebox("Suppression du proxy HTTP","Impossible de supprimer le proxy HTTP, acc\u00e8s refus\u00e9."):PullRemoteAccess()}
1336 function AddRemoteAccessProxy(){var b;b='<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessProxyUpdate()><option value=2>Nom d\'h\u00f4te FQDN<option value=3>Adresse IPv4<option value=4>Adresse IPv6</select><div>Type de connexion</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>';b+=
1337 "<div style=height:26px><input id=d2domain style=float:right;width:200px maxlength=191 onkeyup=AddRemoteAccessProxyUpdate()><div>Suffixe DNS</div></div>";setDialogMode(11,"Ajouter un proxy HTTP",3,AddRemoteAccessProxyOk,b);AddRemoteAccessProxyUpdate()}
1318 -function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c54",b);QH("d2typespan",["","","FQDN / nom d'h\u00f4te","Adresse IPv4","Adresse IPv6"][Q("d2type").value])}function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
1338 +function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c106",b);QH("d2typespan",["","","FQDN / nom d'h\u00f4te","Adresse IPv4","Adresse IPv6"][Q("d2type").value])}function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
1339 function AddRemoteAccessProxyOk2(b,c,a,d){200!=d?messagebox("Ajouter un serveur proxy","\u00c9chec de l'ajout du proxy, \u00e9tat"+d):0!=a.Body.ReturnValue?messagebox("Ajouter un serveur proxy",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1340 function AddRemoteAccessServer(){var b=[],c;for(c in xxCertificates)xxCertificates[c].XPrivateKey&&b.push(xxCertificates[c]);var a;a="<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()><option value=201>Nom d'h\u00f4te FQDN<option value=3>Adresse IPv4</select><div>Type de connexion</div></div><div style=height:26px><input id=d2name style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div id=d2lname></div></div>";a+='<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>Port de serveur</div></div>';
1341 a+="<div style=height:26px id=d2ucn><input id=d2cn style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Nom commun du serveur</div></div>";a+="<div style=height:26px><select id=d2auth style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()>";0<b.length&&(a+="<option value=1>Certificat");a+="<option value=2>Identifiant Mot de passe</select><div>Type d'identification</div></div>";a+="<span id=d2utype>";a+="<div style=height:26px><input id=d2user style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Nom d'utilisateur</div></div>";
@@ -1325,87 +1345,88 @@ function AddRemoteAccessServerOk(){var b,c,a,d;1==Q("d2auth").value?b='<Address
1345 "</Selector></SelectorSet></ReferenceParameters>":(c=Q("d2user").value,a=Q("d2pass").value);0<Q("d2cn").value.length&&(d=Q("d2cn").value);amtstack.AMT_RemoteAccessService_AddMpServer(Q("d2name").value,Q("d2type").value,Q("d2port").value,Q("d2auth").value,b,c,a,d,AddRemoteAccessServerOk2)}
1346 function AddRemoteAccessServerOk2(b,c,a,d){200!=d?messagebox("Ajouter un serveur Internet",format("\u00c9chec de l'ajout du serveur, \u00e9tat {0}",d)):0!=a.Body.ReturnValue?messagebox("Ajouter un serveur Internet",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1347 function AddRemoteAccessServerUpdate(){var b=0!=Q("d2name").value.length;3==Q("d2type").value&&1==b&&(b=0!=Q("d2cn").value.length);2==Q("d2auth").value&&1==b&&(b=0!=Q("d2user").value.length&&passwordcheck(Q("d2pass").value));if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;if(-1!=Q("d2name").value.indexOf(":")||3==Q("d2type").value&&-1!=Q("d2cn").value.indexOf(":"))b=!1;QH("d2lname",201==Q("d2type").value?"Nom d'h\u00f4te":"Adresse IPv4");QV("d2utype",2==Q("d2auth").value);QV("d2ucn",
1328 -3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c54",b)}
1348 +3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c106",b)}
1349 function showEditNameDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_GeneralSettings.response.HostName,a=amtsysstate.AMT_GeneralSettings.response.DomainName;null!=a&&0<a.length&&(c+="."+a);c='<br><div style=height:26px><input id=d11name value="'+c+'" style=float:right;width:200px><div>Nom et domaine</div></div>';1==b&&(b=1==amtsysstate.AMT_GeneralSettings.response.SharedFQDN,c+="<div style=height:26px><select id=d11fqdn style=float:right;width:200px><option value=true "+(b?"selected":"")+'>Partag\u00e9, comme OS<option value="false" '+
1350 (b?"":"selected")+">D\u00e9di\u00e9, diff\u00e9rent de l'OS</select><div>Partage de noms</div></div>");setDialogMode(11,"Nom de l'ordinateur",3,editNameDlgOk,c)}}
1351 function editNameDlgOk(){var b=Q("d11name").value,c=b.indexOf("."),a="";0<=c&&(a=b.substring(c+1),b=b.substring(0,c));c=Clone(amtsysstate.AMT_GeneralSettings.response);c.HostName=b;c.DomainName=a;Q("d11fqdn")&&(c.SharedFQDN=d11fqdn.value);amtstack.Put("AMT_GeneralSettings",c,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}function computerNameGet(b,c,a,d){200==d&&(amtsysstate.AMT_GeneralSettings.response=a.Body,updateSystemStatus())}
1332 -function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c36.value=c;c37.value=b.DDNSPeriodicUpdateInterval;c38.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"Client DNS dynamique",3,showEditDnsDlgOk)}}
1333 -function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c36.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c36.value?!0:!1;2==c36.value&&(b.DDNSPeriodicUpdateInterval=c37.value,b.DDNSTTL=c38.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1334 -function showEditDnsDlgChange(){QE("c37",2==c36.value);QE("c38",2==c36.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"Caract\u00e9ristiques Intel&reg; AMT",3,featuresDlgOk))}
1335 -function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,g){200!=g?messagebox("Erreur","RedirectionService, erreur RequestStateChange"+g):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,g){200!=g?messagebox("Erreur","KVMRedirectionSAP, erreur RequestStateChange"+
1336 -g):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("Erreur","Erreur PUT de RedirectionService"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1337 -function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c49.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c50.checked=!c49.checked),c51.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c52.checked=!c51.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1352 +function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c61.value=c;c62.value=b.DDNSPeriodicUpdateInterval;c63.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"Client DNS dynamique",3,showEditDnsDlgOk)}}
1353 +function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c61.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c61.value?!0:!1;2==c61.value&&(b.DDNSPeriodicUpdateInterval=c62.value,b.DDNSTTL=c63.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1354 +function showEditDnsDlgChange(){QE("c62",2==c61.value);QE("c63",2==c61.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"Caract\u00e9ristiques Intel&reg; AMT",3,featuresDlgOk))}
1355 +function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,e){200!=e?messagebox("Erreur","RedirectionService, erreur RequestStateChange"+e):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,e){200!=e?messagebox("Erreur","KVMRedirectionSAP, erreur RequestStateChange"+
1356 +e):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("Erreur","Erreur PUT de RedirectionService"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1357 +function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c74.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c75.checked=!c74.checked),c76.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c77.checked=!c76.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1358 function showEnableBootServiceDlgOk(){var b=32768+parseInt(document.querySelector("input[name=d26a]:checked").value);15<amtversion&&(b+=parseInt(document.querySelector("input[name=d26b]:checked").value));amtstack.CIM_BootService_RequestStateChange(b,null,showEnableBootServiceDlgResponse,b)}
1339 -function showEnableBootServiceDlgResponse(b,c,a,d,g){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,g),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1340 -function showEnableBootServiceDlgResponse2(b,c,a,d,g){200==d&&a.Body.EnabledState!=g&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"Consentement de l'utilisateur",3,consentDlgOk)}}
1359 +function showEnableBootServiceDlgResponse(b,c,a,d,e){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,e),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1360 +function showEnableBootServiceDlgResponse2(b,c,a,d,e){200==d&&a.Body.EnabledState!=e&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"Consentement de l'utilisateur",3,consentDlgOk)}}
1361 function consentDlgOk(){amtsysstate.IPS_OptInService.response.OptInRequired=document.querySelector("input[name=d10]:checked").value;amtstack.Put("IPS_OptInService",amtsysstate.IPS_OptInService.response,function(){amtstack.Get("IPS_OptInService",consentGet,0,1)},0,1)}function consentGet(b,c,a,d){200==d&&PullSystemStatus()}var ipv6addrtype="Lier l'adresse locale;Adresse locale du r\u00e9seau;Adresse globale;Configur\u00e9 par l'utilisateur;Interdit;DAD en cours;valide;obsol\u00e8te;pr\u00e9f\u00e9r\u00e9 / d\u00e9conseill\u00e9;expir\u00e9;collision;interdit".split(";");
1362 function showIPv6AddrDlg(b,c){if(!xxdialogMode){var a=TableStart();t=c.split(",");for(var d=0;d<t.length;d+=3)a+=TableEntry("<b>"+t[d]+"</b><br><span style=font-size:10px>"+ipv6addrtype[t[d+1]]+","+ipv6addrtype[+t[d+2]+5]+"</span>","");setDialogMode(11,0==b?"Adresses IPv6 pour l'interface filaire":"Adresses IPv6 pour l'interface sans fil",1,null,a+TableEnd())}}
1343 -function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(69,0==b);QV(70,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 d\u00e9sactiv\u00e9");QH("d21l1","IPv6 activ\u00e9, automatique");QH("d21l2","IPv6 activ\u00e9, adresse automatique + manuelle");d21o0.checked=!c;d21o1.checked=
1344 -c&&!ipv6manual;d21o2.checked=c&&ipv6manual;c31.value=isIpAddress(a.IPv6Address,"");c33.value=isIpAddress(a.DefaultRouter,"");c34.value=isIpAddress(a.PrimaryDNS,"");c35.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"Prise en charge IPv6 pour l'interface filaire":"Prise en charge IPv6 pour l'interface sans fil",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1345 -function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c31.value?"::":c31.value.toLocaleLowerCase(),a.DefaultRouter=""==c33.value?"::":c33.value.toLocaleLowerCase(),
1346 -a.PrimaryDNS=""==c34.value?"::":c34.value.toLocaleLowerCase(),a.SecondaryDNS=""==c35.value?"::":c35.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1347 -"CreationClassName").Value,g=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1348 -d+'</w:Selector><w:Selector Name="DeviceID">'+g+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1349 -b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",g=Clone(c[a]);g.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",g,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Prise en charge IPv6",format("Impossible de d\u00e9finir l'\u00e9tat IPv6, erreur {0}",d))}
1363 +function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(68,0==b);QV(69,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 d\u00e9sactiv\u00e9");QH("d21l1","IPv6 activ\u00e9, automatique");QH("d21l2","IPv6 activ\u00e9, adresse automatique + manuelle");d21o0.checked=!c;d21o1.checked=
1364 +c&&!ipv6manual;d21o2.checked=c&&ipv6manual;c56.value=isIpAddress(a.IPv6Address,"");c58.value=isIpAddress(a.DefaultRouter,"");c59.value=isIpAddress(a.PrimaryDNS,"");c60.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"Prise en charge IPv6 pour l'interface filaire":"Prise en charge IPv6 pour l'interface sans fil",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1365 +function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c56.value?"::":c56.value.toLocaleLowerCase(),a.DefaultRouter=""==c58.value?"::":c58.value.toLocaleLowerCase(),
1366 +a.PrimaryDNS=""==c59.value?"::":c59.value.toLocaleLowerCase(),a.SecondaryDNS=""==c60.value?"::":c60.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1367 +"CreationClassName").Value,e=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1368 +d+'</w:Selector><w:Selector Name="DeviceID">'+e+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1369 +b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",e=Clone(c[a]);e.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",e,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Prise en charge IPv6",format("Impossible de d\u00e9finir l'\u00e9tat IPv6, erreur {0}",d))}
1370 function showPingActionDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,b=(1==b.PingResponseEnabled)+((1==b.RmcpPingResponseEnabled)<<1);d20a.checked=0==b;d20b.checked=1==b;d20c.checked=2==b;d20d.checked=3==b;setDialogMode(20,"R\u00e9ponse Intel&reg; AMT Ping",3,showPingActionDlgOk)}}
1371 function showPingActionDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response),c=document.querySelector("input[name=d20]:checked").value;b.PingResponseEnabled=0!=(c&1);b.RmcpPingResponseEnabled=0!=(c&2);amtstack.Put("AMT_GeneralSettings",b,PullSystemStatus,0,1)}
1352 -function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(68,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(69,!0);QV(70,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","Configuration automatique \u00e0 l'aide du serveur DHCP");QH("d21l2","Configuration statique \u00e0 l'aide des param\u00e8tres IPv4 ci-dessous");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=!d21o1.checked;
1353 -c31.value=isIpAddress(b.IPAddress,"");c32.value=isIpAddress(b.SubnetMask,"");c33.value=isIpAddress(b.DefaultGateway,"");c34.value=isIpAddress(b.PrimaryDNS,"");c35.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"Param\u00e8tres IPv4",3,showIPSetupDlgOk)}}
1354 -function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6 activ\u00e9, adresse automatique + manuelle"==Q("d21l2").innerHTML&&2>c31.value.split(":").length&&(b=!1);QE("c54",b);c31.disabled=c32.disabled=c33.disabled=c34.disabled=c35.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1355 -function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c31.value,b.SubnetMask=c32.value,b.DefaultGateway=c33.value,""!=c34.value&&(b.PrimaryDNS=c34.value),""!=c35.value&&
1356 -(b.SecondaryDNS=c35.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Param\u00e8tres IPv4",format("Impossible de d\u00e9finir les param\u00e8tres r\u00e9seau, erreur {0}",d))}amtPowerBootCapabilities=null;
1372 +function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(67,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(68,!0);QV(69,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","Configuration automatique \u00e0 l'aide du serveur DHCP");QH("d21l2","Configuration statique \u00e0 l'aide des param\u00e8tres IPv4 ci-dessous");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=!d21o1.checked;
1373 +c56.value=isIpAddress(b.IPAddress,"");c57.value=isIpAddress(b.SubnetMask,"");c58.value=isIpAddress(b.DefaultGateway,"");c59.value=isIpAddress(b.PrimaryDNS,"");c60.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"Param\u00e8tres IPv4",3,showIPSetupDlgOk)}}
1374 +function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6 activ\u00e9, adresse automatique + manuelle"==Q("d21l2").innerHTML&&2>c56.value.split(":").length&&(b=!1);QE("c106",b);c56.disabled=c57.disabled=c58.disabled=c59.disabled=c60.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1375 +function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c56.value,b.SubnetMask=c57.value,b.DefaultGateway=c58.value,""!=c59.value&&(b.PrimaryDNS=c59.value),""!=c60.value&&
1376 +(b.SecondaryDNS=c60.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Param\u00e8tres IPv4",format("Impossible de d\u00e9finir les param\u00e8tres r\u00e9seau, erreur {0}",d))}amtPowerBootCapabilities=null;
1377 function showPowerActionDlg(){xxdialogMode||(statusbox("Actions de puissance","V\u00e9rification des capacit\u00e9s ..."),amtstack.Get("AMT_BootCapabilities",powerActionResponse00,0,1))}
1358 -function powerActionResponse00(b,c,a,d){if(200==d){b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(g){}amtPowerBootCapabilities=a.Body;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","Power up",2);b&1&&(addOption("d5actionSelect","R\u00e9initialiser",10),addOption("d5actionSelect","Cycle de puissance",5),addOption("d5actionSelect","\u00c9teindre",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect","Mise sous tension du diagnostic",
1359 -300),b&1&&addOption("d5actionSelect","R\u00e9initialiser au diagnostic",301));9<amtversion&&b&1&&(addOption("d5actionSelect","R\u00e9veil du syst\u00e8me d'exploitation en veille",500),addOption("d5actionSelect","\u00c9conomie d'\u00e9nergie du syst\u00e8me d'exploitation",501),addOption("d5actionSelect","Soft-off",12),addOption("d5actionSelect","Red\u00e9marrage en douceur",14),addOption("d5actionSelect","Dormir",4),addOption("d5actionSelect","Hiberner",7));1==amtPowerBootCapabilities.BIOSSetup&&
1378 +function showPowerActionDlg(){if(!xxdialogMode){var b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(c){}amtPowerBootCapabilities=amtsysstate.AMT_BootCapabilities.response;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","Power up",2);b&1&&(addOption("d5actionSelect","R\u00e9initialiser",10),addOption("d5actionSelect","Cycle de puissance",5),addOption("d5actionSelect","\u00c9teindre",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect",
1379 +"Mise sous tension du diagnostic",300),b&1&&addOption("d5actionSelect","R\u00e9initialiser au diagnostic",301));9<amtversion&&b&1&&(addOption("d5actionSelect","R\u00e9veil du syst\u00e8me d'exploitation en veille",500),addOption("d5actionSelect","\u00c9conomie d'\u00e9nergie du syst\u00e8me d'exploitation",501),addOption("d5actionSelect","Soft-off",12),addOption("d5actionSelect","Red\u00e9marrage en douceur",14),addOption("d5actionSelect","Dormir",4),addOption("d5actionSelect","Hiberner",7));1==amtPowerBootCapabilities.BIOSSetup&&
1380 (b&2&&addOption("d5actionSelect","Mettez le BIOS sous tension",100),b&1&&addOption("d5actionSelect","R\u00e9initialiser au BIOS",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","Mise sous tension pour effacement s\u00e9curis\u00e9",104),b&1&&addOption("d5actionSelect","R\u00e9initialiser pour effacer s\u00e9curis\u00e9",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&
1381 2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",106),b&1&&addOption("d5actionSelect","Reset to Platform Erase",107));b&1&&addOption("d5actionSelect","R\u00e9initialiser sur la disquette IDE-R",200);b&2&&addOption("d5actionSelect","Mettez sous tension la disquette IDE-R",201);b&1&&addOption("d5actionSelect","R\u00e9initialiser sur CD-ROM IDE-R",202);b&2&&addOption("d5actionSelect","Allumer le CD-ROM IDE-R",203);b&1&&addOption("d5actionSelect","R\u00e9initialiser \u00e0 PXE",400);b&
1362 -2&&addOption("d5actionSelect","Allumez PXE",401);addOption("d5actionSelect","Action personnalis\u00e9e ...",999);5<amtversion&&addOption("d5actionSelect","Consentement de l'utilisateur ...",998);setDialogMode(5,"Actions de puissance",3,powerActionDlgCheck)}else messagebox("Action de puissance",format("Impossible d'obtenir les capacit\u00e9s du syst\u00e8me, erreur {0}",d))}
1363 -function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"Action de puissance termin\u00e9e."):QH(60,format("Erreur d'action d'alimentation # {0}.",g));setDialogMode(1,"Action de puissance",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Confirmer l'ex\u00e9cution d'Intel&reg; Remote Secure Erase?<br>Saisissez le mot de passe d'effacement s\u00e9curis\u00e9 si n\u00e9cessaire.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Mot de passe</div></div><br><div style=color:red><b> AVERTISSEMENT: </b> Cela effacera les donn\u00e9es sur le syst\u00e8me distant.</div>",
1382 +2&&addOption("d5actionSelect","Allumez PXE",401);addOption("d5actionSelect","Action personnalis\u00e9e ...",999);5<amtversion&&addOption("d5actionSelect","Consentement de l'utilisateur ...",998);setDialogMode(5,"Actions de puissance",3,powerActionDlgCheck)}}
1383 +function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"Action de puissance termin\u00e9e."):QH(61,format("Erreur d'action d'alimentation # {0}.",e));setDialogMode(1,"Action de puissance",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Confirmer l'ex\u00e9cution d'Intel&reg; Remote Secure Erase?<br>Saisissez le mot de passe d'effacement s\u00e9curis\u00e9 si n\u00e9cessaire.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Mot de passe</div></div><br><div style=color:red><b> AVERTISSEMENT: </b> Cela effacera les donn\u00e9es sur le syst\u00e8me distant.</div>",
1384 rsepass=1,setDialogMode(11,"Actions de puissance",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1365 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> AVERTISSEMENT: </b> Cela effacera les donn\u00e9es sur le syst\u00e8me distant.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&
1366 -a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));
1367 -c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Actions de puissance",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}
1368 -var platfromEraseTLV=null;
1369 -function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,g=[1,2,6,25,26,31],v;for(v in g)d&1<<g[v]&&Q("rpef"+g[v]).checked&&(a+=1<<g[v]);d=makeUefiBootParam(1,a,4);g=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),g++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),g++);platfromEraseTLV={tlv:btoa(d),tlvlen:g};c?(statusbox("Action de puissance","V\u00e9rification de l'\u00e9tat ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1385 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> AVERTISSEMENT: </b> Cela effacera les donn\u00e9es sur le syst\u00e8me distant.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&8&&a.push("<label><input id=rpef3 type=checkbox onchange=powerActionDlgRPEValidate()>Verify Storage Erase</label>");
1386 +d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&65536&&a.push("<label><input id=rpef16 type=checkbox onchange=powerActionDlgRPEValidate()>OEM Custom Action</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&
1387 +-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");0<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+
1388 +addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpeeomdata style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("OEM Data (HEX)","<input id=rpeoemdatax style=width:210px maxlength=256 type=input>")+"</div>";setDialogMode(11,"Actions de puissance",3,powerActionDlgRPEEx,c,b);QE("c106",!1)}
1389 +function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,3,6,16,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QV("rpeeomdata",b&65536);QE("c106",b)}var platfromEraseTLV=null;
1390 +function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,3,6,16,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);a&65536&&""!=Q("rpeoemdatax").value&&(d+=makeUefiBootParam(20,hex2rstr(Q("rpeoemdatax").value),null,11),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("Action de puissance","V\u00e9rification de l'\u00e9tat ..."),
1391 +amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1392 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("Action de puissance","V\u00e9rification de l'\u00e9tat ...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=
1393 !1);13!=currentView&&10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
1372 -function showAdvPowerDlg(){try{Q("c39").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1394 +function showAdvPowerDlg(){try{Q("c64").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1395 QV("ForceHDBootOption",1==amtPowerBootCapabilities.ForceHardDriveBoot);QV("ForcePXEBootOption",1==amtPowerBootCapabilities.ForcePXEBoot);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);QV("d24dSerialOverLan",1==amtPowerBootCapabilities.SOL);
1396 QV("d24dSecureErase",1==amtPowerBootCapabilities.SecureErase);QV("d24dPlatformErase",null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&0!=(amtsysstate.CIM_BootService.response.EnabledState&2));QV("d24dFirmwareReset",1==amtPowerBootCapabilities.ConfigurationDataReset);QV("d24dLockSleepButton",1==amtPowerBootCapabilities.SleepButtonLock);QV("d24dUserPasswordBypass",1==amtPowerBootCapabilities.UserPasswordBypass);
1375 -QV("c46",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c47",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c48",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);setDialogMode(24,"Action de puissance personnalis\u00e9e",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}
1376 -function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c39").value&&600>Q("c39").value;QE("c41",!b);QE("c43",!b);QE("idd_d24IDERBootDevice",!b);QE("c45",!b);QE("idd_d24RSEPass",!b);QE("c54",!0)}
1377 -function showAdvPowerDlgOk(){var b=Q("c39").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"Action de puissance termin\u00e9e."):QH(60,format("Erreur d'action d'alimentation # {0}.",g));setDialogMode(1,"Action de puissance",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c39").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=
1378 -Q("d24BiosSecureBoot").checked,AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c43").value,AvdPowerDlg.FirmwareVerbosity=Q("c45").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c44").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked,AvdPowerDlg.LockSleepButton=
1397 +QV("c71",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c72",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c73",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);QH("c66",'<option value=0>None</option><option id="ForceDVDBootOption" value=1>Force CD/DVD Boot</option><option id="ForcePXEBootOption" value=2>Force PXE Boot</option><option id="ForceHDBootOption" value=3>Force Hard Disk Boot</option><option id="ForceDiagBootOption" value=4>Force Diagnostic Boot</option>');
1398 +setDialogMode(24,"Action de puissance personnalis\u00e9e",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c64").value&&600>Q("c64").value;QE("c66",!b);QE("c68",!b);QE("idd_d24IDERBootDevice",!b);QE("c70",!b);QE("idd_d24RSEPass",!b);QE("c106",!0)}
1399 +function showAdvPowerDlgOk(){var b=Q("c64").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"Action de puissance termin\u00e9e."):QH(61,format("Erreur d'action d'alimentation # {0}.",e));setDialogMode(1,"Action de puissance",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c64").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=
1400 +Q("d24BiosSecureBoot").checked,AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c68").value,AvdPowerDlg.FirmwareVerbosity=Q("c70").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c69").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked,AvdPowerDlg.LockSleepButton=
1401 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,AvdPowerDlg.PlatformErase=Q("d24PlatformErase").checked,AvdPowerDlg.FirmwareReset=Q("d24FirmwareReset").checked,!0===AvdPowerDlg.SecureErase&&0<Q("d24rsepass").value.length&&
1402 (AvdPowerDlg.RSEPassword=Q("d24rsepass").value),!0===AvdPowerDlg.PlatformErase?powerActionDlgRPE(!0):(statusbox("Action de puissance","V\u00e9rification de l'\u00e9tat ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)))}
1381 -function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("Action de puissance",format("Erreur # {0}",d)):4294967295==a.Body.OptInRequired&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(d6ConsentText.value="",setDialogMode(6,"Consentement de l'utilisateur",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("Action de puissance","D\u00e9marrage de l'opt-in ..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,
1382 -0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Consentement de l'utilisateur","Le consentement de l'utilisateur n'est pas n\u00e9cessaire."):(statusbox("Action de puissance","Obtention des param\u00e8tres de d\u00e9marrage ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1403 +function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("Action de puissance",format("Erreur # {0}",d)):(4294967295==a.Body.OptInRequired||connectDesktopConsent&&0!=a.Body.OptInRequired)&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(amtstack.IPS_OptInService_CancelOptIn(null),d6ConsentText.value="",setDialogMode(6,"Consentement de l'utilisateur",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("Action de puissance",
1404 +"D\u00e9marrage de l'opt-in ..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Consentement de l'utilisateur","Le consentement de l'utilisateur n'est pas n\u00e9cessaire."):(statusbox("Action de puissance","Obtention des param\u00e8tres de d\u00e9marrage ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1405 function powerActionResponseC1(b,c,a,d){200!=d?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("Action de puissance",format("Erreur #",d)):0!=a.Body.ReturnValue?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("Erreur de consentement de l'utilisateur",a.Body.ReturnValueStr.replace(/_/g," ")):(d6ConsentText.value="",setDialogMode(6,"Consentement de l'utilisateur",11,powerActionSendConsent),checkConsentDisplay(),consentChanged(),amtstack.Enum("CIM_ServiceAvailableToElement",
1406 function(a,b,c,d){errcheck(d,a)||(amtsysstate.CIM_ServiceAvailableToElement.responses=c,updateSystemStatus(),null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState&&amtstack.RequestPowerStateChange(2,function(a,b,c,d){}))}))}
1385 -function powerActionSendConsent(b){0==b?amtstack.IPS_OptInService_CancelOptIn(function(){}):(statusbox("Action de puissance","Envoi du consentement de l'utilisateur ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1407 +function powerActionSendConsent(b){console.log("powerActionSendConsent",b);0==b?(amtstack.IPS_OptInService_CancelOptIn(function(){}),connectDesktopConsent=!1,desktop.Stop()):(statusbox("Action de puissance","Envoi du consentement de l'utilisateur ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1408 function powerActionResponseC2(b,c,a,d){200!=d?messagebox("Action de puissance",format("Erreur # {0}",d)):0!=a.Body.ReturnValue?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Consentement de l'utilisateur","Le consentement de l'utilisateur a r\u00e9ussi."):(statusbox("Action de puissance","V\u00e9rification de l'\u00e9tat ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1387 -function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("Action de puissance",format("Erreur # {0}",d));else{b=d5actionSelect.value;var g=a.Body;g.ConfigurationDataReset=!1;delete g.WinREBootEnabled;delete g.UEFILocalPBABootEnabled;delete g.UEFIHTTPSBootEnabled;delete g.SecureBootControlEnabled;delete g.BootguardStatus;delete g.OptionsCleared;delete g.BIOSLastStatus;delete g.UefiBootParametersArray;delete g.RPEEnabled;999==b?(g.BIOSPause=AvdPowerDlg.BIOSPause,g.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1388 -g.BIOSSetup=AvdPowerDlg.BIOSSetup,g.BootMediaIndex=AvdPowerDlg.BootMediaIndex,g.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,g.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,g.IDERBootDevice=AvdPowerDlg.IDERBootDevice,g.LockKeyboard=AvdPowerDlg.LockKeyboard,g.LockPowerButton=AvdPowerDlg.LockPowerButton,g.LockResetButton=AvdPowerDlg.LockResetButton,g.LockSleepButton=AvdPowerDlg.LockSleepButton,g.ReflashBIOS=AvdPowerDlg.ReflashBIOS,g.UseIDER=AvdPowerDlg.UseIDER,g.UseSOL=AvdPowerDlg.UseSOL,
1389 -g.UseSafeMode=AvdPowerDlg.UseSafeMode,g.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=g.SecureErase&&(g.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==g.SecureErase&&AvdPowerDlg.RSEPassword&&(g.RSEPassword=AvdPowerDlg.RSEPassword)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1390 -0!=(amtPowerBootCapabilities.PlatformErase&1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(g.BIOSPause=!1,g.EnforceSecureBoot=!1,g.BIOSSetup=99<b&&104>b,g.BootMediaIndex=0,g.FirmwareVerbosity=0,g.ForcedProgressEvents=!1,g.IDERBootDevice=202==b||203==b?1:0,g.LockKeyboard=!1,g.LockPowerButton=!1,g.LockResetButton=!1,g.LockSleepButton=!1,g.ReflashBIOS=
1391 -!1,g.UseIDER=199<b&&300>b,g.UseSOL=13==currentView&&8!=b&&300>b,g.UseSafeMode=!1,g.UserPasswordBypass=!1,null!=g.SecureErase&&(g.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===g.SecureErase&&0<rsepass.length&&(g.RSEPassword=rsepass)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&
1392 -1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=!1),rsepass=null);console.log("Action de d\u00e9marrage: "+b);console.log("D\u00e9finition des param\u00e8tres de d\u00e9marrage: "+ObjectToString2(g));statusbox("Action de puissance","D\u00e9finition des param\u00e8tres de d\u00e9marrage ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,b,c,d){200!=d?
1393 -messagebox("Action de puissance",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",g,powerActionResponse2,0,1)},0,1)}}
1394 -function powerActionResponse2(b,c,a,d,g){200!=d?messagebox("Action de puissance",format("PUT AMT_BootSettingData, erreur # {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("Action de puissance","Configuration du prochain d\u00e9marrage ..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1395 -function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c41.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c41.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c41").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1409 +function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("Action de puissance",format("Erreur # {0}",d));else{b=d5actionSelect.value;var e=a.Body;e.ConfigurationDataReset=!1;delete e.WinREBootEnabled;delete e.UEFILocalPBABootEnabled;delete e.UEFIHTTPSBootEnabled;delete e.SecureBootControlEnabled;delete e.BootguardStatus;delete e.OptionsCleared;delete e.BIOSLastStatus;delete e.UefiBootParametersArray;delete e.RPEEnabled;999==b?(e.BIOSPause=AvdPowerDlg.BIOSPause,e.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1410 +e.BIOSSetup=AvdPowerDlg.BIOSSetup,e.BootMediaIndex=AvdPowerDlg.BootMediaIndex,e.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,e.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,e.IDERBootDevice=AvdPowerDlg.IDERBootDevice,e.LockKeyboard=AvdPowerDlg.LockKeyboard,e.LockPowerButton=AvdPowerDlg.LockPowerButton,e.LockResetButton=AvdPowerDlg.LockResetButton,e.LockSleepButton=AvdPowerDlg.LockSleepButton,e.ReflashBIOS=AvdPowerDlg.ReflashBIOS,e.UseIDER=AvdPowerDlg.UseIDER,e.UseSOL=AvdPowerDlg.UseSOL,
1411 +e.UseSafeMode=AvdPowerDlg.UseSafeMode,e.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=e.SecureErase&&(e.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==e.SecureErase&&AvdPowerDlg.RSEPassword&&(e.RSEPassword=AvdPowerDlg.RSEPassword)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1412 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(e.BIOSPause=!1,e.EnforceSecureBoot=!1,e.BIOSSetup=99<b&&104>b,e.BootMediaIndex=0,e.FirmwareVerbosity=0,e.ForcedProgressEvents=!1,e.IDERBootDevice=202==b||203==b?1:0,e.LockKeyboard=!1,e.LockPowerButton=!1,e.LockResetButton=!1,e.LockSleepButton=
1413 +!1,e.ReflashBIOS=!1,e.UseIDER=199<b&&300>b,e.UseSOL=13==currentView&&8!=b&&300>b,e.UseSafeMode=!1,e.UserPasswordBypass=!1,null!=e.SecureErase&&(e.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===e.SecureErase&&0<rsepass.length&&(e.RSEPassword=rsepass)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&
1414 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=!1),rsepass=null);console.log("Action de d\u00e9marrage: "+b);console.log("D\u00e9finition des param\u00e8tres de d\u00e9marrage: "+ObjectToString2(e));statusbox("Action de puissance","D\u00e9finition des param\u00e8tres de d\u00e9marrage ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,
1415 +function(a,b,c,d){200!=d?messagebox("Action de puissance",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",e,powerActionResponse2,0,1)},0,1)}}
1416 +function powerActionResponse2(b,c,a,d,e){200!=d?messagebox("Action de puissance",format("PUT AMT_BootSettingData, erreur # {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("Action de puissance","Configuration du prochain d\u00e9marrage ..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1417 +function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c66.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c66.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c66").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1418 c+"</Selector></SelectorSet></ReferenceParameters>",powerActionResponse3)}var targetPowerAction=0;
1397 -function powerActionResponse3(b,c,a,d){console.log("powerActionResponse3("+c+","+a+","+d+")");if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("Action de puissance","Ex\u00e9cution d'une action de puissance ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==
1398 -b&&(b=AvdPowerDlg.Action);targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("Action de puissance","Jeu d'actions de d\u00e9marrage suivant.")}}
1399 -function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"Action de puissance termin\u00e9e."),setDialogMode(1,"Action de puissance",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c54",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}
1400 -function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1419 +function powerActionResponse3(b,c,a,d){if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("Action de puissance","Ex\u00e9cution d'une action de puissance ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==b&&(b=AvdPowerDlg.Action);targetPowerAction=b;11==b&&
1420 +(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("Action de puissance","Jeu d'actions de d\u00e9marrage suivant.")}}function powerActionResponse4(b,c,a,d){200==d&&(QH(61,"Action de puissance termin\u00e9e."),setDialogMode(1,"Action de puissance",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}
1421 +function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c106",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1422 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1423 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1403 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var g=b[c].app?b[c].app:"";a[d][g]||(a[d][g]={});b[c].name&&(a[d][g][b[c].name]=b[c])}xxStorage.content=
1404 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez le stockage Intel&reg; AMT pour cet ordinateur.<br><br>";var v,n,g="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,e;for(e in b[c][p]){q++;if(c!=v||p!=n)""!=g&&(a+=g,g="<br>"),v=c,n=p,g=""!=c?g+EscapeHtml(c+
1405 -" / "+p):g+"Racine";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+e+'"',g=g+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+e+'",'+C+")><div style=float:right>"),g=g+(" "+AddButton2("T\u00e9l\u00e9charger","DownloadFromStorage("+C+',"'+e+'",event)')),g=g+("</div><div style=padding-top:3px><b>"+EscapeHtml(e)+"</b>, <i>"+b[c][p][e].size+" octets</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==
1406 -q&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=g&&(a+=g);0==d&&(a+="<div style=padding-left:15px><br><i>Aucun fichier trouv\u00e9.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+
1407 -(v?AddButton("T\u00e9l\u00e9charger...","UploadToStorage()"):""));QH(55,a)}else QH(55,"Impossible de charger les donn\u00e9es de stockage ...<br/>"+AddButton("Rafra\u00eechir","PullStorage()"))}
1408 -function showStorageDetails(b,c,a,d){if(!xxdialogMode){var g="",v=xxStorage.content[b][c][a];""!=b&&(g+=addHtmlValue("Vendeur",b));""!=c&&(g+=addHtmlValue("Application",c));g+=addHtmlValue("Nom",a);g+=addHtmlValue("Taille",v.size+" bytes");v.link&&(g+=addHtmlValue("Lien",v.link));setDialogMode(11,"Article de stockage",5,showStorageDetailsEx,g,d)}}function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}
1424 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1425 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez le stockage Intel&reg; AMT pour cet ordinateur.<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var r=0,g;for(g in b[c][p]){r++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+
1426 +" / "+p):e+"Racine";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+g+'",'+C+")><div style=float:right>"),e=e+(" "+AddButton2("T\u00e9l\u00e9charger","DownloadFromStorage("+C+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][p][g].size+" octets</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==
1427 +r&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>Aucun fichier trouv\u00e9.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+
1428 +(v?AddButton("T\u00e9l\u00e9charger...","UploadToStorage()"):""));QH(56,a)}else QH(56,"Impossible de charger les donn\u00e9es de stockage ...<br/>"+AddButton("Rafra\u00eechir","PullStorage()"))}
1429 +function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("Vendeur",b));""!=c&&(e+=addHtmlValue("Application",c));e+=addHtmlValue("Nom",a);e+=addHtmlValue("Taille",v.size+" bytes");v.link&&(e+=addHtmlValue("Lien",v.link));setDialogMode(11,"Article de stockage",5,showStorageDetailsEx,e,d)}}function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}
1430 function storageDeleteResponse(b,c){200!=c?messagebox("Espace de rangement",format("Impossible de supprimer le fichier (ERR {0}), v\u00e9rifiez que l'ordinateur est sous tension.",c)):PullStorage()}function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}function DownloadFromStorageEx(b,c,a){200!=c||null==b?console.log(c,"Data = null"):saveAs(data2blob(b),a)}
1431 function OpenFromStorage(b,c){if(!xxdialogMode){haltEvent(c);var a=window.open("http://"+wsstack.comm.host+":"+wsstack.comm.port+"/amt-storage/"+b,"_blank","noopener,noreferrer");a.opener=null;a.focus()}}function PushToStorage(b,c,a){var d=null;7E3<c.length&&(d=[b,c.substring(7E3)],c=c.substring(0,7E3));wsstack.comm.PerformAjax(c,PushToStorageResponse,d,0,"/amt-storage/"+b+(1==a?"?append=":""),"PUT")}
1432 function PushToStorageResponse(b,c,a){200!=c?messagebox("Espace de rangement",format("Impossible de pousser le fichier (ERR {0}), v\u00e9rifiez que l'ordinateur est sous tension.",c)):null!=a?PushToStorage(a[0],a[1],!0):PullStorage()}
@@ -1416,36 +1437,36 @@ a+="</datalist>";a+="<datalist id=mstorageapplicationlist>";for(d in xxStorageAp
1437 function UploadToStorageEx(b,c){if(c)d=new FileReader,d.onload=UploadToStorageEx2,d.filename=Q("mstoragefile").value,d.readAsBinaryString(c);else{var a=Q("mstoragefile");if(1==a.files.length){var d=new FileReader;d.onload=UploadToStorageEx2;d.filename=a.files[0].name;d.readAsBinaryString(a.files[0])}}}
1438 function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0].name:"");b=b.split(" ").join("");var c=b.split("-");3==c.length&&12>c[0].length&&12>c[1].length&&(Q("mstoragevendor").value=c[0],Q("mstorageapplication").value=c[1],b=c[2]);b=b.split("-").join("");b.endsWith(".gz")&&(b=b.substring(0,b.length-3));b.endsWith(".htm")||b.endsWith(".html")?Q("mstoragetype").value="text/html":b.endsWith(".txt")&&(Q("mstoragetype").value="text/plain");11<b.length&&(b=b.substring(0,11));Q("mstoragefilename").value=
1439 b}
1419 -function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var g=Q("mstoragetype").value;""==g&&(g="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1420 -"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+g+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1440 +function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1441 +"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1442 function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," journ\u00e9es").replace("H"," heures").replace("M"," minutes");b=b.replace(" 1 jour"," Un jour").replace(" 1 heure"," 1 heure").replace(" 1 minutes "," 1 minute ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1422 -function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez les alarmes de r\u00e9veil.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,g){if(200==g){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, r\u00e9veiller sur "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," \u00e0"),void 0!=d[c].Interval&&(a+=" et chacun"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&
1423 -(a+=", supprimer une fois termin\u00e9"),b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("\u00c9diter...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>Aucune alarme de r\u00e9veil enregistr\u00e9e.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("Supprimer toutes les alarmes",
1424 -"RemoveAllAlarms()")+AddButton("Ajouter","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
1425 -function prepareAlarmOccurenceTemplate(b,c,a,d,g){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1426 -g+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"Supprimer toutes les alarmes de r\u00e9veil",3,RemoveAllAlarmsEx,"Confirmer la suppression de toutes les alarmes de r\u00e9veil?")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,g,v){0==--b&&PullAlarms()})}
1443 +function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez les alarmes de r\u00e9veil.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, r\u00e9veiller sur "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," \u00e0"),void 0!=d[c].Interval&&(a+=" et chacun"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&
1444 +(a+=", supprimer une fois termin\u00e9"),b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("\u00c9diter...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>Aucune alarme de r\u00e9veil enregistr\u00e9e.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton2("Supprimer toutes les alarmes",
1445 +"RemoveAllAlarms()",xxAlarms?"":"disabled")+AddButton("Ajouter","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(58,b)}},null,!0)}
1446 +function prepareAlarmOccurenceTemplate(b,c,a,d,e){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1447 +e+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"Supprimer toutes les alarmes de r\u00e9veil",3,RemoveAllAlarmsEx,"Confirmer la suppression de toutes les alarmes de r\u00e9veil?")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,e,v){0==--b&&PullAlarms()})}
1448 function showAddAlarm(b){if(!xxdialogMode){QE("d25alarm_name",!b);if(void 0!=b){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime);Q("d25alarm_name").value=c.ElementName;Q("d25alarm_sdate").value=a.getFullYear()+"-"+_fmttimepad(a.getMonth()+1)+"-"+_fmttimepad(a.getDate());Q("d25alarm_stime").value=a.getHours()+":"+_fmttimepad(a.getMinutes())+":"+_fmttimepad(a.getSeconds());if(c.Interval){var a=c.Interval.Interval.replace("P","").replace("T","").replace("D","D,").replace("H","H,").replace("M","M,").split(","),
1428 -d=[0,0,0],g;for(g in a){var v=a[g].length-1;"D"==a[g][v]&&(d[0]=parseInt(a[g].substring(0,v)));"H"==a[g][v]&&(d[1]=parseInt(a[g].substring(0,v)));"M"==a[g][v]&&(d[2]=parseInt(a[g].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1429 -Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"Ajouter une nouvelle alarme",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c54",b)}
1430 -function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),g=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],g[0],g[1],g[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",g=Q("d25alarm_interval").value.split("-");3!=g.length&&(g=[0,0,0]);var g=
1431 -"P"+g[0]+"DT"+g[1]+"H"+g[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,g,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("Ajouter une alarme",format("Impossible d'ajouter l'alarme. Statut: {0}. <br/> V\u00e9rifiez que l'alarme est pour une heure future.",d)):0!=c.Body.ReturnValue?messagebox("Ajouter une alarme",format("\u00c9chec de l'ajout de l'alarme {0}. <br/> V\u00e9rifiez que l'alarme est pour une heure future.",
1432 -c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+g+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("Modifier l'alarme",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1449 +d=[0,0,0],e;for(e in a){var v=a[e].length-1;"D"==a[e][v]&&(d[0]=parseInt(a[e].substring(0,v)));"H"==a[e][v]&&(d[1]=parseInt(a[e].substring(0,v)));"M"==a[e][v]&&(d[2]=parseInt(a[e].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1450 +Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"Ajouter une nouvelle alarme",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c106",b)}
1451 +function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),e=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],e[0],e[1],e[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",e=Q("d25alarm_interval").value.split("-");3!=e.length&&(e=[0,0,0]);var e=
1452 +"P"+e[0]+"DT"+e[1]+"H"+e[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,e,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("Ajouter une alarme",format("Impossible d'ajouter l'alarme. Statut: {0}. <br/> V\u00e9rifiez que l'alarme est pour une heure future.",d)):0!=c.Body.ReturnValue?messagebox("Ajouter une alarme",format("\u00c9chec de l'ajout de l'alarme {0}. <br/> V\u00e9rifiez que l'alarme est pour une heure future.",
1453 +c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+e+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("Modifier l'alarme",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1454 function showAlertDetails(b){if(!xxdialogMode){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime),a="<div style=text-align:left>"+addHtmlValue("Nom",c.ElementName)+addHtmlValue("Heure de r\u00e9veil",a.toLocaleString().replace(", "," at "));void 0!=c.Interval&&(a+=addHtmlValue("Interne",_fmtinterval(c.Interval.Interval)));a+=addHtmlValue("Apr\u00e8s le r\u00e9veil",1==c.DeleteOnCompletion?"Supprimer l'alarme":"Garder l'alarme")+"</div>";messagebox(format("Alarme {0}",c.ElementName),a);setDialogMode(11,
1455 "Alarme"+c.ElementName,5,showAlertDetailsDelete,a,b)}}function showAlertDetailsDelete(b,c){2==b&&amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,b,c,v){PullAlarms()})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag;
1435 -function setDialogMode(b,c,a,d,g,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c54",!0);QV("c54",a&1);QV("c53",a&2);QV(58,a&2);QV("c55",a&4);c&&QH(59,c);for(c=1;27>c;c++)QV("dialog"+c,c==b);QV("dialog",b);g&&(11==b?QH(63,g):QH(60,g));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1456 +function setDialogMode(b,c,a,d,e,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c106",!0);QV("c106",a&1);QV("c105",a&2);QV(59,a&2);QV("c107",a&4);c&&QH(60,c);for(c=1;28>c;c++)QV("dialog"+c,c==b);QV("dialog",b);e&&(11==b?QH(64,e):QH(61,e));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1457 function dialogclose(b){var c=xxdialogFunc,a=xxdialogButtons,d=xxdialogTag;setDialogMode();(a&8||b)&&c&&c(b,d)}
1437 -function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(41).offsetWidth&&(QS("Desk")["max-width"]=Q(41).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1438 -"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(60,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(60,c);setDialogMode(1,b)}
1439 -function SaveJsonFile(b,c,a,d){var g="",v={},n=new Date;amtsysstate&&(g="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));g+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1440 -n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+g+".json")}var httpErrorTable={200:"D'accord",401:"Erreur d'authentification",408:"Erreur de temporisation",601:"Erreur d'analyse WSMAN",602:"Impossible d'analyser l'en-t\u00eate de r\u00e9ponse HTTP",603:"R\u00e9ponse d'\u00e9num\u00e9ration HTTP inattendue",604:"R\u00e9ponse de pull HTTP inattendue",997:"Domaine de r\u00e9sum\u00e9 non valide"};
1458 +function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(42).offsetWidth&&(QS("Desk")["max-width"]=Q(42).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1459 +"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(61,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(61,c);setDialogMode(1,b)}
1460 +function SaveJsonFile(b,c,a,d){var e="",v={},n=new Date;amtsysstate&&(e="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));e+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1461 +n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+e+".json")}var httpErrorTable={200:"D'accord",401:"Erreur d'authentification",408:"Erreur de temporisation",601:"Erreur d'analyse WSMAN",602:"Impossible d'analyser l'en-t\u00eate de r\u00e9ponse HTTP",603:"R\u00e9ponse d'\u00e9num\u00e9ration HTTP inattendue",604:"R\u00e9ponse de pull HTTP inattendue",997:"Domaine de r\u00e9sum\u00e9 non valide"};
1462 function errcheck(b,c){if(null==wsstack||amtstack!=c)return!0;200!=b&&9!=b&&(setDialogMode(),wsstack.comm.FailAllError=999,amtstack.CancelAllQueries(999),QH(5,httpErrorTable[b]?httpErrorTable[b]:format("Erreur # {0}",b)),401==b&&QH(5,'Erreur d\'authentification<br /><br /><input type=button value="Set new credentials" onclick=meshcentral2credCallback(true)></input>'),go(100),QS(3).width=0);return 200!=b}
1463 function goiFrame(b,c,a){if(!xxdialogMode){go(c);if(1==b.shiftKey||0==Q(13).src.endsWith(a))Q(13).src=a;QV(14,!1);QV(12,!0)}}function go(b,c){if(!xxdialogMode||1==c){QV(12,!1);QV(14,!0);QV(4,100==b);QV(6,100>b);for(var a=0;80>a;a++){QV("p"+a,a==b);var d=QS("go"+a);d&&(d["background-color"]=a==b?"#abcae1":"");d&&(d["background-color"]=a==b?"gray":"")}currentView=b;center()}}
1443 -function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,g=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:g};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(g=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:g}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(g=parseInt(a[2]));return{host:a[0],http:d,redir:g}}
1464 +function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,e=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:e};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(e=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:e}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(e=parseInt(a[2]));return{host:a[0],http:d,redir:e}}
1465 function addLink(b,c){return"<a style=cursor:pointer;color:blue onclick='"+c+"'>&diams; "+b+"</a>"}function addLinkConditional(b,c,a){return a?addLink(b,c):b}function haltEvent(b){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1}function addOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;Q(b).add(d)}function addDisabledOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;d.disabled=1;Q(b).add(d)}
1445 -function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,g=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:g=1}return 4==c+a+d+g}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("Erreur d'appel",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}
1466 +function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,e=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:e=1}return 4==c+a+d+e}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("Erreur d'appel",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}
1467 function TableStart2(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><p><td>"}function TableEntry(b,c){return"<tr><td class=r1><p>"+b+"<td class=r1>"+c}function FullTable(b,c){var a=TableStart();for(i in b)i&&b[i]&&(a+=TableEntry(i,b[i]));return a+TableEnd(c)}function TableEnd(b){return"<tr><td colspan=2><p>"+(b?b:"")+"</table>"}function AddButton(b,c){return"<input type=button value='"+b+"' onclick='"+c+"' style=margin:4px>"}
1468 function AddButton2(b,c,a){return"<input type=button value='"+b+"' onclick='"+c+"' "+a+">"}function AddRefreshButton(b){return'<input type=button name=refreshbtn value="Rafra\u00eechir" onclick=\'refreshButtons(false);'+b+"' style=margin:4px "+(0==refreshButtonsState?"disabled":"")+">"}function MoreStart(){return'<a style=cursor:pointer;color:blue id=morexxx1 onclick=QV("morexxx1",false);QV("morexxx2",true)>&#x25BC; More</a><div id=morexxx2 style=display:none><br><hr>'}
1448 -function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,g=b.options.length;d<g;d++)a=b.options[d],a.selected&&c.push(a.value);return c}function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}
1469 +function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,e=b.options.length;d<e;d++)a=b.options[d],a.selected&&c.push(a.value);return c}function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}
1470 function guidToStr(b){return b.substring(6,8)+b.substring(4,6)+b.substring(2,4)+b.substring(0,2)+"-"+b.substring(10,12)+b.substring(8,10)+"-"+b.substring(14,16)+b.substring(12,14)+"-"+b.substring(16,20)+"-"+b.substring(20)}function getUrlVars(){for(var b,c=[],a=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),d=0;d<a.length;d++)b=a[d].indexOf("="),0<b&&(c[a[d].substring(0,b)]=a[d].substring(b+1,a[d].length));return c}
1471 function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}
1472 function getDocHeight(){return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight&&0!=document.documentElement.clientHeight?document.documentElement.clientHeight:document.getElementsByTagName("body")[0].clientHeight}function addHtmlValue(b,c){return'<div style=height:20px><div style=float:right;width:220px;overflow:hidden><b title="'+c+'">'+c+"</b></div><div>"+b+"</div></div>"}
public/commander-it.htm
+911 -888
@@ -1,8 +1,8 @@
1 -<!DOCTYPE html><html lang="it" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Collegare 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>Stato del sistema</a><p id=go14 class=nav1 onclick=go(14)><a>Desktop remoto</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>File</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Informazioni hardware</a><p id=go6 class=nav1 onclick=go(6)><a>Registro eventi</a><p id=go15 class=nav1 onclick=go(15)><a>Registro di audizione</a><p id=go21 class=nav1 onclick=go(21)><a>Conservazione</a><p id=go8 class=nav1 onclick=go(8)><a>Impostazioni di rete</a><p id=go17 class=nav1 onclick=go(17)><a>Impostazioni Internet</a><p id=go16 class=nav1 onclick=go(16)><a>Impostazioni sicurezza</a><p id=go19 class=nav1 onclick=go(19)><a>Presenza agente</a><p id=go18 class=nav1 onclick=go(18)><a>Difesa del sistema</a><p id=go11 class=nav1 onclick=go(11)><a>Profili utente</a><p id=go22 class=nav1 onclick=go(22)><a>Sottoscrizioni</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go12 class=nav1 onclick=go(12)><a>Browser WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Mappa del disco" onclick=iderToggleDiskMap()><input type=button value="Interrompi sessione IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Floppy, i blocchi sono 512 byte.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CD-ROM, i blocchi sono 2048 byte.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Il firmware di questo computer dovrebbe essere aggiornato,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>per favore controlla qui</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>Caricamento in corso...</h1></div><div id=p1 style=display:none><h1>Stato del sistema</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Informazioni hardware</h1><span id=16></span></div><div id=p6 style=display:none><h1>Registro eventi</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Impostazioni di rete</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Profili utente</h1><span id=21></span></div><div id=p12 style=display:none><h1>Browser WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><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=domanda style=margin:4px onclick=wsmanQuery()><input type=button value=Chiaro style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filtro style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminale seriale su LAN</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La porta di reindirizzamento Intel® AMT o la funzionalità Serial-over-LAN è disabilitata<span id=26>, fai clic qui per abilitarlo.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Il computer remoto non è acceso, fare clic qui per emettere un comando di accensione.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Azioni di potere ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Inizia l'operazione di montaggio del disco remoto" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Avvia acquisizione" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Collegare onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Disconnected.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Cambia ciò che invierà il tasto invio" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Attiva / disattiva le dimensioni del terminale" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Cambia il tipo di emulazione dei tasti da F1 a F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii esteso" title="Attiva / disattiva il tipo di emulazione terminale" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Spedire onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Incolla disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Desktop remoto</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La porta di reindirizzamento Intel® AMT o la funzionalità KVM è disabilitata<span id=37>, fai clic qui per abilitarlo.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Il computer remoto non è acceso, fare clic qui per emettere un comando di accensione.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Gira a sinistra" onclick=drotate(-1)>↺</div><div class=rb title="Ruota a destra" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Attiva / disattiva la modalità a schermo intero" onkeypress="return false" onkeydown="return false" value=Pieno onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Salva uno screenshot del desktop remoto" onkeypress="return false" onkeydown="return false" value=Salva... onclick=deskSaveImage() style=margin-right:3px><input type=button value=Impostazioni... title="Modifica le impostazioni del desktop remoto" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Inizia l'operazione di montaggio del disco remoto" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Cambia lo stato di alimentazione della macchina remota" onkeypress="return false" onkeydown="return false" value="Azioni di potere ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Collegare onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Disconnected.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Vincere<option value=1>Win + Giù<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Win + Sinistra<option value=24>Win + Destra<option value=5>Maiusc + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Spedire onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=genere onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Schermo nero&nbsp;</span><span id=47><input id=48 type=checkbox>Visualizzare solamente&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Registro di audizione</h1><span id=50></span></div><div id=p16 style=display:none><h1>Impostazioni sicurezza</h1><span id=51></span></div><div id=p17 style=display:none><h1>Impostazioni Internet</h1><span id=52></span></div><div id=p18 style=display:none><h1>Difesa del sistema</h1><span id=53></span></div><div id=p19 style=display:none><h1>Presenza agente</h1><span id=54></span></div><div id=p21 style=display:none><h1>Conservazione</h1><span id=55></span></div><div id=p22 style=display:none><h1>Abbonamenti ad eventi</h1><span id=56></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>File</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Su>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Seleziona tutto" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rinominare onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Elimina onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nuova cartella" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Caricare onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Taglio onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=copia onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Incolla onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=ricaricare onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Ordina per nome<option value=2>Ordina per dimensione<option value=3>Ordinare per data<option value=4>Scendi per nome<option value=5>Scendi per dimensione<option value=6>Scendi per data</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 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=60 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>Nome utente</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Parola d'ordine*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>conferma password</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Locale<option value=1>Rete<option value=2>Qualunque</select><div>Autorizzazione</div></div><div>Autorizzazioni concesse</div><ul id=62 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>* Minimo 8 caratteri con maiuscolo, minuscolo, 0-9 e uno di! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Azione di potere</div></div><div><span style=color:red>Avvertimento:</span>Alcune azioni energetiche possono causare la perdita di dati e la disconnessione delle sessioni di reindirizzamento del desktop, del terminale o del disco.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Codice di consenso</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Display principale<option value=1>Display secondario<option id=d6ThirdDisplay value=2 style=display:none>Terzo display</select><div>Visualizzazione del consenso</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Codifica immagine</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Disabilitato<option value=2>Automatic<option value=3>Abilitato</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Mostra cursore del mouse locale</label><br><label><input type=checkbox id=d7showcad>Mostra Ctrl-Alt-Canc</label><br><label><input type=checkbox id=d7limitFrameRate>Frame rate limite</label><br><label><input type=checkbox id=d7noMouseRotate>Non ruotare il mouse</label><br></div><div>Altre impostazioni</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualità</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>scalata</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=Admin style=float:right;width:220px><div style=height:20px>Nome utente</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Parola d'ordine</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Porta di reindirizzamento</label><label id=c15 style=display:block><input type=checkbox id=c16>Desktop remoto KVM</label><label style=display:block><input type=checkbox id=c17>IDE-reindirizzamento<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Non richiesto<br></label><label><input type=radio name=d10 id=c20 value=1>Richiesto solo per KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Sempre richiesto<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Massimo 32 caratteri"><div title="Massimo 32 caratteri">Nome del profilo</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Massimo 32 caratteri"><div title="Massimo 32 caratteri">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priorità</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Autenticazione</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Nessuna</select><div>crittografia</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lunghezza tra 8 e 63 caratteri"><div title="Lunghezza tra 8 e 63 caratteri">Parola d'ordine*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lunghezza tra 8 e 63 caratteri"><div title="Lunghezza tra 8 e 63 caratteri">conferma password</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Ciò salverà l'intero stato di Intel® AMT per questa macchina in un file. Le password non verranno salvate, ma potrebbero essere inclusi alcuni dati sensibili.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Disabilitato<br><input type=radio name=d20 id=d20b value=1>Risposta ICMP<br><input type=radio name=d20 id=d20c value=2>Risposta RMCP<br><input type=radio name=d20 id=d20d value=3>Risposta ICMP e RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Sincronizzazione dell'indirizzo IP del sistema operativo</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>indirizzo IP</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Contrassegno di sottorete</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>porta</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS primario</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternativo</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Disabilitato<option value=1>Disabilitato, aggiornamento DHCP<option value=2>Abilitato</select><div>Client DNS dinamico</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Intervallo di aggiornamento (minuti)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (secondi)</div></div><div style=font-size:10px><br>L'intervallo di defaut è di 1440 minuti, il TTL predefinito è di 900 secondi.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Accendere<option value=10>Ripristina<option value=5>Ciclo di alimentazione<option value=8>Spegnere<option id=d24p500 value=500>OS Wake from Standby<option id=d24p501 value=501>Risparmio energetico del sistema operativo<option value=999>Imposta le opzioni di avvio</select><div>Comando remoto</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pausa BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Applica avvio sicuro</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Impostazioni del BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forza eventi di avanzamento</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Blocca il pulsante di accensione</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Pulsante di reset del blocco</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Pulsante di blocco del sonno</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Blocca tastiera</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Bypass password BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS Reflash</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Modalità sicura</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Usa IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Impostazioni di avvio</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Nessuna<option id=ForceDVDBootOption value=1>Forza avvio CD / DVD<option id=ForcePXEBootOption value=2>Forza avvio PXE<option id=ForceHDBootOption value=3>Forza l'avvio del disco rigido<option id=ForceDiagBootOption value=4>Forza avvio diagnostico</select><div>Boot Source</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Nessuna<option value=1>Indice 1<option value=2>Indice 2<option value=3>Indice 3<option value=3>Indice 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Avvio da floppy<option value=1>Avvia su CD-ROM</select><div>Dispositivo di avvio IDER</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Default del sistema<option id=c46 value=1>Silenzioso<option id=c47 value=2>verboso<option id=c48 value=3>Schermo nero</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>Password RSE</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>Nome dell'allarme</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>Data di sveglia (anno-mese-giorno)</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>Tempo di sveglia (ora: 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>Intervallo (giorni-ore-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>Mantieni l'allarme<option value=1>Elimina al completamento</select></div><div style=padding-top:4px>Dopo la veglia</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Abilitato<br></label><label><input type=radio name=d26b id=c50 value=0>Disabilitato<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Abilitato<br></label><label><input type=radio name=d26a id=c52 value=0>Disabilitato<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Annulla style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=ok style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Elimina style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="it" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Collegare 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>Stato del sistema</a><p id=go14 class=nav1 onclick=go(14)><a>Desktop remoto</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>File</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Informazioni hardware</a><p id=go6 class=nav1 onclick=go(6)><a>Registro eventi</a><p id=go15 class=nav1 onclick=go(15)><a>Registro di audizione</a><p id=go21 class=nav1 onclick=go(21)><a>Conservazione</a><p id=go8 class=nav1 onclick=go(8)><a>Impostazioni di rete</a><p id=go17 class=nav1 onclick=go(17)><a>Impostazioni Internet</a><p id=go16 class=nav1 onclick=go(16)><a>Impostazioni sicurezza</a><p id=go19 class=nav1 onclick=go(19)><a>Presenza agente</a><p id=go18 class=nav1 onclick=go(18)><a>Difesa del sistema</a><p id=go11 class=nav1 onclick=go(11)><a>Profili utente</a><p id=go22 class=nav1 onclick=go(22)><a>Sottoscrizioni</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go12 class=nav1 onclick=go(12)><a>Browser WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Mappa del disco" onclick=iderToggleDiskMap()><input type=button value="Interrompi sessione IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Floppy, i blocchi sono 512 byte.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CD-ROM, i blocchi sono 2048 byte.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Il firmware di questo computer dovrebbe essere aggiornato,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>per favore controlla qui</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>Caricamento in corso...</h1></div><div id=p1 style=display:none><h1>Stato del sistema</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Informazioni hardware</h1><span id=16></span></div><div id=p6 style=display:none><h1>Registro eventi</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Impostazioni di rete</h1><span id=19></span><span id=20></span><span id=21></span></div><div id=p11 style=display:none><h1>Profili utente</h1><span id=22></span></div><div id=p12 style=display:none><h1>Browser WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=23 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=24 type=button value=domanda style=margin:4px onclick=wsmanQuery()><input type=button value=Chiaro style=margin:4px onclick="QH(25, '')"><input id=c0 placeholder=Filtro style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=25></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminale seriale su LAN</h1><br><div id=26 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La porta di reindirizzamento Intel® AMT o la funzionalità Serial-over-LAN è disabilitata<span id=27>, fai clic qui per abilitarlo.</span></div></div><div id=28 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Il computer remoto non è acceso, fare clic qui per emettere un comando di accensione.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=29></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Azioni di potere ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Inizia l'operazione di montaggio del disco remoto" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Avvia acquisizione" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Collegare onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=30>Disconnected.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Cambia ciò che invierà il tasto invio" onclick="termToggleCr();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Attiva / disattiva le dimensioni del terminale" onclick="termToggleSize();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Cambia il tipo di emulazione dei tasti da F1 a F10" onclick="termToggleFx();Q(33).blur()"><input id=34 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii esteso" title="Attiva / disattiva il tipo di emulazione terminale" onclick="termToggleType();Q(34).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Spedire onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=35 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Incolla disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=36><h1>Desktop remoto</h1><br></div><div id=37 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La porta di reindirizzamento Intel® AMT o la funzionalità KVM è disabilitata<span id=38>, fai clic qui per abilitarlo.</span></div></div><div id=39 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Il computer remoto non è acceso, fare clic qui per emettere un comando di accensione.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=40></span>&nbsp;<div class=rb title="Gira a sinistra" onclick=drotate(-1)>↺</div><div class=rb title="Ruota a destra" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Attiva / disattiva la modalità a schermo intero" onkeypress="return false" onkeydown="return false" value=Pieno onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Salva uno screenshot del desktop remoto" onkeypress="return false" onkeydown="return false" value=Salva... onclick=deskSaveImage() style=margin-right:3px><input type=button value=Impostazioni... title="Modifica le impostazioni del desktop remoto" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Inizia l'operazione di montaggio del disco remoto" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Cambia lo stato di alimentazione della macchina remota" onkeypress="return false" onkeydown="return false" value="Azioni di potere ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Collegare onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=41>Disconnected.</span></div><tr><td id=42 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onwheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=43 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Vincere<option value=1>Win + Giù<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Win + Sinistra<option value=24>Win + Destra<option value=5>Maiusc + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12<option value=25>Enter</select><input id=DeskWD type=button value=Spedire onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=44 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=45 type=button value=genere onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=46><input id=47 type=checkbox>Schermo nero&nbsp;</span><span id=48><input id=49 type=checkbox>Visualizzare solamente&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=50></span><h1>Registro di audizione</h1><span id=51></span></div><div id=p16 style=display:none><h1>Impostazioni sicurezza</h1><span id=52></span></div><div id=p17 style=display:none><h1>Impostazioni Internet</h1><span id=53></span></div><div id=p18 style=display:none><h1>Difesa del sistema</h1><span id=54></span></div><div id=p19 style=display:none><h1>Presenza agente</h1><span id=55></span></div><div id=p21 style=display:none><h1>Conservazione</h1><span id=56></span></div><div id=p22 style=display:none><h1>Abbonamenti ad eventi</h1><span id=57></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=58></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>File</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Su>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Seleziona tutto" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rinominare onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Elimina onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nuova cartella" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Caricare onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Taglio onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=copia onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Incolla onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=ricaricare onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Ordina per nome<option value=2>Ordina per dimensione<option value=3>Ordinare per data<option value=4>Scendi per nome<option value=5>Scendi per dimensione<option value=6>Scendi per data</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=59 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=60 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=61 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>Nome utente</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Parola d'ordine*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>conferma password</div></div><div id=62><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Locale<option value=1>Rete<option value=2>Qualunque</select><div>Autorizzazione</div></div><div>Autorizzazioni concesse</div><ul id=63 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>* Minimo 8 caratteri con maiuscolo, minuscolo, 0-9 e uno di! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Azione di potere</div></div><div><span style=color:red>Avvertimento:</span>Alcune azioni energetiche possono causare la perdita di dati e la disconnessione delle sessioni di reindirizzamento del desktop, del terminale o del disco.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Codice di consenso</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Display principale<option value=1>Display secondario<option id=d6ThirdDisplay value=2 style=display:none>Terzo display</select><div>Visualizzazione del consenso</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Codifica immagine</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Disabilitato<option value=2>Automatic<option value=3>Abilitato</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Mostra cursore del mouse locale</label><br><label><input type=checkbox id=d7showcad>Mostra Ctrl-Alt-Canc</label><br><label><input type=checkbox id=d7limitFrameRate>Frame rate limite</label><br><label><input type=checkbox id=d7noMouseRotate>Non ruotare il mouse</label><br><label><input type=checkbox id=d7kvmrmw>Reverse Mouse Wheel</label><br></div><div>Altre impostazioni</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualità</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>scalata</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=Admin style=float:right;width:220px><div style=height:20px>Nome utente</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Parola d'ordine</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Porta di reindirizzamento</label><label id=c15 style=display:block><input type=checkbox id=c16>Desktop remoto KVM</label><label style=display:block><input type=checkbox id=c17>IDE-reindirizzamento<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Non richiesto<br></label><label><input type=radio name=d10 id=c20 value=1>Richiesto solo per KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Sempre richiesto<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=64></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Massimo 32 caratteri"><div title="Massimo 32 caratteri">Nome del profilo</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Massimo 32 caratteri"><div title="Massimo 32 caratteri">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priorità</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Autenticazione</div></div><div style=height:26px><select id=c26 style=float:right;width:200px onclick=updateWifiDialog()><option id=65 value=4>CCMP-AES<option id=66 value=3>TKIP-RC4</select><div>crittografia</div></div><div id=c27><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lunghezza tra 8 e 63 caratteri"><div title="Lunghezza tra 8 e 63 caratteri">Parola d'ordine*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lunghezza tra 8 e 63 caratteri"><div title="Lunghezza tra 8 e 63 caratteri">conferma password</div></div></div><div id=c30 style=display:none><div id=c31 style=height:26px><select id=c32 style=float:right;width:200px onchange=updateNetAuth2Dialog(event)><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protocollo</div></div><div id=c33 style=height:26px><input id=c34 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Massimo 32 caratteri"><div title="Massimo 32 caratteri">Server Name</div></div><div id=c35 style=height:26px><select id=c36 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c37 style=height:26px><input id=c38 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c39 style=height:26px><input id=c40 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Nome utente</div></div><div id=c41 style=height:26px><input id=c42 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuth2Dialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Parola d'ordine</div></div><div id=c43 style=height:26px><input id=c44 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuth2Dialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c45 style=height:26px><input id=c46 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c47 style=height:26px><input id=c48 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c49 style=height:26px><select id=c50 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Client Certificate</div></div><div id=c51 style=height:26px><select id=c52 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Server Issuer Cert</div></div><div id=c53 style=height:26px><select id=c54 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=1>Abilitato<option value=0>Disabilitato</select><div>Active in S0</div></div></div></div><div id=dialog19 style=margin:auto;margin:3px>Ciò salverà l'intero stato di Intel® AMT per questa macchina in un file. Le password non verranno salvate, ma potrebbero essere inclusi alcuni dati sensibili.<br><br><input id=c55 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Disabilitato<br><input type=radio name=d20 id=d20b value=1>Risposta ICMP<br><input type=radio name=d20 id=d20c value=2>Risposta RMCP<br><input type=radio name=d20 id=d20d value=3>Risposta ICMP e RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=67><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Sincronizzazione dell'indirizzo IP del sistema operativo</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=68><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c56 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>indirizzo IP</div></div><div style=height:26px id=69><input id=c57 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Contrassegno di sottorete</div></div><div style=height:26px><input id=c58 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>porta</div></div><div style=height:26px><input id=c59 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS primario</div></div><div style=height:26px><input id=c60 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternativo</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c61 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Disabilitato<option value=1>Disabilitato, aggiornamento DHCP<option value=2>Abilitato</select><div>Client DNS dinamico</div></div><div style=height:26px><input id=c62 style=float:right;width:200px><div>Intervallo di aggiornamento (minuti)</div></div><div style=height:26px><input id=c63 style=float:right;width:200px><div>TTL (secondi)</div></div><div style=font-size:10px><br>L'intervallo di defaut è di 1440 minuti, il TTL predefinito è di 900 secondi.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c64 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Accendere<option value=10>Ripristina<option value=5>Ciclo di alimentazione<option value=8>Spegnere<option id=d24p500 value=500>OS Wake from Standby<option id=d24p501 value=501>Risparmio energetico del sistema operativo<option value=999>Imposta le opzioni di avvio</select><div>Comando remoto</div></div><div style=height:80px><div id=c65 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pausa BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Applica avvio sicuro</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Impostazioni del BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forza eventi di avanzamento</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Blocca il pulsante di accensione</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Pulsante di reset del blocco</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Pulsante di blocco del sonno</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Blocca tastiera</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Bypass password BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS Reflash</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Modalità sicura</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Usa IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Impostazioni di avvio</div></div><div style=height:26px><select id=c66 style=float:right;width:200px onchange=showAdvPowerDlgChange()></select><div>Boot Source</div></div><div id=c67 style=height:26px><select id=c68 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Nessuna<option value=1>Indice 1<option value=2>Indice 2<option value=3>Indice 3<option value=3>Indice 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c69 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Avvio da floppy<option value=1>Avvia su CD-ROM</select><div>Dispositivo di avvio IDER</div></div><div style=height:26px><select id=c70 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Default del sistema<option id=c71 value=1>Silenzioso<option id=c72 value=2>verboso<option id=c73 value=3>Schermo nero</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>Password RSE</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>Nome dell'allarme</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>Data di sveglia (anno-mese-giorno)</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>Tempo di sveglia (ora: 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>Intervallo (giorni-ore-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>Mantieni l'allarme<option value=1>Elimina al completamento</select></div><div style=padding-top:4px>Dopo la veglia</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c74 value=2>Abilitato<br></label><label><input type=radio name=d26b id=c75 value=0>Disabilitato<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c76 value=1>Abilitato<br></label><label><input type=radio name=d26a id=c77 value=0>Disabilitato<br></label></div><div id=dialog27 style=margin:auto;margin:3px><br><div style=height:26px><select id=c78 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>Disabilitato<option value=1>Abilitato</select><div>Abilitato</div></div><div id=c79 style=height:26px><select id=c80 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protocollo</div></div><div id=c81 style=height:26px><input id=c82 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Massimo 32 caratteri"><div title="Massimo 32 caratteri">Server Name</div></div><div id=c83 style=height:26px><select id=c84 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c85 style=height:26px><input id=c86 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c87 style=height:26px><input id=c88 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Nome utente</div></div><div id=c89 style=height:26px><input id=c90 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuthDialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Parola d'ordine</div></div><div id=c91 style=height:26px><input id=c92 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c93 style=height:26px><input id=c94 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c95 style=height:26px><input id=c96 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c97 style=height:26px><select id=c98 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Client Certificate</div></div><div id=c99 style=height:26px><select id=c100 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Server Issuer Cert</div></div><div id=c101 style=height:26px><select id=c102 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>Abilitato<option value=1>Disabilitato</select><div>Active in S0</div></div><div id=c103 style=height:26px><input id=c104 style=float:right;width:200px onkeyup=updateNetAuthDialog()><div>PXE Timeout</div></div></div></div><div style=padding:10px;margin-bottom:4px><input id=c105 type=button value=Annulla style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c106 type=button value=ok style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c107 type=button value=Elimina style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
5 -$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var g=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==g&&$jscomp.global.Object.defineProperty(b,d,g)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
5 +$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var e=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==e&&$jscomp.global.Object.defineProperty(b,d,e)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
6 String.prototype.endsWith||(String.prototype.endsWith=function(b){return-1!==this.indexOf(b,this.length-b.length)});function Q(b){return document.getElementById(b)}function QS(b){try{return Q(b).style}catch(c){}}function QE(b,c){try{Q(b).disabled=!c}catch(a){}}function QV(b,c){try{QS(b).display=c?"":"none"}catch(a){}}function QA(b,c){Q(b).innerHTML+=c}function QH(b,c){Q(b).innerHTML=c}function inputBoxFocus(b){Q(b).focus();var c=Q(b).value;Q(b).value="";Q(b).value=c}
7 function ReadShort(b,c){return(b.charCodeAt(c)<<8)+b.charCodeAt(c+1)}function ReadShortX(b,c){return(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}function ReadInt(b,c){return 16777216*b.charCodeAt(c)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadSInt(b,c){return(b.charCodeAt(c)<<24)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadIntX(b,c){return 16777216*b.charCodeAt(c+3)+(b.charCodeAt(c+2)<<16)+(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}
8 function ShortToStr(b){return String.fromCharCode(b>>8&255,b&255)}function ShortToStrX(b){return String.fromCharCode(b&255,b>>8&255)}function IntToStr(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}function IntToStrX(b){return String.fromCharCode(b&255,b>>8&255,b>>16&255,b>>24&255)}function MakeToArray(b){return b&&null!=b&&"object"!=typeof b?[b]:b}function SplitArray(b){return b.split(",")}function Clone(b){return JSON.parse(JSON.stringify(b))}
@@ -12,153 +12,153 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a,d){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(d?d:32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,u,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.floppyReady)return g.floppyReady=!0,g.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.cdromReady)return g.cdromReady=!0,g.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}g.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,u);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),g.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 -d=0;switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}g.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),u&1);return}g.SendCommandEndResponse(1,5,c,36,0);break;case 27:g.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==g.floppy||176==c&&null==g.cdrom)return g.SendCommandEndResponse(1,
18 -2,c,58,0),-1;g.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}g.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),u&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.floppy&&(d=(g.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.cdrom&&(d=(g.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);g.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),u&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,F,d);a(c,F,d,u);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);g.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return g.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?g.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -u&1):0==N&&(H?g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),u&1):g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),u&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=r;if(16==v||N&&16>v)H+=K;if(30==
22 -v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=A;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));g.SendDataToHost(c,!0,H,u&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");g.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=g.floppy?d=2:176==c&&null!=g.cdrom&&(d=2);g.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),u&1);break;case 76:g.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),g.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),g.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;F=0;160==c?null!=g.floppy&&(F=g.floppy.size>>9):null!=g.cdrom&&(F=g.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?y:R:z;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?q:l:D;break;case 26:176==c&&(H=e);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?g.SendCommandEndResponse(0,5,c,32,0):g.SendDataToHost(c,!0,H,u&1);break;case 81:g.SendDataToHost(c,!0,E,u&1);break;case 172:g.SendDataToHost(c,!0,O,u&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),g.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 -b,x,e){var c=null,y=0;160==a&&(c=g.floppy,null!=g.floppy&&(y=g.floppy.size>>9));176==a&&(c=g.cdrom,null!=g.cdrom&&(y=g.cdrom.size>>11));if(0>x||b+x>y)return g.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return g.SendCommandEndResponse(1,0,a,0,0),0;null!=c&&(g.sectorStats&&g.sectorStats(1,160==a?0:1,y,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==u?H.push({media:c,dev:a,lba:b,len:x,fr:e}):(u=c,T=a,P=b,F=x,d(e)))}function d(a){var b=F,x=P;F>g.iderinfo.readbfr&&(b=g.iderinfo.readbfr);F-=b;P+=b;var e=
26 -new FileReader;e.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));g.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(u=null,N?(g.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),u=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};e.readAsBinaryString?e.readAsBinaryString(u.slice(x,x+b)):e.readAsArrayBuffer(u.slice(x,x+b))}var g={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,q,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,q);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),q&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),q&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);e.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),q&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,F,d);a(c,F,d,q);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);e.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +q&1):0==N&&(H?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),q&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),q&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=u;if(16==v||N&&16>v)H+=K;if(30==
22 +v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=z;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));e.SendDataToHost(c,!0,H,q&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),q&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;F=0;160==c?null!=e.floppy&&(F=e.floppy.size>>9):null!=e.cdrom&&(F=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?A:R:y;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?r:l:D;break;case 26:176==c&&(H=g);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,H,q&1);break;case 81:e.SendDataToHost(c,!0,E,q&1);break;case 172:e.SendDataToHost(c,!0,O,q&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 +b,x,c){var g=null,p=0;160==a&&(g=e.floppy,null!=e.floppy&&(p=e.floppy.size>>9));176==a&&(g=e.cdrom,null!=e.cdrom&&(p=e.cdrom.size>>11));if(0>x||b+x>p)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,p,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==q?H.push({media:g,dev:a,lba:b,len:x,fr:c}):(q=g,T=a,P=b,F=x,d(c)))}function d(a){var b=F,x=P;F>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);F-=b;P+=b;var c=
26 +new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));e.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(q=null,N?(e.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),q=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(q.slice(x,x+b)):c.readAsArrayBuffer(q.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
27 iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,
28 -0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),e=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 -18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),r=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 -0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),A=String.fromCharCode(1,5,3,0),y=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),z=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);g.xxStateChange=function(a){b("IDER-StateChange",a);
31 -0==a&&g.Stop();3==a&&g.Start()};g.Start=function(){b("IDER-Start");b(g.floppy,g.cdrom);g.bytesToAmt=0;g.bytesFromAmt=0;g.inSequence=0;g.outSequence=0;H=[];g.SendCommand(64,ShortToStrX(g.rx_timeout)+ShortToStrX(g.tx_timeout)+ShortToStrX(g.heartbeat)+IntToStrX(g.version));g.sectorStats&&(g.sectorStats(0,0,g.floppy?g.floppy.size>>9:0),g.sectorStats(0,1,g.cdrom?g.cdrom.size>>11:0))};g.Stop=function(){b("IDER-Stop");g.parent.Stop()};g.ProcessData=function(a){g.bytesFromAmt+=a.length;g.acc+=a;null!=v&&
32 -v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",g.acc.length,rstr2hex(g.acc));;){a=g.ProcessDataEx();if(0==a)break;if(g.inSequence!=ReadIntX(g.acc,4)){b("ERROR: Out of sequence",g.inSequence,ReadIntX(g.acc,4));g.Stop();break}g.inSequence++;g.acc=g.acc.substring(a)}};g.SendCommand=function(a,x,e,c){null==x&&(x="");e=50<a&&1==e?2:0;c&&(e+=1);x=String.fromCharCode(a,0,0,e)+IntToStrX(g.outSequence++)+x;g.parent.xxSend(x);g.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 -"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};g.SendCommandEndResponse=function(a,b,x,e,c){a?g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,e,c),!0)};g.SendDataToHost=function(a,b,x,e){var c=e?0:x.length;1==b?g.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,e):g.SendCommand(84,
34 -String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,e)};g.SendGetDataFromHost=function(a,b){g.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};g.SendDisableEnableFeatures=function(a,b){null==b&&(b="");g.SendCommand(72,String.fromCharCode(a)+b)};g.ProcessDataEx=function(){if(8>g.acc.length)return 0;switch(g.acc.charCodeAt(0)){case 65:if(30>g.acc.length)break;var a=g.acc.charCodeAt(29);
35 -if(g.acc.length<30+a)break;g.iderinfo={};g.iderinfo.major=g.acc.charCodeAt(8);g.iderinfo.minor=g.acc.charCodeAt(9);g.iderinfo.fwmajor=g.acc.charCodeAt(10);g.iderinfo.fwminor=g.acc.charCodeAt(11);g.iderinfo.readbfr=ReadShortX(g.acc,16);g.iderinfo.writebfr=ReadShortX(g.acc,18);g.iderinfo.proto=g.acc.charCodeAt(21);g.iderinfo.iana=ReadIntX(g.acc,25);b(g.iderinfo);0!=g.iderinfo.proto&&(b("Unknown proto",g.iderinfo.proto),g.Stop());8192<g.iderinfo.readbfr&&(b("Illegal read buffer size",g.iderinfo.readbfr),
36 -g.Stop());8192<g.iderinfo.writebfr&&(b("Illegal write buffer size",g.iderinfo.writebfr),g.Stop());0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),g.Stop(),8;case 68:return g.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>g.acc.length)break;a=g.acc.charCodeAt(8);null===u?(g.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 -a));return 9;case 73:if(13>g.acc.length)break;var a=g.acc.charCodeAt(8),x=ReadIntX(g.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:g.enabled=x&2?!0:!1;b("IDER Status: "+g.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>g.acc.length)break;b("IDER: ABORT",g.acc.charCodeAt(8));
38 -return 11;case 75:return 8;case 80:if(28>g.acc.length)break;var a=g.acc.charCodeAt(14)&16?176:160,x=g.acc.charCodeAt(14),e=g.acc.substring(16,28),y=g.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(e),y,x);c(a,e,y,x);return 28;case 83:if(14>g.acc.length)break;a=ReadShortX(g.acc,9);if(g.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",g.acc[0]),g.Stop()}return 0};
39 -var H=[],N=!1,u=null,T,P,F;return g},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 -a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,g,v,n){b("SIDER-Start",a,d,g,v,n);c.host=a;c.port=d;c.user=g;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==g?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+g:"")+"&tls1only="+
41 -c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(g){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
28 +0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),r=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 +18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 +0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);
31 +0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;H=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&
32 +v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 +"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,
34 +String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);
35 +if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),
36 +e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===q?(e.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 +a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));
38 +return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),d=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),d,x);c(a,g,d,x);return 28;case 83:if(14>e.acc.length)break;a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};
39 +var H=[],N=!1,q=null,T,P,F;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 +a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+
41 +c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
42 b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);break;
43 -default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,g){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){e.socketState=2;e.socketParseState=0;e.socketAccumulator="";e.socketHeader=null;e.socketData="";
44 -for(i in e.pendingAjaxCall)e.sendRequest(e.pendingAjaxCall[i][0],e.pendingAjaxCall[i][3],e.pendingAjaxCall[i][4])}function p(a){var b=e.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(e.socketAccumulator=b+a;;){if(0==e.socketParseState){b=e.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;e.socketHeader=e.socketAccumulator.substring(0,b).split("\r\n");if(null==e.amtVersion)for(var c in e.socketHeader)0==e.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 -(e.amtVersion=e.socketHeader[c].substring(46));e.socketAccumulator=e.socketAccumulator.substring(b+4);e.socketParseState=1;e.socketData="";e.socketXHeader={Directive:e.socketHeader[0].split(" ")};for(c in e.socketHeader)0!=c&&(b=e.socketHeader[c].indexOf(":"),e.socketXHeader[e.socketHeader[c].substring(0,b).toLowerCase()]=e.socketHeader[c].substring(b+2))}if(1==e.socketParseState){b=-1;if(void 0==e.socketXHeader.connection||"close"!=e.socketXHeader.connection.toLowerCase()||void 0!=e.socketXHeader["transfer-encoding"]&&
46 -"chunked"==e.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=e.socketXHeader["content-length"]){b=parseInt(e.socketXHeader["content-length"]);if(e.socketAccumulator.length<b)break;a=e.socketAccumulator.substring(0,b);e.socketAccumulator=e.socketAccumulator.substring(b);e.socketData=a;b=0}else{var p=e.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(e.socketAccumulator.substring(0,p),16);if(isNaN(b)){e.websocket&&e.websocket.close();break}if(e.socketAccumulator.length<p+2+b+2)break;
47 -a=e.socketAccumulator.substring(p+2,p+2+b);e.socketAccumulator=e.socketAccumulator.substring(p+2+b+2);e.socketData+=a}else b=0;if(0==b){p=e.socketXHeader;b=e.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++e.authcounter){if(e.challengeParams=e.parseDigest(p["www-authenticate"]),null!=e.challengeParams.qop){b=e.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 -e.challengeParams.qop="auth-int":e.challengeParams.qop="auth"}}else p=e.pendingAjaxCall.shift(),e.authcounter=0,e.ActiveAjaxCount--,e.gotNextMessages(b,"success",{status:a},p),e.PerformNextAjax();e.socketParseState=0;e.socketHeader=null}}}}function q(a){0==e.inDataCount&&(e.tlsv1only=1-e.tlsv1only);e.socketState=0;null!=e.socket&&(e.socket.close(),e.socket=null);if(0<e.pendingAjaxCall.length){a=e.pendingAjaxCall.shift();var b=a[5];e.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var e={PendingAjax:[],
49 -ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};e.host=b;e.port=c;e.user=a;e.pass=d;e.tls=g;e.tlsv1only=0;e.inDataCount=0;e.amtVersion=null;e.digestRealmMatch=null;e.digestRealm=null;e.PerformAjax=function(a,b,c,p,d,h){e.ActiveAjaxCount<e.MaxActiveAjaxCount&&0==e.PendingAjax.length?e.PerformAjaxEx(a,b,c,d,h):1==p?e.PendingAjax.unshift([a,b,c,d,h]):e.PendingAjax.push([a,b,c,d,h])};e.PerformNextAjax=function(){if(!(e.ActiveAjaxCount>=
50 -e.MaxActiveAjaxCount||0==e.PendingAjax.length)){var a=e.PendingAjax.shift();e.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);e.PerformNextAjax()}};e.PerformAjaxEx=function(a,b,c,p,d){if(0!=e.FailAllError)e.gotNextMessagesError({status:e.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),e.ActiveAjaxCount++,e.PerformAjaxExNodeJS(a,b,c,p,d)};e.pendingAjaxCall=[];e.PerformAjaxExNodeJS=function(a,b,c,p,d){e.PerformAjaxExNodeJS2(a,
51 -b,c,p,d,5)};e.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=e.FailAllError?(e.ActiveAjaxCount--,999!=e.FailAllError&&e.gotNextMessages(null,"error",{status:0==e.FailAllError?408:e.FailAllError},[a,b,c,p,d]),e.PerformNextAjax()):(e.pendingAjaxCall.push([a,b,c,p,d,h]),0==e.socketState?e.xxConnectHttpSocket():2==e.socketState&&e.sendRequest(a,p,d))};e.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=e.challengeParams){e.digestRealm=e.challengeParams.realm;
52 -if(e.digestRealmMatch&&e.digestRealm!=e.digestRealmMatch){e.FailAllError=997;e.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(e.user+":"+e.challengeParams.realm+":"+e.pass)+":"+e.challengeParams.nonce+":"+n(e.noncecounter)+":"+d+":"+e.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==e.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+e.renderDigest({username:e.user,realm:e.challengeParams.realm,nonce:e.challengeParams.nonce,uri:b,qop:e.challengeParams.qop,
53 -response:c,nc:n(e.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+e.host+":"+e.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==e.socketState&&null!=e.socket&&e.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{e.socket.send(b.buffer)}catch(h){}}};e.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var e=b.trim().split("=");a[e[0]]=e[1].replace(RegExp('"',"g"),"");return a},{})};e.renderDigest=function(a){var b=
54 -[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,e){return b+","+("nc"==e||"qop"==e?e+"="+a[e]:e+'="'+a[e]+'"')},"").substring(1)};e.xxConnectHttpSocket=function(){e.inDataCount=0;e.socketState=1;e.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+e.host+"&port="+e.port+"&tls="+e.tls+"&tls1only="+e.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 -typeof d?"&serverauth=1&user="+a:""));e.socket.binaryType="arraybuffer";e.socket.onopen=l;e.socket.onmessage=p;e.socket.onclose=q};e.gotNextMessages=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](a,c.status,p[2])};e.gotNextMessagesError=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](e,null,{Header:{HttpError:a.status}},a.status,p[2])};e.CancelAllQueries=function(a){for(;0<e.PendingAjax.length;){var b=
56 -e.PendingAjax.shift();b[1](null,a,b[2])}null!=e.websocket&&(e.websocket.close(),e.websocket=null,e.socketState=0)};return e},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
43 +default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){g.socketState=2;g.socketParseState=0;g.socketAccumulator="";g.socketHeader=null;g.socketData="";
44 +for(i in g.pendingAjaxCall)g.sendRequest(g.pendingAjaxCall[i][0],g.pendingAjaxCall[i][3],g.pendingAjaxCall[i][4])}function p(a){var b=g.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(g.socketAccumulator=b+a;;){if(0==g.socketParseState){b=g.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;g.socketHeader=g.socketAccumulator.substring(0,b).split("\r\n");if(null==g.amtVersion)for(var c in g.socketHeader)0==g.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 +(g.amtVersion=g.socketHeader[c].substring(46));g.socketAccumulator=g.socketAccumulator.substring(b+4);g.socketParseState=1;g.socketData="";g.socketXHeader={Directive:g.socketHeader[0].split(" ")};for(c in g.socketHeader)0!=c&&(b=g.socketHeader[c].indexOf(":"),g.socketXHeader[g.socketHeader[c].substring(0,b).toLowerCase()]=g.socketHeader[c].substring(b+2))}if(1==g.socketParseState){b=-1;if(void 0==g.socketXHeader.connection||"close"!=g.socketXHeader.connection.toLowerCase()||void 0!=g.socketXHeader["transfer-encoding"]&&
46 +"chunked"==g.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=g.socketXHeader["content-length"]){b=parseInt(g.socketXHeader["content-length"]);if(g.socketAccumulator.length<b)break;a=g.socketAccumulator.substring(0,b);g.socketAccumulator=g.socketAccumulator.substring(b);g.socketData=a;b=0}else{var p=g.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(g.socketAccumulator.substring(0,p),16);if(isNaN(b)){g.websocket&&g.websocket.close();break}if(g.socketAccumulator.length<p+2+b+2)break;
47 +a=g.socketAccumulator.substring(p+2,p+2+b);g.socketAccumulator=g.socketAccumulator.substring(p+2+b+2);g.socketData+=a}else b=0;if(0==b){p=g.socketXHeader;b=g.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++g.authcounter){if(g.challengeParams=g.parseDigest(p["www-authenticate"]),null!=g.challengeParams.qop){b=g.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 +g.challengeParams.qop="auth-int":g.challengeParams.qop="auth"}}else p=g.pendingAjaxCall.shift(),g.authcounter=0,g.ActiveAjaxCount--,g.gotNextMessages(b,"success",{status:a},p),g.PerformNextAjax();g.socketParseState=0;g.socketHeader=null}}}}function r(a){0==g.inDataCount&&(g.tlsv1only=1-g.tlsv1only);g.socketState=0;null!=g.socket&&(g.socket.close(),g.socket=null);if(0<g.pendingAjaxCall.length){a=g.pendingAjaxCall.shift();var b=a[5];g.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var g={PendingAjax:[],
49 +ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};g.host=b;g.port=c;g.user=a;g.pass=d;g.tls=e;g.tlsv1only=0;g.inDataCount=0;g.amtVersion=null;g.digestRealmMatch=null;g.digestRealm=null;g.PerformAjax=function(a,b,c,p,d,h){g.ActiveAjaxCount<g.MaxActiveAjaxCount&&0==g.PendingAjax.length?g.PerformAjaxEx(a,b,c,d,h):1==p?g.PendingAjax.unshift([a,b,c,d,h]):g.PendingAjax.push([a,b,c,d,h])};g.PerformNextAjax=function(){if(!(g.ActiveAjaxCount>=
50 +g.MaxActiveAjaxCount||0==g.PendingAjax.length)){var a=g.PendingAjax.shift();g.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);g.PerformNextAjax()}};g.PerformAjaxEx=function(a,b,c,p,d){if(0!=g.FailAllError)g.gotNextMessagesError({status:g.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),g.ActiveAjaxCount++,g.PerformAjaxExNodeJS(a,b,c,p,d)};g.pendingAjaxCall=[];g.PerformAjaxExNodeJS=function(a,b,c,p,d){g.PerformAjaxExNodeJS2(a,
51 +b,c,p,d,5)};g.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=g.FailAllError?(g.ActiveAjaxCount--,999!=g.FailAllError&&g.gotNextMessages(null,"error",{status:0==g.FailAllError?408:g.FailAllError},[a,b,c,p,d]),g.PerformNextAjax()):(g.pendingAjaxCall.push([a,b,c,p,d,h]),0==g.socketState?g.xxConnectHttpSocket():2==g.socketState&&g.sendRequest(a,p,d))};g.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=g.challengeParams){g.digestRealm=g.challengeParams.realm;
52 +if(g.digestRealmMatch&&g.digestRealm!=g.digestRealmMatch){g.FailAllError=997;g.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(g.user+":"+g.challengeParams.realm+":"+g.pass)+":"+g.challengeParams.nonce+":"+n(g.noncecounter)+":"+d+":"+g.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==g.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+g.renderDigest({username:g.user,realm:g.challengeParams.realm,nonce:g.challengeParams.nonce,uri:b,qop:g.challengeParams.qop,
53 +response:c,nc:n(g.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+g.host+":"+g.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==g.socketState&&null!=g.socket&&g.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{g.socket.send(b.buffer)}catch(h){}}};g.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};g.renderDigest=function(a){var b=
54 +[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+","+("nc"==c||"qop"==c?c+"="+a[c]:c+'="'+a[c]+'"')},"").substring(1)};g.xxConnectHttpSocket=function(){g.inDataCount=0;g.socketState=1;g.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+g.host+"&port="+g.port+"&tls="+g.tls+"&tls1only="+g.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 +typeof d?"&serverauth=1&user="+a:""));g.socket.binaryType="arraybuffer";g.socket.onopen=l;g.socket.onmessage=p;g.socket.onclose=r};g.gotNextMessages=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](a,c.status,p[2])};g.gotNextMessagesError=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](g,null,{Header:{HttpError:a.status}},a.status,p[2])};g.CancelAllQueries=function(a){for(;0<g.PendingAjax.length;){var b=
56 +g.PendingAjax.shift();b[1](null,a,b[2])}null!=g.websocket&&(g.websocket.close(),g.websocket=null,g.socketState=0)};return g},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
57 function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;
58 d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?
59 d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,
60 0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):d.Stop(2);
61 -else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),e=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),q=q+(e+
62 -1),e=0,e=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(e=n[q],e=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),w="00000002:"+C+":"+e+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(q+=e.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 -p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(e.length)+e);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
61 +else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var r=0,p=n[r],l=a(new Uint8Array(n.buffer.slice(r+1,r+1+p))),r=r+(p+1),g=n[r],p=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),r=r+(g+
62 +1),g=0,g=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[r],g=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),w="00000002:"+C+":"+g+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));r=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(r+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(r)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 +p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
64 break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;
65 break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&
66 1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+
67 "/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=
68 --1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,g,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
68 +-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
69 b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b="",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";
70 var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";
71 -b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,g,v);q.PerformAjax=function(a,b,c,p,d){null==d&&(d="");q.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" '+
72 -d+"><Header><a:Action>"+a,function(a,c,e){var p=q.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(q,p.Header.ResourceURI,p,c,e)}else b(q,null,{Header:{HttpError:c}},601,e)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,h,g,l,B){var x="",A="";
73 -g="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 -B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",A='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=g&&(g="<a:ReferenceParameters><m:arg>"+g+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+
75 -"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+g+"</e:NotifyTo>"+A+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=
76 -function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 -q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=q.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var g in b)if(b.hasOwnProperty(g)&&0!==g.indexOf("__")&&0!==g.indexOf("@")&&null!=b[g]&&"function"!==typeof b[g])if("object"===typeof b[g]&&
78 -b[g].ReferenceParameters){a+="<r:"+g+"><a:Address>"+b[g].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[g].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[g].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+g+">"}else if(Array.isArray(b[g]))for(B=0;B<b[g].length;B++)a+=
79 -"<r:"+g+">"+b[g][B].toString()+"</r:"+g+">";else a+="<r:"+g+">"+b[g].toString()+"</r:"+g+">";b=a+("</r:"+h+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var h=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
80 -p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var g in b)a+="<g:"+g+">"+b[g]+"</g:"+g+">";q.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
81 -p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>",b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,
82 -h){var g="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])g+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else g+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,g,p,d,k,h)};q.ExecMethodXml=function(a,b,c,d,m,k,h){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
83 -p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>',
84 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var g=a.getElementsByTagName("Body")[0];g||(g=a.getElementsByTagName("a:Body")[0]);
86 -if(!g)return null;if(0<g.childNodes.length){k=g.childNodes[0].localName;var q=k.indexOf("_OUTPUT");-1!=q&&q==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(g.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",g,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
87 -function AmtStackCreateService(b){function c(){var a=e.GetPendingActions();C<a&&(C=a);null!=e.onProcessChanged&&w!=a&&(w=a,e.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,z,h,k){200!=z?(c(e,a,null,z,h),g(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?e.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,e,p,z){d(a,p,c,e,[],z,h,k)}):(c(e,a,null,603,h),g(1))}function d(a,b,p,h,z,E,k,m){if(200!=E)p(e,a,null,E,k),g(1);else if(null==b||"PullResponse"!=b.Header.Method)p(e,
88 -a,null,604,k),g(1);else{for(var r in b.Body.Items)if(b.Body.Items[r]instanceof Array)for(var q in b.Body.Items[r])"function"!=typeof b.Body.Items[r][q]&&z.push(b.Body.Items[r][q]);else"function"!=typeof b.Body.Items[r]&&z.push(b.Body.Items[r]);b.Body.EnumerationContext?e.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,e,A){d(a,e,p,c,z,A,k,1)}):(g(1),p(e,a,z,E,k),c())}}function g(a){e.ActiveEnumsCount-=a;e.ActiveEnumsCount>=e.MaxActiveEnumsCount||0==e.PendingEnums.length?c():(a=e.PendingEnums.shift(),
89 -e.Enum(a[0],a[1],a[2]),g(0))}function v(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]),function(b,c,p,d){null==p||200!=d?a.callback(e,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](e,null,d[2]);else e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,z){if(200!=d||"0"!=c.Body.ReturnValue)z[0](e,
90 -null,z[2]);else{var h,m,g;b=z[2];d=new Date;var r=c.Body.RecordArray;"string"===typeof r&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in r){a=null;try{a=window.atob(r[h])}catch(q){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){g={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),
91 -EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)g.EventData.push(a.charCodeAt(m));g.EntityStr=k[g.Entity];g.Desc=p(g.EventSensorType,g.EventOffset,g.EventData,g.Entity);g.EntityStr||(g.EntityStr="Unknown");b.push(g)}}if(1!=c.Body.NoMoreRecords)e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[z[0],b,z[2]]);else z[0](e,b,z[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Dati non validi";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
92 -r[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
93 -64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
94 -a&&170==c[0])return"Cane da guardia dell'agente"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... cambiato in"+e.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Caso di intrusione";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"\u00c8 stata stabilita una sessione seriale su LAN remota.";if(1==c[2])return"Sessione remota su seriale via LAN terminata. Il controllo utente \u00e8 stato ripristinato.";if(2==c[2])return"\u00c8 stata stabilita una sessione di reindirizzamento IDE remoto.";
71 +b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var r={NextMessageId:1,Address:"/wsman"};r.comm=CreateWsmanComm(b,c,a,d,e,v);r.PerformAjax=function(a,b,c,p,d){null==d&&(d="");r.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" '+
72 +d+"><Header><a:Action>"+a,function(a,c,g){var p=r.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(r,p.Header.ResourceURI,p,c,g)}else b(r,null,{Header:{HttpError:c}},601,g)},c,p)};r.CancelAllQueries=function(a){r.comm.CancelAllQueries(a)};r.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};r.ExecSubscribe=function(a,b,c,d,m,k,h,e,l,B){var x="",z="";
73 +e="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 +B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=e&&(e="<a:ReferenceParameters><m:arg>"+e+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+r.Address+
75 +"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+e+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";r.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};r.ExecUnSubscribe=
76 +function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";r.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};r.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 +r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=r.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var e in b)if(b.hasOwnProperty(e)&&0!==e.indexOf("__")&&0!==e.indexOf("@")&&null!=b[e]&&"function"!==typeof b[e])if("object"===typeof b[e]&&
78 +b[e].ReferenceParameters){a+="<r:"+e+"><a:Address>"+b[e].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[e].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[e].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+e+">"}else if(Array.isArray(b[e]))for(B=0;B<b[e].length;B++)a+=
79 +"<r:"+e+">"+b[e][B].toString()+"</r:"+e+">";else a+="<r:"+e+">"+b[e].toString()+"</r:"+e+">";b=a+("</r:"+h+">")}else b="";r.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};r.ExecCreate=function(a,b,c,d,m,k){var h=r.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
80 +p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";r.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};r.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
81 +p(b)+"</Header><Body /></Envelope>";r.PerformAjax(a,c,d,m)};r.ExecGet=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>",b,c,p)};r.ExecMethod=function(a,b,c,p,d,k,
82 +h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])e+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";r.ExecMethodXml(a,b,e,p,d,k,h)};r.ExecMethodXml=function(a,b,c,d,m,k,h){r.PerformAjax(a+"/"+b+"</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
83 +p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};r.ExecEnum=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>',
84 +b,c,p)};r.ExecPull=function(a,b,c,p,d){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 +c,p,d)};r.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var e=a.getElementsByTagName("Body")[0];e||(e=a.getElementsByTagName("a:Body")[0]);
86 +if(!e)return null;if(0<e.childNodes.length){k=e.childNodes[0].localName;var r=k.indexOf("_OUTPUT");-1!=r&&r==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(e.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",e,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return r};
87 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();C<a&&(C=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,g,p,y){d(a,p,c,g,[],y,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,p,h,y,E,k,m){if(200!=E)p(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(g,
88 +a,null,604,k),e(1);else{for(var u in b.Body.Items)if(b.Body.Items[u]instanceof Array)for(var r in b.Body.Items[u])"function"!=typeof b.Body.Items[u][r]&&y.push(b.Body.Items[u][r]);else"function"!=typeof b.Body.Items[u]&&y.push(b.Body.Items[u]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,p,c,y,z,k,1)}):(e(1),p(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
89 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
90 +null,y[2]);else{var h,m,e;b=y[2];d=new Date;var u=c.Body.RecordArray;"string"===typeof u&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in u){a=null;try{a=window.atob(u[h])}catch(r){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){e={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),
91 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)e.EventData.push(a.charCodeAt(m));e.EntityStr=k[e.Entity];e.Desc=p(e.EventSensorType,e.EventOffset,e.EventData,e.Entity);e.EntityStr||(e.EntityStr="Unknown");b.push(e)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Dati non validi";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("One Click Recovery: {0}",
92 +u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("One Click Recovery: {0}",h[c[2]]):format("One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&64==c[1]){if(1==
93 +c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
94 +a&&170==c[0])return"Cane da guardia dell'agente"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... cambiato in"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Caso di intrusione";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"\u00c8 stata stabilita una sessione seriale su LAN remota.";if(1==c[2])return"Sessione remota su seriale via LAN terminata. Il controllo utente \u00e8 stato ripristinato.";if(2==c[2])return"\u00c8 stata stabilita una sessione di reindirizzamento IDE remoto.";
95 if(3==c[2])return"Sessione di reindirizzamento IDE remoto terminata. Il controllo utente \u00e8 stato ripristinato."}if(36==a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="cablata"),4294967293==a?"Tutti i filtri di pacchetti ricevuti sono stati abbinati"+b+" interfaccia.":4294967292==a?"Tutto il filtro pacchetti in uscita \u00e8 stato associato"+b+" interfaccia.":4294967290==a?"Il filtro pacchetti contraffatto \u00e8 stato abbinato"+b+" interfaccia.":"Filtro"+a+" \u00e8 stato abbinato"+
96 b+" interfaccia.";if(192==a)return 0==c[2]?"Politica di sicurezza invocata. Parte o tutto il traffico di rete (TX) \u00e8 stato arrestato.":2==c[2]?"Politica di sicurezza invocata. Parte o tutto il traffico di rete (RX) \u00e8 stato arrestato.":"Politica di sicurezza invocata.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"Richiesta dell'utente per la connessione remota.";if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"Errore EAC: tenta di ottenere la postura mentre NAC in Intel AMT \u00e8 disabilitato.";
97 if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"Errore HWA: errore generale"}return 6==a?"Autenticazione fallita"+(c[1]+(c[2]<<8))+" volte. Il sistema potrebbe essere sotto attacco.":30==a?"Nessun supporto di avvio":32==a?"Blocco del sistema operativo o interruzione dell'alimentazione":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"Errore di avvio del sistema":37==a?"Firmware di sistema avviato (almeno una CPU si sta eseguendo correttamente).":"Tipo di sensore sconosciuto #"+a}
98 -function q(a,b,c,p,d){if(200!=p)d[0](e,[],p);else{var h,k,m=d[1],g=new Date,r;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),
99 -b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Locale</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>Porta predefinita KVM</i>",h=5);r=ReadInt(a,h);b.Time=new Date(1E3*(r+60*g.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);r=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+r);h+=r;r=a.charCodeAt(h++);b.Ex=a.substring(h,h+r);b.ExStr=
100 -e.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)e.AMT_AuditLog_ReadRecords(m.length+1,q,[d[0],m]);else d[0](e,m,p)}}var e={};e.wsman=b;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 C=0,w=0;e.GetPendingActions=function(){return 2*
101 -e.PendingEnums.length+e.ActiveEnumsCount+e.wsman.comm.PendingAjax.length+e.wsman.comm.ActiveAjaxCount+e.PendingBatchOperations};e.Subscribe=function(a,b,p,d,z,h,k,m,g,r){e.wsman.ExecSubscribe(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,y,A,z)},0,h,k,m,g,r);c()};e.UnSubscribe=function(a,b,p,d,z){e.wsman.ExecUnSubscribe(e.CompleteName(a),function(d,z,h,k){c();b(e,a,h,k,p)},0,d,z);c()};e.Get=function(a,b,p,d){e.wsman.ExecGet(e.CompleteName(a),function(d,h,k,m){c();b(e,a,k,m,p)},0,d);c()};e.Put=
102 -function(a,b,p,d,z,h){e.wsman.ExecPut(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z,h);c()};e.Create=function(a,b,p,d,z){e.wsman.ExecCreate(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Delete=function(a,b,p,d,z){e.wsman.ExecDelete(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Exec=function(a,b,p,d,z,h,k){e.wsman.ExecMethod(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.ExecWithXml=function(a,
103 -b,p,d,z,h,k){e.wsman.ExecMethodXml(e.CompleteName(a),b,execArgumentsToXml(p),function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.Enum=function(b,p,d,h){e.ActiveEnumsCount<e.MaxActiveEnumsCount?(e.ActiveEnumsCount++,e.wsman.ExecEnum(e.CompleteName(b),function(e,d,y,h,k){c();a(b,y,p,d,h,k)},d,h)):e.PendingEnums.push([b,p,d,h]);c()};e.BatchEnum=function(a,b,p,d,z,h){z={_pending:b.length};e.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],g=e.Enum;"*"==m[0]&&(g=e.Get,
104 -m=m.substring(1));g(m,function(b,z,A,h,k){e.PendingBatchOperations--;c();k[2][z]={response:null==A?null:A.Body,responses:A,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(e,e,a,k[2],h,d))},[a,b,z,g==e.Get?"Get":"Enum"],h)}};e.BatchGet=function(a,b,p,e,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:e,pri:d});c()};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==a.indexOf("IPS_"))return e.pfx[2]+a};e.CompleteExecResponse=
105 -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,b){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>',
106 -null,null,b)};e.RequestOSPowerStateChange=function(a,b){e.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
107 -null,null,b)};e.SetBootConfigRole=function(a,b){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>',
108 -a,b)};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,b){e.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
109 -k,m,g){e.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,g)};e.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){e.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};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=
110 -function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){e.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};e.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA",
111 -"DeleteAllActions",{_method_dummy:a},b)};e.AMT_AuditLog_ClearLog=function(a){e.Exec("AMT_AuditLog","ClearLog",{},a)};e.AMT_AuditLog_RequestStateChange=function(a,b,c){e.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_AuditLog_ReadRecords=function(a,b,c){e.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};e.AMT_AuditLog_SetAuditLock=function(a,b,c,p){e.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};e.AMT_AuditLog_ExportAuditLogSignature=
112 -function(a,b){e.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};e.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){e.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule",
113 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){e.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};e.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){e.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};e.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService",
114 -"GetUserAclEntryEx",{Handle:a},b,c)};e.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){e.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};e.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){e.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};e.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
115 -{Username:a,DigestPassword:b},c)};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,b,c,p){e.Exec("AMT_AuthorizationService",
116 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};e.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){e.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};e.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_EndpointAccessControlService_GetPosture=function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};e.AMT_EndpointAccessControlService_GetPostureHash=
117 -function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};e.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){e.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};e.AMT_EndpointAccessControlService_GetEacOptions=function(a){e.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};e.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
118 -PostureHashAlgorithm:b},c)};e.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};e.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};e.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){e.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};e.AMT_GeneralSettings_AMTAuthenticate=
119 -function(a,b){e.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};e.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){e.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};e.AMT_KerberosSettingData_GetCredentialCacheState=function(a){e.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};e.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){e.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
120 -b)};e.AMT_MessageLog_CancelIteration=function(a,b){e.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};e.AMT_MessageLog_RequestStateChange=function(a,b,c){e.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_MessageLog_ClearLog=function(a){e.Exec("AMT_MessageLog","ClearLog",{},a)};e.AMT_MessageLog_GetRecords=function(a,b,c,p){e.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};e.AMT_MessageLog_GetRecord=function(a,
121 -b,c){e.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};e.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){e.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};e.AMT_MessageLog_PositionToFirstRecord=function(a,b){e.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};e.AMT_MessageLog_FreezeLog=function(a,b){e.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};e.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){e.Exec("AMT_PublicKeyManagementService",
122 -"AddCRL",{Url:a,SerialNumbers:b},c)};e.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){e.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};e.AMT_PublicKeyManagementService_AddCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddKey=
123 -function(a,b){e.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};e.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};e.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};e.AMT_PublicKeyManagementService_GenerateKeyPair=
124 -function(a,b,c){e.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};e.AMT_RedirectionService_RequestStateChange=function(a,b){e.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};e.AMT_RedirectionService_TerminateSession=function(a,b){e.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};e.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,g){e.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
125 -Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},g)};e.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){e.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};e.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){e.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){e.Exec("AMT_SetupAndConfigurationService",
126 -"CommitChanges",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_Unprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};e.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
127 -e.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};e.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){e.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};e.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){e.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){e.Exec("AMT_SetupAndConfigurationService",
128 -"GetProvisioningAuditRecord",{},a)};e.AMT_SetupAndConfigurationService_GetUuid=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};e.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){e.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};e.AMT_SystemDefensePolicy_GetTimeout=
129 -function(a){e.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};e.AMT_SystemDefensePolicy_SetTimeout=function(a,b){e.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};e.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){e.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};e.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){e.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};e.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
130 -function(a,b){e.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};e.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){e.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};e.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){e.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WebUIService_RequestStateChange=function(a,b,c){e.Exec("AMT_WebUIService",
131 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
132 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};e.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};e.CIM_Account_RequestStateChange=function(a,b,c){e.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
133 -c)};e.CIM_AccountManagementService_CreateAccount=function(a,b,c){e.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};e.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){e.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};e.CIM_BootService_SetBootConfigRole=function(a,b,c){e.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};e.CIM_BootService_RequestStateChange=function(a,b,c,p){e.Exec("CIM_BootService","RequestStateChange",
134 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};e.CIM_Card_ConnectorPower=function(a,b,c){e.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};e.CIM_Card_IsCompatible=function(a,b){e.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};e.CIM_Chassis_IsCompatible=function(a,b){e.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};e.CIM_Fan_SetSpeed=function(a,b){e.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};e.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){e.Exec("CIM_KVMRedirectionSAP",
135 -"RequestStateChange",{RequestedState:a},c)};e.CIM_MediaAccessDevice_LockMedia=function(a,b){e.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};e.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){e.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_MediaAccessDevice_Reset=function(a){e.Exec("CIM_MediaAccessDevice","Reset",{},a)};e.CIM_MediaAccessDevice_EnableDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};e.CIM_MediaAccessDevice_OnlineDevice=
136 -function(a,b){e.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};e.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};e.CIM_MediaAccessDevice_SaveProperties=function(a){e.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};e.CIM_MediaAccessDevice_RestoreProperties=function(a){e.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};e.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){e.Exec("CIM_MediaAccessDevice","RequestStateChange",
137 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_PhysicalFrame_IsCompatible=function(a,b){e.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};e.CIM_PhysicalPackage_IsCompatible=function(a,b){e.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};e.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){e.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.CIM_PowerSupply_SetPowerState=function(a,
138 -b,c){e.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_PowerSupply_Reset=function(a){e.Exec("CIM_PowerSupply","Reset",{},a)};e.CIM_PowerSupply_EnableDevice=function(a,b){e.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};e.CIM_PowerSupply_OnlineDevice=function(a,b){e.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};e.CIM_PowerSupply_QuiesceDevice=function(a,b){e.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};e.CIM_PowerSupply_SaveProperties=function(a){e.Exec("CIM_PowerSupply",
139 -"SaveProperties",{},a)};e.CIM_PowerSupply_RestoreProperties=function(a){e.Exec("CIM_PowerSupply","RestoreProperties",{},a)};e.CIM_PowerSupply_RequestStateChange=function(a,b,c){e.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Processor_SetPowerState=function(a,b,c){e.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Processor_Reset=function(a){e.Exec("CIM_Processor","Reset",{},a)};e.CIM_Processor_EnableDevice=function(a,b){e.Exec("CIM_Processor",
140 -"EnableDevice",{Enabled:a},b)};e.CIM_Processor_OnlineDevice=function(a,b){e.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};e.CIM_Processor_QuiesceDevice=function(a,b){e.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Processor_SaveProperties=function(a){e.Exec("CIM_Processor","SaveProperties",{},a)};e.CIM_Processor_RestoreProperties=function(a){e.Exec("CIM_Processor","RestoreProperties",{},a)};e.CIM_Processor_RequestStateChange=function(a,b,c){e.Exec("CIM_Processor","RequestStateChange",
141 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RecordLog_ClearLog=function(a){e.Exec("CIM_RecordLog","ClearLog",{},a)};e.CIM_RecordLog_RequestStateChange=function(a,b,c){e.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RedirectionService_RequestStateChange=function(a,b,c){e.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Sensor_SetPowerState=function(a,b,c){e.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
142 -c)};e.CIM_Sensor_Reset=function(a){e.Exec("CIM_Sensor","Reset",{},a)};e.CIM_Sensor_EnableDevice=function(a,b){e.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};e.CIM_Sensor_OnlineDevice=function(a,b){e.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};e.CIM_Sensor_QuiesceDevice=function(a,b){e.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Sensor_SaveProperties=function(a){e.Exec("CIM_Sensor","SaveProperties",{},a)};e.CIM_Sensor_RestoreProperties=function(a){e.Exec("CIM_Sensor","RestoreProperties",
143 -{},a)};e.CIM_Sensor_RequestStateChange=function(a,b,c){e.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_StatisticalData_ResetSelectedStats=function(a,b){e.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};e.CIM_Watchdog_KeepAlive=function(a){e.Exec("CIM_Watchdog","KeepAlive",{},a)};e.CIM_Watchdog_SetPowerState=function(a,b,c){e.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Watchdog_Reset=function(a){e.Exec("CIM_Watchdog",
144 -"Reset",{},a)};e.CIM_Watchdog_EnableDevice=function(a,b){e.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};e.CIM_Watchdog_OnlineDevice=function(a,b){e.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};e.CIM_Watchdog_QuiesceDevice=function(a,b){e.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};e.CIM_Watchdog_SaveProperties=function(a){e.Exec("CIM_Watchdog","SaveProperties",{},a)};e.CIM_Watchdog_RestoreProperties=function(a){e.Exec("CIM_Watchdog","RestoreProperties",{},a)};e.CIM_Watchdog_RequestStateChange=
145 -function(a,b,c){e.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_WiFiPort_SetPowerState=function(a,b,c){e.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_WiFiPort_Reset=function(a){e.Exec("CIM_WiFiPort","Reset",{},a)};e.CIM_WiFiPort_EnableDevice=function(a,b){e.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};e.CIM_WiFiPort_OnlineDevice=function(a,b){e.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};e.CIM_WiFiPort_QuiesceDevice=function(a,
146 -b){e.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};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,b,c){e.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){e.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
147 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};e.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};e.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){e.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},h)};e.IPS_HostBasedSetupService_UpgradeClientToAdmin=
148 -function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};e.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){e.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};e.IPS_KVMRedirectionSettingData_TerminateSession=function(a){e.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){e.Exec("IPS_KVMRedirectionSettingData",
149 -"DataChannelRead",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){e.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};e.IPS_OptInService_StartOptIn=function(a){e.Exec("IPS_OptInService","StartOptIn",{},a)};e.IPS_OptInService_CancelOptIn=function(a){e.Exec("IPS_OptInService","CancelOptIn",{},a)};e.IPS_OptInService_SendOptInCode=function(a,b){e.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};e.IPS_OptInService_StartService=function(a){e.Exec("IPS_OptInService",
150 -"StartService",{},a)};e.IPS_OptInService_StopService=function(a){e.Exec("IPS_OptInService","StopService",{},a)};e.IPS_OptInService_RequestStateChange=function(a,b,c){e.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){e.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.IPS_ProvisioningRecordLog_RequestStateChange=
151 -function(a,b,c){e.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_ProvisioningRecordLog_ClearLog=function(a,b){e.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};e.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){e.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};e.IPS_SecIOService_RequestStateChange=function(a,b,c){e.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
152 -TimeoutPeriod:b},c)};e.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){e.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};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",
153 -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",
154 -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",
155 -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",
156 -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,b){e.AMT_MessageLog_PositionToFirstRecord(n,
157 -[a,b,[]])};var D="Non specificato. ; Nessuna memoria di sistema fisicamente installata nel sistema. ; Nessuna memoria di sistema utilizzabile, tutta la memoria installata ha riscontrato un errore irreversibile. ; Errore irreversibile del disco fisso / ATAPI / IDE. ; Errore irreversibile della scheda di sistema. ; Dischetto irreversibile errore del sottosistema. ; Errore irreversibile del controller del disco fisso. ; Errore irreversibile della tastiera PS / 2 o USB. ; Supporto di avvio rimovibile non trovato. ; Errore irreversibile del controller video. ; Nessun dispositivo video rilevato. ; Corruzione del firmware (BIOS) ROM rilevata. ; Mancata corrispondenza della tensione della CPU (i processori che condividono la stessa alimentazione hanno requisiti di tensione non corrispondenti) ; Errore di corrispondenza della velocit\u00e0 della CPU".split(";"),
98 +function r(a,b,c,p,d){if(200!=p)d[0](g,[],p);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),
99 +b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Locale</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>Porta predefinita KVM</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=
100 +g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,r,[d[0],m]);else d[0](g,m,p)}}var g={};g.wsman=b;g.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/"];g.PendingEnums=[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var C=0,w=0;g.GetPendingActions=function(){return 2*
101 +g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,p,d,y,h,k,m,e,u){g.wsman.ExecSubscribe(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,A,z,y)},0,h,k,m,e,u);c()};g.UnSubscribe=function(a,b,p,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,p)},0,d,y);c()};g.Get=function(a,b,p,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,p)},0,d);c()};g.Put=
102 +function(a,b,p,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,p,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,p,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,p,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=function(a,
103 +b,p,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,p,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(g,d,A,h,k){c();a(b,A,p,d,h,k)},d,h)):g.PendingEnums.push([b,p,d,h]);c()};g.BatchEnum=function(a,b,p,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],e=g.Enum;"*"==m[0]&&(e=g.Get,
104 +m=m.substring(1));e(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(g,g,a,k[2],h,d))},[a,b,y,e==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,p,g,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:g,pri:d});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=
105 +function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.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>',
106 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
107 +null,null,b)};g.SetBootConfigRole=function(a,b){g.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>',
108 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
109 +k,m,e){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,e)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
110 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
111 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,p){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};g.AMT_AuditLog_ExportAuditLogSignature=
112 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule",
113 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
114 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
115 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){g.Exec("AMT_AuthorizationService",
116 +"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
117 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
118 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
119 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
120 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,p){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};g.AMT_MessageLog_GetRecord=function(a,
121 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
122 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
123 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
124 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,e){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
125 +Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},e)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
126 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
127 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
128 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
129 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
130 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
131 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){console.log(JSON.stringify({WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},null,2));g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=
132 +function(a,b,c,p,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},
133 +b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,
134 +Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,p){g.Exec("CIM_BootService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c,p,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan",
135 +"SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=
136 +function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",
137 +{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",
138 +{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply",
139 +"QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply","SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor",
140 +"Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor","EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=
141 +function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,
142 +b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=
143 +function(a){g.Exec("CIM_Sensor","RestoreProperties",{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},
144 +c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog","Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog",
145 +"RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",
146 +{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){g.Exec("IPS_HostBasedSetupService",
147 +"Setup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,
148 +DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=
149 +function(a){g.Exec("IPS_KVMRedirectionSettingData","DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};
150 +g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService","StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,
151 +Time:c,TimeoutPeriod:p},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=
152 +function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",
153 +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",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",
154 +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",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",
155 +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",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",
156 +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",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",
157 +4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,[a,b,[]])};var D="Non specificato. ; Nessuna memoria di sistema fisicamente installata nel sistema. ; Nessuna memoria di sistema utilizzabile, tutta la memoria installata ha riscontrato un errore irreversibile. ; Errore irreversibile del disco fisso / ATAPI / IDE. ; Errore irreversibile della scheda di sistema. ; Dischetto irreversibile errore del sottosistema. ; Errore irreversibile del controller del disco fisso. ; Errore irreversibile della tastiera PS / 2 o USB. ; Supporto di avvio rimovibile non trovato. ; Errore irreversibile del controller video. ; Nessun dispositivo video rilevato. ; Corruzione del firmware (BIOS) ROM rilevata. ; Mancata corrispondenza della tensione della CPU (i processori che condividono la stessa alimentazione hanno requisiti di tensione non corrispondenti) ; Errore di corrispondenza della velocit\u00e0 della CPU".split(";"),
158 m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS 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(";"),
159 k="Non specificato ; Altro ; Sconosciuto ; Processore ; Disco ; Periferiche ; Modulo di gestione del sistema ; Scheda di sistema ; Modulo di memoria ; Modulo del processore ; Alimentazione ; Scheda aggiuntiva ; Scheda del pannello anteriore ; Scheda del pannello posteriore ; Scheda del sistema di alimentazione ; Backplane dell'unit\u00e0 ; Espansione interna del sistema scheda ; Altre schede di sistema ; Scheda del processore ; Unit\u00e0 di potenza ; Modulo di potenza ; Scheda di gestione dell'alimentazione ; Scheda del pannello posteriore del telaio ; Telaio del sistema ; Sottotelaio ; Altre schede del telaio ; Alloggiamento unit\u00e0 disco ; Alloggiamento periferiche ; Alloggiamento dispositivo ; Ventola di raffreddamento ; Unit\u00e0 di raffreddamento ; Cavo di interconnessione ; Dispositivo di memoria ; Software di gestione del sistema ; BIOS ; Intel (r) ME ; Bus di sistema ; Gruppo ; Intel (r) ME ; Ambiente esterno ; Batteria ; Lama di elaborazione ; Interruttore di connettivit\u00e0 ; Modulo processore / memoria ; Modulo I / O ; Modulo I / O del processore ; Firmware del controller di gestione ; Canale IPMI ; Bus PCI ; Bus PCI express ; Bus SCSI ; Bus SATA / SAS ; Bus lato anteriore del processore".split(";");
160 -e.RealmNames=";; Reindirizzamento ;; Risorse hardware ; Telecomando ; Archiviazione ; Gestione eventi ; Amministratore archiviazione ; Presenza agente locale ; Presenza agente remoto ; Interruttore automatico ; Tempo di rete ; Informazioni generali ; Aggiornamento firmware ; EIT ; LocalUN ; Controllo accesso endpoint ; Controllo accesso endpoint Amministratore ; Lettore registro eventi ; Registro controllo ; Regno ACL ;;; Sistema locale".split(";");e.WatchdogCurrentStates={1:"Non iniziato",2:"Fermato",
161 -4:"In esecuzione",8:"Scaduto",16:"Sospeso"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),r=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),K={1:"",
160 +g.RealmNames=";; Reindirizzamento ;; Risorse hardware ; Telecomando ; Archiviazione ; Gestione eventi ; Amministratore archiviazione ; Presenza agente locale ; Presenza agente remoto ; Interruttore automatico ; Tempo di rete ; Informazioni generali ; Aggiornamento firmware ; EIT ; LocalUN ; Controllo accesso endpoint ; Controllo accesso endpoint Amministratore ; Lettore registro eventi ; Registro controllo ; Regno ACL ;;; Sistema locale".split(";");g.WatchdogCurrentStates={1:"Non iniziato",2:"Fermato",
161 +4:"In esecuzione",8:"Scaduto",16:"Sospeso"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),K={1:"",
162 2:"HTTPS",4:"Local PBA",8:"WinRE"},B={16:"Security Admin",17:"RCO",18:"Manager di reindirizzamento",19:"Firmware Update Manager",20:"Registro di controllo della sicurezza",21:"Tempo di rete",22:"Amministrazione di rete",23:"Amministrazione archiviazione",24:"Manager di eventi",25:"Responsabile dell'interruttore",26:"Manager di presenza agente",27:"Configurazione senza fili",28:"EAC",29:"KVM",30:"Eventi di attivazione dell'utente",32:"Oscuramento dello schermo",33:"Eventi del cane da guardia",1600:"Provisioning avviato",
163 1601:"Provisioning completato",1602:"Voce ACL aggiunta",1603:"Voce ACL modificata",1604:"Voce ACL rimossa",1605:"Accesso ACL con credenziali non valide",1606:"Stato di ingresso ACL",1607:"Stato TLS modificato",1608:"Set di certificati server TLS",1609:"Rimuovi certificato server TLS",1610:"Aggiunto certificato radice attendibile TLS",1611:"Certificato radice radice TLS rimosso",1612:"Set chiavi precondivise TLS",1613:"Impostazioni Kerberos modificate",1614:"Chiave principale Kerberos modificata",
164 1615:"Ripristino contatori flash usurati",1616:"Pacchetto di alimentazione modificato",1617:"Imposta la modalit\u00e0 di autenticazione del realm",1618:"Aggiorna il client alla modalit\u00e0 di controllo amministratore",1619:"Annullamento del provisioning avviato",1700:"Accensione eseguita",1701:"Spegnimento eseguito",1702:"Ciclo di potenza eseguito",1703:"Ripristino eseguito",1704:"Imposta le opzioni di avvio",1705:"Remote graceful power down initiated",1706:"Remote graceful reset initiated",1707:"Remote Standby initiated",
@@ -166,109 +166,109 @@ e.RealmNames=";; Reindirizzamento ;; Risorse hardware ; Telecomando ; Archiviazi
166 2001:"Politica di controllo della sicurezza modificata",2002:"Registro controllo sicurezza disabilitato",2003:"Registro controllo sicurezza abilitato",2004:"Registro controllo di sicurezza esportato",2005:"Registro controllo di sicurezza recuperato",2100:"Intel&reg; ME Time Set",2200:"Parametri TCPIP impostati",2201:"Nome host impostato",2202:"Set di nomi di dominio",2203:"Parametri VLAN impostati",2204:"Insieme di criteri di collegamento",2205:"Parametri IPv6 impostati",2300:"Set di attributi di archiviazione globale",
167 2301:"Archiviazione EACL modificata",2302:"Memoria FPACL modificata",2303:"Operazione di scrittura in memoria",2400:"Avviso iscritto",2401:"Avviso Non iscritto",2402:"Registro eventi cancellato",2403:"Registro eventi congelato",2500:"Filtro CB aggiunto",2501:"Filtro CB rimosso",2502:"Aggiunta politica CB",2503:"Politica CB rimossa",2504:"Set di criteri predefinito CB",2505:"Set di opzioni euristiche CB",2506:"Stato euristico CB cancellato",2600:"Cane da guardia dell'agente aggiunto",2601:"Agent Watchdog rimosso",
168 2602:"Set di azioni del watchdog dell'agente",2700:"Profilo wireless aggiunto",2701:"Profilo wireless rimosso",2702:"Profilo wireless aggiornato",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",2800:"Set di firme postura EAC",2801:"EAC abilitato",2802:"EAC disabilitato",2803:"EAC Posture State",2804:"EAC Set Options",2900:"Opt-in KVM abilitato",2901:"Attivazione KVM disabilitata",
169 -2902:"Password KVM modificata",2903:"Consenso KVM riuscito",2904:"Consenso KVM non riuscito",3E3:"Modifica della politica di attivazione",3001:"Invia evento codice consenso",3002:"Avvia evento bloccato opt-in",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};e.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==
170 -b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Accesso ME non valido","Accesso MEBx non valido"][b.charCodeAt(0)];if(1606==a){var c=["Disabilitato","Abilitato"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"A distanza"+["noauth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Locale"+["noauth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?e.RealmNames[ReadInt(b,0)]+","+["noauth","auth","Disabilitato"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","MEI locale",
169 +2902:"Password KVM modificata",2903:"Consenso KVM riuscito",2904:"Consenso KVM non riuscito",3E3:"Modifica della politica di attivazione",3001:"Invia evento codice consenso",3002:"Avvia evento bloccato opt-in",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==
170 +b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Accesso ME non valido","Accesso MEBx non valido"][b.charCodeAt(0)];if(1606==a){var c=["Disabilitato","Abilitato"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"A distanza"+["noauth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Locale"+["noauth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?g.RealmNames[ReadInt(b,0)]+","+["noauth","auth","Disabilitato"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","MEI locale",
171 "WSMAN locale","WSAMN remoto"][b.charCodeAt(0)]:1900==a?"A partire dal"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" per"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"A partire dal"+["Nessuna","KVM","Tutti"][b.charCodeAt(0)]+" per"+["Nessuna","KVM","Tutti"][b.charCodeAt(1)]:3001==a?["Successo","Fallito 3 volte"][b.charCodeAt(0)]:
172 -null};e.GetAuditLog=function(a){e.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return e}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
173 -function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",g=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+g+v+">"));return a+("</r:"+b+">")}
172 +null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,r,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
173 +function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">";if("string"==typeof c)a+=c;else for(var v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
174 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
175 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
176 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
177 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function g(a,b){var c,p,e,d,x,h,k,m,g,q=b&&b.split("/"),w=r.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){q=q.slice(0,q.length-1);a=a.split("/");x=a.length-1;r.nodeIdCompat&&A.test(a[x])&&(a[x]=a[x].replace(A,""));a=q.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
178 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((q||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(q)for(g=q.length;0<g;--g)if(e=w[q.slice(0,g).join("/")])if(e=e[p]){d=e;h=x;break}if(d)break;!k&&l&&l[p]&&(k=l[p],m=x)}!d&&k&&(d=k,h=m);d&&(c.splice(0,h,d),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return g(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
179 -a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function e(a){return function(){return r&&r.config&&r.config[a]||{}}}var C,w,D,m,k={},h={},r={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,A=/\.js$/;D=function(a,b){var c,d=q(a),e=d[0];a=d[1];e&&(e=g(e,b),c=p(e));e?a=c&&c.normalize?c.normalize(a,n(b)):g(a,b):(a=g(a,b),d=q(a),
180 -e=d[0],a=d[1],e&&(c=p(e)));return{f:e?e+"!"+a:a,n:a,pr:e,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:e(a)}}};C=function(a,b,c,e){var x,g,A,r,q=[];g=typeof c;var w;e=e||a;if("undefined"===g||"function"===g){b=!b.length&&c.length?["require","exports","module"]:b;for(r=0;r<b.length;r+=1)if(A=D(b[r],e),g=A.f,"require"===g)q[r]=m.require(a);else if("exports"===g)q[r]=m.exports(a),
181 -w=!0;else if("module"===g)x=q[r]=m.module(a);else if(B.call(k,g)||B.call(h,g)||B.call(K,g))q[r]=p(g);else if(A.p)A.p.load(A.n,v(e,!0),l(g),{}),q[r]=k[g];else throw Error(a+" missing "+g);b=c?c.apply(k[a],q):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,e,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){r=a;r.deps&&w(r.deps,r.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
182 -typeof c&&(c=e,e=x);e?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(e.isArrayBuffer(a)||e.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
183 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var e=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)e.nextTick=process.nextTick,e.setImmediate="function"===typeof setImmediate?setImmediate:e.nextTick;else if("function"===typeof setImmediate)e.setImmediate=setImmediate,e.nextTick=function(a){return setImmediate(a)};
184 -else{e.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];e.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
185 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var d=e.setImmediate;e.setImmediate=function(e){15<Date.now()-b?(b=Date.now(),d(e)):(a.push(e),1===a.length&&p.setAttribute("a",c=!c))}}e.nextTick=e.setImmediate}})();e.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};e.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};e.isArrayBufferView=function(a){return a&&
186 -e.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};e.ByteBuffer=c;e.ByteStringBuffer=c;e.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};e.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};e.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};e.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
187 -e.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};e.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};e.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(e.encodeUtf8(a))};e.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
188 -255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
189 -8&255))};e.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};e.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};e.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
190 -e.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};e.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};e.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
191 -16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};e.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24Le=
192 -function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};e.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};e.ByteStringBuffer.prototype.getSignedInt=
193 -function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};e.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
194 -a)};e.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};e.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};e.ByteStringBuffer.prototype.copy=function(){var a=e.createBuffer(this.data);a.read=this.read;return a};e.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};e.ByteStringBuffer.prototype.clear=
195 -function(){this.data="";this.read=0;return this};e.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};e.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.ByteStringBuffer.prototype.toString=function(){return e.decodeUtf8(this.bytes())};e.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
196 -0;this.growSize=b.growSize||1024;var c=e.isArrayBuffer(a),p=e.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};e.DataBuffer.prototype.length=function(){return this.write-this.read};e.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
197 -e.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),p=new Uint8Array(this.length()+b);p.set(c);this.data=new DataView(p.buffer);return this};e.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};e.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
198 -return this};e.DataBuffer.prototype.putBytes=function(a,b){if(e.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var d=new Uint8Array(this.data.buffer,this.write);d.set(c);this.write+=p;return this}if(e.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),d=new Uint8Array(this.data.buffer),d.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof e.DataBuffer||"object"===typeof a&&"number"===
199 -typeof a.read&&"number"===typeof a.write&&e.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),d=new Uint8Array(a.data.byteLength,this.write),d.set(c),this.write+=c.byteLength,this;a instanceof e.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.hex.decode(a,c,this.write),this;if("base64"===
200 -b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=e.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=e.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
201 -b);}throw Error("Invalid parameter: "+a);};e.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};e.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};e.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};e.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
202 -e.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};e.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};e.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};e.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
203 -a,!0);this.write+=4;return this};e.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};e.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};e.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};e.DataBuffer.prototype.getInt24=
204 -function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};e.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};e.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};e.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};e.DataBuffer.prototype.getInt32Le=function(){var a=
205 -this.data.getInt32(this.read,!0);this.read+=4;return a};e.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};e.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
206 -e.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};e.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};e.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};e.DataBuffer.prototype.copy=function(){return new e.DataBuffer(this)};e.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
207 -new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};e.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};e.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};e.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
208 -this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return e.binary.raw.encode(b);if("hex"===a)return e.binary.hex.encode(b);if("base64"===a)return e.binary.base64.encode(b);if("utf8"===a)return e.text.utf8.decode(b);if("utf16"===a)return e.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};e.createBuffer=function(a,b){void 0!==a&&"utf8"===
209 -(b||"raw")&&(a=e.encodeUtf8(a));return new e.ByteBuffer(a)};e.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};e.xorBytes=function(a,b,c){for(var p="",e="",d="",h=0,k=0;0<c;--c,++h)e=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(p+=d,d="",k=0),d+=String.fromCharCode(e),++k;return p+d};e.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};e.bytesToHex=
210 -function(a){return e.createBuffer(a).toHex()};e.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var d=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];e.encode64=function(a,b){for(var c="",p="",e,d,h,k=0;k<a.length;)e=
211 -a.charCodeAt(k++),d=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,b)+"\r\n",c=c.substr(b));return p+
212 -c};e.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,p,e,h,k=0;k<a.length;)c=d[a.charCodeAt(k++)-43],p=d[a.charCodeAt(k++)-43],e=d[a.charCodeAt(k++)-43],h=d[a.charCodeAt(k++)-43],b+=String.fromCharCode(c<<2|p>>4),64!==e&&(b+=String.fromCharCode((p&15)<<4|e>>2),64!==h&&(b+=String.fromCharCode((e&3)<<6|h)));return b};e.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};e.decodeUtf8=function(a){return decodeURIComponent(escape(a))};e.binary={raw:{},hex:{},base64:{}};
213 -e.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};e.binary.raw.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(a.length));for(var e=c=c||0,d=0;d<a.length;++d)p[e++]=a.charCodeAt(d);return b?e-c:p};e.binary.hex.encode=e.bytesToHex;e.binary.hex.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var e=0,d=c;a.length&1&&(e=1,p[d++]=parseInt(a[0],16));for(;e<a.length;e+=2)p[d++]=parseInt(a.substr(e,2),16);return b?d-c:p};e.binary.base64.encode=
214 -function(a,b){for(var c="",p="",e,d,h,k=0;k<a.byteLength;)e=a[k++],d=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,
215 -b)+"\r\n",c=c.substr(b));return p+c};e.binary.base64.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var e,h,k,m,g=0,r=c;g<a.length;)e=d[a.charCodeAt(g++)-43],h=d[a.charCodeAt(g++)-43],k=d[a.charCodeAt(g++)-43],m=d[a.charCodeAt(g++)-43],p[r++]=e<<2|h>>4,64!==k&&(p[r++]=(h&15)<<4|k>>2,64!==m&&(p[r++]=(k&3)<<6|m));return b?r-c:p.subarray(0,r)};e.text={utf8:{},utf16:{}};e.text.utf8.encode=function(a,b,c){a=e.encodeUtf8(a);
216 -var p=b;p||(p=new Uint8Array(a.length));for(var d=c=c||0,h=0;h<a.length;++h)p[d++]=a.charCodeAt(h);return b?d-c:p};e.text.utf8.decode=function(a){return e.decodeUtf8(String.fromCharCode.apply(null,a))};e.text.utf16.encode=function(a,b,c){var p=b;p||(p=new Uint8Array(2*a.length));for(var e=new Uint16Array(p.buffer),d=c=c||0,h=c,k=0;k<a.length;++k)e[h++]=a.charCodeAt(k),d+=2;return b?d-c:p};e.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};e.deflate=function(a,
217 -b,c){b=e.decode64(a.deflate(e.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};e.inflate=function(a,b,c){a=a.inflate(e.encode64(b)).rval;return null===a?null:e.decode64(a)};var g=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=e.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
218 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(e.decode64(c)));return c},m=function(a,b,c,p){var e=l(a,b);null===e&&(e={});e[c]=p;g(a,b,e)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var p=l(a,b);if(null!==p&&c in p){delete p[c];c=!0;for(var e in p){c=!1;break}c&&(p=null);g(a,b,p)}},r=function(a,b){g(a,b,null)},K=function(a,b,
219 -c){var p=null;"undefined"===typeof c&&(c=["web","flash"]);var e,d=!1,h=null,k;for(k in c){e=c[k];try{if("flash"===e||"both"===e){if(null===b[0])throw Error("Flash local storage not available.");p=a.apply(this,b);d="flash"===e}if("web"===e||"both"===e)b[0]=localStorage,p=a.apply(this,b),d=!0}catch(m){h=m}if(d)break}if(!d)throw h;return p};e.setItem=function(a,b,c,p,e){K(m,arguments,e)};e.getItem=function(a,b,c,p){return K(k,arguments,p)};e.removeItem=function(a,b,c,p){K(h,arguments,p)};e.clearItems=
220 -function(a,b,c){K(r,arguments,c)};e.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;e.getQueryVariables=function(a){var b=function(a){var b=
221 -{};a=a.split("&");for(var c=0;c<a.length;c++){var p=a[c].indexOf("="),e;0<p?(e=a[c].substring(0,p),p=a[c].substring(p+1)):(e=a[c],p=null);e in b||(b[e]=[]);e in Object.prototype||null===p||b[e].push(unescape(p))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};e.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
222 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:e.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};e.makeRequest=function(a){var b=e.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var p;"undefined"===typeof a?p=b.query:(p=b.query[a])&&"undefined"!==typeof c&&(p=p[c]);return p},getQueryLast:function(a,b){var p=c.getQuery(a);return p?p[p.length-1]:b}};return c};e.makeLink=function(a,
223 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};e.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var p=0,e=b.length;p<e;){var d=b[p++];if(p==e)a[d]=c;else{var h=d in a;if(!h||h&&"object"!==typeof a[d]||h&&null===a[d])a[d]={};a=a[d]}}};e.getPath=function(a,b,c){for(var p=0,e=b.length,d=!0;d&&p<e&&"object"===typeof a&&null!==a;){var h=b[p++];(d=h in a)&&(a=a[h])}return d?a:c};e.deletePath=function(a,b){if("object"===
224 -typeof a&&null!==a)for(var c=0,p=b.length;c<p;){var e=b[c++];if(c==p)delete a[e];else{if(!(e in a)||"object"!==typeof a[e]||null===a[e])break;a=a[e]}}};e.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};e.format=function(a){var b=/%./g,c,p,e=0,d=[];for(p=0;c=b.exec(a);)switch(p=a.substring(p,b.lastIndex-2),0<p.length&&d.push(p),p=b.lastIndex,c=c[0][1],c){case "s":case "o":e<arguments.length?d.push(arguments[e++ +1]):d.push("<?>");break;case "%":d.push("%");break;default:d.push("<#"+
225 -c+"?>")}d.push(a.substring(p));return d.join("")};e.formatNumber=function(a,b,c,p){var e=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;p=void 0===p?".":p;c=0>a?"-":"";var d=parseInt(a=Math.abs(+a||0).toFixed(e),10)+"",h=3<d.length?d.length%3:0;return c+(h?d.substr(0,h)+p:"")+d.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+p)+(e?b+Math.abs(a-d).toFixed(e).slice(2):"")};e.formatSize=function(a){return a=1073741824<=a?e.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?e.formatNumber(a/1048576,2,".","")+
226 -" MiB":1024<=a?e.formatNumber(a/1024,0)+" KiB":e.formatNumber(a,0)+" bytes"};e.bytesFromIP=function(a){return-1!==a.indexOf(".")?e.bytesFromIPv4(a):-1!==a.indexOf(":")?e.bytesFromIPv6(a):null};e.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=e.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};e.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
227 -2*(8-a.length+b),p=e.createBuffer(),d=0;8>d;++d)if(a[d]&&0!==a[d].length){var h=e.hexToBytes(a[d]);2>h.length&&p.putByte(0);p.putBytes(h)}else p.fillWithByte(0,c),c=0;return p.getBytes()};e.bytesToIP=function(a){return 4===a.length?e.bytesToIPv4(a):16===a.length?e.bytesToIPv6(a):null};e.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};e.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,d=0;d<a.length;d+=
228 -2){for(var h=e.bytesToHex(a[d]+a[d+1]);"0"===h[0]&&"0"!==h;)h=h.substr(1);if("0"===h){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(h)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};e.estimateCores=function(a,b){function c(a,k,m){if(0===k){var g=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);e.cores=
229 -Math.max(1,g);URL.revokeObjectURL(h);return b(null,e.cores)}p(m,function(b,p){a.push(d(m,p));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],e=0;e<a;++e){var z=new Worker(h);z.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(z)}for(e=0;e<a;++e)c[e].postMessage(e)}function d(a,b){for(var c=[],p=0;p<a;++p)for(var e=b[p],h=c[p]=[],z=0;z<a;++z)if(p!==z){var k=b[z];(e.st>k.st&&e.st<k.et||k.st>e.st&&k.st<e.et)&&h.push(z)}return c.reduce(function(a,
230 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in e&&!a.update)return b(null,e.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return e.cores=navigator.hardwareConcurrency,b(null,e.cores);if("undefined"===typeof Worker)return e.cores=1,b(null,e.cores);if("undefined"===typeof Blob)return e.cores=2,b(null,e.cores);var h=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
231 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var q=0;q<g.length;++q)g[q](c);
232 -return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
177 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,g,x,h,k,m,e,r=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){r=r.slice(0,r.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=r.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
178 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((r||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(r)for(e=r.length;0<e;--e)if(d=w[r.slice(0,e).join("/")])if(d=d[p]){g=d;h=x;break}if(g)break;!k&&l&&l[p]&&(k=l[p],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
179 +a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function r(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var C,w,D,m,k={},h={},u={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=r(a),g=d[0];a=d[1];g&&(g=e(g,b),c=p(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=r(a),
180 +g=d[0],a=d[1],g&&(c=p(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};C=function(a,b,c,g){var x,e,z,u,r=[];e=typeof c;var w;g=g||a;if("undefined"===e||"function"===e){b=!b.length&&c.length?["require","exports","module"]:b;for(u=0;u<b.length;u+=1)if(z=D(b[u],g),e=z.f,"require"===e)r[u]=m.require(a);else if("exports"===e)r[u]=m.exports(a),
181 +w=!0;else if("module"===e)x=r[u]=m.module(a);else if(B.call(k,e)||B.call(h,e)||B.call(K,e))r[u]=p(e);else if(z.p)z.p.load(z.n,v(g,!0),l(e),{}),r[u]=k[e];else throw Error(a+" missing "+e);b=c?c.apply(k[a],r):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
182 +typeof c&&(c=g,g=x);g?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(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(b){for(var p=
183 +0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.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)};
184 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
185 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}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&&
186 +d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
187 +d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
188 +255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
189 +8&255))};d.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};d.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};d.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
190 +d.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};d.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};d.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
191 +16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};d.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24Le=
192 +function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};d.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};d.ByteStringBuffer.prototype.getSignedInt=
193 +function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
194 +a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
195 +function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
196 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
197 +d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
198 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
199 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
200 +b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
201 +b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
202 +d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
203 +a,!0);this.write+=4;return this};d.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};d.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};d.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};d.DataBuffer.prototype.getInt24=
204 +function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};d.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};d.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};d.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};d.DataBuffer.prototype.getInt32Le=function(){var a=
205 +this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};d.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
206 +d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
207 +new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
208 +this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
209 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
210 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
211 +a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
212 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
213 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
214 +function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
215 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,u=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[u++]=p<<2|g>>4,64!==h&&(d[u++]=(g&15)<<4|h>>2,64!==k&&(d[u++]=(h&3)<<6|k));return b?u-c:d.subarray(0,u)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
216 +var p=b;p||(p=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)p[y++]=a.charCodeAt(h);return b?y-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
217 +b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
218 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},K=function(a,b,
219 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){K(m,arguments,p)};d.getItem=function(a,b,c,d){return K(k,arguments,d)};d.removeItem=function(a,b,c,d){K(h,arguments,d)};d.clearItems=
220 +function(a,b,c){K(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;d.getQueryVariables=function(a){var b=function(a){var b=
221 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
222 +0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
223 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
224 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
225 +c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
226 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
227 +2*(8-a.length+b),p=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&p.putByte(0);p.putBytes(k)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,h=0;h<a.length;h+=
228 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],e=b.length;m&&e===m.end+1?(m.end=e,m.end-m.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:e,end:e})}b.push(k)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,e){if(0===m){var u=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
229 +Math.max(1,u);URL.revokeObjectURL(k);return b(null,d.cores)}p(e,function(b,d){a.push(h(e,d));c(a,m-1,e)})}function p(a,b){for(var c=[],d=[],g=0;g<a;++g){var h=new Worker(k);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(g=0;g<a;++g)c[g].postMessage(g)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],g=c[d]=[],y=0;y<a;++y)if(d!==y){var k=b[y];(p.st>k.st&&p.st<k.et||k.st>p.st&&k.st<p.et)&&g.push(y)}return c.reduce(function(a,
230 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
231 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var r=0;r<e.length;++r)e[r](c);
232 +return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
233 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
234 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
235 this.mode.start(c)};c.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()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
236 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
237 -c.defined.cipher=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
238 -4<b.length){var d=b;b=a.util.createBuffer();for(var e=0;e<d.length;++e)b.putByte(d[e])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function g(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
236 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
237 +c.defined.cipher=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
238 +4<b.length){var d=b;b=a.util.createBuffer();for(var g=0;g<d.length;++g)b.putByte(d[g])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
239 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
240 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.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);
241 this._outBlock=Array(this._ints)};w.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=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
242 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
243 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
244 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32()^this._outBlock[d],b.putInt32(this._inBlock[d]);else{var e=(this.blockSize-p)%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]);
245 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
246 -p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32(),b.putInt32(this._inBlock[d]^this._outBlock[d]);else{var e=(this.blockSize-p)%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);
247 -if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
248 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)b.putInt32(a.getInt32()^this._outBlock[d]),this._inBlock[d]=this._outBlock[d];else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(d=0;d<this._ints;++d)this._partialOutput.putInt32(a.getInt32()^
249 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
250 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var g=0;g<
251 -this._ints;++g)b.putInt32(a.getInt32()^this._outBlock[g]);else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);0<q&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
244 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
245 +if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
246 +d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
247 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
248 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
249 +this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
250 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var e=0;e<
251 +this._ints;++e)b.putInt32(a.getInt32()^this._outBlock[e]);else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);0<r&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<r&&!c)return b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
252 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
253 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.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,
254 -this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(g(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=g(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
255 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var g=0;g<this._ints;++g)b.putInt32(this._outBlock[g]^=a.getInt32());this._cipherLength+=this.blockSize}else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();
256 -for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);if(0===q||c){c?(g=p%this.blockSize,this._cipherLength+=g,this._partialOutput.truncate(this.blockSize-g)):this._cipherLength+=this.blockSize;for(g=0;g<this._ints;++g)this._outBlock[g]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),
257 -this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
258 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var e=this._aDataLength.concat(g(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,e);e=[];this.cipher.encrypt(this._j0,e);for(var q=0;q<
259 -this._ints;++q)this.tag.putInt32(this._s[q]^e[q]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],p=b.slice(0),d=0;128>d;++d)a[d/32|0]&1<<31-d%32&&(c[0]^=p[0],c[1]^=p[1],c[2]^=p[2],c[3]^=p[3]),this.pow(p,p);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,p=3;0<p;--p)b[p]=a[p]>>>1|(a[p-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
260 -[0,0,0,0],c=0;32>c;++c){var p=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=p[0];b[1]^=p[1];b[2]^=p[2];b[3]^=p[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,p=4*c,c=16*c,d=Array(c),e=0;e<c;++e){var g=[0,0,0,0];g[e/p|0]=1<<b-1<<(p-1-e%p)*b;d[e]=this.generateSubHashTable(this.multiply(g,a),b)}return d};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
261 -p=c>>>1,d=Array(c);d[p]=a.slice(0);for(var e=p>>>1;0<e;)this.pow(d[2*e],d[e]=[]),e>>=1;for(e=2;e<p;){for(var g=1;g<e;++g){var q=d[e],w=d[g];d[e+g]=[q[0]^w[0],q[1]^w[1],q[2]^w[2],q[3]^w[3]]}e*=2}d[0]=[0,0,0,0];for(e=p+1;e<c;++e)g=d[e^p],d[e]=[a[0]^g[0],a[1]^g[1],a[2]^g[2],a[3]^g[3]];return d}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=
262 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
263 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);r=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,e,g,k,q,u,b=0;256>b;++b){q=p^p<<1^p<<2^p<<3^p<<4;q=q>>8^q&255^99;h[c]=q;r[q]=c;u=a[q];e=a[c];g=a[e];k=a[g];u^=u<<24^q<<16^q<<8^q;g=(e^g^k)<<24^(c^
264 -k)<<16^(c^g^k)<<8^c^e^k;for(var w=0;4>w;++w)B[w][c]=u,x[w][q]=g,u=u<<24|u>>>8,g=g<<24|g>>>8;0===c?c=p=1:(c=e^a[a[a[e^k]]],p^=a[a[p]])}}function g(a,b){for(var c=a.slice(0),p,d=1,e=c.length,m=k*(e+6+1),q=e;q<m;++q)p=c[q-1],0===q%e?(p=h[p>>>16&255]<<24^h[p>>>8&255]<<16^h[p&255]<<8^h[p>>>24]^K[d]<<24,d++):6<e&&4===q%e&&(p=h[p>>>24]<<24^h[p>>>16&255]<<16^h[p>>>8&255]<<8^h[p&255]),c[q]=c[q-e]^p;if(b){for(var d=x[0],e=x[1],r=x[2],w=x[3],l=c.slice(0),m=c.length,q=0,F=m-k;q<m;q+=k,F-=k)if(0===q||q===m-k)l[q]=
265 -c[F],l[q+1]=c[F+3],l[q+2]=c[F+2],l[q+3]=c[F+1];else for(var B=0;B<k;++B)p=c[F+B],l[q+(3&-B)]=d[h[p>>>24]]^e[h[p>>>16&255]]^r[h[p>>>8&255]]^w[h[p&255]];c=l}return c}function w(a,b,c,p){var d=a.length/4-1,e,g,k,m,q;p?(e=x[0],g=x[1],k=x[2],m=x[3],q=r):(e=B[0],g=B[1],k=B[2],m=B[3],q=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[p?3:1]^a[1];C=b[2]^a[2];b=b[p?1:3]^a[3];for(var n=3,v=1;v<d;++v)L=e[w>>>24]^g[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=e[l>>>24]^g[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=e[C>>>24]^
266 -g[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=e[b>>>24]^g[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=q[w>>>24]<<24^q[l>>>16&255]<<16^q[C>>>8&255]<<8^q[b&255]^a[++n];c[p?3:1]=q[l>>>24]<<24^q[C>>>16&255]<<16^q[b>>>8&255]<<8^q[w&255]^a[++n];c[2]=q[C>>>24]<<24^q[b>>>16&255]<<16^q[w>>>8&255]<<8^q[l&255]^a[++n];c[p?1:3]=q[b>>>24]<<24^q[w>>>16&255]<<16^q[l>>>8&255]<<8^q[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
267 -a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;e.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!1,mode:p});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!0,mode:p});a.start(b);return a};a.aes.createDecryptionCipher=
254 +this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
255 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var e=0;e<this._ints;++e)b.putInt32(this._outBlock[e]^=a.getInt32());this._cipherLength+=this.blockSize}else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();
256 +for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(0===r||c){c?(e=p%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<r&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),
257 +this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
258 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var u=0;u<
259 +this._ints;++u)this.tag.putInt32(this._s[u]^g[u]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
260 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),g=0;g<c;++g){var e=[0,0,0,0];e[g/d|0]=1<<b-1<<(d-1-g%d)*b;p[g]=this.generateSubHashTable(this.multiply(e,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
261 +d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(p[2*g],p[g]=[]),g>>=1;for(g=2;g<d;){for(var e=1;e<g;++e){var r=p[g],w=p[e];p[g+e]=[r[0]^w[0],r[1]^w[1],r[2]^w[2],r[3]^w[3]]}g*=2}p[0]=[0,0,0,0];for(g=d+1;g<c;++g)e=p[g^d],p[g]=[a[0]^e[0],a[1]^e[1],a[2]^e[2],a[3]^e[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=
262 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
263 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,g,e,k,r,q,b=0;256>b;++b){r=p^p<<1^p<<2^p<<3^p<<4;r=r>>8^r&255^99;h[c]=r;u[r]=c;q=a[r];g=a[c];e=a[g];k=a[e];q^=q<<24^r<<16^r<<8^r;e=(g^e^k)<<24^(c^
264 +k)<<16^(c^e^k)<<8^c^g^k;for(var w=0;4>w;++w)B[w][c]=q,x[w][r]=e,q=q<<24|q>>>8,e=e<<24|e>>>8;0===c?c=p=1:(c=g^a[a[a[g^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,g=c.length,m=k*(g+6+1),r=g;r<m;++r)d=c[r-1],0===r%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^K[p]<<24,p++):6<g&&4===r%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[r]=c[r-g]^d;if(b){for(var p=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),m=c.length,r=0,F=m-k;r<m;r+=k,F-=k)if(0===r||r===m-k)l[r]=
265 +c[F],l[r+1]=c[F+3],l[r+2]=c[F+2],l[r+3]=c[F+1];else for(var B=0;B<k;++B)d=c[F+B],l[r+(3&-B)]=p[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,g,e,k,m,r;d?(g=x[0],e=x[1],k=x[2],m=x[3],r=u):(g=B[0],e=B[1],k=B[2],m=B[3],r=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[d?3:1]^a[1];C=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)L=g[w>>>24]^e[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^e[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=g[C>>>24]^
266 +e[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^e[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=r[w>>>24]<<24^r[l>>>16&255]<<16^r[C>>>8&255]<<8^r[b&255]^a[++n];c[d?3:1]=r[l>>>24]<<24^r[C>>>16&255]<<16^r[b>>>8&255]<<8^r[w&255]^a[++n];c[2]=r[C>>>24]<<24^r[b>>>16&255]<<16^r[w>>>8&255]<<8^r[l&255]^a[++n];c[d?1:3]=r[b>>>24]<<24^r[w>>>16&255]<<16^r[l>>>8&255]<<8^r[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
267 +a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;g.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
268 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
269 -c;for(var c=a.util.createBuffer(),e=0;e<d.length;++e)c.putByte(d[e])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,e=0;e<h;++e)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=g(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return g(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
270 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,r,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
271 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
269 +c;for(var c=a.util.createBuffer(),g=0;g<d.length;++g)c.putByte(d[g])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,g=0;g<h;++g)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
270 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
271 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
272 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
273 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
274 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -282,336 +282,336 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
282 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
283 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
284 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
285 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var q=0;q<g.length;++q)g[q](c);return c.oids}},
286 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
287 -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};c.create=function(b,c,d,e){if(a.util.isArray(e)){for(var h=[],g=0;g<e.length;++g)void 0!==e[g]&&h.push(e[g]);e=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(e),value:e}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,g){void 0===g&&(g=!0);
288 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,r=d(b);if(b.length()<r){if(g)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+r,m;r=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<r){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===r-(b.read-
289 -x))++x,--r}catch(A){}b.read=x}if(l)if(l=[],void 0===r)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,g))}else for(x=b.length();0<r;)l.push(c.fromDer(b,g)),r-=x-b.length(),x=b.length();else{if(void 0===r){if(g)throw Error("Non-constructed ASN.1 object of indefinite length.");r=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<r;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(r)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
290 -e=b.tagClass|b.type,g=a.util.createBuffer();if(b.composed){b.constructed?e|=32:g.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&g.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)g.putInt16(b.value.charCodeAt(h));else g.putBytes(b.value);d.putByte(e);if(127>=g.length())d.putByte(g.length()&127);else{h=g.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(g);
291 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,e,h,g,q=2;q<b.length;++q){d=!0;e=[];h=parseInt(b[q],10);do g=h&127,h>>>=7,d||(g|=128),e.push(g),d=!1;while(0<h);for(d=e.length-1;0<=d;--d)c.putByte(e[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var e=0;0<b.length();)d=b.getByte(),e<<=7,d&128?e+=d&127:(c+="."+(e+d),e=0);
292 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,e=parseInt(a.substr(4,2),10),p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,e);b.setUTCHours(p,g,q,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
293 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,e=parseInt(a.substr(6,2),10),p=parseInt(a.substr(8,2),10),g=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),x=0,l=0,y=!1;"Z"===a.charAt(a.length-1)&&(y=!0);var R=a.length-5,z=a.charAt(R);if("+"===z||"-"===z)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===z&&(l*=-1),y=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
294 -10));y?(b.setUTCFullYear(c,d,e),b.setUTCHours(p,g,q,x),b.setTime(+b+l)):(b.setFullYear(c,d,e),b.setHours(p,g,q,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
285 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var r=0;r<e.length;++r)e[r](c);return c.oids}},
286 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
287 +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};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
288 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
289 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
290 +g=b.tagClass|b.type,e=a.util.createBuffer();if(b.composed){b.constructed?g|=32:e.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&e.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)e.putInt16(b.value.charCodeAt(h));else e.putBytes(b.value);d.putByte(g);if(127>=e.length())d.putByte(e.length()&127);else{h=e.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(e);
291 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,r=2;r<b.length;++r){d=!0;g=[];h=parseInt(b[r],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
292 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),r=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(r=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(g,e,r,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
293 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),r=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
294 +10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(g,e,r,x),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(g,e,r,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
295 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
296 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,e,g){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)g&&(b.tagClass!==d.tagClass&&g.push("["+d.name+'] Expected tag class "'+d.tagClass+
297 -'", got "'+b.tagClass+'"'),b.type!==d.type&&g.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var r=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[r]&&((h=c.validate(b.value[r],d.value[l],e,g))?++r:d.value[l].optional&&(h=!0)),!h&&g&&g.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
298 -b.value.length+'"');h&&e&&(d.capture&&(e[d.capture]=b.value),d.captureAsn1&&(e[d.captureAsn1]=b))}else g&&g.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var g=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,e){var k="";d=d||0;e=e||2;0<d&&(k+="\n");for(var h="",r=0;r<d*e;++r)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
296 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
297 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
298 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
299 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
300 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
301 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",r=0;r<b.value.length;++r)void 0!==b.value[r]&&(l+=1,B+=c.prettyPrint(b.value[r],d+1,e),r+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
302 -c.Type.OCTETSTRING?(g.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:g.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
303 -c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<g.length;++q)g[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
301 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,B+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
302 +c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
303 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var r=0;r<e.length;++r)e[r](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
304 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[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];m=[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];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
305 -Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var e,p,h,g,z,E,q,l=c.length();64<=l;){p=a.h0;h=a.h1;g=a.h2;z=a.h3;for(q=0;16>q;++q)b[q]=c.getInt32Le(),e=z^h&(g^z),e=p+e+k[q]+b[q],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;32>q;++q)e=g^z&(h^g),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;48>q;++q)e=h^g^z,e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;64>q;++q)e=g^(h|~z),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;a.h0=a.h0+p|0;a.h1=a.h1+h|0;a.h2=a.h2+g|0;a.h3=
306 -a.h3+z|0;l-=64}}var g=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=g;g.create=function(){h||c();var b=null,g=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);g=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
307 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],z=m.fullMessageLength.length-1;0<=z;--z)m.fullMessageLength[z]+=q[1],q[1]=q[0]+(m.fullMessageLength[z]/4294967296>>>0),m.fullMessageLength[z]>>>=0,q[0]=q[1]/4294967296>>>0;g.putBytes(c);d(b,k,g);(2048<g.read||0===g.length())&&g.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(g.bytes());c.putBytes(l.substr(0,
308 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,q=0,z=m.fullMessageLength.length-1;0<=z;--z)h=8*m.fullMessageLength[z]+q,q=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=
309 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
310 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,A,y,w,z=d.length();64<=z;){p=a.h0;g=a.h1;q=a.h2;l=a.h3;A=a.h4;for(w=0;16>w;++w)e=d.getInt32(),b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;20>w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;32>
311 -w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;40>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;60>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g&q|l&(g^q),e=(p<<5|p>>>27)+y+A+2400959708+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;80>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>
312 -27)+y+A+3395469782+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;a.h0=a.h0+p|0;a.h1=a.h1+g|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+A|0;z-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),e=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
313 -0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,e=0;e<c;++e)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var w=g.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
314 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],A=0;A<h.fullMessageLength.length;++A)w=8*h.fullMessageLength[A+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
315 -h4:b.h4};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var g=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
316 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,y,w,z,E,O,H,C,u,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
317 -for(;64>l;++l)e=b[l-2],e=(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10,p=b[l-15],p=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,b[l]=e+b[l-7]+p+b[l-16]|0;y=a.h0;w=a.h1;z=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;u=a.h7;for(l=0;64>l;++l)e=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),g=C^O&(H^C),p=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),q=y&w|z&(y^w),e=u+e+g+n[l]+b[l],p+=q,u=C,C=H,H=O,O=E+e|0,E=z,z=w,w=y,y=e+p|0;a.h0=a.h0+y|0;a.h1=a.h1+w|0;a.h2=a.h2+z|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+u|0;v-=
318 -64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.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,
319 -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],l=!0);var b=null,d=a.util.createBuffer(),e=Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,
320 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){r.messageLength=0;r.fullMessageLength=r.messageLength64=[];for(var c=r.messageLengthSize/4,e=0;e<c;++e)r.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return r}};r.start();r.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var x=g.length;r.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=r.fullMessageLength.length-
321 -1;0<=w;--w)r.fullMessageLength[w]+=x[1],x[1]=x[0]+(r.fullMessageLength[w]/4294967296>>>0),r.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return r};r.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,r.blockLength-(r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize&r.blockLength-1)));a.util.createBuffer();for(var w,x,A=8*r.fullMessageLength[0],y=0;y<r.fullMessageLength.length;++y)w=
322 -8*r.fullMessageLength[y+1],x=w/4294967296>>>0,A+=x,l.putInt32(A>>>0),A=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return r};var g=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
323 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
324 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,k,q,z,E,l,w,C,u,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)q=b[S-2],w=q[0],q=q[1],e=((w>>>19|q<<13)^(q>>>29|w<<3)^w>>>6)>>>0,p=((w<<13|q>>>19)^(q<<3|w>>>29)^(w<<26|q>>>6))>>>0,q=b[S-15],w=q[0],q=q[1],g=((w>>>1|q<<31)^(w>>>8|q<<24)^w>>>7)>>>0,k=((w<<31|q>>>1)^(w<<24|q>>>8)^(w<<25|q>>>7))>>>0,w=b[S-7],C=b[S-
325 -16],q=p+w[1]+k+C[1],b[S][0]=e+w[0]+g+C[0]+(q/4294967296>>>0)>>>0,b[S][1]=q>>>0;w=a[0][0];C=a[0][1];u=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)e=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,q=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,p=(ba^D&(J^ba))>>>0,z=(W^V&(aa^W))>>>0,g=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
326 -E=(w&u|v&(w^u))>>>0,l=(C&n|F&(C^n))>>>0,q=G+q+z+m[S][1]+b[S][1],e=I+e+p+m[S][0]+b[S][0]+(q/4294967296>>>0)>>>0,p=q>>>0,q=k+l,g=g+E+(q/4294967296>>>0)>>>0,k=q>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,q=L+p,D=Y+e+(q/4294967296>>>0)>>>0,V=q>>>0,Y=v,L=F,v=u,F=n,u=w,n=C,q=p+k,w=e+g+(q/4294967296>>>0)>>>0,C=q>>>0;q=a[0][1]+C;a[0][0]=a[0][0]+w+(q/4294967296>>>0)>>>0;a[0][1]=q>>>0;q=a[1][1]+n;a[1][0]=a[1][0]+u+(q/4294967296>>>0)>>>0;a[1][1]=q>>>0;q=a[2][1]+F;a[2][0]=a[2][0]+v+(q/4294967296>>>0)>>>0;a[2][1]=q>>>0;
327 -q=a[3][1]+L;a[3][0]=a[3][0]+Y+(q/4294967296>>>0)>>>0;a[3][1]=q>>>0;q=a[4][1]+V;a[4][0]=a[4][0]+D+(q/4294967296>>>0)>>>0;a[4][1]=q>>>0;q=a[5][1]+aa;a[5][0]=a[5][0]+J+(q/4294967296>>>0)>>>0;a[5][1]=q>>>0;q=a[6][1]+W;a[6][0]=a[6][0]+ba+(q/4294967296>>>0)>>>0;a[6][1]=q>>>0;q=a[7][1]+G;a[7][0]=a[7][0]+I+(q/4294967296>>>0)>>>0;a[7][1]=q>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var g=a.sha384=a.sha512.sha384=a.sha512.sha384||
328 -{};g.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=g;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
305 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var p,g,h,e,y,E,r,l=c.length();64<=l;){g=a.h0;h=a.h1;e=a.h2;y=a.h3;for(r=0;16>r;++r)b[r]=c.getInt32Le(),p=y^h&(e^y),p=g+p+k[r]+b[r],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;32>r;++r)p=e^y&(h^e),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;48>r;++r)p=h^e^y,p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;64>r;++r)p=e^(h|~y),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;a.h0=a.h0+g|0;a.h1=a.h1+h|0;a.h2=a.h2+e|0;a.h3=
306 +a.h3+y|0;l-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
307 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var r=c.length;m.messageLength+=r;for(var r=[r/4294967296>>>0,r>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=r[1],r[1]=r[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,r[0]=r[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
308 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,r=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+r,r=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
309 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
310 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;r=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;32>
311 +w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&r|l&(e^r),p=(g<<5|g>>>27)+A+z+2400959708+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>
312 +27)+A+z+3395469782+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+r|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
313 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
314 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
315 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
316 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,A,w,y,E,O,H,C,q,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
317 +for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=p+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;q=a.h7;for(l=0;64>l;++l)p=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),e=C^O&(H^C),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),r=A&w|y&(A^w),p=q+p+e+n[l]+b[l],g+=r,q=C,C=H,H=O,O=E+p|0,E=y,y=w,w=A,A=p+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+q|0;v-=
318 +64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.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,
319 +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],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
320 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
321 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
322 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
323 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
324 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,k,r,y,E,l,w,C,q,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)r=b[S-2],w=r[0],r=r[1],p=((w>>>19|r<<13)^(r>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|r>>>19)^(r<<3|w>>>29)^(w<<26|r>>>6))>>>0,r=b[S-15],w=r[0],r=r[1],e=((w>>>1|r<<31)^(w>>>8|r<<24)^w>>>7)>>>0,k=((w<<31|r>>>1)^(w<<24|r>>>8)^(w<<25|r>>>7))>>>0,w=b[S-7],C=b[S-
325 +16],r=g+w[1]+k+C[1],b[S][0]=p+w[0]+e+C[0]+(r/4294967296>>>0)>>>0,b[S][1]=r>>>0;w=a[0][0];C=a[0][1];q=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)p=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,r=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(J^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
326 +E=(w&q|v&(w^q))>>>0,l=(C&n|F&(C^n))>>>0,r=G+r+y+m[S][1]+b[S][1],p=I+p+g+m[S][0]+b[S][0]+(r/4294967296>>>0)>>>0,g=r>>>0,r=k+l,e=e+E+(r/4294967296>>>0)>>>0,k=r>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,r=L+g,D=Y+p+(r/4294967296>>>0)>>>0,V=r>>>0,Y=v,L=F,v=q,F=n,q=w,n=C,r=g+k,w=p+e+(r/4294967296>>>0)>>>0,C=r>>>0;r=a[0][1]+C;a[0][0]=a[0][0]+w+(r/4294967296>>>0)>>>0;a[0][1]=r>>>0;r=a[1][1]+n;a[1][0]=a[1][0]+q+(r/4294967296>>>0)>>>0;a[1][1]=r>>>0;r=a[2][1]+F;a[2][0]=a[2][0]+v+(r/4294967296>>>0)>>>0;a[2][1]=r>>>0;
327 +r=a[3][1]+L;a[3][0]=a[3][0]+Y+(r/4294967296>>>0)>>>0;a[3][1]=r>>>0;r=a[4][1]+V;a[4][0]=a[4][0]+D+(r/4294967296>>>0)>>>0;a[4][1]=r>>>0;r=a[5][1]+aa;a[5][0]=a[5][0]+J+(r/4294967296>>>0)>>>0;a[5][1]=r>>>0;r=a[6][1]+W;a[6][0]=a[6][0]+ba+(r/4294967296>>>0)>>>0;a[6][1]=r>>>0;r=a[7][1]+G;a[7][0]=a[7][0]+I+(r/4294967296>>>0)>>>0;a[7][1]=r>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
328 +{};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
329 3609767458],[1899447441,602891725],[3049323471,3964484399],[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],
330 [1555081692,3175218132],[1996064986,2198950837],[2554220882,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,
331 106217008],[3516065817,3606008344],[3600352804,1432725776],[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],
332 [3515267271,566280711],[3940187606,3454069534],[4118630271,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]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
333 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,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,
334 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],e=null,g=a.util.createBuffer(),x=Array(80),A=0;80>A;++A)x[A]=Array(2);var y={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){y.messageLength=
335 -0;y.fullMessageLength=y.messageLength128=[];for(var b=y.messageLengthSize/4,c=0;c<b;++c)y.fullMessageLength.push(0);g=a.util.createBuffer();e=Array(d.length);for(c=0;c<d.length;++c)e[c]=d[c].slice(0);return y}};y.start();y.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;y.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=y.fullMessageLength.length-1;0<=k;--k)y.fullMessageLength[k]+=h[1],h[1]=h[0]+(y.fullMessageLength[k]/4294967296>>>0),y.fullMessageLength[k]>>>=0,h[0]=
336 -h[1]/4294967296>>>0;g.putBytes(b);c(e,x,g);(2048<g.read||0===g.length())&&g.compact();return y};y.digest=function(){var d=a.util.createBuffer();d.putBytes(g.bytes());d.putBytes(l.substr(0,y.blockLength-(y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize&y.blockLength-1)));a.util.createBuffer();for(var z,k,m=8*y.fullMessageLength[0],r=0;r<y.fullMessageLength.length;++r)z=8*y.fullMessageLength[r+1],k=z/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=z;z=Array(e.length);for(r=0;r<e.length;++r)z[r]=
337 -e[r].slice(0);c(z,x,d);d=a.util.createBuffer();k="SHA-512"===b?z.length:"SHA-384"===b?z.length-2:z.length-4;for(r=0;r<k;++r)d.putInt32(z[r][0]),r===k-1&&"SHA-512/224"===b||d.putInt32(z[r][1]);return d};return y};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
338 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
339 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md}},l=a;a=function(b,
340 -c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,g={start:function(g,m){if(null!==g)if("string"===typeof g)if(g=g.toLowerCase(),g in a.md.algorithms)b=
341 -a.md.algorithms[g].create();else throw Error('Unknown hash algorithm "'+g+'"');else b=g;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
342 -d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};g.digest=g.getMac;return g}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
343 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<g.length;++q)g[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],e=function(a,
344 -b){return" "+b},p=0;p<a.values.length;++p)d.push(a.values[p].replace(/^(\S+\r\n)/,e));b+=d.join(",")+"\r\n";d=0;a=-1;for(p=0;p<b.length;++p,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=p-a-1,a=-1,++p;else if(" "===b[p]||"\t"===b[p]||","===b[p])a=p;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var e="-----BEGIN "+b.type+"-----\r\n",g;b.procType&&(g={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
345 -e+=c(g));b.contentDomain&&(g={name:"Content-Domain",values:[b.contentDomain]},e+=c(g));b.dekInfo&&(g={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&g.values.push(b.dekInfo.parameters),e+=c(g));if(b.headers)for(g=0;g<b.headers.length;++g)e+=c(b.headers[g]);b.procType&&(e+="\r\n");e+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return e+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
346 -e=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,g=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var q={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(q);if(h[2]){for(var l=h[2].split(g),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var A=l[x];if(!/\s/.test(A[0]))break;h+=A;B=x}if(h=h.match(e)){for(var x={name:h[1],values:[]},A=h[2].split(","),y=0;y<A.length;++y)x.values.push(A[y].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
347 -"Content-Domain"!==x.name)if(q.dekInfo||"DEK-Info"!==x.name)q.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:A[0],parameters:A[1]||null}}else q.contentDomain=A[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
348 -q.procType={version:A[0],type:A[1]}}}++B}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
349 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
350 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,e){var p=32===a.length?3:9;e=3===p?e?[30,-2,-2]:[0,32,2]:e?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=b[0],q=b[1];b=(g>>>4^q)&252645135;q^=b;g^=b<<4;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(g>>>1^q)&1431655765;for(var q=q^b,g=g^b<<1,g=g<<1|g>>>31,q=q<<1|q>>>31,H=0;H<p;H+=3){for(var C=e[H+1],u=e[H+2],T=e[H];T!=C;T+=u){var P=q^a[T],F=(q>>>4|q<<28)^a[T+1];b=g;
351 -g=q;q=b^(n[P>>>24&63]|k[P>>>16&63]|r[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=g;g=q;q=b}g=g>>>1|g<<31;q=q>>>1|q<<31;b=(g>>>1^q)&1431655765;q^=b;g^=b<<1;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(g>>>4^q)&252645135;c[0]=g^b<<4;c[1]=q^b}function g(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var g=
352 -null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;e.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return g({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return g({key:a,
334 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
335 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
336 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
337 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
338 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
339 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md}},l=a;a=function(b,
340 +c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
341 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
342 +d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
343 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var r=0;r<e.length;++r)e[r](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
344 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
345 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
346 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var r={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(r);if(h[2]){for(var l=h[2].split(e),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;B=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(r.procType)if(r.contentDomain||
347 +"Content-Domain"!==x.name)if(r.dekInfo||"DEK-Info"!==x.name)r.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');r.dekInfo={algorithm:z[0],parameters:z[1]||null}}else r.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
348 +r.procType={version:z[0],type:z[1]}}}++B}if("ENCRYPTED"===r.procType&&!r.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
349 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
350 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,g){var p=32===a.length?3:9;g=3===p?g?[30,-2,-2]:[0,32,2]:g?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],r=b[1];b=(e>>>4^r)&252645135;r^=b;e^=b<<4;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(e>>>1^r)&1431655765;for(var r=r^b,e=e^b<<1,e=e<<1|e>>>31,r=r<<1|r>>>31,H=0;H<p;H+=3){for(var C=g[H+1],q=g[H+2],T=g[H];T!=C;T+=q){var P=r^a[T],F=(r>>>4|r<<28)^a[T+1];b=e;
351 +e=r;r=b^(n[P>>>24&63]|k[P>>>16&63]|u[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=e;e=r;r=b}e=e>>>1|e<<31;r=r>>>1|r<<31;b=(e>>>1^r)&1431655765;r^=b;e^=b<<1;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(e>>>4^r)&252645135;c[0]=e^b<<4;c[1]=r^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
352 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
353 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
354 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[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],
355 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],r=[0,268435456,8,268435464,0,268435456,
354 +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],
355 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],r=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
356 8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],F=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],B=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],L=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
357 1,C=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],K=0,D,W=0;W<n;W++){var I=b.getInt32(),G=b.getInt32();D=(I>>>4^G)&252645135;G^=D;I^=D<<4;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>2^G)&858993459;G^=D;I^=D<<2;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=(G>>>8^I)&16711935;I^=D;G^=D<<8;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=I<<8|G>>>20&240;for(var I=G<<24|G<<8&16711680|G>>>8&65280|G>>>24&240,G=D,S=0;S<v.length;++S){v[S]?(I=I<<2|I>>>26,G=G<<2|G>>>26):(I=I<<1|I>>>27,G=G<<1|G>>>27);
358 -var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|e[I>>>20&15]|g[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|q[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|r[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
358 +var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|g[I>>>20&15]|e[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|r[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|u[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
359 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[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,
360 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,
361 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[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,
362 8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[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],h=[256,34078976,34078720,1107296512,
363 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,
364 -524288,0,1074266112,34078976,1073742080],r=[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,
364 +524288,0,1074266112,34078976,1073742080],u=[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,
365 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[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,
366 67108866,67110912,2048,2097154],B=[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,
367 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<g.length;++q)g[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,
368 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,g;e&&!a.disableNativeCode&&(g=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,q){function l(){if(N>A)return q(null,z);n.start(null,
369 -null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();u=2;B()}function B(){if(u<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++u,a.util.setImmediate(B);z+=N<A?E:E.substr(0,y);++N;l()}"function"===typeof h&&(q=h,h=null);if(e&&!a.disableNativeCode&&g.pbkdf2&&(null===h||"object"!==typeof h)&&(4<g.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),q?4===g.pbkdf2Sync.length?g.pbkdf2(b,
370 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):g.pbkdf2(b,c,d,k,h,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===g.pbkdf2Sync.length?g.pbkdf2Sync(b,c,d,k).toString("binary"):g.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
371 -if(q)return q(b);throw b;}var A=Math.ceil(k/x),y=k-(A-1)*x,n=a.hmac.create();n.start(h,b);var z="",E,O,H;if(!q){for(var N=1;N<=A;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var u=2;u<=d;++u)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;z+=N<A?E:E.substr(0,y)}return z}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
372 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
373 -"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
374 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function g(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
375 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)e.putInt32(k[h])}catch(z){if(!("undefined"!==typeof QuotaExceededError&&z instanceof QuotaExceededError))throw z;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
376 -e.putByte(String.fromCharCode(k&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),q=0;32>q;++q)h[q]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(g(k.key,h(k.seed)));k.seed=z(g(k.key,k.seed));
377 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,q=k.plugin.formatKey,z=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var z=c(k.key,
378 -k.seed);k.generated+=z.length;q.putBytes(z);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,g(a))}catch(c){b(c)}},k.seedFileSync=g);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
367 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var r=0;r<e.length;++r)e[r](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
368 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},g="undefined"!==typeof process&&process.versions&&process.versions.node,e;g&&!a.disableNativeCode&&(e=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,r){function l(){if(N>z)return r(null,y);n.start(null,
369 +null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();q=2;B()}function B(){if(q<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++q,a.util.setImmediate(B);y+=N<z?E:E.substr(0,A);++N;l()}"function"===typeof h&&(r=h,h=null);if(g&&!a.disableNativeCode&&e.pbkdf2&&(null===h||"object"!==typeof h)&&(4<e.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),r?4===e.pbkdf2Sync.length?e.pbkdf2(b,
370 +c,d,k,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):e.pbkdf2(b,c,d,k,h,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):4===e.pbkdf2Sync.length?e.pbkdf2Sync(b,c,d,k).toString("binary"):e.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
371 +if(r)return r(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,n=a.hmac.create();n.start(h,b);var y="",E,O,H;if(!r){for(var N=1;N<=z;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var q=2;q<=d;++q)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;y+=N<z?E:E.substr(0,A)}return y}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
372 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
373 +"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,g=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(g=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
374 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function e(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var g=
375 +a.util.createBuffer();if(c)for(;g.length()<b;){var h=Math.max(1,Math.min(b-g.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)g.putInt32(k[h])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(g.length()<b)for(c=Math.floor(65536*Math.random());g.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
376 +g.putByte(String.fromCharCode(k&255));return g.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),r=0;32>r;++r)h[r]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function g(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(g)});l=e(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=r(e(k.key,h(k.seed)));k.seed=y(e(k.key,k.seed));
377 +a.util.setImmediate(g)}if(!d)return k.generateSync(b);var e=k.plugin.cipher,h=k.plugin.increment,r=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;g()};k.generateSync=function(b){var c=k.plugin.cipher,g=k.plugin.increment,e=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var r=a.util.createBuffer();r.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
378 +k.seed);k.generated+=y.length;r.putBytes(y);k.key=e(c(k.key,g(k.seed)));k.seed=h(c(k.key,k.seed))}return r.getBytes(b)};g?(k.seedFile=function(a,b){g.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return g.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,e(a))}catch(c){b(c)}},k.seedFileSync=e);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
379 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
380 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<g.length;++q)g[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
381 -0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},g=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
382 -b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,g,!1);l.putInt32(g[0]);l.putInt32(g[1]);l.putInt32(g[2]);l.putInt32(g[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
383 -process.versions.node,h=null;if("undefined"!==typeof window){var r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(h=function(a){return r.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
384 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<g.length;++q)g[q](c);
385 -return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
380 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var r=0;r<e.length;++r)e[r](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
381 +0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
382 +b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
383 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
384 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var r=0;r<e.length;++r)e[r](c);
385 +return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
386 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,
387 -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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
388 -1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var g=function(b,c,g){var k=!1,h=null,q=null,l=null,n,x,A,y,v=[];b=a.rc2.expandKey(b,c);for(A=0;64>A;A++)v.push(b.getInt16Le());g?(n=function(a){for(A=0;4>A;A++){a[A]+=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);var b=a[A],c=d[A];a[A]=b<<c&65535|(b&65535)>>16-c;y++}},x=function(a){for(A=0;4>A;A++)a[A]+=v[a[(A+3)%4]&63]}):(n=function(a){for(A=3;0<=A;A--){var b=a[A],c=d[A];a[A]=
389 -(b&65535)>>c|b<<16-c&65535;a[A]-=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);y--}},x=function(a){for(A=3;0<=A;A--)a[A]-=v[a[(A+3)%4]&63]});var z=null;return z={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();q=c||new a.util.createBuffer;l=b;z.output=q},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(A=0;4>A;A++){var c=h.getInt16Le();null!==l&&(g?c^=l.getInt16Le():l.putInt16Le(c));
390 -b.push(c&65535)}y=g?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(A=0;4>A;A++)null!==l&&(g?l.putInt16Le(b[A]):b[A]^=l.getInt16Le()),q.putInt16Le(b[A])}},finish:function(a){var b=!0;if(g)if(a)b=a(8,h,!g);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,z.update());!g&&(b=0===h.length())&&(a?b=a(8,q,!g):(a=q.length(),c=q.at(a-1),c>a?b=!1:q.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
391 -a.rc2.createEncryptionCipher=function(a,b){return g(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return g(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
392 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
393 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function g(a,b,c,d,e,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+e;e=Math.floor(h/67108864);c.data[d++]=h&67108863}return e}function l(a,b,c,d,e,p){var g=b&32767;for(b>>=15;0<=--p;){var h=this.data[a]&32767,z=this.data[a++]>>15,k=b*h+z*g,h=g*h+((k&32767)<<15)+c.data[d]+(e&1073741823);e=(h>>>30)+(k>>>15)+b*z+(e>>>30);c.data[d++]=h&1073741823}return e}function n(a,b,
394 -c,d,e,g){var p=b&16383;for(b>>=14;0<=--g;){var h=this.data[a]&16383,z=this.data[a++]>>14,k=b*h+z*p,h=p*h+((k&16383)<<14)+c.data[d]+e;e=(h>>28)+(k>>14)+b*z;c.data[d++]=h&268435455}return e}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function r(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
395 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function A(a,b){return a^b}function y(a,b){return a&~b}function R(){}function z(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
396 -navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=g,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],u;H=48;for(u=0;9>=u;++u)N[H++]=u;H=97;for(u=10;36>u;++u)N[H++]=u;H=65;for(u=10;36>u;++u)N[H++]=u;r.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};r.prototype.revert=function(a){return a};r.prototype.reduce=
397 -function(a){a.divRemTo(this.m,null,a)};r.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};r.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
387 +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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var g=b,e=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=e;128>n;n++)g.putByte(c[g.at(n-
388 +1)+g.at(n-e)&255]);g.setAt(128-l,c[g.at(128-l)&h]);for(n=127-l;0<=n;n--)g.setAt(n,c[g.at(n+1)^g.at(n+l)]);return g};var e=function(b,c,e){var k=!1,h=null,r=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
389 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();r=c||new a.util.createBuffer;l=b;y.output=r},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
390 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),r.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,r,!e):(a=r.length(),c=r.at(a-1),c>a?b=!1:r.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
391 +a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
392 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
393 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,g,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+g;g=Math.floor(h/67108864);c.data[d++]=h&67108863}return g}function l(a,b,c,d,g,e){var p=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,y=this.data[a++]>>15,k=b*h+y*p,h=p*h+((k&32767)<<15)+c.data[d]+(g&1073741823);g=(h>>>30)+(k>>>15)+b*y+(g>>>30);c.data[d++]=h&1073741823}return g}function n(a,b,
394 +c,d,g,e){var p=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,y=this.data[a++]>>14,k=b*h+y*p,h=p*h+((k&16383)<<14)+c.data[d]+g;g=(h>>28)+(k>>14)+b*y;c.data[d++]=h&268435455}return g}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
395 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
396 +navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=e,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],q;H=48;for(q=0;9>=q;++q)N[H++]=q;H=97;for(q=10;36>q;++q)N[H++]=q;H=65;for(q=10;36>q;++q)N[H++]=q;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
397 +function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
398 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
399 -c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var e=a.length,p=!1,g=0;0<=--e;){var h=8==d?a[e]&255:m(a,e);0>h?"-"==a.charAt(e)&&(p=!0):(p=!1,0==g?this.data[this.t++]=h:g+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-g)-1)<<g,this.data[this.t++]=
400 -h>>this.DB-g):this.data[this.t-1]|=h<<g,g+=d,g>=this.DB&&(g-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<g&&(this.data[this.t-1]|=(1<<this.DB-g)-1<<g));this.clamp();p&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
401 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,e=(1<<d)-1,g=Math.floor(a/this.DB),p=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+g+1]=this.data[h]>>d|p,p=(this.data[h]&e)<<c;for(h=g-1;0<=h;--h)b.data[h]=0;b.data[g]=p;b.t=this.t+g+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,e=this.DB-d,g=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var p=
402 -c+1;p<this.t;++p)b.data[p-c-1]|=(this.data[p]&g)<<e,b.data[p-c]=this.data[p]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&g)<<e);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
403 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),e=a.abs(),g=d.t;for(b.t=g+e.t;0<=--g;)b.data[g]=0;for(g=0;g<e.t;++g)b.data[g+d.t]=d.am(0,e.data[g],b,g,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
404 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,g){var p=a.abs();if(!(0>=p.t)){var z=this.abs();if(z.t<p.t)null!=b&&b.fromInt(0),null!=g&&this.copyTo(g);else{null==g&&(g=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),z.lShiftTo(l,g)):(p.copyTo(k),z.copyTo(g));p=k.t;z=k.data[p-1];if(0!=z){var E=z*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),u=this.FV/E,E=(1<<this.F1)/E,y=1<<this.F2,r=g.t,x=r-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=g.compareTo(w)&&
405 -(g.data[g.t++]=1,g.subTo(w,g));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=g.data[--r]==z?this.DM:Math.floor(g.data[r]*u+(g.data[r-1]+y)*E);if((g.data[r]+=k.am(0,O,g,x,0,p))<O)for(k.dlShiftTo(x,w),g.subTo(w,g);g.data[r]<--O;)g.subTo(w,g)}null!=b&&(g.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));g.t=p;g.clamp();0<l&&g.rShiftTo(l,g);0>m&&c.ZERO.subTo(g,g)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
406 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var g=d(),p=d(),z=b.convert(this),k=h(a)-1;for(z.copyTo(g);0<=--k;)if(b.sqrTo(g,p),0<(a&1<<k))b.mulTo(p,z,g);else var m=g,g=p,p=m;return b.revert(g)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
399 +c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var g=a.length,e=!1,p=0;0<=--g;){var h=8==d?a[g]&255:m(a,g);0>h?"-"==a.charAt(g)&&(e=!0):(e=!1,0==p?this.data[this.t++]=h:p+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-p)-1)<<p,this.data[this.t++]=
400 +h>>this.DB-p):this.data[this.t-1]|=h<<p,p+=d,p>=this.DB&&(p-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<p&&(this.data[this.t-1]|=(1<<this.DB-p)-1<<p));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
401 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,g=(1<<d)-1,p=Math.floor(a/this.DB),e=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+p+1]=this.data[h]>>d|e,e=(this.data[h]&g)<<c;for(h=p-1;0<=h;--h)b.data[h]=0;b.data[p]=e;b.t=this.t+p+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,g=this.DB-d,p=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var e=
402 +c+1;e<this.t;++e)b.data[e-c-1]|=(this.data[e]&p)<<g,b.data[e-c]=this.data[e]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&p)<<g);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,g=Math.min(a.t,this.t);c<g;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
403 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),g=a.abs(),e=d.t;for(b.t=e+g.t;0<=--e;)b.data[e]=0;for(e=0;e<g.t;++e)b.data[e+d.t]=d.am(0,g.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
404 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,e){var p=a.abs();if(!(0>=p.t)){var y=this.abs();if(y.t<p.t)null!=b&&b.fromInt(0),null!=e&&this.copyTo(e);else{null==e&&(e=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),y.lShiftTo(l,e)):(p.copyTo(k),y.copyTo(e));p=k.t;y=k.data[p-1];if(0!=y){var E=y*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),q=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=e.t,x=u-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=e.compareTo(w)&&
405 +(e.data[e.t++]=1,e.subTo(w,e));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=e.data[--u]==y?this.DM:Math.floor(e.data[u]*q+(e.data[u-1]+A)*E);if((e.data[u]+=k.am(0,O,e,x,0,p))<O)for(k.dlShiftTo(x,w),e.subTo(w,e);e.data[u]<--O;)e.subTo(w,e)}null!=b&&(e.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));e.t=p;e.clamp();0<l&&e.rShiftTo(l,e);0>m&&c.ZERO.subTo(e,e)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
406 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var e=d(),p=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(e);0<=--k;)if(b.sqrTo(e,p),0<(a&1<<k))b.mulTo(p,y,e);else var l=e,e=p,p=l;return b.revert(e)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
407 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 b=(1<<a)-1,c,d=!1,e="",g=this.t,p=this.DB-g*this.DB%a;if(0<g--)for(p<this.DB&&0<(c=this.data[g]>>p)&&(d=!0,e="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=g;)p<a?(c=(this.data[g]&(1<<p)-1)<<a-p,c|=this.data[--g]>>(p+=this.DB-a)):(c=this.data[g]>>(p-=a)&b,0>=p&&(p+=this.DB,--g)),0<c&&(d=!0),d&&(e+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?e:"0"};c.prototype.negate=function(){var a=
408 d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
409 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new r(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=z;R.prototype.revert=z;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
409 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
410 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)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var T=[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,
411 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],P=67108864/T[T.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
412 -b),c=k(b),g=d(),p=d(),h="";for(this.divRemTo(c,g,p);0<g.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,g.divRemTo(c,g,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,z=0;z<a.length;++z){var k=m(a,z);0>k?"-"==a.charAt(z)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
412 +b),c=k(b),e=d(),p=d(),h="";for(this.divRemTo(c,e,p);0<e.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,e.divRemTo(c,e,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
413 this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var e=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<e?d[0]&(1<<e)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,e,g=Math.min(a.t,this.t);for(d=
414 0;d<g;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){e=a.s&this.DM;for(d=g;d<this.t;++d)c.data[d]=b(this.data[d],e);c.t=this.t}else{e=this.s&this.DM;for(d=g;d<a.t;++d)c.data[d]=b(e,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
415 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
416 0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var e;for(e=c.t-this.t;d<e;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(e=Math.min(a.t,b);d<e;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
417 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var z=1;z++<d&&0!=
417 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var y=1;y++<d&&0!=
418 p.compareTo(b);)if(p=p.modPowInt(2,this),0==p.compareTo(c.ONE))return!1;if(0!=p.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.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]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
419 function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,e=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[e++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==e&&
420 -(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,A,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
421 -y,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
420 +(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
421 +A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
422 0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,e=0;0!=d;)d&=d-1,++e;a+=e}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
423 -y)};c.prototype.flipBit=function(a){return this.changeBit(a,A)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
424 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),g,p=k(1),z;if(0>=c)return p;g=18>c?1:48>c?3:144>c?4:768>c?5:6;z=8>c?new r(b):b.isEven()?new E(b):new v(b);var m=[],l=3,q=g-1,u=(1<<g)-1;m[1]=z.convert(this);if(1<g)for(c=d(),z.sqrTo(m[1],c);l<=u;)m[l]=d(),z.mulTo(c,m[l-2],m[l]),l+=2;for(var y=a.t-1,x,w=!0,O=d(),c=h(a.data[y])-1;0<=y;){c>=q?x=a.data[y]>>c-q&u:(x=(a.data[y]&(1<<c+1)-1)<<q-c,0<y&&(x|=a.data[y-1]>>this.DB+c-q));for(l=g;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--y);
425 -if(w)m[x].copyTo(p),w=!1;else{for(;1<l;)z.sqrTo(p,O),z.sqrTo(O,p),l-=2;0<l?z.sqrTo(p,O):(l=p,p=O,O=l);z.mulTo(O,m[x],p)}for(;0<=y&&0==(a.data[y]&1<<c);)z.sqrTo(p,O),l=p,p=O,O=l,0>--c&&(c=this.DB-1,--y)}return z.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),g=k(1),p=k(0),h=k(0),z=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(g.isEven()&&p.isEven()||(g.addTo(this,g),p.subTo(a,p)),g.rShiftTo(1,
426 -g)):p.isEven()||p.subTo(a,p),p.rShiftTo(1,p);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&z.isEven()||(h.addTo(this,h),z.subTo(a,z)),h.rShiftTo(1,h)):z.isEven()||z.subTo(a,z),z.rShiftTo(1,z);0<=d.compareTo(e)?(d.subTo(e,d),b&&g.subTo(h,g),p.subTo(z,p)):(e.subTo(d,e),b&&h.subTo(g,h),z.subTo(p,z))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=z.compareTo(a))return z.subtract(a);if(0>z.signum())z.addTo(a,z);else return z;return 0>z.signum()?z.add(a):z};c.prototype.pow=function(a){return this.exp(a,
423 +A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
424 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),e,p=k(1),y;if(0>=c)return p;e=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var l=[],m=3,r=e-1,q=(1<<e)-1;l[1]=y.convert(this);if(1<e)for(c=d(),y.sqrTo(l[1],c);m<=q;)l[m]=d(),y.mulTo(c,l[m-2],l[m]),m+=2;for(var A=a.t-1,x,w=!0,O=d(),c=h(a.data[A])-1;0<=A;){c>=r?x=a.data[A]>>c-r&q:(x=(a.data[A]&(1<<c+1)-1)<<r-c,0<A&&(x|=a.data[A-1]>>this.DB+c-r));for(m=e;0==(x&1);)x>>=1,--m;0>(c-=m)&&(c+=this.DB,--A);
425 +if(w)l[x].copyTo(p),w=!1;else{for(;1<m;)y.sqrTo(p,O),y.sqrTo(O,p),m-=2;0<m?y.sqrTo(p,O):(m=p,p=O,O=m);y.mulTo(O,l[x],p)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(p,O),m=p,p=O,O=m,0>--c&&(c=this.DB-1,--A)}return y.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),p=k(1),g=k(0),h=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(p.isEven()&&g.isEven()||(p.addTo(this,p),g.subTo(a,g)),p.rShiftTo(1,
426 +p)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&y.isEven()||(h.addTo(this,h),y.subTo(a,y)),h.rShiftTo(1,h)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(e)?(d.subTo(e,d),b&&p.subTo(h,p),g.subTo(y,g)):(e.subTo(d,e),b&&h.subTo(p,h),y.subTo(g,y))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
427 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
428 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
429 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<g.length;++l)g[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
428 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
429 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<e.length;++l)e[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
430 0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var l=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+l);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
431 v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
432 v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
433 2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
434 -0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs1}},
435 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?g(a,b,p,h):d(a,b,p,h)}function d(b,c,g,k){var m=l(b,c),z=0,q=n(m.bitLength());"millerRabinTests"in
436 -g&&(q=g.millerRabinTests);var r=10;"maxBlockTime"in g&&(r=g.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(q))return k(null,m);m.dAddOffset(h[z++%8],0)}while(0>r||+new Date-v<r);a.util.setImmediate(function(){d(b,c,g,k)})}function g(b,c,h,m){function q(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}z.bitLength()>b&&(z=l(b,c));h=z.toString(16);e.target.postMessage({hex:h,workLoad:r});
437 -z.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var z=l(b,c),E=h.workers,r=h.workLoad||100,n=30*r/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;q()});q()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(r).byteValue(),0);return c}
438 -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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],r=new k(null);r.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
439 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
440 -0;l<g.length;++l)g[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
434 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
435 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?e(a,b,p,h):d(a,b,p,h)}function d(b,c,e,k){var m=l(b,c),y=0,r=n(m.bitLength());"millerRabinTests"in
436 +e&&(r=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(r))return k(null,m);m.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,m){function r(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}y.bitLength()>b&&(y=l(b,c));h=y.toString(16);e.target.postMessage({hex:h,workLoad:u});
437 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;r()});r()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
438 +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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
439 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
440 +0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
441 Error("Message is too long for PKCS#1 v1.5 padding."),g.length=b.length,g.max=d-11,g;g.putByte(0);g.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var h=0;h<d;++h)g.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),h=0;h<d;++h)e=l.charCodeAt(h),0===e?++k:g.putByte(e);d=k}g.putByte(0);g.putBytes(b);return g}function d(b,c,e,g){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var h=b.getByte(),k=b.getByte();if(0!==h||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
442 -typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function g(b,c,d){function e(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
443 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var g=b.p;b.p=b.q;b.q=g}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,e()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,e()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
444 -(g=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,g,b.p,b.q,g.mod(b.p1),g.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);e()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
445 -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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,r=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
442 +typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
443 +b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,r,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
444 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var r={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(r.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
445 +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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
446 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},B={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
447 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
448 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
449 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},A=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
450 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},y=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
449 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
450 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
451 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
452 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
453 -b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,g,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
454 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,g).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,g):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
453 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
454 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,e):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
455 c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:g,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},g=+new Date,p,k=0;null===a.keys&&
456 -(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(r[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
456 +(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
457 null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(p=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,p,a.p,a.q,
458 p.mod(a.p1),p.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});p=+new Date;k+=p-g;g=p}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
459 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var e=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(e,0),e.keys;g(e,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,g){var l={n:b,e:g,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
459 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var g=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(g,0),g.keys;e(g,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
460 b,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+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
461 -l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,g,k,l,m,q,r){var x={n:b,e:c,d:g,p:k,q:l,dP:m,dQ:q,qInv:r,decrypt:function(b,c,g){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,g)}};else if(-1!==["RAW","NONE",
462 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:y},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
461 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,l,m,r,u){var x={n:b,e:c,d:e,p:k,q:l,dP:m,dQ:r,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
462 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
463 [k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,B,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
464 -c.errors=d,c;var e,g,l,q,y,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();y=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
465 -16),new m(e,16),new m(g,16),new m(l,16),new m(q,16),new m(y,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
466 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,A,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
464 +c.errors=d,c;var e,g,l,r,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();r=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
465 +16),new m(e,16),new m(g,16),new m(l,16),new m(r,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
466 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
467 c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
468 -!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||
469 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<g.length;++l)g[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
470 -b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var g=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encryptionOid"},
471 -{name:"AlgorithmIdentifier.parameters",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
472 -tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:g.Class.UNIVERSAL,
473 -type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"salt"},
474 -{name:"pkcs-12PbeParams.iterations",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var e=a.random.getBytesSync(d.saltSize),h=d.count,k=g.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var z,q;switch(d.algorithm){case "aes128":z=m=16;d=n["aes128-CBC"];q=a.aes.createEncryptionCipher;break;case "aes192":m=24;
475 -z=16;d=n["aes192-CBC"];q=a.aes.createEncryptionCipher;break;case "aes256":m=32;z=16;d=n["aes256-CBC"];q=a.aes.createEncryptionCipher;break;case "des":z=m=8;d=n.desCBC;q=a.des.createEncryptionCipher;break;default:throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;}var v=a.pkcs5.pbkdf2(c,e,h,m);c=a.random.getBytesSync(z);h=q(v);h.start(c);h.update(g.toDer(b));h.finish();b=h.output.getBytes();e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,
476 -g.Type.OID,!1,g.oidToDer(n.pkcs5PBES2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n.pkcs5PBKDF2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(d).getBytes()),g.create(g.Class.UNIVERSAL,
477 -g.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(e),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(g.toDer(b)),h.finish(),b=h.output.getBytes(),e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,
478 -!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]);else throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[e,g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,e={},h=[];if(!g.validate(b,m,e,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=g.derToOid(e.encryptionOid);
479 -h=l.pbe.getCipher(h,e.encryptionParams,c);e=a.util.createBuffer(e.encryptedData);h.update(e);h.finish()&&(d=g.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:g.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
480 -b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return g.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var e,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
481 -h=24;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
482 -e.substr(0,8),h);c=k(c);c.start(e);c.update(g.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(e).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,e=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==e.type&&"PRIVATE KEY"!==e.type&&"RSA PRIVATE KEY"!==e.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".'),
483 -d.headerType=d,d;if(e.procType&&"ENCRYPTED"===e.procType.type){var h,k;switch(e.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
484 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+e.dekInfo.algorithm+'".'),d.algorithm=e.dekInfo.algorithm,d;}var m=a.util.hexToBytes(e.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(e.body));if(k.finish())d=k.output.getBytes();else return d}else d=
485 -e.body;d="ENCRYPTED PRIVATE KEY"===e.type?l.decryptPrivateKeyInfo(g.fromDer(d),c):g.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,q=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var u=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,q);
486 -var C=q*Math.ceil(u/q);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%u));C=q*Math.ceil(b/q);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<q;l++)D.putByte(C.at(l%m));var Y=Math.ceil(u/q)+Math.ceil(b/q),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(q)),
468 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
469 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
470 +b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
471 +{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"}]},k={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",
472 +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,
473 +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"}]}]},h={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"},
474 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var g=a.random.getBytesSync(d.saltSize),h=d.count,k=e.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,r;switch(d.algorithm){case "aes128":y=m=16;d=n["aes128-CBC"];r=a.aes.createEncryptionCipher;break;case "aes192":m=24;
475 +y=16;d=n["aes192-CBC"];r=a.aes.createEncryptionCipher;break;case "aes256":m=32;y=16;d=n["aes256-CBC"];r=a.aes.createEncryptionCipher;break;case "des":y=m=8;d=n.desCBC;r=a.des.createEncryptionCipher;break;default:throw g=Error("Cannot encrypt private key. Unknown encryption algorithm."),g.algorithm=d.algorithm,g;}var v=a.pkcs5.pbkdf2(c,g,h,m);c=a.random.getBytesSync(y);h=r(v);h.start(c);h.update(e.toDer(b));h.finish();b=h.output.getBytes();g=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
476 +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,
477 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(g),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(e.toDer(b)),h.finish(),b=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,
478 +!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,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,g={},h=[];if(!e.validate(b,m,g,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=e.derToOid(g.encryptionOid);
479 +h=l.pbe.getCipher(h,g.encryptionParams,c);g=a.util.createBuffer(g.encryptedData);h.update(g);h.finish()&&(d=e.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
480 +b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var g,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
481 +h=24;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
482 +g.substr(0,8),h);c=k(c);c.start(g);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(g).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,g=a.pem.decode(b)[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".'),
483 +d.headerType=d,d;if(g.procType&&"ENCRYPTED"===g.procType.type){var h,k;switch(g.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
484 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+g.dekInfo.algorithm+'".'),d.algorithm=g.dekInfo.algorithm,d;}var m=a.util.hexToBytes(g.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(g.body));if(k.finish())d=k.output.getBytes();else return d}else d=
485 +g.body;d="ENCRYPTED PRIVATE KEY"===g.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,r=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var q=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,r);
486 +var C=r*Math.ceil(q/r);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%q));C=r*Math.ceil(b/r);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<r;l++)D.putByte(C.at(l%m));var Y=Math.ceil(q/r)+Math.ceil(b/r),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(r)),
487 V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);L.putBuffer(ea)}v=L;n.putBuffer(C)}n.truncate(n.length()-g);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
488 -"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var e={};b=[];if(!g.validate(c,k,e,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=g.derToOid(e.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=g.derToOid(e.encOid);if(b!==l.oids["aes128-CBC"]&&
489 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=e.kdfSalt;var m=a.util.createBuffer(e.kdfIterationCount),m=m.getInt(m.length()<<3),q;switch(l.oids[b]){case "aes128-CBC":q=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":q=24;h=a.aes.createDecryptionCipher;break;
490 -case "aes256-CBC":q=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":q=24;h=a.des.createDecryptionCipher;break;case "desCBC":q=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,q);e=e.encIv;h=h(b);h.start(e);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var e={},k=[];if(!g.validate(c,h,e,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(e.salt),e=a.util.createBuffer(e.iterations),
491 -e=e.getInt(e.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,e,m);d=l.pbe.generatePkcs12Key(d,k,2,e,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
492 -typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
493 -0;l<g.length;++l)g[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
494 -a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var g={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
488 +"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var g={};b=[];if(!e.validate(c,k,g,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=e.derToOid(g.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=e.derToOid(g.encOid);if(b!==l.oids["aes128-CBC"]&&
489 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=g.kdfSalt;var m=a.util.createBuffer(g.kdfIterationCount),m=m.getInt(m.length()<<3),r;switch(l.oids[b]){case "aes128-CBC":r=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":r=24;h=a.aes.createDecryptionCipher;break;
490 +case "aes256-CBC":r=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":r=24;h=a.des.createDecryptionCipher;break;case "desCBC":r=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,r);g=g.encIv;h=h(b);h.start(g);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
491 +g=g.getInt(g.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,g,m);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
492 +typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
493 +0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
494 +a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
495 tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",
496 -tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(g)};d.encryptedDataValidator={name:"EncryptedData",
497 -tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(g)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
496 +tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(e)};d.encryptedDataValidator={name:"EncryptedData",
497 +tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(e)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
498 captureAsn1:"digestAlgorithms"},a,{name:"SignedData.Certificates",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,capture:"signerInfos",optional:!0,value:[{name:"SignerInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:c.Class.UNIVERSAL,
499 type:c.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
500 value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,
501 constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]}]}]};d.recipientInfoValidator={name:"RecipientInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,
502 constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
503 -value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
504 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
505 -["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var g=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());g.putBuffer(b.digest())}g.truncate(g.length()-d);return g.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
506 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
507 -Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
508 -{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
509 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,g=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,x=Math.ceil(v/8),A=b.digest().getBytes();
510 -if(x<g+m+2)throw Error("Message is too long to encrypt.");var y;y=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(A);n.putBytes(y);c.start();c.update(n.getBytes());A=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-g-2);n.putByte(1);n.putBytes(y);var R=n.getBytes(),z=x-g-1,E=d.generate(A,z);y="";for(n=0;n<z;n++)y+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;y=String.fromCharCode(y.charCodeAt(0)&~v)+y.substr(1);
511 -return y+A+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<g+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-g-1,v=k.substr(0,n);k=k.substr(n,g);var y=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&y))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),z="";for(q=0;q<n;q++)z+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
512 -z=String.fromCharCode(z.charCodeAt(0)&~y)+z.substr(1);l=l-g-m-2;for(q=0;q<l;q++)if(0!==z.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==z.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=z.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,
513 -module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
503 +value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
504 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
505 +["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var e=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());e.putBuffer(b.digest())}e.truncate(e.length()-d);return e.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
506 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
507 +Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
508 +{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
509 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,r){var n,v=r-1,x=Math.ceil(v/8),z=b.digest().getBytes();
510 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
511 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var r;r=l-1;l=Math.ceil(r/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-r&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(r=0;r<n;r++)y+=String.fromCharCode(v.charCodeAt(r)^R.charCodeAt(r));
512 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(r=0;r<l;r++)if(0!==y.charCodeAt(r))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
513 +module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
514 ["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
515 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function g(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
516 -v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===r.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
515 +var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
516 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
517 typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
518 (e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
519 -"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in r?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
519 +"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
520 d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
521 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
522 -d.extension=b,d;return b}function n(a,b){switch(a){case r["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
522 +d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
523 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
524 !1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
525 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},r=h.oids,v={};v.CN=r.commonName;v.commonName="CN";v.C=r.countryName;v.countryName="C";v.L=r.localityName;v.localityName="L";v.ST=r.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=r.organizationName;v.organizationName="O";v.OU=r.organizationalUnitName;v.organizationalUnitName="OU";v.E=r.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
525 +h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
526 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
527 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
528 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
529 {name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},B,{name:"Certificate.TBSCertificate.issuerUniqueID",
530 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
531 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
532 -{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},A={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
532 +{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
533 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
534 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
535 -tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},y={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
535 +tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
536 tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},B,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
537 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
538 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in r&&(g.name=r[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
539 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in r&&(p.name=r[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===r.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==r["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:r.sha1},mgf:{algorithmOid:r.mgf1,hash:{algorithmOid:r.sha1}},
540 -saltLength:20});c={};a=[];if(!k.validate(b,A,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
538 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
539 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
540 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
541 b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
542 return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
543 body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
544 break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
545 c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
546 -null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){g([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){g(a);
547 -b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){g(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
548 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
549 -e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in r)switch(r[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
550 -e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case r.sha1WithRSAEncryption:l=void 0;break;case r["RSASSA-PSS"]:d=r[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=r[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
551 -e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=r[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
552 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=r.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
553 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,x,e,l))throw e=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),e.errors=l,e;if("string"!==typeof e.certSignature){for(var l="\x00",m=0;m<e.certSignature.length;++m)l+=k.toDer(e.certSignature[m]).getBytes();e.certSignature=l}var l=k.derToOid(e.publicKeyOid),y=h.createCertificate();y.version=e.certVersion?e.certVersion.charCodeAt(0):
554 -0;m=a.util.createBuffer(e.certSerialNumber);y.serialNumber=m.toHex();y.signatureOid=a.asn1.derToOid(e.certSignatureOid);y.signatureParameters=R(y.signatureOid,e.certSignatureParams,!0);y.siginfo.algorithmOid=a.asn1.derToOid(e.certinfoSignatureOid);y.siginfo.parameters=R(y.siginfo.algorithmOid,e.certinfoSignatureParams,!1);m=a.util.createBuffer(e.certSignature);++m.read;y.signature=m.getBytes();m=[];void 0!==e.certValidity1UTCTime&&m.push(k.utcTimeToDate(e.certValidity1UTCTime));void 0!==e.certValidity2GeneralizedTime&&
555 -m.push(k.generalizedTimeToDate(e.certValidity2GeneralizedTime));void 0!==e.certValidity3UTCTime&&m.push(k.utcTimeToDate(e.certValidity3UTCTime));void 0!==e.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(e.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
556 -y.validity.notBefore=m[0];y.validity.notAfter=m[1];y.tbsCertificate=e.tbsCertificate;if(d){y.md=null;if(y.signatureOid in r)switch(l=r[y.signatureOid],l){case "sha1WithRSAEncryption":y.md=a.md.sha1.create();break;case "md5WithRSAEncryption":y.md=a.md.md5.create();break;case "sha256WithRSAEncryption":y.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":y.md=a.md.sha512.create();break;case "RSASSA-PSS":y.md=a.md.sha256.create()}if(null===y.md)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
557 -e.signatureOid=y.signatureOid,e;m=k.toDer(y.tbsCertificate);y.md.update(m.getBytes())}m=a.md.sha1.create();y.issuer.getField=function(a){return c(y.issuer,a)};y.issuer.addField=function(a){g([a]);y.issuer.attributes.push(a)};y.issuer.attributes=h.RDNAttributesAsArray(e.certIssuer,m);e.certIssuerUniqueId&&(y.issuer.uniqueId=e.certIssuerUniqueId);y.issuer.hash=m.digest().toHex();m=a.md.sha1.create();y.subject.getField=function(a){return c(y.subject,a)};y.subject.addField=function(a){g([a]);y.subject.attributes.push(a)};
558 -y.subject.attributes=h.RDNAttributesAsArray(e.certSubject,m);e.certSubjectUniqueId&&(y.subject.uniqueId=e.certSubjectUniqueId);y.subject.hash=m.digest().toHex();y.extensions=e.certExtensions?h.certificateExtensionsFromAsn1(e.certExtensions):[];l===h.oids.rsaEncryption&&(y.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo));return y};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
559 -return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in r)if(c.name=r[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
546 +null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
547 +b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
548 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
549 +e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
550 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
551 +e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
552 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
553 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),q=h.createCertificate();q.version=g.certVersion?g.certVersion.charCodeAt(0):
554 +0;m=a.util.createBuffer(g.certSerialNumber);q.serialNumber=m.toHex();q.signatureOid=a.asn1.derToOid(g.certSignatureOid);q.signatureParameters=R(q.signatureOid,g.certSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;q.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
555 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
556 +q.validity.notBefore=m[0];q.validity.notAfter=m[1];q.tbsCertificate=g.tbsCertificate;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===q.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
557 +g.signatureOid=q.signatureOid,g;m=k.toDer(q.tbsCertificate);q.md.update(m.getBytes())}m=a.md.sha1.create();q.issuer.getField=function(a){return c(q.issuer,a)};q.issuer.addField=function(a){e([a]);q.issuer.attributes.push(a)};q.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(q.issuer.uniqueId=g.certIssuerUniqueId);q.issuer.hash=m.digest().toHex();m=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};
558 +q.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(q.subject.uniqueId=g.certSubjectUniqueId);q.subject.hash=m.digest().toHex();q.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return q};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
559 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
560 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
561 -k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in r?c[r[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
562 -g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,y,e,l))throw e=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),e.errors=l,e;if("string"!==typeof e.csrSignature){for(var l=
563 -"\x00",m=0;m<e.csrSignature.length;++m)l+=k.toDer(e.csrSignature[m]).getBytes();e.csrSignature=l}l=k.derToOid(e.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var u=h.createCertificationRequest();u.version=e.csrVersion?e.csrVersion.charCodeAt(0):0;u.signatureOid=a.asn1.derToOid(e.csrSignatureOid);u.signatureParameters=R(u.signatureOid,e.csrSignatureParams,!0);u.siginfo.algorithmOid=a.asn1.derToOid(e.csrSignatureOid);u.siginfo.parameters=R(u.siginfo.algorithmOid,
564 -e.csrSignatureParams,!1);l=a.util.createBuffer(e.csrSignature);++l.read;u.signature=l.getBytes();u.certificationRequestInfo=e.certificationRequestInfo;if(d){u.md=null;if(u.signatureOid in r)switch(l=r[u.signatureOid],l){case "sha1WithRSAEncryption":u.md=a.md.sha1.create();break;case "md5WithRSAEncryption":u.md=a.md.md5.create();break;case "sha256WithRSAEncryption":u.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":u.md=a.md.sha512.create();break;case "RSASSA-PSS":u.md=a.md.sha256.create()}if(null===
565 -u.md)throw e=Error("Could not compute certification request digest. Unknown signature OID."),e.signatureOid=u.signatureOid,e;l=k.toDer(u.certificationRequestInfo);u.md.update(l.getBytes())}l=a.md.sha1.create();u.subject.getField=function(a){return c(u.subject,a)};u.subject.addField=function(a){g([a]);u.subject.attributes.push(a)};u.subject.attributes=h.RDNAttributesAsArray(e.certificationRequestInfoSubject,l);u.subject.hash=l.digest().toHex();u.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo);
566 -u.getAttribute=function(a){return c(u,a)};u.addAttribute=function(a){g([a]);u.attributes.push(a)};u.attributes=h.CRIAttributesAsArray(e.certificationRequestInfoAttributes||[]);return u};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
567 -null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){g([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){g(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){g(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
568 -e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in r)switch(r[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
569 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case r["RSASSA-PSS"]:c=r[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=r[b.signatureParameters.mgf.algorithmOid];
570 -if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=r[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
561 +k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
562 +g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
563 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var q=h.createCertificationRequest();q.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;q.signatureOid=a.asn1.derToOid(g.csrSignatureOid);q.signatureParameters=R(q.signatureOid,g.csrSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,
564 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;q.signature=l.getBytes();q.certificationRequestInfo=g.certificationRequestInfo;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===
565 +q.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=q.signatureOid,g;l=k.toDer(q.certificationRequestInfo);q.md.update(l.getBytes())}l=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};q.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);q.subject.hash=l.digest().toHex();q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
566 +q.getAttribute=function(a){return c(q,a)};q.addAttribute=function(a){e([a]);q.attributes.push(a)};q.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return q};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
567 +null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
568 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
569 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
570 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
571 h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
572 k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
573 !1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
574 return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
575 return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
576 -h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return g.certs[b.hash]||
577 -null}var g={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in g.certs?(c=g.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):g.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
578 -for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)g.addCertificate(b[l]);return g};h.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"};
579 -h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var q=c.shift(),y=null,r=!1;if(g<q.validity.notBefore||g>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:g};if(null===k){y=c[0]||b.getIssuer(q);null===y&&q.isIssuer(q)&&(r=!0,y=q);if(y){var n=y;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){y=n.shift();
580 -try{x=y.verify(q)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||y&&!r||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&y&&!q.isIssuer(y)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<q.extensions.length;++x){var w=q.extensions[x];!w.critical||w.name in n||(k=
581 -{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||y&&!r)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
582 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
583 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
584 -c.defined.x509=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
585 -[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function g(b,c,h,q){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
586 -for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],r,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},u=null,u=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(u.tagClass!==m.Class.UNIVERSAL||u.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");u=d(u).value;break;case k.oids.encryptedData:var A=q,x={},B=[];if(!m.validate(u,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
587 -b.errors=B,b;u=m.derToOid(x.contentType);if(u!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=u,b;u=m.derToOid(x.encAlgorithm);u=k.pbe.getCipher(u,x.encParameter,A);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);u.update(x);if(!u.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");u=u.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
588 -l(u,h,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var q,r,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
589 -k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:q=A;r=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
590 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(x,q,g,h))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=h,a;r()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
591 -a.pkcs12||{},r={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
592 -r,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
576 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
577 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
578 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.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"};
579 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var r=c.shift(),A=null,u=!1;if(g<r.validity.notBefore||g>r.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:r.validity.notBefore,notAfter:r.validity.notAfter,now:g};if(null===k){A=c[0]||b.getIssuer(r);null===A&&r.isIssuer(r)&&(u=!0,A=r);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
580 +try{x=A.verify(r)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(r)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&A&&!r.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<r.extensions.length;++x){var w=r.extensions[x];!w.critical||w.name in n||(k=
581 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=r.getExtension("basicConstraints"),r=r.getExtension("keyUsage"),null!==r&&(r.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
582 +null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==r&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));r=null===k?!0:k.error;l=d?d(r,m,e):r;if(!0===l)k=null;else{!0===r&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
583 +if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
584 +c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
585 +[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,r){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
586 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},q=null,q=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(q.tagClass!==m.Class.UNIVERSAL||q.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");q=d(q).value;break;case k.oids.encryptedData:var z=r,x={},B=[];if(!m.validate(q,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
587 +b.errors=B,b;q=m.derToOid(x.contentType);if(q!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=q,b;q=m.derToOid(x.encAlgorithm);q=k.pbe.getCipher(q,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);q.update(x);if(!q.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");q=q.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
588 +l(q,h,r);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var r,u,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
589 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:r=z;u=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
590 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==r&&!m.validate(x,r,g,h))throw a=Error("Cannot read PKCS#12 "+r.name),a.errors=h,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
591 +a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
592 +u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
593 tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},B={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
594 value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
595 -capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},A={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
596 -h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var r={};if(!m.validate(b,v,r,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:r.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
597 -(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==r.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=r.version.charCodeAt(0),l;if(m.derToOid(r.contentType)!==k.oids.data)throw l=
598 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(r.contentType),l;b=r.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(r.mac){var w=null,A=0,u=m.derToOid(r.macAlgorithm);switch(u){case k.oids.sha1:w=a.md.sha1.create();A=20;break;case k.oids.sha256:w=a.md.sha256.create();A=32;break;case k.oids.sha384:w=a.md.sha384.create();A=48;break;case k.oids.sha512:w=a.md.sha512.create();
599 -A=64;break;case k.oids.md5:w=a.md.md5.create(),A=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+u);var u=new a.util.ByteBuffer(r.macSalt),B="macIterations"in r?parseInt(a.util.bytesToHex(r.macIterations),16):1,A=h.generateKey(n,u,3,B,A,w),u=a.hmac.create();u.start(w,A);u.update(b.value);if(u.getMac().getBytes()!==r.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}g(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
600 -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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(q)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);q=[];null!==
601 -g&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
602 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));g=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],n=0;n<q.length;++n){c=q[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
603 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
595 +capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
596 +h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
597 +(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
598 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var w=null,z=0,q=m.derToOid(u.macAlgorithm);switch(q){case k.oids.sha1:w=a.md.sha1.create();z=20;break;case k.oids.sha256:w=a.md.sha256.create();z=32;break;case k.oids.sha384:w=a.md.sha384.create();z=48;break;case k.oids.sha512:w=a.md.sha512.create();
599 +z=64;break;case k.oids.md5:w=a.md.md5.create(),z=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+q);var q=new a.util.ByteBuffer(u.macSalt),B="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,z=h.generateKey(n,q,3,B,z,w),q=a.hmac.create();q.start(w,z);q.update(b.value);if(q.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
600 +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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var r=a.util.isArray(c)?c[0]:c;"string"===typeof r&&(r=k.certificateFromPem(r));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(r)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);r=[];null!==
601 +g&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
602 +0<r.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,r));g=[];r=[];null!==c&&(r=a.util.isArray(c)?c:[c]);for(var u=[],n=0;n<r.length;++n){c=r[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
603 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);u.push(c)}0<u.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,u),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
604 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
605 [m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var v;e.useMac&&(g=a.md.sha1.create(),v=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,v,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),v=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
606 !0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,v.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
607 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
608 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
609 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var g=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
610 -g.headerType=b.type;throw g;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,g){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:g})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
611 -typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
607 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
608 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
609 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
610 +e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
611 +typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
612 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var g=a.util.createBuffer(),h=b.length>>1,l=h+(b.length&1),k=b.substr(0,l),l=b.substr(h,l);b=a.util.createBuffer();h=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);h.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
613 -for(var q=0;q<m;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
614 -a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},g=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
613 +for(var r=0;r<m;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(r=0;r<c;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
614 +a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
615 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
616 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
617 certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};m.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};m.CipherSuites={};m.getCipherSuite=function(a){var b=null,c;for(c in m.CipherSuites){var d=m.CipherSuites[c];if(d.id[0]===a.charCodeAt(0)&&d.id[1]===a.charCodeAt(1)){b=d;break}}return b};
@@ -622,41 +622,41 @@ send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protoco
622 b.session.compressionMethod=g?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.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,
623 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
624 (a.expect=B,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
625 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:z,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
625 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
626 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
627 !1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
628 -l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:z:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:z)):b.error(b,{message:e?"No server certificate provided.":
629 -"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=r;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
628 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
629 +"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
630 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
631 try{var g=b.session.sp;g.pre_master_secret=d.decrypt(c);var h=b.session.clientHelloVersion;if(h.major!==g.pre_master_secret.charCodeAt(0)||h.minor!==g.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){g.pre_master_secret=a.random.getBytes(48)}b.expect=O;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
632 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
633 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(g){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=O;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
634 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
635 -return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=y;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
635 +return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
636 data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=B;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
637 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:H;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var g=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
638 e.putBuffer(b.session.sha1.digest());var h=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,h?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(g);b.session.sha1.update(g);if(b.session.resuming&&h||!b.session.resuming&&!h)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
639 -data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?A:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
639 +data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?z:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
640 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
641 "Bad certificate.";break;case m.Alert.Description.unsupported_certificate:d="Unsupported certificate.";break;case m.Alert.Description.certificate_revoked:d="Certificate revoked.";break;case m.Alert.Description.certificate_expired:d="Certificate expired.";break;case m.Alert.Description.certificate_unknown:d="Certificate unknown.";break;case m.Alert.Description.illegal_parameter:d="Illegal parameter.";break;case m.Alert.Description.unknown_ca:d="Unknown certificate authority.";break;case m.Alert.Description.access_denied:d=
642 "Access denied.";break;case m.Alert.Description.decode_error:d="Decode error.";break;case m.Alert.Description.decrypt_error:d="Decrypt error.";break;case m.Alert.Description.export_restriction:d="Export restriction.";break;case m.Alert.Description.protocol_version:d="Unsupported protocol version.";break;case m.Alert.Description.insufficient_security:d="Insufficient security.";break;case m.Alert.Description.internal_error:d="Internal error.";break;case m.Alert.Description.user_canceled:d="User canceled.";
643 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt24();if(g>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var h=d.bytes(g+
644 4);d.read+=4;e in J[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(h),b.session.sha1.update(h)),J[b.entity][b.expect][e](b,c,g)):
645 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt16(),d=d.getBytes(g);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||g>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
646 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,r=3,v=4,B=5,x=6,A=7,y=8,R=1,z=2,E=3,O=4,H=5,N=6,u=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];ea[m.ConnectionEnd.server]=[[u,P,F,u,L],[u,
647 -P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[u,u,m.handleServerHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,P,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,L,u,u,u,u,u,u],
648 -[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];J[m.ConnectionEnd.server]=[[u,m.handleClientHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,P,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleClientKeyExchange,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleCertificateVerify,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,
649 -u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
646 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,B=5,x=6,z=7,A=8,R=1,y=2,E=3,O=4,H=5,N=6,q=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];ea[m.ConnectionEnd.server]=[[q,P,F,q,L],[q,
647 +P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[q,q,m.handleServerHello,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,P,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,L,q,q,q,q,q,q],
648 +[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q]];J[m.ConnectionEnd.server]=[[q,m.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,P,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.handleClientKeyExchange,q,q,q,q],[q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,m.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,
649 +q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[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]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
650 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};g&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
651 cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
652 a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
653 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=g;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
653 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
654 }return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
655 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
656 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
655 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var r=a.util.createBuffer();
656 +n(r,2,k);n(l,2,r);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
657 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var g=
658 -null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(q.bytes(),!1));
659 -var y=a.util.createBuffer();n(y,3,q);e.putBuffer(y)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
658 +null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var r=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(r.bytes(),!1));
659 +var u=a.util.createBuffer();n(u,3,r);e.putBuffer(u)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(q){return b.error(b,{message:"Could not send certificate list.",cause:q,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
660 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
661 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(g){b.error(b,{message:"Could not get private key.",cause:g,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
662 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var g=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(g))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -678,199 +678,199 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_versio
678 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_message}})),c.record.ready=!0));c=b}if(!h.fail&&null!==h.record&&h.record.ready)if(b=h.record,d=b.type-m.ContentType.change_cipher_spec,e=ea[h.entity][h.expect],d in e)e[d](h,b);else m.handleUnexpected(h,b)}return c};h.prepare=function(b){m.queue(h,m.createRecord(h,{type:m.ContentType.application_data,data:a.util.createBuffer(b)}));return m.flush(h)};h.prepareHeartbeatRequest=function(b,c){b instanceof a.util.ByteBuffer&&
679 (b=b.bytes());"undefined"===typeof c&&(c=b.length);h.expectedHeartbeatPayload=b;m.queue(h,m.createRecord(h,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_request,b,c)}));return m.flush(h)};h.close=function(a){if(!h.fail&&h.sessionCache&&h.session){var b={id:h.session.id,version:h.session.version,sp:h.session.sp};b.sp.keys=null;h.sessionCache.setSession(b.id,b)}if(h.open){h.open=!1;h.input.clear();if(h.isConnected||h.handshaking)h.isConnected=h.handshaking=!1,
680 m.queue(h,m.createAlert(h,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(h);h.closed(h)}h.reset(a)};return h};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
681 -return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<g.length;++l)g[l](c);return c.tls}},
682 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,g,l){g=g.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
683 -g?l.keys.server_write_key:l.keys.client_write_key),iv:g?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",g?l.keys.client_write_key:l.keys.server_write_key),iv:g?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var e=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
684 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(g)&&(b.fragment=k.output,b.length=b.fragment.length(),e=!0);return e}function g(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
685 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,q=a.random.getBytesSync(g),y=e.output.length();y>=g?(b.fragment=e.output.getBytes(y-g),q=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
686 -b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;y=a.hmac.create();y.start("SHA1",e);y.update(q);q=y.digest().getBytes();y.start(null,null);y.update(g);g=y.digest().getBytes();return q===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
681 +return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
682 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
683 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
684 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
685 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,r=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),r=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
686 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(r);r=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return r===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
687 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
688 -20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<g.length;++l)g[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
689 -typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
690 -a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
691 -function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<g.length;++l)g[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
692 -(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<q;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var g=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(g.getBytesSync(h)),
693 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));h-=q.length;0<h&&(q=a.util.fillString(String.fromCharCode(0),h)+q);h=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:h,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
694 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<g.length;++l)g[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
695 -"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],g=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var g=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):g<=c[m.level].index&&
688 +20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
689 +typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
690 +a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
691 +function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
692 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,r=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<r;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),r;do r=(new d(a.util.bytesToHex(e.getBytesSync(h)),
693 +16)).mod(c.n);while(r.equals(d.ZERO));r=a.util.hexToBytes(r.toString(16));h-=r.length;0<h&&(r=a.util.fillString(String.fromCharCode(0),h)+r);h=c.encrypt(r,"NONE");r=b.generate(r,l);return{encapsulation:h,key:r}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
694 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
695 +"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
696 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
697 a.log.logMessage({timestamp:new Date,level:b,category:c,message:d,arguments:e})}})(n[l]);a.log.makeLogger=function(b){b={flags:0,f:b};a.log.setLevel(b,"none");return b};a.log.setLevel=function(b,c){var d=!1;if(b&&!(b.flags&a.log.LEVEL_LOCKED))for(var e=0;e<a.log.levels.length;++e)if(c==a.log.levels[e]){b.level=c;d=!0;break}return d};a.log.lock=function(b,c){b.flags="undefined"===typeof c||c?b.flags|a.log.LEVEL_LOCKED:b.flags&~a.log.LEVEL_LOCKED};a.log.addLogger=function(a){d.push(a)};if("undefined"!==
698 -typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},g=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else g=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};g=a.log.makeLogger(g);a.log.setLevel(g,"debug");a.log.addLogger(g)}else console={log:function(){}};
699 -null!==g&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(g,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(g));a.log.consoleLogger=g}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
700 -c.defined.log=!0;for(var l=0;l<g.length;++l)g[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!r.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
701 -b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:r.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
702 -r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.encryptedContent.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]),r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function g(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
703 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.digestAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(r.create(r.Class.UNIVERSAL,
704 -r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.signatureAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]));c.value.push(r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=r.create(r.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
705 -r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?r.utcTimeToDate(e):r.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?r.create(r.Class.UNIVERSAL,r.Type.UTCTIME,!1,r.dateToUtcTime(e)):
706 -r.create(r.Class.UNIVERSAL,r.Type.GENERALIZEDTIME,!1,r.dateToGeneralizedTime(e))}return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[c])])}function m(b){return[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,
707 -r.Type.OCTETSTRING,!1,b.parameter.getBytes())]),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!r.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(r.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
708 -0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:r.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
698 +typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},e=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else e=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};e=a.log.makeLogger(e);a.log.setLevel(e,"debug");a.log.addLogger(e)}else console={log:function(){}};
699 +null!==e&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(e,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(e));a.log.consoleLogger=e}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
700 +c.defined.log=!0;for(var l=0;l<e.length;++l)e[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!u.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
701 +b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:u.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
702 +u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.encryptedContent.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]),u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function e(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
703 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.digestAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(u.create(u.Class.UNIVERSAL,
704 +u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.signatureAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]));c.value.push(u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=u.create(u.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
705 +u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?u.utcTimeToDate(e):u.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?u.create(u.Class.UNIVERSAL,u.Type.UTCTIME,!1,u.dateToUtcTime(e)):
706 +u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
707 +u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
708 +0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
709 c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
710 -break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var r=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
711 -b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=r.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:r.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!r.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=r.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
710 +break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
711 +b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
712 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
713 -c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
714 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.signerInfos));return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),
713 +c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
714 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
715 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
716 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
717 -signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(r.create(r.Class.CONTEXT_SPECIFIC,
718 -0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(g).getBytes()),r.create(r.Class.UNIVERSAL,
719 -r.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=r.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=r.toDer(d);h.getByte();r.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
720 -}else{e.authenticatedAttributesAsn1=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=r.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
716 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var r=c[m];if(!l&&r.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&r.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
717 +signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
718 +0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
719 +u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
720 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var r=e.authenticatedAttributes[m];r.type===a.pki.oids.messageDigest?r.value=c[e.digestAlgorithm].digest():r.type!==a.pki.oids.signingTime||r.value||(r.value=k);h.value.push(n(r));e.authenticatedAttributesAsn1.value.push(n(r))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
721 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
722 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,
723 -!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,g(b.recipients)),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
722 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
723 +!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
724 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
725 }h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
726 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
727 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
728 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
729 -Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function g(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
730 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=g(w.bytes()),b.truncate(b.length()-
731 -x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(g("\x00\x00\x00\x00",l)),x.putBuffer(g("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=g("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
732 -h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,g){g=g||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+g};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
733 -function(b,g){g=g||{};var l=g.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===g.encoding)return l=l.toHex(),g.delimiter?l.match(/.{2}/g).join(g.delimiter):l;if("binary"===g.encoding)return l.getBytes();if(g.encoding)throw Error('Unknown encoding "'+g.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
734 -(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<g.length;++l)g[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
735 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var g={};a.debug.set("forge.task","queues",g);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
728 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
729 +Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
730 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
731 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
732 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
733 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
734 +(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
735 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
736 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
737 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
738 -this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",g)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
738 +this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
739 (c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
740 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
741 this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
742 a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
743 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in g?0===g[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):g[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(g[b.type].shift(),0===g[b.type].length?delete g[b.type]:g[b.type][0].start()):a.log.error("forge.task",
744 -"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in g?g[a.type].push(b):(g[b.type]=[b],m(b))};a.task.cancel=function(a){a in g&&(g[a]=[g[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
745 -a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<g.length;++l)g[l](c);return c.task}},
746 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
747 -return}var g,v=function(a,b){b.exports=function(b){var c=g.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){g="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
743 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
744 +"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
745 +a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
746 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
747 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
748 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});
749 -function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var g=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),g=g.substring(0,g.length-24),v=0;v<c.length;v++)if(g===c[v].DERKey||g==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
750 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),g=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(g,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
751 -var e=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,e,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,g){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,g)}
752 -function amtcert_createCertificate(b,c,a,d,g){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
753 -value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==g?g={name:"extKeyUsage",serverAuth:!0}:g.name="extKeyUsage",
754 -n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},g,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
755 -function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,g=b.length;d<g;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
749 +function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),e=e.substring(0,e.length-24),v=0;v<c.length;v++)if(e===c[v].DERKey||e==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
750 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),r=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(r).getBytes();
751 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
752 +function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
753 +value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
754 +n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
755 +function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,e=b.length;d<e;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
756 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
757 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
758 -require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var g="";a.on("data",function(a){null!=g&&(g+=a.toString("binary"));5E5<g.length&&(g=null)});a.on("end",function(){certUrlCache[b]={data:btoa(g),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,g)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
759 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,e,k,m,q){var r=a[b++];q={};var u=0,B=0;if(0==r){if(2==h.bpp)for(e=0;e<m;e++)n(a[b++]+(a[b++]<<8),e);else for(e=0;e<m;e++)v(a[b++],e);g(h.spare,c,d)}else if(1==r)h.graymode?(r=a[b++],h.lowcolor&&(r<<=4),h.canvas.fillStyle="rgb("+r+","+r+","+r+")"):(r=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(r&224)+","+((r&28)<<3)+","+D((r&3)<<6):(r>>8&248)+","+(r>>3&252)+","+
760 -((r&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,e,k);else if(1<r&&17>r){k=4;B=15;if(2==h.bpp){for(e=0;e<r;e++)q[e]=a[b++]+(a[b++]<<8);2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)n(q[r>>e&B],u++)}else{for(e=0;e<r;e++)q[e]=a[b++];2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)v(q[r>>e&B],u++)}g(h.spare,c,d)}else if(128==r){if(2==h.bpp)for(;u<m&&b<a.byteLength;){r=a[b++]+(a[b++]<<8);B=1;do B+=e=a[b++];while(255==e);if(0==
761 -h.rotation)p(r,u,B),u+=B;else for(;0<=--B;)n(r,u++)}else for(;u<m&&b<a.byteLength;){r=a[b++];B=1;do B+=e=a[b++];while(255==e);if(0==h.rotation)l(r,u,B),u+=B;else for(;0<=--B;)v(r,u++)}g(h.spare,c,d)}else if(129<r){if(2==h.bpp)for(e=0;e<r-128;e++)q[e]=a[b++]+(a[b++]<<8);else for(e=0;e<r-128;e++)q[e]=a[b++];for(;u<m&&b<a.byteLength;){B=1;e=a[b++];r=q[e%128];if(127<e){do B+=e=a[b++];while(255==e)}if(0==h.rotation)2==h.bpp?p(r,u,B):l(r,u,B),u+=B;else if(2==h.bpp)for(;0<=--B;)n(r,u++);else for(;0<=--B;)v(r,
762 -u++)}g(h.spare,c,d)}}function g(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
758 +require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
759 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,r){var u=a[b++];r={};var q=0,B=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
760 +((u&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;B=15;if(2==h.bpp){for(g=0;g<u;g++)r[g]=a[b++]+(a[b++]<<8);2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(r[u>>g&B],q++)}else{for(g=0;g<u;g++)r[g]=a[b++];2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(r[u>>g&B],q++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;q<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);B=1;do B+=g=a[b++];while(255==g);if(0==
761 +h.rotation)p(u,q,B),q+=B;else for(;0<=--B;)n(u,q++)}else for(;q<m&&b<a.byteLength;){u=a[b++];B=1;do B+=g=a[b++];while(255==g);if(0==h.rotation)l(u,q,B),q+=B;else for(;0<=--B;)v(u,q++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)r[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)r[g]=a[b++];for(;q<m&&b<a.byteLength;){B=1;g=a[b++];u=r[g%128];if(127<g){do B+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?p(u,q,B):l(u,q,B),q+=B;else if(2==h.bpp)for(;0<=--B;)n(u,q++);else for(;0<=--B;)v(u,
762 +q++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
763 h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
764 b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
765 -1]=e,h.spare.data[b+2]=a,b+=4}function q(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function e(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
766 -2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):r[c.code];
767 -null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
768 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
769 -0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
770 -h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var e=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)e=12,h.state=1,h.parent&&delete h.parent.connectTime,
771 -h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)e=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){e=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;e=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
765 +1]=e,h.spare.data[b+2]=a,b+=4}function r(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
766 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];null!=c&&h.sendkey(c,
767 +a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);173==c&&(d=45);186==c&&
768 +(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=0;h.spareh2=0;
769 +h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=h.rwidth=
770 +h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
771 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
772 h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
773 0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
774 -50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);e=4;break;case 2:e=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)e=0;else if(b=l.getUint32(4)+8,c.byteLength<b)e=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
774 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
775 0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
776 -h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}e=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),e=l.getUint16(4),q=l.getUint16(6),p=e*q,r=l.getUint32(8);if(17>r){if(1>e||64<e||1>q||
777 -64<q)return console.log("Invalid tile size ("+e+","+q+"), disconnecting."),h.Stop();if(h.sparew!=e||h.spareh!=q){h.sparew=h.sparew2=e;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=e;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==r){h.canvas.canvas.width=h.rwidth=h.width=e;h.canvas.canvas.height=h.rheight=
778 -h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));e=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==r){r=12;e=12+p*h.bpp;if(h.acc.byteLength<e)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(r,!0),w),r+=2;else for(w=0;w<p;w++)v(h.acc[r++],w);g(h.spare,b,c)}else if(16==r){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
779 -16+w)break;r=16;if(5<w&&0==h.acc[r]&&l.getUint16(r+1,!0)==w-5)d(h.acc,r+5,b,c,e,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(r,r+w-0)))),0<l.length){for(var r=l,N=new Uint8Array(r.length),u=0,C=r.length;u<C;++u)N[u]=r.charCodeAt(u);d(N,0,b,c,e,q,p,l.length)}else console.log("Invalid deflate data");e=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==e)break;h.acc=e!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(e)):
776 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),r=l.getUint16(6),p=g*r,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>r||
777 +64<r)return console.log("Invalid tile size ("+g+","+r+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=r){h.sparew=h.sparew2=g;h.spareh=h.spareh2=r;if(1==h.rotation||3==h.rotation)h.sparew2=r,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
778 +h.height=r;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
779 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,r,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,N=new Uint8Array(u.length),q=0,C=u.length;q<C;++q)N[q]=u.charCodeAt(q);d(N,0,b,c,g,r,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
780 null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
781 function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
782 -h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,C(0,0),w(0,0));h.width=h.canvas.canvas.width;
783 -h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var r={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
783 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
784 NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
785 F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
786 h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
787 h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var K=!1,B=!1;h.GrabMouseInput=function(){if(1!=K){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;K=!0}};h.UnGrabMouseInput=function(){if(0!=K){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;K=!1}};h.GrabKeyInput=function(){1!=B&&(document.onkeyup=
788 h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,B=!0)};h.UnGrabKeyInput=function(){0!=B&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,B=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
789 0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){h.ReverseMouseWheel&&(b*=-1);var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/
790 -Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,g=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-g[0])*d;h.my=(event.pageY-g[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=q(h.mx,h.my),h.my=e(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
790 +Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=r(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
791 h.mNagleTimer=null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=
792 -0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;
793 -a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,g="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?g:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");
794 -a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&
795 -a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var g=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<g&&0!=a.State)for(a.PendingOperations.push([g,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];
796 -if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&
797 -255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),g=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),n=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,n,b,e,g,n,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);
798 -a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();
799 -if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,e=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,
800 -4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),e=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+
801 -q+" Y="+e);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,e);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,e);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,
802 -4));break;case 11:c=0;q={};e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<e)for(c=((b.charCodeAt(6+2*e)&255)<<8)+(b.charCodeAt(7+2*e)&255),n=0;n<e;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,
803 -4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);g=v[b];d&&(a.CanvasId.style.cursor=g)}return w+D}}};a.MouseButton=
804 -{NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,
805 -Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?
806 -d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,
807 -a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,
808 -67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,g;for(g in a.TouchArray)g==b?e=c:1==a.TouchArray[g].f?(e=65542,a.TouchArray[g].f=3):e=2==a.TouchArray[g].f?262144:131078,d+=String.fromCharCode(g)+a.intToStr(e)+a.shortToStr(a.TouchArray[g].x)+a.shortToStr(a.TouchArray[g].y),2==a.TouchArray[g].f&&
809 -delete a.TouchArray[g];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,g=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-g[0])*e,d=(c.pageY-
810 -g[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var n=g=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?g=a.MouseButton.LEFT:2==c.which?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT:c.button&&(0==c.button?g=a.MouseButton.LEFT:1==c.button?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?n=-120*c.detail:c.wheelDelta&&(n=3*c.wheelDelta));var v="",v=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,
811 -a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,n/256&255,n&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?g:2*g&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(v),a.Alternate=1):a.Alternate=0:a.send(v)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",
812 -b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,
813 -a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&
814 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&
815 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&
816 -(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&
817 -a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};
818 -a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,g=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]=
819 -{x:e,y:g});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
820 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<
821 -b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/
822 -a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=
823 -a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
824 -null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=
825 -null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;
826 -if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||
827 -3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,
828 -0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};
829 -a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;
830 -d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var g=new FileReader,v=!1,n=[];g.readAsBinaryString?g.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:g.readAsBinaryString(new Blob([n.shift()]))}:g.readAsArrayBuffer&&(g.onloadend=function(a){d.xxOnSocketData(a.target.result);
831 -0==n.length?v=!1:g.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(g.readAsBinaryString)v=!0,g.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,g.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=
832 -function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=
833 -a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");
834 -d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(u[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<
835 -b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){y[m][D]=a;A[m][D]=(e<<6)+(C<<12)+q}function g(){for(var a=(e<<6)+(C<<12)+q,b=D;b<l.width;b++)y[m][b]=" ",A[m][b]=a}function v(a){for(var b=(e<<6)+(C<<12)+q,c=0;c<l.width;c++)y[a][c]=" ",A[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)y[b]=y[b+a],A[b]=A[b+a];for(b=E[1]-a+1;b<=
836 -E[1];b++)for(y[b]=[],A[b]=[],a=0;a<l.width;a++)y[b][a]=" ",A[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,e=7,C=0,w=!0,D=0,m=0,k=0,h=0,r=0,K=[],B=0,x=0,A=[],y=[],R=!1,z=!0,E,O=!1,H=[],
837 -N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){y[c]=[];A[c]=[];for(var d=0;d<l.width;d++)y[c][d]=" ",A[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=
838 -decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(r){case 0:switch(n){case 27:r=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":r=2;break;case "(":r=4;break;case ")":r=5;break;case "]":r=6;break;case "=":O=!0;r=0;break;case ">":O=!1;r=0;break;case "7":k=D;h=m;r=0;break;case "8":D=k;m=h;r=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var u=0;u<l.width;u++)y[n][u]=y[n-1][u],A[n][u]=A[n-1][u];for(n=
839 -E[0]+1-1;n>E[0]-1;n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;r=0;break;default:console.log("unknown terminal short code",p),r=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,u=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(z=!1);break;case "h":25==n[0]&&(z=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==u&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==
840 -u&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==u&&(0==n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==u&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==u&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==u&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==u&&(p=n[0]);for(J=D;J<l.width-p;J++)y[m][J]=y[m][J+p],A[m][J]=A[m][J+p];for(J=l.width-p;J<l.width;J++)y[m][J]=" ",A[m][J]=448;break;case "L":J=1;1==u&&(J=n[0]);0==J&&(J=1);
841 -for(n=E[1];n>=m+J;n--)y[n]=y[n-J],A[n]=A[n-J];for(n=m;n<m+J;n++)for(y[n]=[],A[n]=[],p=0;p<l.width;p++)y[n][p]=" ",A[n][p]=448;break;case "J":if(1==u&&2==n[0])l.TermClear((C<<12)+(e<<6)),m=D=0,H=[];else if(0==u||1==u&&0==n[0])for(g(),J=m+1;J<l.height;J++)v(J);else if(1==u&&1==n[0])for(g(),J=0;J<m-1;J++)v(J);break;case "H":2==u?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<u;J++)n[J]&&0!=n[J]?1==n[J]?
842 -8>e&&(e+=8):2==n[J]||22==n[J]?8<=e&&(e-=8):7==n[J]?q=2:27==n[J]?q=0:30<=n[J]&&37>=n[J]?(p=8<=e,e=n[J]-30,p&&8>=e&&(e+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?e=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,e=7,q=0);break;case "K":if(0!=u&&(1!=u||n[0]&&0!=n[0])){if(1==u)if(1==n[0])for(n=(e<<6)+(C<<12)+q,u=0;u<D;u++)y[m][u]=" ",A[m][u]=n;else 2==n[0]&&v(m)}else g();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==u&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-
843 -1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=E[1]);break;case "S":p=1;1==u&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "M":p=1;1==u&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "T":p=1;1==u&&(p=n[0]);for(n=E[1];n>E[0]+
844 -p;n--)for(u=0;u<l.width;u++)y[n][u]=y[n-p][u],A[n][u]=A[n-p][u];for(n=E[0]+p;n>E[0];n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "X":p=1;J=D;R=m;for(1==u&&(p=n[0]);0<p&&R<l.height;)y[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}r=0}break;case 4:r=0;break;case 5:r=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(u=parseInt(n[0]),(0==u||2==u)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,
845 -l.title=n[1]);r=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var u=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
846 -9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,
847 -9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)y[b][c]=" ",A[b][c]=a;H=[]};l.TermResetScreen=function(){q=0;e=7;C=0;w=z=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);
848 -N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};
849 -l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,
850 -79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,
851 -91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;
852 -var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
853 -a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=A[b][h],D==h&&m==b&&z&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=y[b][h],d){case "&":a+="&amp;";
792 +0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=
793 +700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
794 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
795 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
796 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
797 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
798 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
799 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,r=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
800 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),r=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+r+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
801 +a.ProcessPictureMsg(c,r,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(r,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;r={};g=((b.charCodeAt(4)&255)<<8)+
802 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);r[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,r,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
803 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
804 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
805 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&
806 +7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==
807 +a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&
808 +a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+
809 +a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
810 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
811 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
812 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
813 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
814 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
815 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
816 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
817 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
818 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
819 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
820 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
821 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
822 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
823 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
824 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
825 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
826 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
827 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
828 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
829 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
830 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
831 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
832 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
833 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
834 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(q[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
835 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(C<<12)+r}function e(){for(var a=(g<<6)+(C<<12)+r,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(C<<12)+r,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
836 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),r=0,g=7,C=0,w=!0,D=0,m=0,k=0,h=0,u=0,K=[],B=0,x=0,z=[],A=[],R=!1,y=!0,E,O=!1,H=[],N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
837 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=
838 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":O=!0;u=0;break;case ">":O=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var q=0;q<l.width;q++)A[n][q]=A[n-1][q],z[n][q]=z[n-1][q];for(n=E[0]+1-1;n>E[0]-1;n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;u=0;break;
839 +default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,q=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==q&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==q&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==q&&(0==
840 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==q&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==q&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==q&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==q&&(p=n[0]);for(J=D;J<l.width-p;J++)A[m][J]=A[m][J+p],z[m][J]=z[m][J+p];for(J=l.width-p;J<l.width;J++)A[m][J]=" ",z[m][J]=448;break;case "L":J=1;1==q&&(J=n[0]);0==J&&(J=1);for(n=E[1];n>=m+J;n--)A[n]=A[n-J],z[n]=z[n-J];for(n=m;n<m+J;n++)for(A[n]=[],
841 +z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==q&&2==n[0])l.TermClear((C<<12)+(g<<6)),m=D=0,H=[];else if(0==q||1==q&&0==n[0])for(e(),J=m+1;J<l.height;J++)v(J);else if(1==q&&1==n[0])for(e(),J=0;J<m-1;J++)v(J);break;case "H":2==q?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<q;J++)n[J]&&0!=n[J]?1==n[J]?8>g&&(g+=8):2==n[J]||22==n[J]?8<=g&&(g-=8):7==n[J]?r=2:27==n[J]?r=0:30<=n[J]&&
842 +37>=n[J]?(p=8<=g,g=n[J]-30,p&&8>=g&&(g+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?g=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,g=7,r=0);break;case "K":if(0!=q&&(1!=q||n[0]&&0!=n[0])){if(1==q)if(1==n[0])for(n=(g<<6)+(C<<12)+r,q=0;q<D;q++)A[m][q]=" ",z[m][q]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==q&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
843 +E[1]);break;case "S":p=1;1==q&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "M":p=1;1==q&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "T":p=1;1==q&&(p=n[0]);for(n=E[1];n>E[0]+p;n--)for(q=0;q<l.width;q++)A[n][q]=A[n-p][q],z[n][q]=z[n-p][q];for(n=
844 +E[0]+p;n>E[0];n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "X":p=1;J=D;R=m;for(1==q&&(p=n[0]);0<p&&R<l.height;)A[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(q=parseInt(n[0]),(0==q||2==q)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=
845 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var q=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
846 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
847 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;H=[]};l.TermResetScreen=function(){r=0;g=7;C=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
848 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
849 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
850 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
851 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
852 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
853 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
854 break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<H.length&&(H=H.slice(H.length-800));c=H.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
855 l.Init();return l},ZLIB=ZLIB||{};
856 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
857 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
858 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,x,A,B,D,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=A=1;15>=p;p++)if(A<<=1,A-=M[p],0>A)return-1;if(0<A&&(0==
859 -b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(q=0;q<n;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=r,fa=K,ga=ca=0,U=-1}q=D=0;p=d;S=c;n=w;x=0;W=-1;B=1<<w;I=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[q]<U?G.val=e[q]:e[q]>U?(G.op=fa[ga+e[q]],G.val=Z[ca+e[q]]):G.op=96;A=1<<p-x;d=C=1<<n;do C-=A,m[S+(D>>>x)+C]=G;while(0!=C);for(A=1<<p-1;D&A;)A>>>=1;
860 -0!=A?(D&=A-1,D+=A):D=0;q++;if(0==--M[p]){if(p==v)break;p=g[l+e[q]]}if(p>w&&(D&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(A=1<<n;n+x<v;){A-=M[n+x];if(0>=A)break;n++;A<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=D&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=D&&(m[S+D]={op:64,bits:p-x,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function g(){var a;this.total=this.check=
858 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,r,v,w,x,z,D,B,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(r=0;r<n;r++)M[g[l+r]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
859 +b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(r=0;r<n;r++)0!=g[l+r]&&(e[x[g[l+r]]++]=r);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=u,fa=K,ga=ca=0,U=-1}r=B=0;p=d;S=c;n=w;x=0;W=-1;D=1<<w;I=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[r]<U?G.val=e[r]:e[r]>U?(G.op=fa[ga+e[r]],G.val=Z[ca+e[r]]):G.op=96;z=1<<p-x;d=C=1<<n;do C-=z,m[S+(B>>>x)+C]=G;while(0!=C);for(z=1<<p-1;B&z;)z>>>=1;
860 +0!=z?(B&=z-1,B+=z):B=0;r++;if(0==--M[p]){if(p==v)break;p=g[l+e[r]]}if(p>w&&(B&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(z=1<<n;n+x<v;){z-=M[n+x];if(0>=z)break;n++;z<<=1}D+=1<<n;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:p-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
861 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
862 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function e(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function C(a,b){return a.hold&
863 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
862 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function r(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!r(a))return!1;return!0}function C(a,b){return a.hold&
863 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
864 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
865 -e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new g;ZLIB.inflateReset(b,
866 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,g,h,k,r,u=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);g={};n(a,g);h=g.have;k=g.left;
867 -P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!e(g,16))break a;if(d.wrap&2&&35615==g.hold){d.check=a.checksum_function(0,null,0,0);v(a,g.hold);p(g);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(g,8)<<8)+(g.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(g,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(g,4);u=C(g,4)+8;if(0==d.wbits)d.wbits=u;else if(u>d.wbits){a.msg="invalid window size";d.mode=
868 -29;break}d.dmax=1<<u;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=g.hold&512?9:11;p(g);break;case 1:if(!e(g,16))break a;d.flags=g.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=g.hold>>>8&1);d.flags&512&&v(a,g.hold);p(g);d.mode=2;case 2:if(!e(g,32))break a;null!==d.head&&(d.head.time=g.hold);d.flags&512&&(r=g.hold,a.state.check=a.checksum_function(a.state.check,
869 -[r&255,r>>>8&255,r>>>16&255,r>>>24&255],0,4));p(g);d.mode=3;case 3:if(!e(g,16))break a;null!==d.head&&(d.head.xflags=g.hold&255,d.head.os=g.hold>>>8);d.flags&512&&v(a,g.hold);p(g);d.mode=4;case 4:if(d.flags&1024){if(!e(g,16))break a;d.length=g.hold;null!==d.head&&(d.head.extra_len=g.hold);d.flags&512&&v(a,g.hold);p(g);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(r=d.length,r>g.have&&(r=g.have),r&&(null!==d.head&&null!==d.head.extra&&(u=d.head.extra_len-
870 -d.length,d.head.extra+=a.input_data.substring(g.next,g.next+(u+r>d.head.extra_max?d.head.extra_max-u:r))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r)),g.have-=r,g.next+=r,d.length-=r),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==g.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");r=0;do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=u,d.length++)}while(r<g.have);d.flags&
871 -512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==g.have)break a;r=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=u,d.length++)}while(r<g.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=
872 -r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!e(g,16))break a;if(g.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(g)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!e(g,32))break a;a.adler=d.check=m(g.hold);p(g);d.mode=10;case 10:if(0==d.havedict)return l(g),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
873 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(g);d.mode=26;break}if(!e(g,3))break a;d.last=C(g,1);w(g,1);switch(C(g,2)){case 0:d.mode=13;break;case 1:r=d;u=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
865 +e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
866 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,q=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
867 +P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);q=C(e,4)+8;if(0==d.wbits)d.wbits=q;else if(q>d.wbits){a.msg="invalid window size";d.mode=
868 +29;break}d.dmax=1<<q;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
869 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(q=d.head.extra_len-
870 +d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(q+u>d.head.extra_max?d.head.extra_max-q:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=q,d.length++)}while(u<e.have);d.flags&
871 +512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=q,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
872 +u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
873 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=C(e,1);w(e,1);switch(C(e,2)){case 0:d.mode=13;break;case 1:u=d;q=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
874 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
875 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
876 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -893,28 +893,28 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
893 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
894 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
895 {op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
896 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);r.lencode=0;r.distcode=512;for(u=0;512>u;u++)r.codes[u]=B[u];for(u=0;32>u;u++)r.codes[u+512]=x[u];r.lenbits=9;r.distbits=5;
897 -d.mode=19;if(c==ZLIB.Z_TREES){w(g,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(g,2);break;case 13:D(g);if(!e(g,32))break a;if((g.hold&65535)!=(g.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=g.hold&65535;p(g);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(r=d.length){r>g.have&&(r=g.have);r>g.left&&(r=g.left);if(0==r)break a;a.output_data+=a.input_data.substring(g.next,g.next+r);a.next_out+=r;g.have-=
898 -r;g.next+=r;g.left-=r;d.length-=r;break}d.mode=11;break;case 16:if(!e(g,14))break a;d.nlen=C(g,5)+257;w(g,5);d.ndist=C(g,5)+1;w(g,5);d.ncode=C(g,4)+4;w(g,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!e(g,3))break a;r=C(g,3);d.lens[A[d.have++]]=r;w(g,3)}for(;19>d.have;)d.lens[A[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
899 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(16>r.val)w(g,r.bits),d.lens[d.have++]=r.val;else{if(16==r.val){if(!e(g,r.bits+2))break a;w(g,r.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}u=d.lens[d.have-1];r=3+C(g,2);w(g,2)}else if(17==r.val){if(!e(g,r.bits+3))break a;w(g,r.bits);u=0;r=3+C(g,3);w(g,3)}else{if(!e(g,r.bits+7))break a;w(g,r.bits);u=0;r=11+C(g,7);w(g,7)}if(d.have+r>d.nlen+d.ndist){a.msg=
900 -"invalid bit length repeat";d.mode=29;break}for(;r--;)d.lens[d.have++]=u}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=g.have&&258<=g.left){l(g);r=a;var F=K=u=void 0,Y=void 0,L=void 0,
901 -ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,u=r.state,K=r.input_data,F=r.next_in,Y=F+r.avail_in-5,L=r.next_out,ea=L-(k-r.avail_out),V=L+(r.avail_out-257),J=u.wsize,aa=u.whave,ba=u.wnext,W=u.window,I=u.hold,G=u.bits,S=u.codes,Z=u.lencode,ca=u.distcode,fa=(1<<u.lenbits)-1,ga=(1<<u.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
902 -G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)r.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
903 -u.sane){r.msg="invalid distance too far back";u.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,r.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)r.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);r.output_data+=r.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),X-=3;X&&(r.output_data+=r.output_data.charAt(U++),
904 -1<X&&(r.output_data+=r.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{r.msg="invalid distance code";u.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?u.mode=11:(r.msg="invalid literal/length code",u.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;r.next_in=F;r.next_out=L;r.avail_in=F<Y?5+(Y-F):5-(F-Y);r.avail_out=L<V?257+(V-L):257-(L-V);u.hold=I;u.bits=G;n(a,g);11==d.mode&&(d.back=-1);
905 -break}for(d.back=0;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(r.op&&0==(r.op&240)){for(u=r;;){r=d.codes[d.lencode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;d.length=r.val;if(0==r.op){d.mode=25;break}if(r.op&32){d.back=-1;d.mode=11;break}if(r.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=r.op&15;d.mode=21;case 21:if(d.extra){if(!e(g,d.extra))break a;
906 -d.length+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){r=d.codes[d.distcode+C(g,d.distbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(0==(r.op&240)){for(u=r;;){r=d.codes[d.distcode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;if(r.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=r.val;d.extra=r.op&15;d.mode=23;case 23:if(d.extra){if(!e(g,d.extra))break a;
907 -d.offset+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==g.left)break a;r=k-g.left;if(d.offset>r){r=d.offset-r;if(r>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}r>d.wnext?(r-=d.wnext,u=d.wsize-r):u=d.wnext-r;K=-1;r>d.length&&(r=d.length)}else u=-1,K=a.next_out-d.offset,r=d.length;r>g.left&&(r=g.left);g.left-=r;d.length-=r;if(0<=u)a.output_data+=d.window.substring(u,u+r),a.next_out+=r;else{a.next_out+=r;do a.output_data+=a.output_data.charAt(K++);while(--r)}0==
908 -d.length&&(d.mode=20);break;case 25:if(0==g.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;g.left--;d.mode=20;break;case 26:if(d.wrap){if(!e(g,32))break a;k-=g.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=g.left;if((d.flags?g.hold:m(g.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(g)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!e(g,32))break a;if(g.hold!=(d.total&4294967295)){a.msg="incorrect length check";
909 -d.mode=29;break}p(g)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(g);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))g=a.state,r=a.output_data.length,null===g.window&&(g.window=""),0==g.wsize&&(g.wsize=1<<g.wbits),g.window=r>=g.wsize?a.output_data.substring(r-g.wsize):g.whave+r<g.wsize?g.window+a.output_data:g.window.substring(g.whave-(g.wsize-r))+a.output_data,g.whave=g.window.length,
910 -g.wnext=g.whave<g.wsize?g.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
896 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(q=0;512>q;q++)u.codes[q]=B[q];for(q=0;32>q;q++)u.codes[q+512]=x[q];u.lenbits=9;u.distbits=5;
897 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
898 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=C(e,5)+257;w(e,5);d.ndist=C(e,5)+1;w(e,5);d.ncode=C(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=C(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
899 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}q=d.lens[d.have-1];u=3+C(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);q=0;u=3+C(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);q=0;u=11+C(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
900 +"invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=q}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var F=K=q=void 0,Y=void 0,L=void 0,
901 +ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,q=u.state,K=u.input_data,F=u.next_in,Y=F+u.avail_in-5,L=u.next_out,ea=L-(k-u.avail_out),V=L+(u.avail_out-257),J=q.wsize,aa=q.whave,ba=q.wnext,W=q.window,I=q.hold,G=q.bits,S=q.codes,Z=q.lencode,ca=q.distcode,fa=(1<<q.lenbits)-1,ga=(1<<q.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
902 +G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)u.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
903 +q.sane){u.msg="invalid distance too far back";q.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)u.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);u.output_data+=u.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),X-=3;X&&(u.output_data+=u.output_data.charAt(U++),
904 +1<X&&(u.output_data+=u.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{u.msg="invalid distance code";q.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?q.mode=11:(u.msg="invalid literal/length code",q.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;u.next_in=F;u.next_out=L;u.avail_in=F<Y?5+(Y-F):5-(F-Y);u.avail_out=L<V?257+(V-L):257-(L-V);q.hold=I;q.bits=G;n(a,e);11==d.mode&&(d.back=-1);
905 +break}for(d.back=0;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(u.op&&0==(u.op&240)){for(q=u;;){u=d.codes[d.lencode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
906 +d.length+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+C(e,d.distbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(0==(u.op&240)){for(q=u;;){u=d.codes[d.distcode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
907 +d.offset+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,q=d.wsize-u):q=d.wnext-u;K=-1;u>d.length&&(u=d.length)}else q=-1,K=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=q)a.output_data+=d.window.substring(q,q+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(K++);while(--u)}0==
908 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
909 +d.mode=29;break}p(e)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
910 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
911 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
912 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
913 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
914 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
915 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;a%=65521;n%=65521}return a|n<<16}function c(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b[c],65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),
916 a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b[c++],n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=
917 -a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,g,v){return"string"===typeof d?b(a,d,g,v):c(a,d,g,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
917 +a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,e,v){return"string"===typeof d?b(a,d,e,v):c(a,d,e,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
918 65521);131042<=v&&(v-=131042);65521<=v&&(v-=65521);return c|v<<16}})();"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-crc32.js");
919 (function(){function b(a,b){var c,n=0;for(c=0;b;)b&1&&(c^=a[n]),b>>=1,n++;return c}function c(a,c){var v;for(v=0;32>v;v++)a[v]=b(c,c[v])}var a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,
920 3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,
@@ -923,32 +923,32 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
923 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
924 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
925 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
926 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,g,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^g}})();
927 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),g=b.webkitRequestFileSystem,v=b.requestFileSystem||g||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
928 -b.chrome?c():setTimeout(c,500)},q=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(g){n(g)}}},e=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},C=function(n,m,k){k||(n=e(n));var h=this;k=n.type;var r=!1,w,B,x=function(){q(h,["writestart","progress","write","writeend"])},A=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
929 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(r||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},y=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},z;h.readyState=h.INIT;m||(m="download");if(a)w=
930 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(z=n.slice||n.webkitSlice,n=z.call(n,0,n.size,"application/octet-stream"),r=!0);g&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||g)B=b;v?(l+=n.size,v(b.TEMPORARY,l,y(function(a){a.root.getDirectory("saved",C,y(function(a){var b=function(){a.getFile(m,C,y(function(a){a.createWriter(y(function(b){b.onwriteend=
931 -function(b){B.location.href=a.toURL();h.readyState=h.DONE;q(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&A()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),A)}),A)};a.getFile(m,{create:!1},y(function(a){a.remove();b()}),y(function(a){a.code===a.NOT_FOUND_ERR?b():A()}))}),A)}),A)):A()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
932 -b,c){c||(a=e(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
926 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,r;if(0>=v)return a;p=Array(32);r=Array(32);r[0]=3988292384;for(n=l=1;32>n;n++)r[n]=l,l<<=1;c(p,r);c(r,p);do{c(p,r);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(r,p);v&1&&(a=b(r,a));v>>=1}while(0!=v);return a^e}})();
927 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
928 +b.chrome?c():setTimeout(c,500)},r=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(g){n(g)}}},g=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},C=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){r(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
929 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
930 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",C,A(function(a){var b=function(){a.getFile(m,C,A(function(a){a.createWriter(A(function(b){b.onwriteend=
931 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;r(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
932 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;r(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
933 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
934 -var version="0.9.3",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
934 +var version="0.9.7",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
935 null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Caricamento in corso...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetAuth NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
936 StatusStrs=["Disconnected","Connessione in corso ...","Impostare...","Collegato"],t,t2,rsepass=null;
937 -function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
938 -applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
939 -haltEvent,!1);document.addEventListener("dragleave",haltEvent,!1);document.addEventListener("drop",documentFileSelectHandler,!1);Q("p16").addEventListener("dragover",haltEvent,!1);Q("p16").addEventListener("dragleave",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",
940 -p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
937 +function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(23).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
938 +urlvars.kvmenc&&(c=parseInt(urlvars.kvmenc),"number"==typeof c&&(desktopsettings.encflags=c));urlvars.kvmdec&&(c=parseInt(urlvars.kvmdec),"number"==typeof c&&(desktopsettings.decimationMode=c));applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(34).value=terminalEmulations[terminal.m.terminalEmulation];Q(31).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",
939 +haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);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",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);
940 +document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
941 function documentFileSelectHandler(b){haltEvent(b);for(var c=!0,a=0;a<b.dataTransfer.files.length;a++)0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".img")&&0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".iso")&&(c=!1);1==c&&null!=b.dataTransfer&&0<currentView&&100>currentView&&(1==b.dataTransfer.files.length||2==b.dataTransfer.files.length)?(a=c=null,b.dataTransfer.files[0].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[0]),b.dataTransfer.files[0].name.toLowerCase().endsWith(".img")&&
942 (c=b.dataTransfer.files[0]),2==b.dataTransfer.files.length&&(b.dataTransfer.files[1].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[1]),b.dataTransfer.files[1].name.toLowerCase().endsWith(".img")&&(c=b.dataTransfer.files[1])),null==c&&null==a||iderStart3(c,a,1)):null!=b.dataTransfer&&1==b.dataTransfer.files.length&&(c=b.dataTransfer.files[0].name.toLowerCase(),21==currentView&&UploadToStorage(b.dataTransfer.files[0],c))}
943 function connectButtonfunction(){wsstack&&0!=wsstack.socketState?disconnect():meshcentral2credCallback()}function connectButtonfunctionEx(){currentMeshNode=parent.getCurrentNode();connect(currentMeshNode._id,16992,null,null,0);Q("xconnectbutton1").value="Disconnect"}function getCurrentMeshNode(){return currentMeshNode}function setConnectionState(b){QE("xconnectbutton1",b);0==b&&disconnect()}function setFrameHeight(b){}function setAuthCallback(b){meshcentral2credCallback=b}
944 function setUrlVar(b,c){urlvars||(urlvars={});urlvars[b]=c}function cleanup(){c3.value="Avvia acquisizione";terminal.m.capture&&delete terminal.m.capture;terminal.Stop();desktop.disconnectCode=0;desktop.Stop()}
945 -function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
946 -function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
947 -function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
948 -function connect(b,c,a,d,g,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,g);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(28,"");QH(39,"");amtversion=amtversionmin=amtFirstPull=
949 -0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(21,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(49,"");
950 -QH(50,LoadingHtml);xxCertificates=null;QH(51,LoadingHtml);QH(24,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(52,LoadingHtml);QH(54,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
951 -!1;QH(53,LoadingHtml);QE(43,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(48,!1),Q(48).checked=!0);QE(44,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
945 +function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
946 +function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
947 +function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
948 +function connect(b,c,a,d,e,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,e);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(29,"");QH(40,"");amtversion=amtversionmin=amtFirstPull=
949 +0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(22,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(50,"");
950 +QH(51,LoadingHtml);xxCertificates=null;QH(52,LoadingHtml);QH(25,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(53,LoadingHtml);QH(55,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
951 +!1;QH(54,LoadingHtml);QE(44,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(49,!1),Q(49).checked=!0);QE(45,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
952 function disconnect(){null!=desktopPollTimer&&(clearInterval(desktopPollTimer),desktopPollTimer=null);fullscreen&&deskToggleFull();iderStop();StopDefenseStatsTimer();dialogclose(0);amtstack&&(amtstack.onProcessChanged=null,amtstack.CancelAllQueries(999),amtstack=null);cleanup();wsstack=null;delete amtstack;onProcessChanged(0,1);go(101);Q("xconnectbutton1").value="Collegare";QH(5,"Disconnected");go(100)}
953 function onProcessChanged(b,c){QS(3).width=100*b/c+"%";0==b&&refreshButtons(!0);0==b&&amtstack&&(0<amtversion&&0==(amtFirstPull&64)?(amtFirstPull|=64,PullPowerPolicy(),subscriptionsFilters=null,PullEventSubscriptions(),PullWatchdog(),5<amtversion&&(PullCertificates(),PullRemoteAccess())):0==(amtFirstPull&1)?PullHardware():0==(amtFirstPull&16)?PullEventLog():0==(amtFirstPull&32)&&PullAuditLog())}
954 function checkAmtVersion(b){var c=b.split(".");b=parseInt(c[0]);var a=parseInt(c[1]),c=parseInt(c[2]),c=1E3*a+c,d=0;5>=b||12<=b?d=1:6==b&&2061<=c?d=1:7==b&&1091<=c?d=1:8==b&&1071<=c?d=1:9==b?5>a&&1041<=c?d=1:5061<=c&&(d=1):10==b&&55<=c?d=1:11==b&&(5>a&&25<=c?d=1:6027<=c&&(d=1));return 0==d}
@@ -957,36 +957,37 @@ function processSystemVersion(b,c,a,d){if(200==d||400==d){if(200==d){amtlogicale
957 1==urlvars.sol&&(go(13),connectTerminal())}else errcheck(d,b)}var refreshButtonsState=!0;function refreshButtons(b){if(refreshButtonsState!=b){refreshButtonsState=b;for(var c=0,a=document.getElementsByTagName("input");c<a.length;c++)"refreshbtn"==a[c].name&&(a[c].disabled=!b)}}
958 function PullPowerState(){amtstack&&0==amtstack.GetPendingActions()&&amtsysstate&&amtsysstate.CIM_ServiceAvailableToElement&&amtstack.Enum("CIM_ServiceAvailableToElement",function(b,c,a,d){200==d&&(amtsysstate.CIM_ServiceAvailableToElement.responses=a,9<amtversion&&null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?
959 amtstack.Get("IPS_PowerManagementService",function(a,b,c,d){200==d&&(amtsysstate.IPS_PowerManagementService.response=c.Body,updateSystemStatus())}):updateSystemStatus())})}
960 -function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c=["CIM_ServiceAvailableToElement","*AMT_GeneralSettings","AMT_EthernetPortSettings","*AMT_RedirectionService","CIM_ElementSettingData"];5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");15<amtversion&&1==amtstack.wsman.comm.xtls&&
961 -c.push("*CIM_BootService");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
960 +function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c="CIM_ServiceAvailableToElement *AMT_GeneralSettings AMT_EthernetPortSettings *AMT_RedirectionService CIM_ElementSettingData *AMT_BootCapabilities".split(" ");5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");
961 +15<amtversion&&c.push("*CIM_BootService");2<amtversion&&c.push("*AMT_8021XProfile");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
962 function processSystemStatus(b,c,a,d){if(void 0==a.IPS_ScreenConfigurationService||400==a.IPS_ScreenConfigurationService.status)a.IPS_ScreenConfigurationService=null;if(void 0==a.IPS_KVMRedirectionSettingData||400==a.IPS_KVMRedirectionSettingData.status)a.IPS_KVMRedirectionSettingData=null;if(void 0==a.CIM_KVMRedirectionSAP||400==a.CIM_KVMRedirectionSAP.status)a.CIM_KVMRedirectionSAP=null;if(void 0==a.IPS_OptInService||400==a.IPS_OptInService.status)a.IPS_OptInService=null;void 0!=a.AMT_RedirectionService&&
963 -200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var g in a)null!=a[g]&&a[g].status>d&&(d=a[g].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"Sincronizza orologio",3,syncClockEx,"Sincronizzare l'orologio Intel AMT con questo computer?")}
963 +200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var e in a)null!=a[e]&&a[e].status>d&&(d=a[e].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"Sincronizza orologio",3,syncClockEx,"Sincronizzare l'orologio Intel AMT con questo computer?")}
964 function syncClockEx(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(b,c,a,d){200!=d?messagebox("","Impossibile impostare l'ora, status ="+d):0!=a.Body.ReturnValue?messagebox("","Impossibile impostare l'ora, errore: "+a.Body.ReturnValueStr):(b=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(a.Body.Ta0,b,b,function(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}))})}
965 var DMTFPowerStates=";;Accensione;Sonno leggero;Sonno profondo;Ciclo di accensione (soft off);Off - Difficile;Ibernazione (Off soft);Soft off;Ciclo di accensione (Off-hard);Ripristino del bus principale;Diagnostic interrupt (NMI);Non applicabile;Off - Morbido grazioso;Off - Hard aggraziato;Ripristino del bus principale aggraziato;Ciclo di accensione (Off - Soft aggraziato);Ciclo di accensione (Off - Hard Graceful);Interruzione diagnostica (INIT)".split(";");
966 -function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),g="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Sconosciuto</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Accensione"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
967 -3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", Connesso",", A batteria"][v.PowerSource]);d+=TableEntry("Energia",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Nessuna</i>":EscapeHtml(c);d+=TableEntry("Nome e dominio",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?
966 +function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Sconosciuto</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Accensione"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
967 +3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(29,n),QH(40,n));v.PowerSource&&(n+=[", Connesso",", A batteria"][v.PowerSource]);d+=TableEntry("Energia",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Nessuna</i>":EscapeHtml(c);d+=TableEntry("Nome e dominio",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?
968 d+=TableEntry("ID di sistema",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("ID di sistema",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" attivato in modalit\u00e0 controllo amministratore (ACM)",4==l.ProvisioningMode&&(n=" attivato in modalit\u00e0 controllo client (CCM)",b=9));
969 -d+=TableEntry("Intel&reg; ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=
970 -amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),e=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),e=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||
971 -6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(g+=", Porta di reindirizzamento");q&&(g+=", Seriale su LAN");n&&(g+=", IDE-reindirizzamento");e&&(g+=", KVM");""==g&&(g=" Nessuna");d+=TableEntry("Funzionalit\u00e0 attive",addLinkConditional(g.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,g="Display principale",7<amtversion&&
972 -void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(g=["Display principale","Display secondario","3 \u00b0 display"][n.DefaultScreen]),g='<span title="'+format("Il display remoto predefinito \u00e8 {0}",g.toLowerCase())+'">'+g+"</span>",1==n.Is5900PortEnabled&&(g+=", Porta 5900 abilitata"),1==n.OptInPolicy&&(g+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"secondi opt-in":"secondo opt-in")),g+=","+n.SessionTimeout+" minuto"+(0<n.SessionTimeout?"s":"")+" timeout della sessione",9<amtversion&&null!=
973 -amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(g+=", Soppressione consentita"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Desktop remoto",addLinkConditional(g,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!e);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=
974 -amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(g="Stato sconosciuto",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(g="Non richiesto"),1==p&&(g="Richiesto solo per KVM"),4294967295==p&&(g="Sempre richiesto"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(g=addLinkConditional(g,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consenso dell'utente",g));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&
975 -(g={0:"Sconosciuto",1:"Altro",2:"Abilitato",3:"Disabilitato",4:"Chiudere",5:"Non applicabile",6:"Abilitato ma offline",7:"In prova",8:"differite",9:"quiesce",10:"Di partenza",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(g[32768]="OCR & RPE Disabled",g[32769]="OCR Enabled, RPE Disabled"),n=g[amtsysstate.CIM_BootService.response.EnabledState]?g[amtsysstate.CIM_BootService.response.EnabledState]:"Sconosciuto",d+=TableEntry("Boot Features",
976 -addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)if(g[C].SettingData&&1==g[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==g[C].SettingData.ReferenceParameters.ResourceURI)for(p=g[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("Politica energetica",
977 -addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Appuntamento",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));g=AddRefreshButton("PullSystemStatus()")+" ";g+=AddButton("Azioni di potere ...","showPowerActionDlg()")+" ";g+=AddButton("Salva stato ...","saveEntireAmtState()")+" ";d+=TableEnd(g);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
978 -QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" La modifica delle impostazioni di rete potrebbe rendere questa pagina non disponibile.");d=d+"<br><h2>impostazioni generali</h2>"+TableStart();g="";"<i>Nessuna</i>"!=c&&(1==v.SharedFQDN&&(g=", condiviso con il sistema operativo"),0==v.SharedFQDN&&(g=", diverso dal sistema operativo"));d+=TableEntry("Nome e dominio",addLinkConditional(c+
979 -g,"showEditNameDlg(1)",xxAccountAdminName));c="Disabilitato";1==v.DDNSUpdateEnabled?c="Abilitato ciascuno"+v.DDNSPeriodicUpdateInterval+" minuti, TTL \u00e8"+v.DDNSTTL+" minuti":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Aggiornamento dal server DHCP");d+=TableEntry("DNS dinamico",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=
980 -a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Interfaccia wireless":"Interfaccia cablata")+"</h2>";d+=TableStart();d+=TableEntry("Stato di collegamento",1==c.LinkIsUp?"Il collegamento \u00e8 attivo":"Il link non \u00e8 attivo");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);g=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&g.push("S0 / AC"),14==c.LinkPolicy[C]&&g.push("Sx / AC"),16==c.LinkPolicy[C]&&g.push("S0 / DC"),224==c.LinkPolicy[C]&&
981 -g.push("Sx / DC");0==g.length&&g.push("");d+=TableEntry("Politica di collegamento",addLinkConditional(0==g.length?"Non disponibile":"Disponibili in: "+g.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("Indirizzo MAC",c.MACAddress));amtwirelessif==a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("Stato",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),
982 -s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("Stato radio",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>Nessuna</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?
983 -"Abilitato":"Disabilitato","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"Abilitato":"Disabilitato",
984 -"showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Rispondi al ping",addLinkConditional(["Disabilitato","Risposta ICMP","Risposta RMCP","Risposta ICMP e RMCP"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),g=1==c.DHCPEnabled?"Automatico tramite server DHCP":"Indirizzo IP statico",1==c.IpSyncEnabled&&(g+=", IP sync with OS"),d+=TableEntry("Stato IPv4",addLinkConditional(g,
985 -"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("Indirizzo IPv4",isIpAddress(c.IPAddress,"Nessuna"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("Gateway / maschera IPv4",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Nessuna")));g=c.PrimaryDNS;isIpAddress(g)&&(c.SecondaryDNS&&(g+=" / "+c.SecondaryDNS),d+=TableEntry("Server dei nomi di dominio IPv4",g));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="Disabilitato",
986 -w,g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)g[C].SettingData&&g[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==g[C].IsCurrent);1==w&&(p=(g=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Indirizzi abilitati, automatici e manuali":"Abilitato, indirizzi automatici");d+=TableEntry("Stato IPv6",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));
987 -if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("Indirizzo IPv6",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("Indirizzo IPv6","Nessuna");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("Router predefinito IPv6",c.CurrentDefaultRouter));
988 -isIpAddress(c.CurrentPrimaryDNS)&&(g=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(g+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("Server dei nomi di dominio IPv6",g))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}
989 -function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
969 +d+=TableEntry("Intel&reg; ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(28,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(39,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=
970 +amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,r=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||
971 +6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(e+=", Porta di reindirizzamento");r&&(e+=", Seriale su LAN");n&&(e+=", IDE-reindirizzamento");g&&(e+=", KVM");""==e&&(e=" Nessuna");d+=TableEntry("Funzionalit\u00e0 attive",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Display principale",7<amtversion&&
972 +void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Display principale","Display secondario","3 \u00b0 display"][n.DefaultScreen]),e='<span title="'+format("Il display remoto predefinito \u00e8 {0}",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+=", Porta 5900 abilitata"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"secondi opt-in":"secondo opt-in")),e+=","+n.SessionTimeout+" minuto"+(0<n.SessionTimeout?"s":"")+" timeout della sessione",9<amtversion&&null!=
973 +amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+=", Soppressione consentita"),QV(46,n),Q(47).checked=!1):QV(46,!1),d+=TableEntry("Desktop remoto",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(26,!p||!r);QV(27,xxAccountAdminName);QV(37,!p||!g);QV(38,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=
974 +amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="Stato sconosciuto",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(e="Non richiesto"),1==p&&(e="Richiesto solo per KVM"),4294967295==p&&(e="Sempre richiesto"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consenso dell'utente",e));null!=amtsysstate.AMT_BootCapabilities.response.PlatformErase&&0<amtsysstate.AMT_BootCapabilities.response.PlatformErase&&
975 +null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"Sconosciuto",1:"Altro",2:"Abilitato",3:"Disabilitato",4:"Chiudere",5:"Non applicabile",6:"Abilitato ma offline",7:"In prova",8:"differite",9:"quiesce",10:"Di partenza",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?
976 +e[amtsysstate.CIM_BootService.response.EnabledState]:"Sconosciuto",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)if(e[C].SettingData&&1==e[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[C].SettingData.ReferenceParameters.ResourceURI)for(p=e[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,
977 +r=0;r<AmtSystemPowerSchemes.length;r++)AmtSystemPowerSchemes[r].SchemeGUID==p&&(d+=TableEntry("Politica energetica",addLinkConditional(AmtSystemPowerSchemes[r].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Appuntamento",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("Azioni di potere ...","showPowerActionDlg()")+
978 +" ";e+=AddButton("Salva stato ...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" La modifica delle impostazioni di rete potrebbe rendere questa pagina non disponibile.");
979 +d=d+"<br><h2>impostazioni generali</h2>"+TableStart();e="";"<i>Nessuna</i>"!=c&&(1==v.SharedFQDN&&(e=", condiviso con il sistema operativo"),0==v.SharedFQDN&&(e=", diverso dal sistema operativo"));d+=TableEntry("Nome e dominio",addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));c="Disabilitato";1==v.DDNSUpdateEnabled?c="Abilitato ciascuno"+v.DDNSPeriodicUpdateInterval+" minuti, TTL \u00e8"+v.DDNSTTL+" minuti":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Aggiornamento dal server DHCP");d+=
980 +TableEntry("DNS dinamico",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Interfaccia wireless":"Interfaccia cablata")+"</h2>";d+=TableStart();d+=TableEntry("Stato di collegamento",1==c.LinkIsUp?"Il collegamento \u00e8 attivo":
981 +"Il link non \u00e8 attivo");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);e=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&e.push("S0 / AC"),14==c.LinkPolicy[C]&&e.push("Sx / AC"),16==c.LinkPolicy[C]&&e.push("S0 / DC"),224==c.LinkPolicy[C]&&e.push("Sx / DC");0==e.length&&e.push("");d+=TableEntry("Politica di collegamento",addLinkConditional(0==e.length?"Non disponibile":"Disponibili in: "+e.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=
982 +TableEntry("Indirizzo MAC",c.MACAddress));amtwirelessif==a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("Stato",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("Stato radio",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>Nessuna</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&
983 +"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"Abilitato":"Disabilitato","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=
984 +xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"Abilitato":"Disabilitato","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Rispondi al ping",addLinkConditional(["Disabilitato","Risposta ICMP","Risposta RMCP","Risposta ICMP e RMCP"][v.PingResponseEnabled+
985 +(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-FAST/TLS".split(" "),p="Disabilitato",amtsysstate.AMT_8021XProfile.responses.Body.Enabled&&(p="Abilitato,"+e[amtsysstate.AMT_8021XProfile.responses.Body.AuthenticationProtocol]),d+=TableEntry("802.1x",addLinkConditional(p,"editNetAuthProfile()",xxAccountAdminName)),e=1==c.DHCPEnabled?"Automatico tramite server DHCP":"Indirizzo IP statico",
986 +1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("Stato IPv4",addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("Indirizzo IPv4",isIpAddress(c.IPAddress,"Nessuna"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("Gateway / maschera IPv4",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Nessuna")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("Server dei nomi di dominio IPv4",e));if(5<amtversion&&200==amtsysstate.IPS_IPv6PortSettings.status){c=
987 +amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="Disabilitato",w,e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)e[C].SettingData&&e[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[C].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Indirizzi abilitati, automatici e manuali":"Abilitato, indirizzi automatici");d+=TableEntry("Stato IPv6",
988 +addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("Indirizzo IPv6",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("Indirizzo IPv6","Nessuna");isIpAddress(c.CurrentDefaultRouter)&&
989 +(d+=TableEntry("Router predefinito IPv6",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("Server dei nomi di dominio IPv6",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&
990 +PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
991 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
992 "")+">Available in S0/DC - Powered on & on battery</label><br>";a+="<label><input type=checkbox id=d11p4 value=224 "+(0<=c.LinkPolicy.indexOf(224)?"checked":"")+">Available in Sx/DC - Sleeping & on battery</label><br>";setDialogMode(11,"Politica sui collegamenti",3,showLinkPolicyDlgEx,a,b)}}
993 function showLinkPolicyDlgEx(b,c){var a=Clone(amtsysstate.AMT_EthernetPortSettings.responses[c]);a.DHCPEnabled&&(delete a.IPAddress,delete a.SubnetMask,delete a.DefaultGateway,delete a.PrimaryDNS,delete a.SecondaryDNS);a.LinkPolicy=[];Q("d11p1").checked&&a.LinkPolicy.push(1);Q("d11p2").checked&&a.LinkPolicy.push(14);Q("d11p3").checked&&a.LinkPolicy.push(16);Q("d11p4").checked&&a.LinkPolicy.push(224);amtstack.Put("AMT_EthernetPortSettings",a,showLinkPolicyDlgExDone,0,1,a)}
@@ -995,30 +996,30 @@ function showAuthCsme(){if(!xxdialogMode){var b;b="<div style=margin-top:8px>Int
996 for(var c in amtstack.amtauth.Certificates){var a=amtstack.amtauth.Certificates[c];b+="<tr><td style=width:32px;vertical-align:top><img src=images-commander/cert1.png height=32 width=32 />";b+="<td style=padding-bottom:6px><b>"+EscapeHtml(a.subject.getField("CN").value)+(!0===a.xTrusted?", <span style=color:#080>di fiducia</span>":"")+"</b><br />";a.subject.getField("OU")&&(b+=EscapeHtml(a.subject.getField("OU").value)+"<br />");b+=amtstack.amtauth.CertificatesDer[c].length+" byte,<a style=cursor:pointer;color:blue onclick=downloadAuthCert("+
997 c+")>Scarica</a>";a.xCrl&&(b+="<br />CRL "+a.xCrl.length+" byte,<a style=cursor:pointer;color:blue onclick=downloadCertCrl("+c+")>Scarica</a>")}setDialogMode(11,"Authentic CSME",1,null,b+"</table><div>")}}function downloadCertCrl(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.Certificates[b].xCrl),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".crl")}
998 function downloadAuthCert(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.CertificatesDer[b]),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".cer")}var IntelAmtEntireState,IntelAmtEntireStateCalls;
998 -function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c30.value="amtstate"+b+".json";setDialogMode(19,"Salva l'intero stato Intel&reg; AMT",3,saveEntireAmtStateOk)}}
999 -function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(60,"Fetching entire state, please wait...");setDialogMode(1,"Salva l'intero stato Intel&reg; AMT",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
1000 -function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c30.value))}
999 +function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c55.value="amtstate"+b+".json";setDialogMode(19,"Salva l'intero stato Intel&reg; AMT",3,saveEntireAmtStateOk)}}
1000 +function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(61,"Fetching entire state, please wait...");setDialogMode(1,"Salva l'intero stato Intel&reg; AMT",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
1001 +function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c55.value))}
1002 function showDesktopSettingsDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_KVMRedirectionSettingData.response,c;c="<div style=text-align:left><div style=height:26px;margin-top:4px><select id=subddisplay style=float:right;width:200px><option value=0>Display principale</option><option value=1>Display secondario</option>";9<amtversion&&(c+="<option value=2>3 \u00b0 display</option>");c+='</select><div style=padding-top:4px>Visualizzazione predefinita</div></div><div style=height:26px;margin-top:4px><input id=subsessiontimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>Timeout della sessione (minuti)</div></div>';
1003 1==b.OptInPolicy&&(c+='<div style=height:26px;margin-top:4px><input id=suboptintimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>Timeout di attivazione (secondi)</div></div>');c+="<div style=height:26px;margin-top:4px><select id=subdlegacy style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>Disabilitato, consigliato</option><option value=1>Visualizzatori KVM legacy abilitati</option></select><div style=padding-top:4px>Porta 5900</div></div>";
1004 c+="<div style=height:26px;margin-top:4px id=subspassx><input id=subspass type=password autocomplete=off style=float:right;width:200px maxlength=8 onkeyup=showDesktopSettingsDlgUpdate()><div style=padding-top:4px>5900 password (8 caratteri)</div></div>";9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(c+='<div style=height:26px;margin-top:4px><select id=subsb style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>Disabilitato</option><option value=1>Abilitato</option></select><div style=padding-top:4px title="Questa funzione non \u00e8 spesso supportata">Oscuramento dello schermo</div></div>');
1005 c+="</div>";setDialogMode(11,"Impostazioni desktop remoto",3,showDesktopSettingsDlgOk,c);Q("subddisplay").value=b.DefaultScreen;Q("subsessiontimeout").value=b.SessionTimeout;1==b.OptInPolicy&&(Q("suboptintimeout").value=b.OptInPolicyTimeout);Q("subdlegacy").value=1==b.Is5900PortEnabled?1:0;9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(Q("subsb").value=amtsysstate.IPS_ScreenConfigurationService.response.EnabledState);showDesktopSettingsDlgUpdate()}}
1005 -function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c54",b)}
1006 +function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c106",b)}
1007 function showDesktopSettingsDlgOk(){var b=Clone(amtsysstate.IPS_KVMRedirectionSettingData.response);b.DefaultScreen=Q("subddisplay").value;b.SessionTimeout=Q("subsessiontimeout").value;b.Is5900PortEnabled=1==Q("subdlegacy").value;1==b.OptInPolicy&&(b.OptInPolicyTimeout=Q("suboptintimeout").value);1==b.Is5900PortEnabled&&(b.RFBPassword=Q("subspass").value);amtstack.Put("IPS_KVMRedirectionSettingData",b,showDesktopSettingsDlgOk2);b=Clone(amtsysstate.IPS_ScreenConfigurationService.response);b.EnabledState=
1008 parseInt(Q("subsb").value);amtstack.Put("IPS_ScreenConfigurationService",b,showDesktopSettingsDlgOk3)}function showDesktopSettingsDlgOk2(b,c,a,d){200==d?PullSystemStatus():messagebox("Impostazioni desktop remoto",format("Errore {0}, impossibile impostare valori.",d))}
1009 function showDesktopSettingsDlgOk3(b,c,a,d){200!=d?messagebox("Errore",format("Il blanking dello schermo non pu\u00f2 essere impostato, il blanking potrebbe non essere supportato su questo sistema ({0}).",d)):amtstack.Get("IPS_ScreenConfigurationService",function(a,b,c,d){200==d&&(amtsysstate.IPS_ScreenConfigurationService.response=c.Body,updateSystemStatus())},0,1)}
1010 function PullEventLog(b){1==b&&xxdialogMode||(amtFirstPull|=16,amtstack.Enum("AMT_MessageLog",processMessageLog0),amtstack.GetMessageLog(processMessageLog1))}var processMessageLog0responses=null;
1011 function processMessageLog0(b,c,a,d){200==d&&(d&&QV("go6",!0),a&&(processMessageLog0responses=a),b="",c="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>",null!=processMessageLog0responses&&(b=1==processMessageLog0responses[0].IsFrozen?AddButton("Registro non congelato","FreezeLog(0)"):AddButton("Congela registro","FreezeLog(1)")),c+=TableEnd('<div style=float:right><input id=eventFilter placeholder="Filtro" style=margin:4px onkeyup=eventFilter()>&nbsp;</div><div>&nbsp;'+
1012 AddRefreshButton("PullEventLog(1)")+AddButton("Pulisci il registro","ClearLog()")+AddButton("Salva...","SaveEventLog()")+b),QH(17,c+"<br>"))}function SaveEventLog(){xxdialogMode||null==eventmessages||SaveJsonFile("IntelAmtEventlog","events","Intel AMT Event Log",eventmessages)}var eventmessages=null;
1012 -function processMessageLog1(b,c){eventmessages=c;var a,d=0,g;g="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>fonte</b><td class=r1><b>Descrizione</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);g+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1013 -a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}g+=TableEnd(0==d?"&nbsp;":"");QH(18,g+"<br>");processMessageLog0()}
1014 -function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(60,"Cancella registro eventi?"),setDialogMode(1,"Registro eventi",3,ClearLogEx))}function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("Registro eventi","Impossibile cancellare, errore: "+d):PullEventLog()})}
1015 -function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("Tempo",c.Time.toLocaleString());a+=addHtmlValue("fonte",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("Descrizione",c.Desc);a+=MoreStart();a+=addHtmlValue("Indirizzo dispositivo",c.DeviceAddress);a+=addHtmlValue("Entit\u00e0",c.Entity);a+=addHtmlValue("Istanza dell'entit\u00e0",c.EntityInstance);var d="",g;for(g in c.EventData)0<d.length&&(d+=","),d+=c.EventData[g];a+=addHtmlValue("Dati",
1013 +function processMessageLog1(b,c){eventmessages=c;var a,d=0,e;e="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>fonte</b><td class=r1><b>Descrizione</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);e+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1014 +a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}e+=TableEnd(0==d?"&nbsp;":"");QH(18,e+"<br>");processMessageLog0()}
1015 +function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(61,"Cancella registro eventi?"),setDialogMode(1,"Registro eventi",3,ClearLogEx))}function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("Registro eventi","Impossibile cancellare, errore: "+d):PullEventLog()})}
1016 +function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("Tempo",c.Time.toLocaleString());a+=addHtmlValue("fonte",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("Descrizione",c.Desc);a+=MoreStart();a+=addHtmlValue("Indirizzo dispositivo",c.DeviceAddress);a+=addHtmlValue("Entit\u00e0",c.Entity);a+=addHtmlValue("Istanza dell'entit\u00e0",c.EntityInstance);var d="",e;for(e in c.EventData)0<d.length&&(d+=","),d+=c.EventData[e];a+=addHtmlValue("Dati",
1017 d);a+=addHtmlValue("Compensare",c.EventOffset);a+=addHtmlValue("Tipo di sensore",c.EventSensorType);a+=addHtmlValue("Gravit\u00e0",c.EventSeverity);a+=addHtmlValue("Tipo di fonte",c.EventSourceType);a+=addHtmlValue("genere",c.EventType);a+=addHtmlValue("Numero del sensore",c.SensorNumber);a+=MoreEnd();a+="</div>";messagebox(format("Dettagli evento n. {0}",b+1),a)}}
1018 function eventFilter(){var b=Q("eventFilter").value.toLowerCase(),c;for(c in eventmessages)QV("xamtevent"+c,""==b||0<=eventmessages[c].Desc.toLowerCase().indexOf(b)||0<=eventmessages[c].EntityStr.toLowerCase().indexOf(b))}var subscriptionsFilters=null,subscriptionsListeners=null;
1019 function PullEventSubscriptions(){null==subscriptionsFilters&&amtstack.Enum("CIM_FilterCollection",processEventSubscriptions0);amtstack.BatchEnum(null,["CIM_ListenerDestination","CIM_FilterCollectionSubscription"],processEventSubscriptions1)}function processEventSubscriptions0(b,c,a,d){408!=d&&400!=d&&(d&&errcheck(d,b)||(subscriptionsFilters=a))}
1019 -function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gestisci gli abbonati agli eventi.<br><br>";for(var g in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[g].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[g],
1020 -b+='<div class=itemBar onclick="showSubscriptionDetails('+g+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>Nessun abbonamento trovato.</i></div><br>");g="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(g+=AddButton("Nuovo abbonamento","newSubscriptionButton()"));b+="<br><td class=r1>"+
1021 -TableEnd(g+"</div>");QH(56,b)}}var subscriptionDeliveryModes={2:"Spingere",3:"Spingere con ACK",4:"eventi",5:"Tirare"};
1020 +function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gestisci gli abbonati agli eventi.<br><br>";for(var e in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[e].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[e],
1021 +b+='<div class=itemBar onclick="showSubscriptionDetails('+e+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>Nessun abbonamento trovato.</i></div><br>");e="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(e+=AddButton("Nuovo abbonamento","newSubscriptionButton()"));b+="<br><td class=r1>"+
1022 +TableEnd(e+"</div>");QH(57,b)}}var subscriptionDeliveryModes={2:"Spingere",3:"Spingere con ACK",4:"eventi",5:"Tirare"};
1023 function showSubscriptionDetails(b){if(!xxdialogMode){var c=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[b].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),a=subscriptionsListeners.CIM_ListenerDestination.responses[b],d;d="<div style=text-align:left>"+addHtmlValue("Destinazione",a.Destination);d+=addHtmlValue("Filtro",c);d+=addHtmlValue("Modalit\u00e0 di consegna",subscriptionDeliveryModes[a.DeliveryMode]);setDialogMode(11,"Sottoscrizione"+(b+1),xxAccountAdminName?
1024 5:1,deleteSubscriptionButton,d+"</div>",b)}}
1025 function deleteSubscriptionButton(b,c){2==b&&amtstack.UnSubscribe("CIM_FilterCollectionSubscription",PullEventSubscriptions,null,1,{Filter:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_FilterCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+subscriptionsListeners.CIM_FilterCollectionSubscription.responses[c].Filter.ReferenceParameters.SelectorSet.Selector.Value+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference>",
@@ -1026,92 +1027,92 @@ Handler:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/a
1027 function newSubscriptionButton(){if(!xxdialogMode&&null!=subscriptionsFilters){var b;b="<div style=height:26px;margin-top:4px><select id=subtype style=float:right;width:260px><option value=Push>Spingere</option><option value=PushWithAck>Spingere con ACK</option></select><div style=padding-top:4px>genere</div></div><div style=height:26px;margin-top:4px><select id=subfilter style=float:right;width:260px>";for(var c in subscriptionsFilters)b+='<option value="'+subscriptionsFilters[c].InstanceID+'">'+
1028 subscriptionsFilters[c].CollectionName.substring(13)+"</option>";b+="</select><div style=padding-top:4px>Filtro</div></div>";b+='<div style=height:26px;margin-top:4px><input id=suburl style=float:right;width:260px maxlength=253 onkeyup=newSubscriptionUpdate() value="http://"><div style=padding-top:4px>URL</div></div>';b+="<div style=height:26px;margin-top:4px><select id=subauth style=float:right;width:260px onchange=newSubscriptionUpdate()><option value=0>Nessuna</option><option value=1>digerire</option></select><div style=padding-top:4px>Autenticazione</div></div>";
1029 b+="<div style=height:26px;margin-top:4px id=subxuser><input id=subuser style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>Nome utente</div></div>";b+="<div style=height:26px;margin-top:4px id=subxpass><input id=subpass style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>Parola d'ordine</div></div>";b+="<div style=height:26px;margin-top:4px><input id=subargs style=float:right;width:260px maxlength=128><div style=padding-top:4px>argomenti</div></div>";
1029 -setDialogMode(11,"Aggiungi abbonamento evento",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c54",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1030 +setDialogMode(11,"Aggiungi abbonamento evento",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c106",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1031 function newSubscriptionButtonOk(){var b=0==Q("subuser").value.length?void 0:Q("subuser").value,c=0==Q("subpass").value.length?void 0:Q("subpass").value;amtstack.Subscribe("CIM_FilterCollection",Q("subtype").value,Q("suburl").value,newSubscriptionButtonOk2,null,1,{InstanceID:Q("subfilter").value},0<Q("subargs").value.length?Q("subargs").value:null,b,c)}function newSubscriptionButtonOk2(b,c,a,d){200==d&&PullEventSubscriptions()}
1032 function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AMT_AuditLog",processAuditLog0))}var auditLog=null,auditLogEnabledStates="Sconosciuto;Altro;Abilitato;Disabilitato;Chiudere;Non applicabile;Abilitato ma offline;In prova;differite;quiesce;Di partenza".split(";");
1032 -function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Disabilitato":"Abilitato",c&2&&(b+=", Bloccato"),c&4&&(b+=", Quasi pieno"),c&8&&(b+=", Pieno"),c&16&&(b+=", NoKey"),c="<h1>Impostazioni registro di controllo</h1>"+TableStart(),c+=TableEntry("Stato",b),c+=TableEntry("Conservazione",a[0].CurrentNumberOfRecords+" record (s),"+a[0].PercentageFree+"% gratuito"),c+=TableEntry("Sovrascrivi politica",2==a[0].OverwritePolicy?"Si avvolge quando \u00e8 pieno":"Non sovrascrive mai"),
1033 -c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1034 -function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filtro" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Salva...","SaveAuditLog()")+AddButton("Pulisci il registro","ClearAuditLog()"))+"<br>");if(0==c.length)d="Nessun evento del registro di controllo trovato.";else{var g=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Tempo</b><td class=r1 style=width:260px><b>Iniziatore</b><td class=r1><b>Action</b>";
1035 -for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;g++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1036 -minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==g?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Log di controllo Intel AMT",auditLog)}
1037 -function ClearAuditLog(b){QH(60,"Cancella registro di controllo?");setDialogMode(1,"Registro di audizione",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1033 +function processAuditLog0(b,c,a,d){200==d&&a&&0<a.length&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Disabilitato":"Abilitato",c&2&&(b+=", Bloccato"),c&4&&(b+=", Quasi pieno"),c&8&&(b+=", Pieno"),c&16&&(b+=", NoKey"),c="<h1>Impostazioni registro di controllo</h1>"+TableStart(),c+=TableEntry("Stato",b),c+=TableEntry("Conservazione",a[0].CurrentNumberOfRecords+" record (s),"+a[0].PercentageFree+"% gratuito"),c+=TableEntry("Sovrascrivi politica",2==a[0].OverwritePolicy?"Si avvolge quando \u00e8 pieno":
1034 +"Non sovrascrive mai"),c+=TableEnd(),QH(50,c),amtstack.GetAuditLog(processAuditLog1))}
1035 +function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filtro" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Salva...","SaveAuditLog()")+AddButton("Pulisci il registro","ClearAuditLog()"))+"<br>");if(0==c.length)d="Nessun evento del registro di controllo trovato.";else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Tempo</b><td class=r1 style=width:260px><b>Iniziatore</b><td class=r1><b>Action</b>";
1036 +for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1037 +minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(51,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Log di controllo Intel AMT",auditLog)}
1038 +function ClearAuditLog(b){QH(61,"Cancella registro di controllo?");setDialogMode(1,"Registro di audizione",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1039 function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("Registro di audizione","Errore: "+d)}
1039 -function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Tempo",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Iniziatore",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Indirizzo",a.NetAddress));d+=addHtmlValue("Applicazione",a.AuditApp);d+=addHtmlValue("Evento",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Dati estesi",a.ExStr);else if(0<a.Ex.length){var g="";for(c in a.Ex)0<g.length&&(g+=","),g+=a.Ex.charCodeAt(c);""!=g&&(d+=
1040 -addHtmlValue("Valori dei dati",g));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("Stringa di dati",a.Ex.substring(2)))}messagebox("Audit Event #"+(b+1)+" Dettagli",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1040 +function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Tempo",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Iniziatore",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Indirizzo",a.NetAddress));d+=addHtmlValue("Applicazione",a.AuditApp);d+=addHtmlValue("Evento",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Dati estesi",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=","),e+=a.Ex.charCodeAt(c);""!=e&&(d+=
1041 +addHtmlValue("Valori dei dati",e));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("Stringa di dati",a.Ex.substring(2)))}messagebox("Audit Event #"+(b+1)+" Dettagli",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1042 function PullCertificates(){amtstack.BatchEnum(null,["AMT_PublicKeyCertificate","AMT_PublicPrivateKeyPair","AMT_TLSSettingData","AMT_TLSCredentialContext"],processCerts1)}
1042 -function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var g in xxCertificates)xxCertificates[g].InstanceID==b&&(xxTlsCurrentCert=
1043 -g)}for(g in xxCertificates)xxCertificates[g].TrustedRootCertficate=1==xxCertificates[g].TrustedRootCertficate,xxCertificates[g].X509Certificate=window.atob(xxCertificates[g].X509Certificate),xxCertificates[g].XIssuer=parseCertName(xxCertificates[g].Issuer),xxCertificates[g].XSubject=parseCertName(xxCertificates[g].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1043 +function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var e in xxCertificates)xxCertificates[e].InstanceID==b&&(xxTlsCurrentCert=
1044 +e)}for(e in xxCertificates)xxCertificates[e].TrustedRootCertficate=1==xxCertificates[e].TrustedRootCertficate,xxCertificates[e].X509Certificate=window.atob(xxCertificates[e].X509Certificate),xxCertificates[e].XIssuer=parseCertName(xxCertificates[e].Issuer),xxCertificates[e].XSubject=parseCertName(xxCertificates[e].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1045 function parseCertName(b){var c={},a=b.split(","),d;for(d in a)b=a[d].indexOf("="),c[a[d].substring(0,b)]=a[d].substring(b+1);return c}
1046 function getTlsSecurityState(b){if(0==xxTlsSettings[b].Enabled)return"Disabilitato";var c=(1==xxTlsSettings[b].MutualAuthentication?"TLS di mutua autorizzazione":"TLS di autenticazione server")+(1==xxTlsSettings[b].AcceptNonSecureConnections?" e non TLS":"");1==xxTlsSettings[b].MutualAuthentication&&xxTlsSettings[b].TrustedCN&&(b=MakeToArray(xxTlsSettings[b].TrustedCN),0<b.length&&(c+=", "+(1<b.length?"Trusted names":"Trusted name")+": "+b.join(", ")+"."));return c}
1047 function updateCertificates(){if(null!=xxCertificates){var b="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,c=1-b,a=TableStart(),a=a+TableEntry("Sicurezza TLS remota",addLinkConditional(getTlsSecurityState(c),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEntry("Sicurezza TLS locale",addLinkConditional(getTlsSecurityState(b),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEnd(),a=a+("<br>"+TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gestisci i certificati Intel&reg; AMT per questo computer.<br><br>");
1048 if(0==xxCertificates.length&&0==xxCertPrivateKeys.length)a+="<div style=padding-left:15px><br><i>Nessun certificato trovato.</i></div><br>";else{for(var d in xxCertificates)b="",xxCertificates[d].TrustedRootCertficate&&(b=", Radice attendibile"),xxCertificates[d].XPrivateKey&&(b=", Chiave privata"),d==xxTlsCurrentCert&&(b+=", Certificato TLS"),a+="<div class=itemBar onclick=showCertDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(xxCertificates[d].XSubject.CN)+"</b><i>"+b+"</i></div></div>";
1048 -for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>Coppia di chiavi private non assegnate #"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("Aggiungi certificato ...","addCertButton()")+AddButton("Rilascia certificato ...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(51,a)}}
1049 +for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>Coppia di chiavi private non assegnate #"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("Aggiungi certificato ...","addCertButton()")+AddButton("Rilascia certificato ...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(52,a)}}
1050 function showKeyPairDetails(b){setDialogMode(11,"Key Pair #"+b,5,function(c){2==c&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertPrivateKeys[b].InstanceID},PullCertificates,0,1)},"Questa \u00e8 una coppia di chiavi di certificato pubblico / privato che non appartiene ad alcun certificato. Questa voce dovrebbe essere temporanea.")}
1051 var xxCertSubjectNames={CN:"Nome comune",O:"Organizzazione",OU:"Unit\u00e0 organizzativa",S:"Stato / Provincia",ST:"Stato / Provincia",L:"Localit\u00e0",C:"Nazione",SN:"Cognome",GN:"Nome di battesimo"};
1052 function showCertDetails(b){if(!xxdialogMode){var c=xxCertificates[b],a;a="<br>"+addHtmlValue("Certificato",c.X509Certificate.length+" byte,<a style=cursor:pointer;color:blue onclick=downloadCert("+b+")>Scarica</a>");a+=addHtmlValue("Radice attendibile",c.TrustedRootCertficate?"s\u00ec":"No");0==c.TrustedRootCertficate&&c.XPrivateKey&&(a+=addHtmlValue("Chiave privata","Presente"));a+='<br><div style="border-bottom:1px solid gray"><i>Oggetto del certificato</i></div><br>';for(var d in c.XSubject)c.XSubject[d]&&
1053 (a+=addHtmlValue(xxCertSubjectNames[d]?xxCertSubjectNames[d]:d,EscapeHtml(c.XSubject[d])));a+='<br><div style="border-bottom:1px solid gray"><i>Certificato dell\'Emittente</i></div><br>';for(d in c.XIssuer)c.XIssuer[d]&&(a+=addHtmlValue(xxCertSubjectNames[d]?xxCertSubjectNames[d]:d,EscapeHtml(c.XIssuer[d])));setDialogMode(11,"Certificato -"+EscapeHtml(c.XSubject.CN),5,function(a){2==a&&(xxCertificates[b].XPrivateKey&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertificates[b].XPrivateKey.InstanceID},
1054 function(){},0,1),amtstack.Delete("AMT_PublicKeyCertificate",xxCertificates[b],certificateRemoved,0,1))},a)}}function downloadCert(b){saveAs(data2blob(xxCertificates[b].X509Certificate),xxCertificates[b].XSubject.CN+".cer")}function cert_FileSelectHandler(b){haltEvent(b);1==b.dataTransfer.files.length&&(b.dataTransfer.files[0].name.toLowerCase().endsWith(".p12")?issueCertButton(b.dataTransfer.files):addCertButton(b.dataTransfer.files))}var xxDragDropCertFiles=null;
1055 function addCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen onchange=addCertButtonUpdate() type=file style=float:right;width:260px accept=".cer,.pem">',xxDragDropCertFiles&&(b='<input style=float:right;width:260px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b="<div style=height:10px></div>"+("<div style=height:26px;margin-top:4px>"+b+"<div style=padding-top:4px>File del certificato</div></div>")+"<div style=height:26px;margin-top:4px><select id=certtype style=float:right;width:260px><option value=1>Certificato radice attendibile</option><option value=0>Certificato a catena</option></select><div style=padding-top:4px>Tipo di certificato</div></div>",
1055 -setDialogMode(11,"Aggiungi certificato",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c54",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1056 +setDialogMode(11,"Aggiungi certificato",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c106",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1057 function addCertButtonOk2(b){b=b.target.result;var c=b.indexOf("-----BEGIN CERTIFICATE-----");0<=c?(b=b.substring(c+27),c=b.indexOf("-----END CERTIFICATE-----"),0<=c&&(b=b.substring(0,c)),b=b.replace(/\r\n/g,"")):b=btoa(b);1==getSelectElement("certtype").value?amtstack.AMT_PublicKeyManagementService_AddTrustedRootCertificate(b,certificateAdded):amtstack.AMT_PublicKeyManagementService_AddCertificate(b,certificateAdded)}
1058 function issueCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen type=file style=float:right;width:230px onchange=issueCertButtonUpdate() accept=".p12">',xxDragDropCertFiles&&(b='<input style=float:right;width:230px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b=""+("<div styleheight:26px;margin-top:14px>"+b+"<div style=padding-top:4px>Certificate file</div></div>")+"<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certopenpass type=password autocomplete=off style=float:right;width:230px><div style=padding-top:4px>Password del certificato</div></div>",
1059 b+='<br><div style="border-bottom:1px solid gray"><i>Certificato Intel&reg; AMT</i></div>',b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certcn style=float:right;width:230px><div style=padding-top:4px>Nome comune</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certo style=float:right;width:230px><div style=padding-top:4px>Organizzazione</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certst style=float:right;width:230px><div style=padding-top:4px>Stato / Provincia</div></div>",
1060 b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certc style=float:right;width:230px><div style=padding-top:4px>Nazione</div></div>",b+='<div>Usi del certificato</div><ul 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">',b+="<li><label><input type=checkbox id=d11_cu4 checked>Server TLS (HTTPS)</label></li>",b+="<li><label><input type=checkbox id=d11_cu5>Client TLS (HTTPS)</label></li>",
1061 b+="<li><label><input type=checkbox id=d11_cu6>Protezione e-mail</label></li>",b+="<li><label><input type=checkbox id=d11_cu7>Firma del codice</label></li>",b+="<li><label><input type=checkbox id=d11_cu8>Timestamp</label></li>",b+="</ul>",setDialogMode(11,"Rilascio certificato",3,issueCertButtonOk,b),issueCertButtonUpdate())}
1061 -function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c54",c)}
1062 +function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c106",c)}
1063 function issueCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length?(b=new FileReader,b.onload=issueCertButtonOk2,b.readAsBinaryString(c[0])):issueCertButtonOk3(null)}function issueCertButtonOk2(b){0==amtcert_loadP12File(b.target.result,Q("certopenpass").value,issueCertButtonOk3)&&messagebox("Rilascio certificato","Impossibile decrittografare / decodificare il certificato.")}
1064 function issueCertButtonOk3(b,c,a){xxCaPrivateKey=b;xxCaSubjectAttributes=c;amtstack.AMT_PublicKeyManagementService_GenerateKeyPair(0,2048,GenerateKeyPairResponse)}
1065 function GenerateKeyPairResponse(b,c,a,d){200!=d?messagebox("Rilascio certificato","Impossibile generare la coppia di chiavi. Stato: "+d):0!=a.Body.ReturnValue?messagebox("Rilascio certificato","Impossibile generare la coppia di chiavi,"+a.Body.ReturnValueStr):amtstack.Enum("AMT_PublicPrivateKeyPair",GenerateKeyPairResponse2,a.Body.KeyPair.ReferenceParameters.SelectorSet.Selector.Value)}
1065 -function GenerateKeyPairResponse2(b,c,a,d,g){if(200!=d)messagebox("Rilascio certificato","Impossibile generare la coppia di chiavi. Stato: "+d);else{b=null;for(var v in a)a[v].InstanceID==g&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};g={CN:"Certificato radice non attendibile"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in g={},xxCaSubjectAttributes)g[xxCaSubjectAttributes[v].shortName]=
1066 -xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,g,v);null==v?messagebox("Rilascio certificato","Impossibile firmare il certificato."):(v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,
1066 +function GenerateKeyPairResponse2(b,c,a,d,e){if(200!=d)messagebox("Rilascio certificato","Impossibile generare la coppia di chiavi. Stato: "+d);else{b=null;for(var v in a)a[v].InstanceID==e&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};e={CN:"Certificato radice non attendibile"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in e={},xxCaSubjectAttributes)e[xxCaSubjectAttributes[v].shortName]=
1067 +xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,e,v);null==v?messagebox("Rilascio certificato","Impossibile firmare il certificato."):(v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,
1068 v.length-25),GenerateKeyPairResponse4))}}function GenerateKeyPairResponse4(b,c,a,d){200!=d?messagebox("Rilascio certificato","Impossibile generare la coppia di chiavi. Stato: "+d):PullCertificates()}function certificateAdded(b,c,a,d){200!=d||0!=a.Body.ReturnValue?messagebox("Aggiungi certificato","Impossibile aggiungere il certificato, errore"+(200!=d?d:a.Body.ReturnValueStr)):PullCertificates()}
1069 function certificateRemoved(b,c,a,d){200!=d?messagebox("Rimuovi certificato","Impossibile rimuovere il certificato, errore"+d):PullCertificates()}function getInputElement(b){var c=document.getElementsByTagName("input");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}function getSelectElement(b){var c=document.getElementsByTagName("select");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}
1069 -function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>Nessun certificato, TLS disabilitato</option>";for(var c in xxCertificates)0!=xxCertificates[c].TrustedRootCertficate||!xxCertificates[c].XPrivateKey||null!=xxTlsCurrentCert&&xxTlsCurrentCert!=c||(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>Certificato</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1070 +function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>Nessun certificato, TLS disabilitato</option>";for(var c in xxCertificates)0==xxCertificates[c].TrustedRootCertficate&&xxCertificates[c].XPrivateKey&&(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>Certificato</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1071 b+="<option value=2>Mutual-auth TLS only</option><option value=3>Mutual-auth, non-TLS allowed</option>";b+='</select><div style=padding-top:4px>Security</div></div><div style=height:26px id=d11rcn title="Elenco separato da virgole di nomi comuni di certificati che potranno connettersi in remoto."><input id=d11_rcn style=float:right;width:260px onkeyup=showSetTlsSecurityDlgUpdate() placeholder="nome1, nome2"><div style=padding-top:4px>CN remoti</div></div>';setDialogMode(11,"Impostazioni TLS",3,showSetTlsSecurityDlgOk,
1072 b);if(0==xxTLSCredentialContext.length||0==xxTlsSettings[0].Enabled||0==xxTlsSettings[1].Enabled)getSelectElement("tlscert").value=-1;else for(c in b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value,xxCertificates)xxCertificates[c].InstanceID==b&&(getSelectElement("tlscert").value=c);c=1-("Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1);getSelectElement("tlsremote").value=(1==xxTlsSettings[c].MutualAuthentication?2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?
1072 -1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c54",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1073 +1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c106",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1074 function showSetTlsSecurityDlgOk(){var b=getSelectElement("tlscert").value,c=getSelectElement("tlsremote").value,a=Clone(xxTlsSettings);setTlsSecurityPendingCalls=0;setTlsSecurityDeleteCredentialContext=null;if(-1!=b){if(0<xxTLSCredentialContext.length){var d=Clone(xxTLSCredentialContext[0]);d.ElementInContext.ReferenceParameters.SelectorSet.Selector.Value=xxCertificates[b].InstanceID;amtstack.Put("AMT_TLSCredentialContext",d,setTlsSecurityResponse,0,1)}else amtstack.Create("AMT_TLSCredentialContext",
1075 {ElementInContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[b].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",ElementProvidingContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_TLSProtocolEndpointCollection")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters>'},
1075 -setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,g=1-d;a[g].Enabled=-1!=b;a[g].MutualAuthentication=2<=c;a[g].AcceptNonSecureConnections=1==c%2;a[g].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1076 +setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,e=1-d;a[e].Enabled=-1!=b;a[e].MutualAuthentication=2<=c;a[e].AcceptNonSecureConnections=1==c%2;a[e].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1077 b,c,d){200!=d?messagebox("","Impossibile impostare l'ora, status ="+d):0!=c.Body.ReturnValue?messagebox("","Impossibile impostare l'ora, errore: "+c.Body.ReturnValueStr):(a=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(c.Body.Ta0,a,a,function(){setTlsSecurityResponse()}))}));setTlsSecurityPendingCalls+=2;amtstack.Put("AMT_TLSSettingData",a[0],setTlsSecurityResponse,0,1,a[0]);amtstack.Put("AMT_TLSSettingData",a[1],setTlsSecurityResponse,0,1,a[1]);
1078 statusbox("Impostazioni TLS","Applicazione di nuove impostazioni di sicurezza ...")}function splitDomains(b){b=b.split(",");if(0!=b.length){for(var c in b)if(b[c]=b[c].trim(),0<=b[c].indexOf(" ")||0==b[c].length)return;if(!(4<b.length))return b}}
1079 function setTlsSecurityResponse(b,c,a,d){if(b){if(200!=d){messagebox("","Impossibile impostare la sicurezza TLS, status ="+d);return}if(a.Body.ReturnValueStr&&!methodcheck(a))return}0==--setTlsSecurityPendingCalls&&amtstack.AMT_SetupAndConfigurationService_CommitChanges(null,setTlsSecurityResponse2)}
1080 function setTlsSecurityResponse2(b,c,a,d){200!=d?messagebox("","Impossibile impostare la sicurezza TLS, status ="+d):0!=a.Body.ReturnValue?messagebox("","Impossibile impostare la sicurezza TLS, errore: "+a.Body.ReturnValueStr):setTimeout(setTlsSecurityResponse3,2E3)}
1081 function setTlsSecurityResponse3(){null!=setTlsSecurityDeleteCredentialContext&&amtstack.Delete("AMT_TLSCredentialContext",setTlsSecurityDeleteCredentialContext,function(){});PullCertificates();setDialogMode();amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}var xxWatchdog=null;
1082 function PullWatchdog(){amtstack.BatchEnum(null,["*AMT_AgentPresenceCapabilities","AMT_AgentPresenceWatchdog","AMT_AgentPresenceWatchdogAction","AMT_StateTransitionCondition","CIM_ConcreteDependency"],PullWatchdogResponse)}
1082 -function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var g in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[g],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1083 +function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var e in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[e],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1084 "@Name","PolicyConditionName").Value,d=getItem(xxWatchdog.AMT_AgentPresenceWatchdog.responses,"DeviceID",d),a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,"PolicyConditionName",a),d.transitions||(d.transitions=[]),d.transitions.push(a)),c&&"AMT_StateTransitionCondition"==c.Value&&(a=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyConditionName").Value,b=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyActionName").Value,a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,
1085 "PolicyConditionName",a),b=getItem(xxWatchdog.AMT_AgentPresenceWatchdogAction.responses,"PolicyActionName",b),a.actions||(a.actions=[]),a.actions.push(b));updateWatchdog();QV("go19",!0)}}var watchdogEnabledStates="Sconosciuto;Altro;Abilitato;Disabilitato;Chiudere;Non applicabile;Abilitato ma offline;In prova;differite;quiesce;Di partenza".split(";"),watchdogMonitoredEntity="Sconosciuto;Altro;Sistema operativo;Processo di avvio del sistema operativo;Processo di spegnimento del sistema operativo;Processo di avvio del firmware;Processo di avvio del BIOS;Applicazione;Processore di servizio".split(";");
1086 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("Numero massimo",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" cani da guardia");b+=TableEntry("Numero massimo di azioni totali",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" Azioni");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Gestisci i watchdog di presenza degli agenti Intel&reg; AMT.<br><br>";if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||
1087 0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>Nessun watchdog di presenza agente trovato.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="Aggiungi azione ..." onclick=addWatchdogAction(event,'+
1087 -c+")>";a.transitions&&(b+='<input type=button style=float:right value="Elimina azioni ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",g;for(g in a.transitions){var v=a.transitions[g];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : Evento da registrare")}""!=d&&(b+="<div style=padding:12px>"+
1088 -d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Aggiungi watchdog ...","AddWatchdog()"));b+="<br>";QH(54,b)}}function getWatchdogTransitionStr(b){if(31==b)return"Qualsiasi stato";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1088 +c+")>";a.transitions&&(b+='<input type=button style=float:right value="Elimina azioni ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : Evento da registrare")}""!=d&&(b+="<div style=padding:12px>"+
1089 +d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Aggiungi watchdog ...","AddWatchdog()"));b+="<br>";QH(55,b)}}function getWatchdogTransitionStr(b){if(31==b)return"Qualsiasi stato";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1090 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("Descrizione",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("Entit\u00e0 monitorata",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("Stato attuale",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("Stato abilitato",watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("Intervallo di avvio",
1091 b.StartupInterval+" secondo (s)");c+=addHtmlValue("Intervallo di timeout",b.TimeoutInterval+" secondo (s)");setDialogMode(11,format("Cane da guardia {0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
1092 function AddWatchdog(){var b;b="<div style=height:26px;margin-top:4px><input id=wgname style=float:right;width:240px maxlength=16 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Nome</div></div>"+('<div style=height:26px;margin-top:4px><input id=wgguid style=float:right;width:240px maxlength=36 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px title="Genera DeviceID casuale">'+addLink("ID del dispositivo","GenerateWatchdogGuid()")+"</div></div>");b+="<div style=height:26px;margin-top:4px><input id=wgstart style=float:right;width:240px maxlength=8 placeholder=3600 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Avvio (secondi)</div></div>";
1093 b+="<div style=height:26px;margin-top:4px><input id=wgtimeout style=float:right;width:240px maxlength=8 placeholder=60 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Timeout (secondi)</div></div>";setDialogMode(11,"Aggiungi cane da guardia",3,AddWatchdogOk,b);AddWatchdogUpdate()}function GenerateWatchdogGuid(){var b,c="";for(b=0;16>b;b++)c+=String.fromCharCode(random(255));Q("wgguid").value=guidToStr(rstr2hex(c));AddWatchdogUpdate()}
1093 -function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var g=a.charCodeAt(d);45!=g&&(48<=g&&57>=g||97<=g&&102>=g?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1094 +function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var e=a.charCodeAt(d);45!=e&&(48<=e&&57>=e||97<=e&&102>=e?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1095 function AddWatchdogOk(){var b=Q("wgtimeout").value,c=Q("wgstart").value;""==b&&(b=60);""==c&&(c=3600);b={CreationClassName:0,DeviceID:btoa(hex2rstr(guidToStr(Q("wgguid").value.replace(/-/g,"")).replace(/-/g,""))),StartupInterval:c,SystemCreationClassName:0,SystemName:0,TimeoutInterval:b,MonitoredEntityDescription:Q("wgname").value};amtstack.Create("AMT_AgentPresenceWatchdog",b,AddWatchdogOk2)}
1096 function AddWatchdogOk2(b,c,a,d){200!=d?messagebox("Cane da guardia","Impossibile aggiungere il watchdog, errore #"+d):PullWatchdog()}
1097 function addWatchdogAction(b,c){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d;d="<table><td style=width:180px>A partire dal<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsa"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";d+="<td>Per<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsb"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";setDialogMode(11,"Aggiungi azione watchdog",
1098 3,addWatchdogActionOk,d+"</table><br>Esegui azione<br><input id=wgsevent type=checkbox checked onclick=addWatchdogActionUpdate()>Scrivi nel registro eventi<br />",a);addWatchdogActionUpdate();haltEvent(b)}function addWatchdogActionUpdate(){var b=0,c=0,a;for(a in amtstack.WatchdogCurrentStates)1==Q("wgsa"+a).checked&&(b+=parseInt(a)),1==Q("wgsb"+a).checked&&(c+=parseInt(a));QE("dlgOkButton",0<b&&0<c&&1==Q("wgsevent").checked)}
1098 -function addWatchdogActionOk(b,c){var a=0,d=0,g;for(g in amtstack.WatchdogCurrentStates)1==Q("wgsa"+g).checked&&(a+=parseInt(g)),1==Q("wgsb"+g).checked&&(d+=parseInt(g));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Azione del cane da guardia","Impossibile aggiungere l'azione del watchdog, errore #"+d):PullWatchdog()}
1099 +function addWatchdogActionOk(b,c){var a=0,d=0,e;for(e in amtstack.WatchdogCurrentStates)1==Q("wgsa"+e).checked&&(a+=parseInt(e)),1==Q("wgsb"+e).checked&&(d+=parseInt(e));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Azione del cane da guardia","Impossibile aggiungere l'azione del watchdog, errore #"+d):PullWatchdog()}
1100 function deleteWatchdogActions(b,c){setDialogMode(11,"Elimina azioni watchdog",3,deleteWatchdogActionsOk,"Eliminare tutte le azioni per questo cane da guardia?",xxWatchdog.AMT_AgentPresenceWatchdog.responses[c]);haltEvent(b)}function deleteWatchdogActionsOk(b,c){amtstack.AMT_AgentPresenceWatchdog_DeleteAllActions(deleteWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
1101 function deleteWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Azione del cane da guardia","Impossibile rimuovere le azioni del watchdog, errore #"+d):PullWatchdog()}
1102 var xxSystemDefense=null,xxSystemDefenceLinkedPolicy={},xxUpdatingDefenseStats=!1,xxFilterStatistics=[{},{}],xxFilterStatisticsTimer=null,xxFilterStatisticsTimerActive=!1,xxSystemDefenceFilterEthernetTypes={2048:"Tutti i pacchetti IP",2054:"Tutti i pacchetti ARP"},xxSystemDefenceFilterIPTypes={4:"IPv4",6:"IPv6"},xxSystemDefenceFilterDesc={0:"Consenti, conte",1:"Lascia cadere, conta",2:"Limite di velocit\u00e0",3:"permettere",4:"Far cadere"},xxSystemDefenceFilters={HdrProtocolID:1,HdrDestAddress:2,
1103 HdrDestMask:2,HdrSrcAddress:2,HdrSrcMask:2,HdrSrcPortStart:1,HdrSrcPortEnd:1,HdrDestPortStart:1,HdrDestPortEnd:1,HdrSrcAddressEndOfRange:2,"HdrDestAddressEndOfRange ":2,TCPFlagsOn:3,TCPFlagsOff:3};function PullSystemDefense(){amtFirstPull|=4;amtstack.BatchEnum(null,["AMT_SystemDefensePolicy","AMT_NetworkPortSystemDefensePolicy","AMT_Hdr8021Filter","AMT_IPHeadersFilter","AMT_NetworkFilter"],PullSystemDefenseResponse)}
1104 function PullSystemDefenseResponse(b,c,a,d){200==d&&(xxSystemDefense=a,updateSystemDefense(),QV("go18",!0),urlvars.norefresh&&UpdateDefenseStats())}
1105 function updateSystemDefense(){if(null!=xxSystemDefense){var b="";xxSystemDefenceLinkedPolicy={};for(var c in xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses){var a=xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses[c],d=+getItem(a.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value.substring(27),a=getItem(xxSystemDefense.AMT_SystemDefensePolicy.responses,"InstanceID",a.Dependent.ReferenceParameters.SelectorSet.Selector.Value);xxSystemDefenceLinkedPolicy[d]=
1105 -a}b+=TableStart();c="<i>Nessuna</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("Politica cablata predefinita",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],g;for(g in a)d=a[g],d=1==d?d+" pacchetto":d+" pacchetti",b+=TableEntry((0==c?"Cablata":"senza fili")+g,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>Gestisci le politiche di difesa del sistema Intel&reg; AMT.<br><br>";
1106 +a}b+=TableStart();c="<i>Nessuna</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("Politica cablata predefinita",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],e;for(e in a)d=a[e],d=1==d?d+" pacchetto":d+" pacchetti",b+=TableEntry((0==c?"Cablata":"senza fili")+e,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>Gestisci le politiche di difesa del sistema Intel&reg; AMT.<br><br>";
1107 if(0==xxSystemDefense.AMT_SystemDefensePolicy.responses.length)b+="<div style=padding-left:15px><i>Nessuna politica di difesa del sistema trovata.</i></div><br>";else for(c in xxSystemDefense.AMT_SystemDefensePolicy.responses)a=xxSystemDefense.AMT_SystemDefensePolicy.responses[c],d="",a.FilterCreationHandles&&(a.FilterCreationHandles=MakeToArray(a.FilterCreationHandles),d=a.FilterCreationHandles.length,d=", "+d+" filter"+(1<d?"s":"")),b+="<div class=itemBar onclick=showPolicyDetails("+c+")><div style=padding-top:3px><b>"+
1108 EscapeHtml(a.PolicyName)+"</b>"+d+"</div></div>";b+="<tr><td class=r1 style=padding-left:15px><br>Gestisci i filtri di difesa del sistema Intel&reg; AMT.<br><br>";if(0==xxSystemDefense.AMT_Hdr8021Filter.responses.length&&0==xxSystemDefense.AMT_IPHeadersFilter.responses.length)b+="<div style=padding-left:15px><i>Nessun filtro di difesa del sistema trovato.</i></div><br>";else{for(c in xxSystemDefense.AMT_Hdr8021Filter.responses)a=xxSystemDefense.AMT_Hdr8021Filter.responses[c],(d=xxSystemDefenceFilterEthernetTypes[a.HdrProtocolID8021])||
1109 (d="Tutto il protocollo Ethernet"+a.HdrProtocolID8021),d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile],2==a.FilterProfile&&(d+=" a"+a.FilterProfileData+" pacchetto / sec"),1==a.ActionEventOnMatch&&(d+=", Evento in partita"),b+="<div class=itemBar onclick=showFilterDetails(0,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>";for(c in xxSystemDefense.AMT_IPHeadersFilter.responses){a=xxSystemDefense.AMT_IPHeadersFilter.responses[c];
1109 -(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="Tutto il protocollo Ethernet"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" a"+a.FilterProfileData+" pacchetto / sec");1==a.ActionEventOnMatch&&(d+=", Evento in partita");var v=0;for(g in xxSystemDefenceFilters)a[g]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+
1110 -"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("Aggiungi filtro ...","AddDefenseFilter()")+AddButton("Aggiungi politica ...","AddDefensePolicy()"));QH(53,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}
1110 +(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="Tutto il protocollo Ethernet"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" a"+a.FilterProfileData+" pacchetto / sec");1==a.ActionEventOnMatch&&(d+=", Evento in partita");var v=0;for(e in xxSystemDefenceFilters)a[e]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+
1111 +"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("Aggiungi filtro ...","AddDefenseFilter()")+AddButton("Aggiungi politica ...","AddDefensePolicy()"));QH(54,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}
1112 function StopDefenseStatsTimer(){null!=xxFilterStatisticsTimer&&(clearInterval(xxFilterStatisticsTimer),xxFilterStatisticsTimer=null);xxFilterStatisticsTimerActive=!1}
1113 function UpdateDefenseStats(b){if(b||1!=xxFilterStatisticsTimerActive)xxFilterStatisticsTimerActive=!0,b=b?b:0,xxSystemDefenceLinkedPolicy[b]?amtstack.AMT_SystemDefensePolicy_UpdateStatistics('<a:Address></a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+b+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",!1,UpdateDefenseStats2,b,0,{InstanceID:xxSystemDefenceLinkedPolicy[b].InstanceID}):
1113 -(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,g){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,g):StopDefenseStatsTimer()}
1114 -function UpdateDefenseStats3(b,c,a,d,g){b=0;if(200==d){xxFilterStatistics[g]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[g][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1114 +(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,e){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,e):StopDefenseStatsTimer()}
1115 +function UpdateDefenseStats3(b,c,a,d,e){b=0;if(200==d){xxFilterStatistics[e]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[e][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1116 function changeDefaultPolicy(b){if(!xxdialogMode){var c;c="<div style=height:26px;margin-top:4px><select id=policySelection style=float:right;width:266px><option value=-1>Nessuna";for(var a in xxSystemDefense.AMT_SystemDefensePolicy.responses)c+="<option value="+a+(xxSystemDefenceLinkedPolicy[b]&&xxSystemDefense.AMT_SystemDefensePolicy.responses[a].InstanceID==xxSystemDefenceLinkedPolicy[b].InstanceID?" selected":"")+">"+xxSystemDefense.AMT_SystemDefensePolicy.responses[a].PolicyName;setDialogMode(11,
1117 "Politica di difesa del sistema predefinita",3,changeDefaultPolicyOk,c+"</select><div style=padding-top:4px>Politica di default</div></div>",b)}}
1118 function changeDefaultPolicyOk(b,c){var a=Q("policySelection").value,d=xxSystemDefenceLinkedPolicy[c];d&&amtstack.Delete("AMT_NetworkPortSystemDefensePolicy",'<w:SelectorSet><w:Selector Name="Antecedent"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">CIM_EthernetPort</w:Selector><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+c+
@@ -1124,116 +1125,135 @@ function AddDefenseFilter(){if(!xxdialogMode){var b;b="<div style=height:26px;ma
1125 b+="<div style=height:26px;margin-top:4px id=filterdatadiv><input id=filterdata style=float:right;width:260px maxlength=8 onkeyup=AddDefenseFilterUpdate()><div style=padding-top:4px>Pacchetti / secondo</div></div>";b+="<div style=height:26px;margin-top:4px><select id=filteraction style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=false>Fare niente<option value=1>Evento in partita</select><div style=padding-top:4px>Registro eventi</div></div>";setDialogMode(11,"Aggiungi filtro di difesa del sistema",
1126 3,AddDefenseFilterOk,b);AddDefenseFilterUpdate()}}
1127 function AddDefenseFilterOk(){if(1>=Q("filtertype").value){var b=0==Q("filtertype").value?2048:2054,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrProtocolID8021:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value};2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_Hdr8021Filter",c,AddDefenseFilterOk2)}else{var b=2==Q("filtertype").value?
1127 -4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var g=a[d].indexOf("="),v=a[d].substring(0,g),g=a[d].substring(g+1),n=xxSystemDefenceFilters[v];n||(v="Hdr"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(g=g.split("."),4==g.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(g[0]),
1128 -parseInt(g[1]),parseInt(g[2]),parseInt(g[3]))))):c[v]=g)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c54",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1128 +4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var e=a[d].indexOf("="),v=a[d].substring(0,e),e=a[d].substring(e+1),n=xxSystemDefenceFilters[v];n||(v="Hdr"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(e=e.split("."),4==e.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(e[0]),
1129 +parseInt(e[1]),parseInt(e[2]),parseInt(e[3]))))):c[v]=e)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c106",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1130 function AddDefenseFilterOk2(b,c,a,d){200!=d?messagebox("Aggiungi filtro di difesa del sistema","Impossibile aggiungere il filtro, errore #"+d):PullSystemDefense()}
1130 -function showFilterDetails(b,c){if(!xxdialogMode){var a,d,g,v;0==b?(v="AMT_Hdr8021Filter",g="Ethernet Traffic",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="Tutto il protocollo Ethernet"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",g="IP Traffic",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="Tutto il protocollo IP"+d.HdrIPVersion));var n;n=""+addHtmlValue("Nome",EscapeHtml(d.Name));n+=addHtmlValue("genere",
1131 -g);n+=addHtmlValue("Traffico corrispondente",a);n+=addHtmlValue("Direzione",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,g=d[l],b=xxSystemDefenceFilters[l],2==b&&4==g.length&&(g=hex2rstr(g),g=g.charCodeAt(0)+"."+g.charCodeAt(1)+"."+g.charCodeAt(2)+"."+g.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("Filtro"+a,g));n+=addHtmlValue("Evento in partita",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,
1131 +function showFilterDetails(b,c){if(!xxdialogMode){var a,d,e,v;0==b?(v="AMT_Hdr8021Filter",e="Ethernet Traffic",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="Tutto il protocollo Ethernet"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",e="IP Traffic",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="Tutto il protocollo IP"+d.HdrIPVersion));var n;n=""+addHtmlValue("Nome",EscapeHtml(d.Name));n+=addHtmlValue("genere",
1132 +e);n+=addHtmlValue("Traffico corrispondente",a);n+=addHtmlValue("Direzione",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,e=d[l],b=xxSystemDefenceFilters[l],2==b&&4==e.length&&(e=hex2rstr(e),e=e.charCodeAt(0)+"."+e.charCodeAt(1)+"."+e.charCodeAt(2)+"."+e.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("Filtro"+a,e));n+=addHtmlValue("Evento in partita",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,
1133 "Filtro Ethernet #"+d.InstanceID,5,showFilterDetailsOk,n,[v,d])}}function showFilterDetailsOk(b,c){2==b&&amtstack.Delete(c[0],c[1],deleteDefenseFilter)}function deleteDefenseFilter(b,c,a,d){200!=d?messagebox("Rimuovi filtro","Impossibile rimuovere il filtro, assicurarsi che non sia in uso."):PullSystemDefense()}var xxAddDefensePolicyFilters;
1134 function AddDefensePolicy(){if(!xxdialogMode){xxAddDefensePolicyFilters=[];var b;b='<div style=height:26px;margin-top:4px><input id=policyname title="<policy name>:<policy precedence number>" style=float:right;width:260px maxlength=16 onkeyup=AddDefensePolicyUpdate()><div style=padding-top:4px>Nome</div></div><div style=height:26px;margin-top:4px><select id=policytx title="Azione predefinita da eseguire per il traffico in uscita" style=float:right;width:133px><option value=0>Allow<option value=1>Far cadere<option value=2>Consenti, Conte<option value=3>Goccia, Conte<option value=4>Consenti, il conte, Evento<option value=5>Goccia, Conte, Evento</select><select id=policyrx style=float:right;width:133px title="Azione predefinita da eseguire per il traffico in entrata"><option value=0>permettere<option value=1>Far cadere<option value=2>Consenti, Conte<option value=3>Goccia, Conte<option value=4>Consenti, il conte, Evento<option value=5>Goccia, Conte, Evento</select><div style=padding-top:4px>TX / RX predefinito</div></div>';b+=
1135 "<div id=policyFilters></div>";if(0<xxSystemDefense.AMT_Hdr8021Filter.responses.length||0<xxSystemDefense.AMT_IPHeadersFilter.responses.length){b+="<div style=height:26px;margin-top:4px><div style=float:right><select id=xfilter style=width:186px>";for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];b+="<option value="+a.InstanceID+">"+a.Name}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],
1136 b+="<option value="+a.InstanceID+">"+a.Name;b+="</select><input id=addFilterButton type=button value=Add style=width:80px onclick=addFilterButton()></div><div style=padding-top:4px>Aggiungi filtro</div></div>"}setDialogMode(11,"Aggiungi politica di difesa del sistema",3,AddDefensePolicyOk,b);AddDefensePolicyUpdate()}}function addFilterButton(){0<=xxAddDefensePolicyFilters.indexOf(Q("xfilter").value)||(xxAddDefensePolicyFilters.push(Q("xfilter").value),AddDefensePolicyUpdate())}
1137 function removeFilterButton(b){xxAddDefensePolicyFilters.splice(b,1);AddDefensePolicyUpdate()}
1137 -function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c54",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>Questa politica non contiene filtri.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Rimuovere","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+GetFilterById(xxAddDefensePolicyFilters[c]).Name+
1138 +function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c106",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>Questa politica non contiene filtri.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Rimuovere","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+GetFilterById(xxAddDefensePolicyFilters[c]).Name+
1139 "</b></div></div>";QH("policyFilters",b)}}function GetFilterById(b){for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];if(a.InstanceID==b)return a}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)if(a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],a.InstanceID==b)return a}
1140 function AddDefensePolicyOk(){var b=Q("policytx").value,c=Q("policyrx").value,a=0,d=Q("policyname").value.split(":");2==d.length&&(a=parseInt(d[1]));b={"InstanceID ":0,PolicyName:d[0],PolicyPrecedence:a,TxDefaultCount:1<b,TxDefaultDrop:1==b%2,TxDefaultMatchEvent:3<b,RxDefaultCount:1<c,RxDefaultDrop:1==c%2,RxDefaultMatchEvent:3<c};0<xxAddDefensePolicyFilters.length&&(b.FilterCreationHandles=xxAddDefensePolicyFilters);amtstack.Create("AMT_SystemDefensePolicy",b,AddDefensePolicyOk2)}
1141 function AddDefensePolicyOk2(b,c,a,d){200!=d?messagebox("Aggiungi politica di difesa del sistema","Impossibile aggiungere la politica, errore #"+d):PullSystemDefense()}
1142 function showPolicyDetails(b){if(!xxdialogMode){var c=xxSystemDefense.AMT_SystemDefensePolicy.responses[b],a;a=""+addHtmlValue("Nome",EscapeHtml(c.PolicyName));0!=c.PolicyPrecedence&&(a+=addHtmlValue("Precedenza",c.PolicyPrecedence));var d=1==c.TxDefaultDrop?"Far cadere":"permettere";1==c.TxDefaultCount&&(d+=", Contare");1==c.TxDefaultMatchEvent&&(d+=", Evento");a+=addHtmlValue("Azione TX predefinita",d);d=1==c.RxDefaultDrop?"Drop":"Allow";1==c.RxDefaultCount&&(d+=", Count");1==c.RxDefaultMatchEvent&&
1143 (d+=", Event");a+=addHtmlValue("Azione RX predefinita",d);if(c.FilterCreationHandles)for(b in c.FilterCreationHandles)a+=addHtmlValue("Filtro n."+(+b+1),GetFilterById(c.FilterCreationHandles[b]).Name);setDialogMode(11,format("Politica #",c.InstanceID.substring(20)),5,showPolicyDetailsOk,a,c)}}function showPolicyDetailsOk(b,c){2==b&&amtstack.Delete("AMT_SystemDefensePolicy",c,deleteDefensePolicy)}
1143 -function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("Rimuovi politica","Impossibile rimuovere la politica, assicurarsi che non sia in uso."):PullSystemDefense()}var xxWireless;function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService *AMT_BootCapabilities".split(" "),processWireless)}function wifiRefresh(){xxdialogMode||PullWireless()}
1144 -var xxWifiState={3:"Disabilitato",32768:"Abilitato in S0",32769:"Abilitato in S0, Sx / AC"},xxRadioState={2:"Acceso, connesso",3:"via",6:"Acceso, disconnesso"},xxWifiAuthenticationMethod={1:"Altro",2:"Aperto",3:"Chiave condivisa",4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE"},xxWifiEncryptionMethod={1:"Altro",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"Nessuna"};function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1145 -function showWirelessInfo(){if(xxWireless){var b,c,a="",d,g;if(xxWireless.CIM_WiFiPortCapabilities.response){g="<br><h2>Profili wireless</h2>"+TableStart2();g+="<tr><td class=r2 style=padding-left:15px><br>Profili wireless che Intel&reg; AMT utilizzer\u00e0 per la connettivit\u00e0 di rete.<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b&&(g+="<div class=itemBar onclick=showWifiDetails("+
1146 -c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+" &nbsp; ",xxAccountAdminName&&(g+=AddButton2("Rimuovere",'wifiRemoveButton("'+c+'")')),g+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>",a++);0==a&&(g+="<i>Nessun profilo wireless presente</i><br>");g+="<br><td class=r2>";g=xxAccountAdminName?g+TableEnd(AddButton("Nuovo profilo","showWifiNewProfile()")):g+TableEnd("");
1147 -QH(20,g+"<br>")}}}function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"Stato wireless",3,wifiStateDlg,b)}}
1144 +function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("Rimuovi politica","Impossibile rimuovere la politica, assicurarsi che non sia in uso."):PullSystemDefense()}var xxWireless;function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService CIM_IEEE8021xSettings".split(" "),processWireless)}function wifiRefresh(){xxdialogMode||PullWireless()}
1145 +var xxWifiState={3:"Disabilitato",32768:"Abilitato in S0",32769:"Abilitato in S0, Sx / AC"},xxRadioState={2:"Acceso, connesso",3:"via",6:"Acceso, disconnesso"},xxWifiAuthenticationMethod={1:"Altro",2:"Aperto",3:"Chiave condivisa",4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE IEEE 802.1x",32769:"WPA3 OWE IEEE 802.1x"},xxWifiEncryptionMethod={1:"Altro",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"Nessuna"};
1146 +function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1147 +function showWirelessInfo(){if(xxWireless){var b,c,a="",d,e;if(xxWireless.CIM_WiFiPortCapabilities.response){e="<br><h2>Profili wireless</h2>"+TableStart2();e+="<tr><td class=r2 style=padding-left:15px><br>Profili wireless che Intel&reg; AMT utilizzer\u00e0 per la connettivit\u00e0 di rete.<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)if(d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b){var v="",n=null,l="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");
1148 +if(xxWireless.CIM_IEEE8021xSettings.responses)for(var p in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[p].ElementName==d.ElementName&&(n=xxWireless.CIM_IEEE8021xSettings.responses[p]);n&&(v=", "+l[n.AuthenticationProtocol]);e+="<div class=itemBar onclick=showWifiDetails("+c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+v+" &nbsp; ";xxAccountAdminName&&
1149 +(e+=AddButton2("Rimuovere",'wifiRemoveButton("'+c+'")'));e+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>";a++}0==a&&(e+="<i>Nessun profilo wireless presente</i><br>");e+="<br><td class=r2>";e=xxAccountAdminName?e+TableEnd(AddButton("Nuovo profilo","showWifiNewProfile()")):e+TableEnd("");QH(20,e+"<br>")}}}
1150 +function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"Stato wireless",3,wifiStateDlg,b)}}
1151 function wifiStateDlg(){amtstack.CIM_WiFiPort_RequestStateChange(document.querySelector("input[name=d11]:checked").value,null,function(){amtstack.Get("CIM_WiFiPort",function(b,c,a,d){200==d&&(xxWireless.CIM_WiFiPort.response=a.Body,showWirelessInfo())})})}
1152 function showWifiSyncDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d11 id=wl0 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">Disabilitato</label><br>");b+="<label><input type=radio name=d11 id=wl0 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">Abilitato</label><br>";setDialogMode(11,"Local Profile Sync",3,showWifiSyncDlgEx,b)}}
1150 -function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,g){200==g&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1153 +function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,e){200==e&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1154 function showUefiWifiCoExDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d12 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Disabled</label><br>");b+="<label><input type=radio name=d12 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Enabled</label><br>";setDialogMode(11,"UEFI Wifi CoEx Profile Sharing",3,UefiWifiCoExDlg,b)}}
1152 -function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,g){200==g&&PullWireless()})}
1153 -function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("Nome del profilo",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",b.SSID);c+=addHtmlValue("Autenticazione",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("crittografia",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("Priorit\u00e0",b.Priority);messagebox("Profilo wireless",c+"</div>")}}
1154 -function wifiRemoveButton(b){xxdialogMode||(QH(60,format('Rimuovere il profilo wireless "{0}"?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"Profilo wireless",3,function(){removeWifiButtonEx(b)}))}function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1155 -function removeWifiEntryResponse(b,c,a,d,g){methodcheck(a)||amtstack.Enum("CIM_WiFiEndpointSettings",function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c,showWirelessInfo())})}
1156 -function showWifiNewProfile(){if(!xxdialogMode){var b="";for(i=1;256>i;i++){var c=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==i&&(c=0);c&&(b+="<option value="+i+">"+i)}QH("c24",b);QV("c26",13<amtversion);c25.value=6;c27.value=4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"Aggiungi profilo wireless",3,function(){addWifiProfile()});updateWifiDialog()}}
1157 -function addWifiProfile(){amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},{__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c27.value,SSID:c23.value,Priority:c24.value,
1158 -PSKPassPhrase:c28.value},null,null,null,removeWifiEntryResponse)}
1159 -function updateWifiDialog(){var b=!0,c=c25.value,a=c27.value;QV(66,4>c);QV(65,3<c);QV(64,3<c);QV(67,4>c);4>c&&(3==a||4==a)&&(c27.value=2);3<c&&(2==a||5==a)&&(c27.value=3);32768==c&&(c27.value=4);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);QE("c54",1==b&&0<c22.value.length&&0<c23.value.length&&7<c28.value.length&&
1160 -c28.value==c29.value)}function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1155 +function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,e){200==e&&PullWireless()})}
1156 +function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("Nome del profilo",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",EscapeHtml(b.SSID));c+=addHtmlValue("Autenticazione",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("crittografia",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("Priorit\u00e0",b.Priority);var a=null,d="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");
1157 +if(xxWireless.CIM_IEEE8021xSettings.responses)for(var e in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[e].ElementName==b.ElementName&&(a=xxWireless.CIM_IEEE8021xSettings.responses[e]);a&&(c=c+'<div style="width:100%;border-bottom:1px solid #000;margin-bottom:5px;margin-top:5px">802.11x</div>'+addHtmlValue("Autenticazione",d[a.AuthenticationProtocol]),a.Domain&&(c+=addHtmlValue("Domain",EscapeHtml(a.Domain))),a.Username&&(c+=addHtmlValue("Nome utente",EscapeHtml(a.Username))));
1158 +c+="</div>";messagebox("Profilo wireless",c)}}function wifiRemoveButton(b){xxdialogMode||(QH(61,format('Rimuovere il profilo wireless "{0}"?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"Profilo wireless",3,function(){removeWifiButtonEx(b)}))}function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1159 +function removeWifiEntryResponse(b,c,a,d,e){methodcheck(a)||amtstack.BatchEnum("",["CIM_WiFiEndpointSettings","CIM_IEEE8021xSettings"],function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c.CIM_WiFiEndpointSettings.responses,xxWireless.CIM_IEEE8021xSettings.responses=c.CIM_IEEE8021xSettings.responses,showWirelessInfo())})}
1160 +function showWifiNewProfile(){if(!xxdialogMode){for(var b="",c=1;256>c;c++){var a=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==c&&(a=0);a&&(b+="<option value="+c+">"+c)}QH("c24",b);var b="<option value=-1>"+EscapeHtml("Nessuna")+"</option>",a="<option value=-1>"+EscapeHtml("Nessuna")+"</option>",c;for(c in xxCertificates)xxCertificates[c].TrustedRootCertficate?a+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+
1161 +"</option>":xxCertificates[c].XPrivateKey&&(b+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+"</option>");QH("c50",b);QH("c52",a);c="<option value=32769>WPA3 OWE IEEE 802.1x</option><option value=32768>WPA3 SAE IEEE 802.1x</option>";c+="<option value=7>WPA2 IEEE 802.1x</option>";c+="<option value=5>WPA IEEE 802.1x</option>";c+="<option value=6>WPA2 PSK</option>";c+="<option value=4>WPA PSK</option>";QH("c25",c);c25.value=6;c26.value=
1162 +4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"Aggiungi profilo wireless",3,function(){addWifiProfile()});updateWifiDialog()}}
1163 +function addWifiProfile(){var b,c,a,d={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c26.value,SSID:c23.value,Priority:c24.value};if(4==c25.value||6==c25.value)d.PSKPassPhrase=c28.value;if(5==c25.value||7==c25.value||32768==c25.value||
1164 +32769==c25.value)b={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_IEEE8021xSettings"),ElementName:"8021x-"+c22.value,InstanceID:"8021x-"+c22.value,ActiveInS0:1==Q("c54").value,AuthenticationProtocol:Q("c32").value},""!=Q("c44").value&&(b.RoamingIdentity=Q("c44").value),""!=Q("c34").value&&(b.ServerCertificateName=Q("c34").value,b.ServerCertificateNameComparison=Q("c36").value),
1165 +""!=Q("c40").value&&(b.Username=Q("c40").value),""!=Q("c42").value&&(b.Password=Q("c42").value),""!=Q("c38").value&&(b.Domain=Q("c38").value),3<Q("c32").value&&(b.ProtectedAccessCredential=Q("c46").value,b.PACPassword=Q("c48").value),0<=parseInt(Q("c50").value)&&(c='<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">'+
1166 +xxCertificates[parseInt(Q("c50").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>"),0<=parseInt(Q("c52").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">'+
1167 +xxCertificates[parseInt(Q("c52").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>");console.log("wifiepsettinginput",JSON.stringify(d,null,2));console.log("netAuthProfile",JSON.stringify(b,null,2));console.log("netAuthSettingsClientCert",c);console.log("netAuthSettingsServerCaCert",a);amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},d,b,c,a,removeWifiEntryResponse)}
1168 +function updateWifiDialog(){var b=!0,c=c25.value,a=c26.value;4>c&&(3==a||4==a)&&(c26.value=2);3<c&&(2==a||5==a)&&(c26.value=3);if(32768==c||32769==c)c26.value=4;QV("c27",4==c||6==c);QV("c30",5==c||7==c||32768==c||32769==c);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);0==c22.value.length&&0==c23.value.length&&(b=!1);4!=c&&6!=c||
1169 +!(8>c28.value.length||63<c28.value.length||c28.value!=c29.value)||(b=!1);QE("c106",b);updateNetAuthDialog()}function updateNetAuth2Dialog(){QV("c35",""!=Q("c33").value);QV("c45",3<Q("c32").value);QV("c47",3<Q("c32").value)}
1170 +function editNetAuthProfile(){if(!xxdialogMode){var b="<option value=-1>"+EscapeHtml("Nessuna")+"</option>",c="<option value=-1>"+EscapeHtml("Nessuna")+"</option>",a;for(a in xxCertificates)xxCertificates[a].TrustedRootCertficate?c+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>":xxCertificates[a].XPrivateKey&&(b+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>");QH("c98",b);QH("c100",c);b=amtsysstate.AMT_8021XProfile.responses.Body;
1171 +Q("c78").value=b.Enabled?1:0;Q("c102").value=b.ActiveInS0?1:0;Q("c104").value=b.PxeTimeout;if(b.Enabled){Q("c80").value=b.AuthenticationProtocol;Q("c92").value=b.RoamingIdentity?b.RoamingIdentity:"";Q("c82").value=b.ServerCertificateName?b.ServerCertificateName:"";Q("c84").value=b.ServerCertificateNameComparison?b.ServerCertificateNameComparison:0;Q("c88").value=b.Username?b.Username:
1172 +"";Q("c90").value=b.Password?b.Password:"";Q("c86").value=b.Domain?b.Domain:"";Q("c94").value=b.ProtectedAccessCredential?b.ProtectedAccessCredential:"";Q("c96").value=b.PACPassword?b.PACPassword:"";var d=c=-1;b.ServerCertificateIssuer&&(c=b.ServerCertificateIssuer.ReferenceParameters.SelectorSet.Selector.Value);b.ClientCertificate&&(d=b.ClientCertificate.ReferenceParameters.SelectorSet.Selector.Value);for(a in xxCertificates)xxCertificates[a].InstanceID==
1173 +c&&(Q("c100").value=a),xxCertificates[a].InstanceID==d&&(Q("c98").value=a)}setDialogMode(27,"802.1x Profile",3,function(){setNetAuthProfile()});updateNetAuthDialog()}}
1174 +function updateNetAuthDialog(){QV("c79",1==Q("c78").value);QV("c81",1==Q("c78").value);QV("c83",1==Q("c78").value&&""!=Q("c82").value);QV("c85",1==Q("c78").value);QV("c87",1==Q("c78").value);QV("c89",1==Q("c78").value);QV("c91",1==Q("c78").value);QV("c93",1==Q("c78").value&&
1175 +3<Q("c80").value);QV("c95",1==Q("c78").value&&3<Q("c80").value);QV("c97",1==Q("c78").value);QV("c99",1==Q("c78").value);QV("c101",1==Q("c78").value);QV("c103",1==Q("c78").value)}
1176 +function setNetAuthProfile(){var b=Clone(amtsysstate.AMT_8021XProfile.responses.Body);b.Enabled=1==Q("c78").value;b.Enabled&&(b.ActiveInS0=1==Q("c102").value,b.AuthenticationProtocol=Q("c80").value,""!=Q("c92").value?b.RoamingIdentity=Q("c92").value:delete b.RoamingIdentity,""!=Q("c82").value?(b.ServerCertificateName=Q("c82").value,b.ServerCertificateNameComparison=Q("c84").value):
1177 +(delete b.ServerCertificateName,delete b.ServerCertificateNameComparison),""!=Q("c88").value?b.Username=Q("c88").value:delete b.Username,""!=Q("c90").value?b.Password=Q("c90").value:delete b.Password,""!=Q("c86").value?b.Domain=Q("c86").value:delete b.Domain,3<Q("c80").value?(b.ProtectedAccessCredential=Q("c94").value,b.PACPassword=Q("c96").value):(delete b.ProtectedAccessCredential,delete b.PACPassword),
1178 +0<=parseInt(Q("c98").value)?b.ClientCertificate="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c98").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ClientCertificate,0<=parseInt(Q("c100").value)?b.ServerCertificateIssuer="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+
1179 +amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c100").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ServerCertificateIssuer,b.PxeTimeout=Q("c104").value);amtstack.Put("AMT_8021XProfile",b,setNetAuthProfileEx)}
1180 +function setNetAuthProfileEx(b,c,a,d){200==d?(amtsysstate.AMT_8021XProfile.responses.Body=amtsysstate.AMT_8021XProfile.response=a.Body,updateSystemStatus()):a.Header.WsmanError?messagebox("802.1x Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("802.1x Error","Error, Status = "+d)}
1181 +function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1182 var DMTFCPUStatus="Sconosciuto;Abilitato;Disabilitato dall'utente;Disabilitato dal BIOS (errore POST);Inattivo;Altro".split(";"),DMTFMemType="Sconosciuto;Altro;DRAM;DRAM sincrona;Cache DRAM;EDO;EDRAM;VRAM;SRAM;RAM;rom;Veloce;EEPROM;FEPROM;EPROM;CDRAM;3DRAM;SDRAM;SGRAM;RDRAM;DDR;DDR-2;BRAM;FB-DIMM;DDR3;FBD2;DDR4;LPDDR;LPDDR2;LPDDR3;LPDDR4".split(";"),DMTFMemFormFactor=";Altro;Sconosciuto;SIMM;SORSO;Patata fritta;TUFFO;ZIP;Carta proprietaria;DIMM;TSOP;Fila di patatine;RIMM;SODIMM;SRIMM;FB-DIM".split(";"),
1183 DMTFProcFamilly={191:"Processore Intel&reg; Core &trade; 2 Duo",192:"Processore Intel&reg; Core &trade; 2 Solo",193:"Processore Intel&reg; Core &trade; 2 Extreme",194:"Processore Intel&reg; Core &trade; 2 Quad",195:"Processore mobile Intel&reg; Core &trade; 2 Extreme",196:"Processore mobile Intel&reg; Core &trade; 2 Duo",197:"Processore mobile Intel&reg; Core &trade; 2 Solo",198:"Processore Intel&reg; Core &trade; i7",199:"Processore Intel&reg; Celeron&reg; dual-core"},HardwareInventory;
1163 -function processHardware(b,c,a,d){if(200==d){var g;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("Salva...","SaveHardwareLog()")+" Le informazioni sull'hardware vengono raccolte all'avvio del sistema.");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>piattaforma</h2>"+FullTable({"Modello di computer":c.Model,
1184 +function processHardware(b,c,a,d){if(200==d){var e;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("Salva...","SaveHardwareLog()")+" Le informazioni sull'hardware vengono raccolte all'avvio del sistema.");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>piattaforma</h2>"+FullTable({"Modello di computer":c.Model,
1185 fabbricante:c.Manufacturer,Versione:c.Version,"Numero di serie":c.SerialNumber,"ID di sistema":guidToStr(a.CIM_SystemPackaging.responses[0].PlatformGUID).toLowerCase()},"");b+="<br><h2>zoccolo</h2>";b+=FullTable({fabbricante:d.Manufacturer,"Nome del prodotto":d.Model,Versione:d.Version,"Numero di serie":d.SerialNumber,"Etichetta delle risorse":d.Tag,"Sostituibile?":1==d.CanBeFRUed?"Yes":"No"},"");b+="<br><h2>BIOS</h2>";b+=FullTable({venditore:a.CIM_BIOSElement.response.Manufacturer,Versione:v,"Data di rilascio":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",
1165 -{timeZone:"UTC"})},"");b+="<br>";for(g in a.CIM_Processor.responses)c=a.CIM_Processor.responses[g],d=a.CIM_Chip.responses[g],b+="<h2>Processore "+(parseInt(g)+1)+"</h2>",b+=FullTable({fabbricante:trademarks(d.Manufacturer),Famiglia:DMTFProcFamilly[c.Family],Versione:trademarks(d.Version),"Velocit\u00e0 massima della presa":c.MaxClockSpeed+" MHz",Stato:DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(g in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[g],b+="<h2>Modulo di memoria "+(+g+
1166 -1)+"</h2>",b+=FullTable({"Etichetta bancaria":c.BankLabel,fabbricante:c.Manufacturer,"Numero di serie":c.SerialNumber,Dimensione:parseInt(c.Capacity/1048576)+" MB","Fattore di forma":DMTFMemFormFactor[c.FormFactor],genere:DMTFMemType[c.MemoryType],"Etichetta delle risorse":c.Tag,"Numero parte":c.PartNumber},"");b+="<br>";for(g in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[g],d=a.CIM_PhysicalPackage.responses[+g+1],b+="<h2>Supporti di memorizzazione "+(parseInt(g)+1)+"</h2>",
1167 -b+=FullTable({Modello:d.Model,"Numero di serie":""==d.SerialNumber?"Unknown":d.SerialNumber,Dimensione:parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" MB"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(g in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[g].PackageType&&(c=a.CIM_PhysicalPackage.responses[g]);null!=c&&(b+="<h2>Battery</h2>",g=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,fabbricante:c.Manufacturer,
1168 -"Manufacture date":g,"Numero di serie":c.SerialNumber,genere:"Altro;Sconosciuto;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],"Design capacity":a.CIM_Battery.response.DesignCapacity+" mWatt-hours","Design voltage":a.CIM_Battery.response.DesignVoltage+" mVolts"},c.OtherIdentifyingInfo&&(a["Other Info"]=c.OtherIdentifyingInfo),b+=FullTable(a,""))}b+="<br>";QH(16,b);updateSystemStatus()}}
1186 +{timeZone:"UTC"})},"");b+="<br>";for(e in a.CIM_Processor.responses)c=a.CIM_Processor.responses[e],d=a.CIM_Chip.responses[e],b+="<h2>Processore "+(parseInt(e)+1)+"</h2>",b+=FullTable({fabbricante:trademarks(d.Manufacturer),Famiglia:DMTFProcFamilly[c.Family],Versione:trademarks(d.Version),"Velocit\u00e0 massima della presa":c.MaxClockSpeed+" MHz",Stato:DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(e in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[e],b+="<h2>Modulo di memoria "+(+e+
1187 +1)+"</h2>",b+=FullTable({"Etichetta bancaria":c.BankLabel,fabbricante:c.Manufacturer,"Numero di serie":c.SerialNumber,Dimensione:parseInt(c.Capacity/1048576)+" MB","Fattore di forma":DMTFMemFormFactor[c.FormFactor],genere:DMTFMemType[c.MemoryType],"Etichetta delle risorse":c.Tag,"Numero parte":c.PartNumber},"");b+="<br>";for(e in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[e],d=a.CIM_PhysicalPackage.responses[+e+1],b+="<h2>Supporti di memorizzazione "+(parseInt(e)+1)+"</h2>",
1188 +b+=FullTable({Modello:d.Model,"Numero di serie":""==d.SerialNumber?"Unknown":d.SerialNumber,Dimensione:parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" MB"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(e in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[e].PackageType&&(c=a.CIM_PhysicalPackage.responses[e]);null!=c&&(b+="<h2>Battery</h2>",e=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,fabbricante:c.Manufacturer,
1189 +"Manufacture date":e,"Numero di serie":c.SerialNumber,genere:"Altro;Sconosciuto;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],"Design capacity":a.CIM_Battery.response.DesignCapacity+" mWatt-hours","Design voltage":a.CIM_Battery.response.DesignVoltage+" mVolts"},c.OtherIdentifyingInfo&&(a["Other Info"]=c.OtherIdentifyingInfo),b+=FullTable(a,""))}b+="<br>";QH(16,b);updateSystemStatus()}}
1190 function SaveHardwareLog(){!xxdialogMode&&HardwareInventory&&SaveJsonFile("IntelAmtHardware","hardware","Informazioni sull'hardware Intel AMT",HardwareInventory)}var AmtSystemPowerSchemes=null;function PullPowerPolicy(){amtstack.Enum("AMT_SystemPowerScheme",powerPolicyResponse)}function powerPolicyResponse(b,c,a,d){AmtSystemPowerSchemes=a;updateSystemStatus()}
1191 function showPowerPolicyDlg(b){if(!xxdialogMode){for(var c="",a=0;a<AmtSystemPowerSchemes.length;a++)c+='<input type=radio name=powerpolicy value="'+AmtSystemPowerSchemes[a].InstanceID+'" '+(AmtSystemPowerSchemes[a].SchemeGUID==b?" checked":"")+">"+AmtSystemPowerSchemes[a].Description+"<br>";setDialogMode(11,"Intel&reg; AMT Power Policy",3,showPowerPolicyDlgOk,c)}}
1192 function showPowerPolicyDlgOk(){for(var b=null,c=0,a=document.getElementsByTagName("input");c<a.length;c++)"powerpolicy"==a[c].name&&a[c].checked&&(b=a[c].value);amtstack.AMT_SystemPowerScheme_SetPowerScheme(showPowerPolicyDlgOkDone,b)}function showPowerPolicyDlgOkDone(b,c,a,d){200==d&&PullSystemStatus()}var xxAccountAdminName,xxAccountRealmInfo,xxAccountEnabledInfo={},xxAccountFetch,showHiddenAccounts=!1;
1193 function PullUserInfo(){xxAccountFetch=1;delete xxAccountAdminName;xxAccountRealmInfo={};amtstack.AMT_AuthorizationService_GetAdminAclEntry(getAdminAclEntryResponse);amtstack.AMT_AuthorizationService_EnumerateUserAclEntries(1,enumerateUserAclEntriesResponse)}function getAdminAclEntryResponse(b,c,a,d){200==d&&(xxAccountRealmInfo[-1]={AccessPermission:999,DigestUsername:a.Body.Username,Realms:null},xxAccountAdminName=a.Body.Username,updateAccounts())}
1173 -function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var g in a.Body.Handles)b=a.Body.Handles[g],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1174 -function getUserAclEntryExResponse(b,c,a,d,g){xxAccountFetch--;200==d&&(a.Body.Handle=g,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[g]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,g){200==d&&(xxAccountEnabledInfo[g]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,g){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(g,getAclEnabledStateResponse,g))}
1175 -function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>Gestire gli account utente Intel&reg; AMT per questo computer.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,g=!1,v=0;a.DigestUsername?(d=a.DigestUsername,g="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!g){var n="";if(999!=a.AccessPermission){2==
1176 -v&&(n+="Disabilitato,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Realms[c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="Sindaco,");n=0<=a.Realms.indexOf(3)?n+"Amministratore":1==l?n+"1 regno":n+(l+" regni")}else n+="Amministratore",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!g&&xxAccountAdminName&&(b+=" "+AddButton2("Modificare...",
1194 +function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var e in a.Body.Handles)b=a.Body.Handles[e],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1195 +function getUserAclEntryExResponse(b,c,a,d,e){xxAccountFetch--;200==d&&(a.Body.Handle=e,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[e]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,e){200==d&&(xxAccountEnabledInfo[e]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,e){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(e,getAclEnabledStateResponse,e))}
1196 +function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>Gestire gli account utente Intel&reg; AMT per questo computer.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,e=!1,v=0;a.DigestUsername?(d=a.DigestUsername,e="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!e){var n="";if(999!=a.AccessPermission){2==
1197 +v&&(n+="Disabilitato,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Realms[c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="Sindaco,");n=0<=a.Realms.indexOf(3)?n+"Amministratore":1==l?n+"1 regno":n+(l+" regni")}else n+="Amministratore",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!e&&xxAccountAdminName&&(b+=" "+AddButton2("Modificare...",
1198 "changeAccountButton(event,"+a.Handle+")"));b+='</div><div style=padding-top:3px;width:330px;float:left;overflow-x:hidden title="'+d+'"><b>'+d+"</b></div><div style=padding-top:3px>"+n+"</div></div>"}}c='<div style=float:right;margin-right:8px><a title="Attiva / disattiva account nascosti" style=color:gray;cursor:pointer onclick=toggleAccountButton()>'+(showHiddenAccounts?"&#x25B2;":"&#x25BC;")+"</a></div><div>&nbsp;"+AddRefreshButton("xxAccountFetch=999;PullUserInfo()");xxAccountAdminName&&(c+=AddButton("Nuovo account",
1178 -"newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1199 +"newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(22,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1200 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"Modifica account",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1201 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"Nuovo account",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1181 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,g=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Errore dell'account","Parametri non validi");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1182 -l,n,g,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,g,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}
1183 -function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Amministratore</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1184 -function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["Solo locale","Solo rete","Tutti (locali e di rete)"];
1185 -function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,g=c.DigestUsername;g||(g=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("Nome",g);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("Stato",1==xxAccountEnabledInfo[b].Enabled?"Abilitato":"Disabilitato"));if(g==xxAccountAdminName)a+=addHtmlValue("Autorizzazione","Amministratore");else{var a=a+addHtmlValue("Autorizzazione",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v=
1186 -"Amministratore",0<=c.Realms.indexOf(20)&&(v+=", Revisore contabile");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="Nessuna");a+=addHtmlValue("Realms","")+"<b>"+v+"</b>"}messagebox("account"+g,a+"</div>")}}
1187 -function wsmanQuery(){QH(24,"");var b=getSelectedOptions(Q(22)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(23,!1),c&&0<c.length&&amtstack.BatchEnum("Browser",c,browserResponse,null,!0))}
1188 -function browserResponse(b,c,a,d){QE(23,!0);b="";for(var g in a)c=a[g],b+="<h2>"+g+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(Vuoto)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>Errore n."+c.status+"</div>"),b+="</div><br>";QH(24,b)}
1202 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Errore dell'account","Parametri non validi");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1203 +l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1204 +function updateRealms(b){QV(62,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Amministratore</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(63,c)}}
1205 +function updateAccountDialog(){var b=!0;if("none"!=Q(62).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c106",b)}var xxUserPermissions=["Solo locale","Solo rete","Tutti (locali e di rete)"];
1206 +function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,e=c.DigestUsername;e||(e=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("Nome",e);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("Stato",1==xxAccountEnabledInfo[b].Enabled?"Abilitato":"Disabilitato"));if(e==xxAccountAdminName)a+=addHtmlValue("Autorizzazione","Amministratore");else{var a=a+addHtmlValue("Autorizzazione",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v=
1207 +"Amministratore",0<=c.Realms.indexOf(20)&&(v+=", Revisore contabile");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="Nessuna");a+=addHtmlValue("Realms","")+"<b>"+v+"</b>"}messagebox("account"+e,a+"</div>")}}
1208 +function wsmanQuery(){QH(25,"");var b=getSelectedOptions(Q(23)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(24,!1),c&&0<c.length&&amtstack.BatchEnum("Browser",c,browserResponse,null,!0))}
1209 +function browserResponse(b,c,a,d){QE(24,!0);b="";for(var e in a)c=a[e],b+="<h2>"+e+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(Vuoto)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>Errore n."+c.status+"</div>"),b+="</div><br>";QH(25,b)}
1210 function wsmanFilter(){var b=c0.value.toLowerCase(),c;for(c in AllWsman)QV("WSB-"+AllWsman[c],""==b||0<=AllWsman[c].toLowerCase().indexOf(b))}function connectTerminal(){terminal&&(0==terminal.State?(terminal.tlsv1only=amtstack.wsman.comm.tlsv1only,terminal.Start(currentMeshNode._id,16994,"*","*",0)):terminal.Stop())}
1190 -function onTerminalStateChange(b,c){c4.value=0==c?"Collegare":"Disconnect";Q(29).textContent=StatusStrs[c];QE(34,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection of not supported.");
1191 -break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(31).value="100x30",terminal.m.Init(100,30)):(Q(31).value="80x25",terminal.m.Init(80,25))}
1192 -var terminalEmulations=["Terminale UTF8","ASCII esteso","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(33).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(32).value=["Intel (F10 = ESC + [OM)","Alternativo (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1193 -function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(30).value="LF",terminal.m.lineFeed="\n"):(Q(30).value="CR + LF",terminal.m.lineFeed="\r\n")}
1211 +function onTerminalStateChange(b,c){c4.value=0==c?"Collegare":"Disconnect";Q(30).textContent=StatusStrs[c];QE(35,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection is not supported.");
1212 +break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(32).value="100x30",terminal.m.Init(100,30)):(Q(32).value="80x25",terminal.m.Init(80,25))}
1213 +var terminalEmulations=["Terminale UTF8","ASCII esteso","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(34).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(33).value=["Intel (F10 = ESC + [OM)","Alternativo (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1214 +function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(31).value="LF",terminal.m.lineFeed="\n"):(Q(31).value="CR + LF",terminal.m.lineFeed="\r\n")}
1215 function terminalCaptureToggle(b){if(!xxdialogMode)if(void 0==terminal.m.capture)terminal.m.capture="",c3.value="Stop Capture";else{if(0<terminal.m.capture.length){b="TerminalCapture";var c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);saveAs(data2blob(terminal.m.capture),b+".txt")}delete terminal.m.capture;
1216 c3.value="Avvia acquisizione"}}function terminal_FileSelectHandler(b){haltEvent(b);if(3==terminal.State&&null!=b.dataTransfer&&1==b.dataTransfer.files.length){var c=new FileReader;c.onload=terminal_onSetupBinRead;c.readAsText(b.dataTransfer.files[0])}}function terminal_onSetupBinRead(b){d3pastetextarea.value=b.target.result;setDialogMode(3,"Incolla",3,termPaste)}var desktopScreenInfo=null,desktopPollTimer=null,webRtcDesktop=null;
1217 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1218 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1198 -function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1199 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1219 +function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&(null==amtsysstate||null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&null!=amtsysstate.IPS_OptInService.response&&0!=amtsysstate.IPS_OptInService.response.OptInRequired)?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&
1220 +null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1221 0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1222 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1223 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1224 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
1225 "\r\n"},webRtcDesktop.webrtc.oniceconnectionstatechange=function(){null==webRtcDesktop||null==webRtcDesktop.webrtc||"disconnected"!=webRtcDesktop.webrtc.iceConnectionState&&"failed"!=webRtcDesktop.webrtc.iceConnectionState||webRtcDesktopReset()},webRtcDesktop.webrtc.createOffer(function(a){webRtcDesktop.webrtcoffer=a;webRtcDesktop.webrtc.setLocalDescription(a,function(){},webRtcDesktopReset)},webRtcDesktopReset,{mandatory:{OfferToReceiveAudio:!1,OfferToReceiveVideo:!1}})):"answer"==a.action&&null!=
1205 -webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=
1206 -setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(42).innerHTML="")}
1226 +webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.m.ReverseMouseWheel=desktopsettings.reverseMouseWheel,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),
1227 +PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(43).innerHTML="")}
1228 function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(desktopScreenInfo=a.IPS_ScreenSettingData.responses.Body,desktopScreenInfo.KVMRSD=a.IPS_KVMRedirectionSettingData.responses.Body,UpdateDesktopDisplayInfo())}
1208 -function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1229 +function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(43).innerHTML=b+"&nbsp;":Q(43).innerHTML=""}
1230 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1210 -function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Collegare":"Disconnect";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Desktop remoto","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Desktop remoto","The device indicated that this type of connection of not supported."):5E4==b.disconnectCode?
1211 -messagebox("Desktop remoto","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("Desktop remoto","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;case 3:12<=
1212 -amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1213 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Impostazioni desktop remoto",3,showDesktopSettingsChanged))}
1214 -function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1215 -1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1216 -function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1217 -15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1231 +function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Collegare":"Disconnect";var d=3==c&&!urlvars.kvmviewonly;QE(44,d);QE("deskkeys",d);QE("DeskWD",d);QE(45,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Desktop remoto","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Desktop remoto","The device indicated that this type of connection is not supported."):5E4==b.disconnectCode?
1232 +messagebox("Desktop remoto","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?a=null!=b.connectTime&&b.connectTime+5E3<Date.now():50002==b.disconnectCode&&messagebox("Desktop remoto","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",
1233 +ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(41).textContent=StatusStrs[desktop.State]+b}
1234 +function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Impostazioni desktop remoto",3,showDesktopSettingsChanged))}
1235 +function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.reverseMouseWheel=d7kvmrmw.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();
1236 +desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1237 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;d7kvmrmw.checked=desktopsettings.reverseMouseWheel;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",
1238 +12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1239 c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1219 -QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1220 -function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1221 -"8px"),center()))}
1222 -function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"Voce tastiera remota",3,showDeskTypeEx,'<div>Immettere il testo e fare clic su OK per digitarlo in remoto utilizzando una tastiera inglese statunitense. Assicurarsi di posizionare il cursore remoto nella posizione corretta prima di procedere.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1240 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(44,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1241 +function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1!=urlvars.kvmonly&&disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(36,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding="8px"),center()))}
1242 +function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(45).blur(),setDialogMode(11,"Voce tastiera remota",3,showDeskTypeEx,'<div>Immettere il testo e fare clic su OK per digitarlo in remoto utilizzando una tastiera inglese statunitense. Assicurarsi di posizionare il cursore remoto nella posizione corretta prima di procedere.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1243 var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
1224 -function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(48).checked||desktop.m.sendcad()}
1244 +function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(49).checked||desktop.m.sendcad()}
1245 var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511,0]],2:[[65511,1],[65362,1],[65362,0],[65511,0]],3:[[65511,1],[108,1],[108,0],[65511,0]],4:[[65511,1],[109,1],[109,0],[65511,0]],5:[[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]],6:[[65470,1],[65470,0]],7:[[65471,1],[65471,0]],8:[[65472,1],[65472,0]],9:[[65473,1],[65473,0]],10:[[65474,1],[65474,0]],11:[[65475,1],[65475,0]],12:[[65476,1],[65476,0]],13:[[65477,1],[65477,0]],14:[[65478,1],[65478,0]],15:[[65479,
1226 -1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]]};
1227 -function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1246 +1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]],25:[[65293,1],[65293,0]]};
1247 +function deskSendKeys(){if(!Q(49).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1248 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1229 -function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1230 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1249 +function dmousedown(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1250 +function dmousemove(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1251 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1252 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1253 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1234 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Radice</a>",g=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in g)""!=g[v]&&p24filetreelocation.push(g[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var g=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1235 -70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),e="";null!=l.d&&(e=new Date(l.d),e=e.getMonth()+1+"/"+e.getDate()+"/"+e.getFullYear()+" "+e.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1236 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(g+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+e+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1254 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Radice</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,r;r=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1255 +70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1256 +encodeURIComponent(l.nx)+'")>'+r+"</a></span></div>":(w=r,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+r+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1257 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1258 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1259 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1243,8 +1263,8 @@ d));QE("p24NewFolderButton",0<p24filetreelocation.length||0==d);QE("p24UploadBut
1263 function p24createfolder(){setDialogMode(11,"Nuova cartella",3,p24createfolderEx,"<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% />");focusTextBox("p24renameinput");p24fileNameCheck()}function p24createfolderEx(){p24files.sendCtrlMsg(JSON.stringify({action:"mkdir",reqid:1,path:p24filetreelocation.join("/")+"/"+Q("p24renameinput").value}));p24folderup(999)}
1264 function p24deletefile(){var b=p24getFileSelCount();setDialogMode(11,"Elimina",3,p24deletefileEx,1<b?"Delete "+b+" selected items?":"Delete selected item?")}function p24deletefileEx(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);p24files.sendCtrlMsg(JSON.stringify({action:"rm",reqid:1,path:p24filetreelocation.join("/"),delfiles:b}));p24folderup(999)}
1265 function p24renamefile(){for(var b,c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&(b=p24filetree.dir[c[a].value].n);setDialogMode(11,"Rinominare",3,p24renamefileEx,'<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% value="'+b+'" />',{action:"rename",path:p24filetreelocation.join("/"),oldname:b});focusTextBox("p24renameinput");p24fileNameCheck()}
1246 -function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c54",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1247 -function p24uploadFile(){setDialogMode(11,"Caricare un file",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c54",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1266 +function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c106",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1267 +function p24uploadFile(){setDialogMode(11,"Caricare un file",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c106",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1268 function p24copyFile(b){var c=document.getElementsByName("fd");p24clipboard=[];p24clipboardCut=b;p24clipboardFolder=p24targetpath;for(b=0;b<c.length;b++)c[b].checked&&"3"==c[b].attributes.file.value&&p24clipboard.push(p24filetree.dir[c[b].value].n);p24updateClipview()}
1269 function p24pasteFile(){var b="";null!=p24clipboard&&0<p24clipboard.length&&(b="Confim "+(0==p24clipboardCut?"copy":"move")+" of "+p24clipboard.length+" entrie"+(1<p24clipboard.length?"s":"")+" to this location?");setDialogMode(11,"Incolla",3,p24pasteFileEx,b)}
1270 function p24pasteFileEx(){p24files.sendCtrlMsg(JSON.stringify({action:0==p24clipboardCut?"copy":"move",reqid:1,scpath:p24clipboardFolder,dspath:p24targetpath,names:p24clipboard}));p24folderup(999);1==p24clipboardCut&&(p24clipboardFolder=p24clipboard=null,p24clipboardCut=0,p24updateClipview())}
@@ -1268,35 +1288,35 @@ function iderStart2(){if(1!=Q("floppyImageInput").files.length&&1!=Q("cdromImage
1288 function iderStart3(b,c,a){iderStop();ider=CreateAmtRedirect(CreateAmtRemoteIder());ider.onStateChanged=onIderStateChange;ider.m.floppy=b;ider.m.cdrom=c;ider.m.iderStart=a;ider.m.sectorStats=iderSectorStats;ider.tlsv1only=amtstack.wsman.comm.tlsv1only;ider.Start(currentMeshNode._id,16994,"*","*",0);QV("IDERDiskMapButton",!0)}
1289 function iderStop(){ider&&(ider.m.Stop(),ider.onStateChanged=null,ider.m.onDialogPrompt=null,delete ider);iderTimer&&(clearInterval(iderTimer),delete iderTimer);iderToggleDiskMap(!1)}function onIderStateChange(b,c){QE("c2",3!=c);QE("c8",3!=c);QE("c1",3!=c);QE("c7",3!=c);QV(9,3==c);center();3==c?(urlvars.norefresh||(iderTimer=setInterval(onIderTimer,500)),onIderTimer()):iderTimer&&(clearInterval(iderTimer),delete iderTimer)}
1290 function onIderTimer(){ider.m.Update&&ider.m.Update();-1==ider.m.bytesFromAmt?iderStop():QH(10,"<b>"+(ider.m.server?"server":"")+"Sessione IDE-R </b>, connessa,"+ider.m.bytesFromAmt+" in,"+ider.m.bytesToAmt+" su.")}var heatMapWidth=600,heatMapDividor={};
1271 -function iderSectorStats(b,c,a,d,g){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </b>, i blocchi sono {0} byte.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> Floppy </b>, i blocchi sono {0} byte.",512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;g/=c;if(0==b)v.height=6*(Math.floor(a/
1272 -(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+g;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1291 +function iderSectorStats(b,c,a,d,e){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </b>, i blocchi sono {0} byte.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> Floppy </b>, i blocchi sono {0} byte.",512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;e/=c;if(0==b)v.height=6*(Math.floor(a/
1292 +(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+e;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1293 function iderToggleDiskMap(b){var c="none"!=QS("iderHeatmap").display;null==b&&(b=!c);xxdialogMode&&(b=!1);QS("iderHeatmap").display=b?"":"none"}function onIderDialogPrompt(b,c,a){iderCodeBlock&&(document.body.removeChild(iderCodeBlock),delete iderCodeBlock);c.js&&(b=document.createElement("script"),b.text=c.js,iderCodeBlock=document.body.appendChild(b));setDialogMode(11,"Reindirizzamento archiviazione",a?a:3,onIderDialogPromptOk,c.html)}
1294 function onIderDialogPromptOk(b){1==b?window.iderServerCall?ider.m.dialogPrompt(window.iderServerCall()):ider.m.dialogPrompt():iderStop()}function iderServerStart(){xxdialogMode||(iderStop(),ider=CreateAmtRemoteServerIder(),null!=ider&&(ider.onStateChanged=onIderStateChange,ider.m.sectorStats=iderSectorStats,ider.m.onDialogPrompt=onIderDialogPrompt,ider.tlsv1only=amtstack.wsman.comm.tlsv1only,ider.Start(currentMeshNode._id,16994,"*","*",0)))}
1295 var xxRemoteAccess=null,xxEnvironementDetection=null,xxCiraServers=null,xxUserInitiatedCira=null,xxUserInitiatedEnabledState={32768:"Disabilitato",32769:"BIOS abilitato",32770:"Abilitazione SO",32771:"BIOS e sistema operativo abilitati"},xxRemoteAccessCredentiaLinks=null,xxMPSUserPass=null,xxPolicies=null;
1296 function PullRemoteAccess(){var b="*AMT_EnvironmentDetectionSettingData AMT_ManagementPresenceRemoteSAP AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule *AMT_UserInitiatedConnectionService AMT_MPSUsernamePassword".split(" ");11<amtversion&&b.push("*IPS_HTTPProxyService","IPS_HTTPProxyAccessPoint");amtstack.BatchEnum(null,b,processRemote1)}
1277 -function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var g in a)200!=a[g].status&&(d=a[g].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1278 -MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(g in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[g],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1297 +function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var e in a)200!=a[e].status&&(d=a[e].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1298 +MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(e in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[e],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1299 "@Name","Name").Value)),b.MpsType=c.MpsType,c=getItem(c.PolicySet.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyRuleName").Value.split(" ")[0],xxPolicies[c].push(b);updateRemoteAccess()}}
1300 function updateRemoteAccess(){if(null!=xxEnvironementDetection){var b,c="Disabilitato",a=xxRemoteAccess.IPS_HTTPProxyService&&xxRemoteAccess.IPS_HTTPProxyAccessPoint;xxEnvironementDetection.DetectionStrings&&0<xxEnvironementDetection.DetectionStrings.length&&(c="Abilitato,"+xxEnvironementDetection.DetectionStrings.length+" "+(1<xxEnvironementDetection.DetectionStrings.length?"domains":"domain"));b=""+TableStart();b+=TableEntry("Rilevazione dell'ambiente",addLink(c,"editEnvironmentDetection()"));b+=
1301 TableEntry("Opzioni di avvio dell'utente",addLinkConditional(xxUserInitiatedEnabledState[xxUserInitiatedCira.EnabledState],"editUserInitiatedCira()",xxAccountAdminName));c="<i>Nessuna</i>";if(0<xxPolicies.User.length){var c="",d;for(d in xxPolicies.User)0<c.length&&(c+=", "),c+=xxPolicies.User[d].AccessInfo,1==xxPolicies.User[d].MpsType&&(c+=" (CILA)")}b+=TableEntry("Connessione avviata dall'utente",addLinkConditional(c,'editMpsPolicy("User")',xxAccountAdminName));c="<i>Nessuna</i>";if(0<xxPolicies.Alert.length)for(d in c=
1282 -"",xxPolicies.Alert)0<c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("Connessione avviata da avviso",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>Nessuna</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var g=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",
1283 -"periodico");if(g){var v=atob(g.ExtendedData);0==ReadInt(v,0)&&(c+=format(", ogni {0} secondi",ReadInt(v,4)));1==ReadInt(v,0)&&(g=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+g+":"+v+" daily")}b+=TableEntry("Connessione periodica",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Gestire i server di gestione remota Intel&reg; AMT.<br><br>";if(0==xxCiraServers.length)b+="<div style=padding-left:15px><br><i>Nessun server remoto trovato.</i></div><br>";
1302 +"",xxPolicies.Alert)0<c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("Connessione avviata da avviso",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>Nessuna</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var e=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",
1303 +"periodico");if(e){var v=atob(e.ExtendedData);0==ReadInt(v,0)&&(c+=format(", ogni {0} secondi",ReadInt(v,4)));1==ReadInt(v,0)&&(e=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+e+":"+v+" daily")}b+=TableEntry("Connessione periodica",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Gestire i server di gestione remota Intel&reg; AMT.<br><br>";if(0==xxCiraServers.length)b+="<div style=padding-left:15px><br><i>Nessun server remoto trovato.</i></div><br>";
1304 else for(d in xxCiraServers)c=":"+xxCiraServers[d].Port,xxCiraServers[d].CN&&(c+=", "+xxCiraServers[d].CN),b+="<div class=itemBar onclick=showServerDetails("+d+")><div style=padding-top:3px><b>"+xxCiraServers[d].AccessInfo+"</b>"+EscapeHtml(c)+"</div></div>";if(a)if(b+="<br>Gestire i proxy HTTP utilizzati per le connessioni di gestione.<br><br>",c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses,0==c.length)b+="<div style=padding-left:15px><br><i>Nessun proxy configurato.</i></div><br>";else for(d in c)b+=
1285 -"<div class=itemBar onclick=showProxyDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(c[d].AccessInfo)+":"+c[d].Port+"</b> / "+EscapeHtml(c[d].NetworkDnsSuffix)+"</div></div>";d="";xxAccountAdminName&&(d=AddButton("Aggiungi server...","AddRemoteAccessServer()"),a&&(d+=AddButton("Aggiungi proxy ...","AddRemoteAccessProxy()")));b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+d);QH(52,b)}}var xxEditMpsPolicyType;
1286 -function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="Utente avviato");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(Nessuna)",g;for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[g].Name?" selected":"")+">"+xxCiraServers[g].AccessInfo;
1305 +"<div class=itemBar onclick=showProxyDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(c[d].AccessInfo)+":"+c[d].Port+"</b> / "+EscapeHtml(c[d].NetworkDnsSuffix)+"</div></div>";d="";xxAccountAdminName&&(d=AddButton("Aggiungi server...","AddRemoteAccessServer()"),a&&(d+=AddButton("Aggiungi proxy ...","AddRemoteAccessProxy()")));b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+d);QH(53,b)}}var xxEditMpsPolicyType;
1306 +function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="Utente avviato");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(Nessuna)",e;for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[e].Name?" selected":"")+">"+xxCiraServers[e].AccessInfo;
1307 c+="</select><div>Server primario</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Esterno<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA - Interno</select><div>Tipo di MPS primario</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";c+="<option value=-1>(Nessuna)";
1288 -for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[g].Name?" selected":"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>Server secondario</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Esterno<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA - Interno</select><div>Tipo di MPS secondario</div></div>")}g=
1289 -0;d&&(g=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+g+">";c+="<div>Durata del tunnel (secondi)</div></div>";"Periodic"==b&&(a=0,g=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),g=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),g+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">Periodico, intervallo di tempo<option value=1"+
1290 -(1==a?" selected":"")+">Ora del giorno, una volta al giorno",c+="</select><div>Tipo di trigger</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+g+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0} Connessione",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1291 -function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c54",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1308 +for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[e].Name?" selected":"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>Server secondario</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Esterno<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA - Interno</select><div>Tipo di MPS secondario</div></div>")}e=
1309 +0;d&&(e=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+e+">";c+="<div>Durata del tunnel (secondi)</div></div>";"Periodic"==b&&(a=0,e=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),e=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),e+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">Periodico, intervallo di tempo<option value=1"+
1310 +(1==a?" selected":"")+">Ora del giorno, una volta al giorno",c+="</select><div>Tipo di trigger</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+e+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0} Connessione",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1311 +function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c106",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1312 -1!=Q("d2server1").value),QH("ttypelabel",0==Q("d2ttype").value?"Intervallo di trigger (secondi)":"Ora del giorno (HH: MM)"),QE("d2ttype",-1!=Q("d2server1").value));QE("d2lifetime",-1!=Q("d2server1").value);b&&(QE("d2server1cira",-1<Q("d2server1").value),1<xxCiraServers.length&&QE("d2server2cira",-1<Q("d2server1").value&&-1<Q("d2server2").value))}
1313 function editMpsPolicyOk(){var b=xxEditMpsPolicyType;"User"==b&&(b="User Initiated");getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",b)?amtstack.Delete("AMT_RemoteAccessPolicyRule",{PolicyRuleName:b},editMpsPolicyOk2):editMpsPolicyOk2()}
1294 -function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var g,v;0<=Q("d2server1").value&&(g='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1314 +function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var e,v;0<=Q("d2server1").value&&(e='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1315 xxCiraServers[Q("d2server1").value].Name+"</Selector></SelectorSet></ReferenceParameters>");0<=Q("d2server1").value&&1<xxCiraServers.length&&0<=Q("d2server2").value&&(v='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1296 -xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?g&&(0==Q("d2server1cira").value?d.push(g):n.push(g),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):g&&(d.push(g),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1316 +xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?e&&(0==Q("d2server1cira").value?d.push(e):n.push(e),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):e&&(d.push(e),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1317 function editEnvironmentDetection(b){1!=b&&(editEnvironmentDetectionTmp=xxEnvironementDetection.DetectionStrings?Clone(xxEnvironementDetection.DetectionStrings):[]);var c="";xxAccountAdminName&&(c+="Immettere fino a 5 suffissi di dominio Intranet. Se il computer si trova al di fuori di questi domini, le porte locali Intel&reg; AMT verranno chiuse e le connessioni del server remoto saranno attive.<br><br>");0==editEnvironmentDetectionTmp.length&&(c+="<i>Nessun dominio intranet, Rilevamento ambiente disabilitato.</i><br>");
1318 for(var a in editEnvironmentDetectionTmp)c+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Rimuovere","editEnvironmentDetectionRemove("+a+")")+'</div><div style=padding-top:3px;max-width:260px;overflow:hidden title="'+editEnvironmentDetectionTmp[a]+'"><b>'+editEnvironmentDetectionTmp[a]+"</b></div></div>";xxAccountAdminName&&5>editEnvironmentDetectionTmp.length&&(c+="<br><input id=edInput placeholder=intranet.org style=width:276px onkeyup=edInputChg() maxlength=63><input type=button id=edAdd value=Add style=width:80px;margin-left:5px onclick=editEnvironmentDetectionAdd()>");
1299 -1==b?QH(63,c):setDialogMode(11,"Rilevamento dell'ambiente",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1319 +1==b?QH(64,c):setDialogMode(11,"Rilevamento dell'ambiente",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1320 function editEnvironmentDetectionDlg2(b,c,a,d){200!=d?messagebox("Rilevamento dell'ambiente",format("Impossibile aggiungere il server, stato {0}",d)):a.Body.ReturnValue&&0!=a.Body.ReturnValue?messagebox("Rilevamento dell'ambiente",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}function edInputChg(){5>editEnvironmentDetectionTmp.length&&QE("edAdd",0<Q("edInput").value.length)}
1321 function editEnvironmentDetectionAdd(){editEnvironmentDetectionTmp.push(Q("edInput").value);editEnvironmentDetection(1)}function editEnvironmentDetectionRemove(b){editEnvironmentDetectionTmp.splice(b,1);editEnvironmentDetection(1)}
1322 function editUserInitiatedCira(){if(!xxdialogMode){var b="",c;for(c in xxUserInitiatedEnabledState)b+="<input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxUserInitiatedCira.EnabledState==c?"checked":"")+">"+xxUserInitiatedEnabledState[c]+"<br>";setDialogMode(11,"Tunnel avviato dall'utente",3,editUserInitiatedCiraDlg,b)}}
@@ -1309,7 +1329,7 @@ function showProxyDetails(b){var c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.respo
1329 function showProxyDetailsOk(b,c){var a=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses[c];2==b&&amtstack.Delete("IPS_HTTPProxyAccessPoint",{Name:a.Name},showProxyDetailsOk2)}function showProxyDetailsOk2(b,c,a,d){408==d?messagebox("Rimozione proxy HTTP","Impossibile rimuovere il proxy HTTP, accesso negato."):PullRemoteAccess()}
1330 function AddRemoteAccessProxy(){var b;b='<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessProxyUpdate()><option value=2>Nome host FQDN<option value=3>Indirizzo IPv4<option value=4>Indirizzo IPv6</select><div>Tipo di connessione</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>Porta</div></div>';b+=
1331 "<div style=height:26px><input id=d2domain style=float:right;width:200px maxlength=191 onkeyup=AddRemoteAccessProxyUpdate()><div>Suffisso DNS</div></div>";setDialogMode(11,"Aggiungi proxy HTTP",3,AddRemoteAccessProxyOk,b);AddRemoteAccessProxyUpdate()}
1312 -function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c54",b);QH("d2typespan",["","","FQDN / nome host","Indirizzo IPv4","Indirizzo IPv6"][Q("d2type").value])}function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
1332 +function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c106",b);QH("d2typespan",["","","FQDN / nome host","Indirizzo IPv4","Indirizzo IPv6"][Q("d2type").value])}function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
1333 function AddRemoteAccessProxyOk2(b,c,a,d){200!=d?messagebox("Aggiungi server proxy","Impossibile aggiungere proxy, stato"+d):0!=a.Body.ReturnValue?messagebox("Aggiungi server proxy",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1334 function AddRemoteAccessServer(){var b=[],c;for(c in xxCertificates)xxCertificates[c].XPrivateKey&&b.push(xxCertificates[c]);var a;a="<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()><option value=201>Nome host FQDN<option value=3>Indirizzo IPv4</select><div>Tipo di connessione</div></div><div style=height:26px><input id=d2name style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div id=d2lname></div></div>";a+='<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>Porta del server</div></div>';
1335 a+="<div style=height:26px id=d2ucn><input id=d2cn style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Nome comune del server</div></div>";a+="<div style=height:26px><select id=d2auth style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()>";0<b.length&&(a+="<option value=1>Certificato");a+="<option value=2>Nome utente / password</select><div>Tipo di autenticazione</div></div>";a+="<span id=d2utype>";a+="<div style=height:26px><input id=d2user style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Nome utente</div></div>";
@@ -1319,84 +1339,87 @@ function AddRemoteAccessServerOk(){var b,c,a,d;1==Q("d2auth").value?b='<Address
1339 "</Selector></SelectorSet></ReferenceParameters>":(c=Q("d2user").value,a=Q("d2pass").value);0<Q("d2cn").value.length&&(d=Q("d2cn").value);amtstack.AMT_RemoteAccessService_AddMpServer(Q("d2name").value,Q("d2type").value,Q("d2port").value,Q("d2auth").value,b,c,a,d,AddRemoteAccessServerOk2)}
1340 function AddRemoteAccessServerOk2(b,c,a,d){200!=d?messagebox("Aggiungi Internet Server",format("Impossibile aggiungere il server, stato {0}",d)):0!=a.Body.ReturnValue?messagebox("Aggiungi Internet Server",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1341 function AddRemoteAccessServerUpdate(){var b=0!=Q("d2name").value.length;3==Q("d2type").value&&1==b&&(b=0!=Q("d2cn").value.length);2==Q("d2auth").value&&1==b&&(b=0!=Q("d2user").value.length&&passwordcheck(Q("d2pass").value));if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;if(-1!=Q("d2name").value.indexOf(":")||3==Q("d2type").value&&-1!=Q("d2cn").value.indexOf(":"))b=!1;QH("d2lname",201==Q("d2type").value?"Nome host":"Indirizzo IPv4");QV("d2utype",2==Q("d2auth").value);QV("d2ucn",
1322 -3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c54",b)}
1342 +3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c106",b)}
1343 function showEditNameDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_GeneralSettings.response.HostName,a=amtsysstate.AMT_GeneralSettings.response.DomainName;null!=a&&0<a.length&&(c+="."+a);c='<br><div style=height:26px><input id=d11name value="'+c+'" style=float:right;width:200px><div>Nome e dominio</div></div>';1==b&&(b=1==amtsysstate.AMT_GeneralSettings.response.SharedFQDN,c+="<div style=height:26px><select id=d11fqdn style=float:right;width:200px><option value=true "+(b?"selected":"")+'>Condiviso, come il sistema operativo<option value="false" '+
1344 (b?"":"selected")+">Dedicato, diverso dal sistema operativo</select><div>Condivisione del nome</div></div>");setDialogMode(11,"Nome del computer",3,editNameDlgOk,c)}}
1345 function editNameDlgOk(){var b=Q("d11name").value,c=b.indexOf("."),a="";0<=c&&(a=b.substring(c+1),b=b.substring(0,c));c=Clone(amtsysstate.AMT_GeneralSettings.response);c.HostName=b;c.DomainName=a;Q("d11fqdn")&&(c.SharedFQDN=d11fqdn.value);amtstack.Put("AMT_GeneralSettings",c,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}function computerNameGet(b,c,a,d){200==d&&(amtsysstate.AMT_GeneralSettings.response=a.Body,updateSystemStatus())}
1326 -function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c36.value=c;c37.value=b.DDNSPeriodicUpdateInterval;c38.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"Client DNS dinamico",3,showEditDnsDlgOk)}}
1327 -function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c36.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c36.value?!0:!1;2==c36.value&&(b.DDNSPeriodicUpdateInterval=c37.value,b.DDNSTTL=c38.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1328 -function showEditDnsDlgChange(){QE("c37",2==c36.value);QE("c38",2==c36.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"Funzionalit\u00e0 Intel&reg; AMT",3,featuresDlgOk))}
1329 -function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,g){200!=g?messagebox("Errore","RedirectionService, RequestStateChange Error"+g):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,g){200!=g?messagebox("Errore","KVMRedirectionSAP, errore RequestStateChange"+
1330 -g):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("Errore","Errore PUT RedirectionService"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1331 -function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c49.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c50.checked=!c49.checked),c51.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c52.checked=!c51.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1346 +function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c61.value=c;c62.value=b.DDNSPeriodicUpdateInterval;c63.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"Client DNS dinamico",3,showEditDnsDlgOk)}}
1347 +function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c61.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c61.value?!0:!1;2==c61.value&&(b.DDNSPeriodicUpdateInterval=c62.value,b.DDNSTTL=c63.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1348 +function showEditDnsDlgChange(){QE("c62",2==c61.value);QE("c63",2==c61.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"Funzionalit\u00e0 Intel&reg; AMT",3,featuresDlgOk))}
1349 +function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,e){200!=e?messagebox("Errore","RedirectionService, RequestStateChange Error"+e):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,e){200!=e?messagebox("Errore","KVMRedirectionSAP, errore RequestStateChange"+
1350 +e):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("Errore","Errore PUT RedirectionService"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1351 +function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c74.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c75.checked=!c74.checked),c76.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c77.checked=!c76.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1352 function showEnableBootServiceDlgOk(){var b=32768+parseInt(document.querySelector("input[name=d26a]:checked").value);15<amtversion&&(b+=parseInt(document.querySelector("input[name=d26b]:checked").value));amtstack.CIM_BootService_RequestStateChange(b,null,showEnableBootServiceDlgResponse,b)}
1333 -function showEnableBootServiceDlgResponse(b,c,a,d,g){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,g),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1334 -function showEnableBootServiceDlgResponse2(b,c,a,d,g){200==d&&a.Body.EnabledState!=g&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"Consenso dell'utente",3,consentDlgOk)}}
1353 +function showEnableBootServiceDlgResponse(b,c,a,d,e){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,e),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1354 +function showEnableBootServiceDlgResponse2(b,c,a,d,e){200==d&&a.Body.EnabledState!=e&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"Consenso dell'utente",3,consentDlgOk)}}
1355 function consentDlgOk(){amtsysstate.IPS_OptInService.response.OptInRequired=document.querySelector("input[name=d10]:checked").value;amtstack.Put("IPS_OptInService",amtsysstate.IPS_OptInService.response,function(){amtstack.Get("IPS_OptInService",consentGet,0,1)},0,1)}function consentGet(b,c,a,d){200==d&&PullSystemStatus()}var ipv6addrtype="Link indirizzo locale;Indirizzo locale di rete;Indirizzo globale;Configurato dall'utente;Non autorizzato;DAD in corso;valido;deprecato;preferito / obsoleto;scaduto;collisione;non autorizzato".split(";");
1356 function showIPv6AddrDlg(b,c){if(!xxdialogMode){var a=TableStart();t=c.split(",");for(var d=0;d<t.length;d+=3)a+=TableEntry("<b>"+t[d]+"</b><br><span style=font-size:10px>"+ipv6addrtype[t[d+1]]+","+ipv6addrtype[+t[d+2]+5]+"</span>","");setDialogMode(11,0==b?"Indirizzi IPv6 per interfaccia cablata":"Indirizzi IPv6 per interfaccia wireless",1,null,a+TableEnd())}}
1337 -function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(69,0==b);QV(70,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 disabilitato");QH("d21l1","IPv6 abilitato, automatico");QH("d21l2","IPv6 abilitato, automatico + indirizzo manuale");d21o0.checked=!c;d21o1.checked=c&&!ipv6manual;
1338 -d21o2.checked=c&&ipv6manual;c31.value=isIpAddress(a.IPv6Address,"");c33.value=isIpAddress(a.DefaultRouter,"");c34.value=isIpAddress(a.PrimaryDNS,"");c35.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"Supporto IPv6 per interfaccia cablata":"Supporto IPv6 per interfaccia wireless",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1339 -function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c31.value?"::":c31.value.toLocaleLowerCase(),a.DefaultRouter=""==c33.value?"::":c33.value.toLocaleLowerCase(),
1340 -a.PrimaryDNS=""==c34.value?"::":c34.value.toLocaleLowerCase(),a.SecondaryDNS=""==c35.value?"::":c35.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1341 -"CreationClassName").Value,g=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1342 -d+'</w:Selector><w:Selector Name="DeviceID">'+g+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1343 -b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",g=Clone(c[a]);g.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",g,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Supporto IPv6",format("Impossibile impostare lo stato IPv6, errore {0}",d))}
1357 +function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(68,0==b);QV(69,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 disabilitato");QH("d21l1","IPv6 abilitato, automatico");QH("d21l2","IPv6 abilitato, automatico + indirizzo manuale");d21o0.checked=!c;d21o1.checked=c&&!ipv6manual;
1358 +d21o2.checked=c&&ipv6manual;c56.value=isIpAddress(a.IPv6Address,"");c58.value=isIpAddress(a.DefaultRouter,"");c59.value=isIpAddress(a.PrimaryDNS,"");c60.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"Supporto IPv6 per interfaccia cablata":"Supporto IPv6 per interfaccia wireless",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1359 +function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c56.value?"::":c56.value.toLocaleLowerCase(),a.DefaultRouter=""==c58.value?"::":c58.value.toLocaleLowerCase(),
1360 +a.PrimaryDNS=""==c59.value?"::":c59.value.toLocaleLowerCase(),a.SecondaryDNS=""==c60.value?"::":c60.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1361 +"CreationClassName").Value,e=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1362 +d+'</w:Selector><w:Selector Name="DeviceID">'+e+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1363 +b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",e=Clone(c[a]);e.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",e,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Supporto IPv6",format("Impossibile impostare lo stato IPv6, errore {0}",d))}
1364 function showPingActionDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,b=(1==b.PingResponseEnabled)+((1==b.RmcpPingResponseEnabled)<<1);d20a.checked=0==b;d20b.checked=1==b;d20c.checked=2==b;d20d.checked=3==b;setDialogMode(20,"Risposta al ping Intel&reg; AMT",3,showPingActionDlgOk)}}
1365 function showPingActionDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response),c=document.querySelector("input[name=d20]:checked").value;b.PingResponseEnabled=0!=(c&1);b.RmcpPingResponseEnabled=0!=(c&2);amtstack.Put("AMT_GeneralSettings",b,PullSystemStatus,0,1)}
1346 -function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(68,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(69,!0);QV(70,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","Configurazione automatica tramite server DHCP");QH("d21l2","Configurazione statica utilizzando le impostazioni IPv4 di seguito");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=!d21o1.checked;c31.value=
1347 -isIpAddress(b.IPAddress,"");c32.value=isIpAddress(b.SubnetMask,"");c33.value=isIpAddress(b.DefaultGateway,"");c34.value=isIpAddress(b.PrimaryDNS,"");c35.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"Impostazioni IPv4",3,showIPSetupDlgOk)}}
1348 -function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6 abilitato, automatico + indirizzo manuale"==Q("d21l2").innerHTML&&2>c31.value.split(":").length&&(b=!1);QE("c54",b);c31.disabled=c32.disabled=c33.disabled=c34.disabled=c35.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1349 -function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c31.value,b.SubnetMask=c32.value,b.DefaultGateway=c33.value,""!=c34.value&&(b.PrimaryDNS=c34.value),""!=c35.value&&
1350 -(b.SecondaryDNS=c35.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Impostazioni IPv4",format("Impossibile impostare i parametri di rete, errore {0}",d))}amtPowerBootCapabilities=null;function showPowerActionDlg(){xxdialogMode||(statusbox("Azioni di potere","Verifica delle funzionalit\u00e0 ..."),amtstack.Get("AMT_BootCapabilities",powerActionResponse00,0,1))}
1351 -function powerActionResponse00(b,c,a,d){if(200==d){b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(g){}amtPowerBootCapabilities=a.Body;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","Accendere",2);b&1&&(addOption("d5actionSelect","Ripristina",10),addOption("d5actionSelect","Ciclo di alimentazione",5),addOption("d5actionSelect","Spegnere",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect","Accendi la diagnostica",
1352 -300),b&1&&addOption("d5actionSelect","Ripristina diagnostica",301));9<amtversion&&b&1&&(addOption("d5actionSelect","OS Wake from Standby",500),addOption("d5actionSelect","Risparmio energetico del sistema operativo",501),addOption("d5actionSelect","Soft-off",12),addOption("d5actionSelect","Soft-reset",14),addOption("d5actionSelect","Dormire",4),addOption("d5actionSelect","Hibernate",7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&addOption("d5actionSelect","Accensione al BIOS",100),b&1&&addOption("d5actionSelect",
1353 -"Ripristina al BIOS",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","Accensione per Cancellazione sicura",104),b&1&&addOption("d5actionSelect","Ripristina per cancellare sicura",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",106),b&1&&addOption("d5actionSelect",
1354 -"Reset to Platform Erase",107));b&1&&addOption("d5actionSelect","Ripristina IDE-R Floppy",200);b&2&&addOption("d5actionSelect","Accendi IDE-R Floppy",201);b&1&&addOption("d5actionSelect","Ripristinare su IDE-R CDROM",202);b&2&&addOption("d5actionSelect","Accendere il CD-ROM IDE-R",203);b&1&&addOption("d5actionSelect","Ripristina su PXE",400);b&2&&addOption("d5actionSelect","Accendere a PXE",401);addOption("d5actionSelect","Azione personalizzata ...",999);5<amtversion&&addOption("d5actionSelect","Consenso dell'utente ...",
1355 -998);setDialogMode(5,"Azioni di potere",3,powerActionDlgCheck)}else messagebox("Azione di potere",format("Impossibile ottenere le funzionalit\u00e0 di sistema, errore {0}",d))}
1356 -function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"Azione di potenza completata."):QH(60,format("Errore azione alimentazione # {0}.",g));setDialogMode(1,"Azione di potere",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Conferma l'esecuzione di Intel&reg; Remote Secure Erase?<br>Immettere la password di cancellazione sicura, se necessario.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Parola d'ordine</div></div><br><div style=color:red><b> ATTENZIONE: </b> Questo canceller\u00e0 i dati sul sistema remoto.</div>",
1366 +function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(67,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(68,!0);QV(69,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","Configurazione automatica tramite server DHCP");QH("d21l2","Configurazione statica utilizzando le impostazioni IPv4 di seguito");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=!d21o1.checked;c56.value=
1367 +isIpAddress(b.IPAddress,"");c57.value=isIpAddress(b.SubnetMask,"");c58.value=isIpAddress(b.DefaultGateway,"");c59.value=isIpAddress(b.PrimaryDNS,"");c60.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"Impostazioni IPv4",3,showIPSetupDlgOk)}}
1368 +function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6 abilitato, automatico + indirizzo manuale"==Q("d21l2").innerHTML&&2>c56.value.split(":").length&&(b=!1);QE("c106",b);c56.disabled=c57.disabled=c58.disabled=c59.disabled=c60.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1369 +function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c56.value,b.SubnetMask=c57.value,b.DefaultGateway=c58.value,""!=c59.value&&(b.PrimaryDNS=c59.value),""!=c60.value&&
1370 +(b.SecondaryDNS=c60.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Impostazioni IPv4",format("Impossibile impostare i parametri di rete, errore {0}",d))}amtPowerBootCapabilities=null;function showPowerActionDlg(){xxdialogMode||(statusbox("Azioni di potere","Verifica delle funzionalit\u00e0 ..."),amtstack.Get("AMT_BootCapabilities",powerActionResponse00,0,1))}
1371 +function showPowerActionDlg(){if(!xxdialogMode){var b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(c){}amtPowerBootCapabilities=amtsysstate.AMT_BootCapabilities.response;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","Accendere",2);b&1&&(addOption("d5actionSelect","Ripristina",10),addOption("d5actionSelect","Ciclo di alimentazione",5),addOption("d5actionSelect","Spegnere",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect",
1372 +"Accendi la diagnostica",300),b&1&&addOption("d5actionSelect","Ripristina diagnostica",301));9<amtversion&&b&1&&(addOption("d5actionSelect","OS Wake from Standby",500),addOption("d5actionSelect","Risparmio energetico del sistema operativo",501),addOption("d5actionSelect","Soft-off",12),addOption("d5actionSelect","Soft-reset",14),addOption("d5actionSelect","Dormire",4),addOption("d5actionSelect","Hibernate",7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&addOption("d5actionSelect","Accensione al BIOS",
1373 +100),b&1&&addOption("d5actionSelect","Ripristina al BIOS",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","Accensione per Cancellazione sicura",104),b&1&&addOption("d5actionSelect","Ripristina per cancellare sicura",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",
1374 +106),b&1&&addOption("d5actionSelect","Reset to Platform Erase",107));b&1&&addOption("d5actionSelect","Ripristina IDE-R Floppy",200);b&2&&addOption("d5actionSelect","Accendi IDE-R Floppy",201);b&1&&addOption("d5actionSelect","Ripristinare su IDE-R CDROM",202);b&2&&addOption("d5actionSelect","Accendere il CD-ROM IDE-R",203);b&1&&addOption("d5actionSelect","Ripristina su PXE",400);b&2&&addOption("d5actionSelect","Accendere a PXE",401);addOption("d5actionSelect","Azione personalizzata ...",999);5<amtversion&&
1375 +addOption("d5actionSelect","Consenso dell'utente ...",998);setDialogMode(5,"Azioni di potere",3,powerActionDlgCheck)}}
1376 +function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"Azione di potenza completata."):QH(61,format("Errore azione alimentazione # {0}.",e));setDialogMode(1,"Azione di potere",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Conferma l'esecuzione di Intel&reg; Remote Secure Erase?<br>Immettere la password di cancellazione sicura, se necessario.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Parola d'ordine</div></div><br><div style=color:red><b> ATTENZIONE: </b> Questo canceller\u00e0 i dati sul sistema remoto.</div>",
1377 rsepass=1,setDialogMode(11,"Azioni di potere",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1358 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> ATTENZIONE: </b> Questo canceller\u00e0 i dati sul sistema remoto.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");
1359 -d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password",
1360 -"<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Azioni di potere",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1361 -function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,g=[1,2,6,25,26,31],v;for(v in g)d&1<<g[v]&&Q("rpef"+g[v]).checked&&(a+=1<<g[v]);d=makeUefiBootParam(1,a,4);g=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),g++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),g++);platfromEraseTLV={tlv:btoa(d),tlvlen:g};c?(statusbox("Azione di potere","Verifica dello stato ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1378 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> ATTENZIONE: </b> Questo canceller\u00e0 i dati sul sistema remoto.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&8&&a.push("<label><input id=rpef3 type=checkbox onchange=powerActionDlgRPEValidate()>Verify Storage Erase</label>");
1379 +d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&65536&&a.push("<label><input id=rpef16 type=checkbox onchange=powerActionDlgRPEValidate()>OEM Custom Action</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&
1380 +-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");0<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+
1381 +addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpeeomdata style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("OEM Data (HEX)","<input id=rpeoemdatax style=width:210px maxlength=256 type=input>")+"</div>";setDialogMode(11,"Azioni di potere",3,powerActionDlgRPEEx,c,b);QE("c106",!1)}
1382 +function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,3,6,16,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QV("rpeeomdata",b&65536);QE("c106",b)}var platfromEraseTLV=null;
1383 +function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,3,6,16,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);a&65536&&""!=Q("rpeoemdatax").value&&(d+=makeUefiBootParam(20,hex2rstr(Q("rpeoemdatax").value),null,11),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("Azione di potere","Verifica dello stato ..."),
1384 +amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1385 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("Azione di potere","Verifica dello stato ...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=!1);13!=currentView&&
1386 10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
1364 -function showAdvPowerDlg(){try{Q("c39").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1387 +function showAdvPowerDlg(){try{Q("c64").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1388 QV("ForceHDBootOption",1==amtPowerBootCapabilities.ForceHardDriveBoot);QV("ForcePXEBootOption",1==amtPowerBootCapabilities.ForcePXEBoot);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);QV("d24dSerialOverLan",1==amtPowerBootCapabilities.SOL);
1389 QV("d24dSecureErase",1==amtPowerBootCapabilities.SecureErase);QV("d24dPlatformErase",null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&0!=(amtsysstate.CIM_BootService.response.EnabledState&2));QV("d24dFirmwareReset",1==amtPowerBootCapabilities.ConfigurationDataReset);QV("d24dLockSleepButton",1==amtPowerBootCapabilities.SleepButtonLock);QV("d24dUserPasswordBypass",1==amtPowerBootCapabilities.UserPasswordBypass);
1367 -QV("c46",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c47",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c48",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);setDialogMode(24,"Azione di potenza personalizzata",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}
1368 -function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c39").value&&600>Q("c39").value;QE("c41",!b);QE("c43",!b);QE("idd_d24IDERBootDevice",!b);QE("c45",!b);QE("idd_d24RSEPass",!b);QE("c54",!0)}
1369 -function showAdvPowerDlgOk(){var b=Q("c39").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"Azione di potenza completata."):QH(60,format("Errore azione alimentazione # {0}.",g));setDialogMode(1,"Azione di potere",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c39").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=Q("d24BiosSecureBoot").checked,
1370 -AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c43").value,AvdPowerDlg.FirmwareVerbosity=Q("c45").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c44").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked,AvdPowerDlg.LockSleepButton=Q("d24LockSleepButton").checked,
1390 +QV("c71",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c72",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c73",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);QH("c66",'<option value=0>None</option><option id="ForceDVDBootOption" value=1>Force CD/DVD Boot</option><option id="ForcePXEBootOption" value=2>Force PXE Boot</option><option id="ForceHDBootOption" value=3>Force Hard Disk Boot</option><option id="ForceDiagBootOption" value=4>Force Diagnostic Boot</option>');
1391 +setDialogMode(24,"Azione di potenza personalizzata",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c64").value&&600>Q("c64").value;QE("c66",!b);QE("c68",!b);QE("idd_d24IDERBootDevice",!b);QE("c70",!b);QE("idd_d24RSEPass",!b);QE("c106",!0)}
1392 +function showAdvPowerDlgOk(){var b=Q("c64").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"Azione di potenza completata."):QH(61,format("Errore azione alimentazione # {0}.",e));setDialogMode(1,"Azione di potere",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c64").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=Q("d24BiosSecureBoot").checked,
1393 +AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c68").value,AvdPowerDlg.FirmwareVerbosity=Q("c70").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c69").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked,AvdPowerDlg.LockSleepButton=Q("d24LockSleepButton").checked,
1394 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,AvdPowerDlg.PlatformErase=Q("d24PlatformErase").checked,AvdPowerDlg.FirmwareReset=Q("d24FirmwareReset").checked,!0===AvdPowerDlg.SecureErase&&0<Q("d24rsepass").value.length&&(AvdPowerDlg.RSEPassword=
1395 Q("d24rsepass").value),!0===AvdPowerDlg.PlatformErase?powerActionDlgRPE(!0):(statusbox("Azione di potere","Verifica dello stato ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)))}
1373 -function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("Azione di potere",format("Errore # {0}",d)):4294967295==a.Body.OptInRequired&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(d6ConsentText.value="",setDialogMode(6,"Consenso dell'utente",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("Azione di potere","Avvio dell'iscrizione in corso ..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):
1374 -connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Consenso dell'utente","Non \u00e8 necessario il consenso dell'utente."):(statusbox("Azione di potere","Ottenere le impostazioni di avvio ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1396 +function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("Azione di potere",format("Errore # {0}",d)):(4294967295==a.Body.OptInRequired||connectDesktopConsent&&0!=a.Body.OptInRequired)&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(amtstack.IPS_OptInService_CancelOptIn(null),d6ConsentText.value="",setDialogMode(6,"Consenso dell'utente",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("Azione di potere","Avvio dell'iscrizione in corso ..."),
1397 +amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Consenso dell'utente","Non \u00e8 necessario il consenso dell'utente."):(statusbox("Azione di potere","Ottenere le impostazioni di avvio ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1398 function powerActionResponseC1(b,c,a,d){200!=d?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("Azione di potere",format("Errore n.",d)):0!=a.Body.ReturnValue?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("Errore di consenso dell'utente",a.Body.ReturnValueStr.replace(/_/g," ")):(d6ConsentText.value="",setDialogMode(6,"Consenso dell'utente",11,powerActionSendConsent),checkConsentDisplay(),consentChanged(),amtstack.Enum("CIM_ServiceAvailableToElement",
1399 function(a,b,c,d){errcheck(d,a)||(amtsysstate.CIM_ServiceAvailableToElement.responses=c,updateSystemStatus(),null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState&&amtstack.RequestPowerStateChange(2,function(a,b,c,d){}))}))}
1377 -function powerActionSendConsent(b){0==b?amtstack.IPS_OptInService_CancelOptIn(function(){}):(statusbox("Azione di potere","Invio del consenso dell'utente ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1400 +function powerActionSendConsent(b){console.log("powerActionSendConsent",b);0==b?(amtstack.IPS_OptInService_CancelOptIn(function(){}),connectDesktopConsent=!1,desktop.Stop()):(statusbox("Azione di potere","Invio del consenso dell'utente ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1401 function powerActionResponseC2(b,c,a,d){200!=d?messagebox("Azione di potere",format("Errore # {0}",d)):0!=a.Body.ReturnValue?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Consenso dell'utente","Consenso dell'utente riuscito."):(statusbox("Azione di potere","Verifica dello stato ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1379 -function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("Azione di potere",format("Errore # {0}",d));else{b=d5actionSelect.value;var g=a.Body;g.ConfigurationDataReset=!1;delete g.WinREBootEnabled;delete g.UEFILocalPBABootEnabled;delete g.UEFIHTTPSBootEnabled;delete g.SecureBootControlEnabled;delete g.BootguardStatus;delete g.OptionsCleared;delete g.BIOSLastStatus;delete g.UefiBootParametersArray;delete g.RPEEnabled;999==b?(g.BIOSPause=AvdPowerDlg.BIOSPause,g.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1380 -g.BIOSSetup=AvdPowerDlg.BIOSSetup,g.BootMediaIndex=AvdPowerDlg.BootMediaIndex,g.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,g.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,g.IDERBootDevice=AvdPowerDlg.IDERBootDevice,g.LockKeyboard=AvdPowerDlg.LockKeyboard,g.LockPowerButton=AvdPowerDlg.LockPowerButton,g.LockResetButton=AvdPowerDlg.LockResetButton,g.LockSleepButton=AvdPowerDlg.LockSleepButton,g.ReflashBIOS=AvdPowerDlg.ReflashBIOS,g.UseIDER=AvdPowerDlg.UseIDER,g.UseSOL=AvdPowerDlg.UseSOL,
1381 -g.UseSafeMode=AvdPowerDlg.UseSafeMode,g.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=g.SecureErase&&(g.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==g.SecureErase&&AvdPowerDlg.RSEPassword&&(g.RSEPassword=AvdPowerDlg.RSEPassword)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1382 -0!=(amtPowerBootCapabilities.PlatformErase&1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(g.BIOSPause=!1,g.EnforceSecureBoot=!1,g.BIOSSetup=99<b&&104>b,g.BootMediaIndex=0,g.FirmwareVerbosity=0,g.ForcedProgressEvents=!1,g.IDERBootDevice=202==b||203==b?1:0,g.LockKeyboard=!1,g.LockPowerButton=!1,g.LockResetButton=!1,g.LockSleepButton=!1,g.ReflashBIOS=
1383 -!1,g.UseIDER=199<b&&300>b,g.UseSOL=13==currentView&&8!=b&&300>b,g.UseSafeMode=!1,g.UserPasswordBypass=!1,null!=g.SecureErase&&(g.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===g.SecureErase&&0<rsepass.length&&(g.RSEPassword=rsepass)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&
1384 -1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=!1),rsepass=null);console.log("Azione di avvio: "+b);console.log("Impostazione delle impostazioni di avvio: "+ObjectToString2(g));statusbox("Azione di potere","Impostazione delle impostazioni di avvio ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,b,c,d){200!=d?messagebox("Azione di potere",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",
1385 -d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",g,powerActionResponse2,0,1)},0,1)}}
1386 -function powerActionResponse2(b,c,a,d,g){200!=d?messagebox("Azione di potere",format("PUT AMT_BootSettingData, Errore # {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("Azione di potere","Impostazione del prossimo avvio ..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1387 -function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c41.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c41.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c41").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1402 +function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("Azione di potere",format("Errore # {0}",d));else{b=d5actionSelect.value;var e=a.Body;e.ConfigurationDataReset=!1;delete e.WinREBootEnabled;delete e.UEFILocalPBABootEnabled;delete e.UEFIHTTPSBootEnabled;delete e.SecureBootControlEnabled;delete e.BootguardStatus;delete e.OptionsCleared;delete e.BIOSLastStatus;delete e.UefiBootParametersArray;delete e.RPEEnabled;999==b?(e.BIOSPause=AvdPowerDlg.BIOSPause,e.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1403 +e.BIOSSetup=AvdPowerDlg.BIOSSetup,e.BootMediaIndex=AvdPowerDlg.BootMediaIndex,e.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,e.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,e.IDERBootDevice=AvdPowerDlg.IDERBootDevice,e.LockKeyboard=AvdPowerDlg.LockKeyboard,e.LockPowerButton=AvdPowerDlg.LockPowerButton,e.LockResetButton=AvdPowerDlg.LockResetButton,e.LockSleepButton=AvdPowerDlg.LockSleepButton,e.ReflashBIOS=AvdPowerDlg.ReflashBIOS,e.UseIDER=AvdPowerDlg.UseIDER,e.UseSOL=AvdPowerDlg.UseSOL,
1404 +e.UseSafeMode=AvdPowerDlg.UseSafeMode,e.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=e.SecureErase&&(e.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==e.SecureErase&&AvdPowerDlg.RSEPassword&&(e.RSEPassword=AvdPowerDlg.RSEPassword)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1405 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(e.BIOSPause=!1,e.EnforceSecureBoot=!1,e.BIOSSetup=99<b&&104>b,e.BootMediaIndex=0,e.FirmwareVerbosity=0,e.ForcedProgressEvents=!1,e.IDERBootDevice=202==b||203==b?1:0,e.LockKeyboard=!1,e.LockPowerButton=!1,e.LockResetButton=!1,e.LockSleepButton=
1406 +!1,e.ReflashBIOS=!1,e.UseIDER=199<b&&300>b,e.UseSOL=13==currentView&&8!=b&&300>b,e.UseSafeMode=!1,e.UserPasswordBypass=!1,null!=e.SecureErase&&(e.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===e.SecureErase&&0<rsepass.length&&(e.RSEPassword=rsepass)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&
1407 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=!1),rsepass=null);console.log("Azione di avvio: "+b);console.log("Impostazione delle impostazioni di avvio: "+ObjectToString2(e));statusbox("Azione di potere","Impostazione delle impostazioni di avvio ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,
1408 +b,c,d){200!=d?messagebox("Azione di potere",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",e,powerActionResponse2,0,1)},0,1)}}
1409 +function powerActionResponse2(b,c,a,d,e){200!=d?messagebox("Azione di potere",format("PUT AMT_BootSettingData, Errore # {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("Azione di potere","Impostazione del prossimo avvio ..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1410 +function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c66.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c66.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c66").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1411 c+"</Selector></SelectorSet></ReferenceParameters>",powerActionResponse3)}var targetPowerAction=0;
1389 -function powerActionResponse3(b,c,a,d){console.log("powerActionResponse3("+c+","+a+","+d+")");if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("Azione di potere","Esecuzione dell'azione di potenza ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==b&&(b=AvdPowerDlg.Action);
1390 -targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("Azione di potere","Prossimo set di azioni di avvio.")}}function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"Azione di potenza completata."),setDialogMode(1,"Azione di potere",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}
1391 -function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c54",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1412 +function powerActionResponse3(b,c,a,d){if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("Azione di potere","Esecuzione dell'azione di potenza ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==b&&(b=AvdPowerDlg.Action);targetPowerAction=b;11==b&&(b=10);999>
1413 +b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("Azione di potere","Prossimo set di azioni di avvio.")}}function powerActionResponse4(b,c,a,d){200==d&&(QH(61,"Azione di potenza completata."),setDialogMode(1,"Azione di potere",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}function powerActionResponse5(b,c,a,d){}
1414 +function consentChanged(){QE("c106",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1415 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1416 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1394 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var g=b[c].app?b[c].app:"";a[d][g]||(a[d][g]={});b[c].name&&(a[d][g][b[c].name]=b[c])}xxStorage.content=
1395 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gestisci lo storage Intel&reg; AMT per questo computer.<br><br>";var v,n,g="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,e;for(e in b[c][p]){q++;if(c!=v||p!=n)""!=g&&(a+=g,g="<br>"),v=c,n=p,g=""!=c?g+EscapeHtml(c+" / "+
1396 -p):g+"Radice";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+e+'"',g=g+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+e+'",'+C+")><div style=float:right>"),g=g+(" "+AddButton2("Scarica","DownloadFromStorage("+C+',"'+e+'",event)')),g=g+("</div><div style=padding-top:3px><b>"+EscapeHtml(e)+"</b>, <i>"+b[c][p][e].size+" byte</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==q&&(wsstack.comm.PerformAjax("",
1397 -function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=g&&(a+=g);0==d&&(a+="<div style=padding-left:15px><br><i>Nessun file trovato.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("Caricare...","UploadToStorage()"):
1398 -""));QH(55,a)}else QH(55,"Impossibile caricare i dati di archiviazione ...<br/>"+AddButton("ricaricare","PullStorage()"))}
1399 -function showStorageDetails(b,c,a,d){if(!xxdialogMode){var g="",v=xxStorage.content[b][c][a];""!=b&&(g+=addHtmlValue("venditore",b));""!=c&&(g+=addHtmlValue("Applicazione",c));g+=addHtmlValue("Nome",a);g+=addHtmlValue("Dimensione",v.size+" bytes");v.link&&(g+=addHtmlValue("collegamento",v.link));setDialogMode(11,"Articolo di archiviazione",5,showStorageDetailsEx,g,d)}}function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}
1417 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1418 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gestisci lo storage Intel&reg; AMT per questo computer.<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var r=0,g;for(g in b[c][p]){r++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+" / "+
1419 +p):e+"Radice";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+g+'",'+C+")><div style=float:right>"),e=e+(" "+AddButton2("Scarica","DownloadFromStorage("+C+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][p][g].size+" byte</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==r&&(wsstack.comm.PerformAjax("",
1420 +function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>Nessun file trovato.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("Caricare...","UploadToStorage()"):
1421 +""));QH(56,a)}else QH(56,"Impossibile caricare i dati di archiviazione ...<br/>"+AddButton("ricaricare","PullStorage()"))}
1422 +function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("venditore",b));""!=c&&(e+=addHtmlValue("Applicazione",c));e+=addHtmlValue("Nome",a);e+=addHtmlValue("Dimensione",v.size+" bytes");v.link&&(e+=addHtmlValue("collegamento",v.link));setDialogMode(11,"Articolo di archiviazione",5,showStorageDetailsEx,e,d)}}function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}
1423 function storageDeleteResponse(b,c){200!=c?messagebox("Conservazione",format("Impossibile eliminare il file (ERR {0}), verificare che il computer sia acceso.",c)):PullStorage()}function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}function DownloadFromStorageEx(b,c,a){200!=c||null==b?console.log(c,"Data = null"):saveAs(data2blob(b),a)}
1424 function OpenFromStorage(b,c){if(!xxdialogMode){haltEvent(c);var a=window.open("http://"+wsstack.comm.host+":"+wsstack.comm.port+"/amt-storage/"+b,"_blank","noopener,noreferrer");a.opener=null;a.focus()}}function PushToStorage(b,c,a){var d=null;7E3<c.length&&(d=[b,c.substring(7E3)],c=c.substring(0,7E3));wsstack.comm.PerformAjax(c,PushToStorageResponse,d,0,"/amt-storage/"+b+(1==a?"?append=":""),"PUT")}
1425 function PushToStorageResponse(b,c,a){200!=c?messagebox("Conservazione",format("Impossibile inviare il file (ERR {0}), verificare che il computer sia acceso.",c)):null!=a?PushToStorage(a[0],a[1],!0):PullStorage()}
@@ -1407,36 +1430,36 @@ a+="<datalist id=mstorageapplicationlist>";for(d in xxStorageApplications)a+='<o
1430 function UploadToStorageEx(b,c){if(c)d=new FileReader,d.onload=UploadToStorageEx2,d.filename=Q("mstoragefile").value,d.readAsBinaryString(c);else{var a=Q("mstoragefile");if(1==a.files.length){var d=new FileReader;d.onload=UploadToStorageEx2;d.filename=a.files[0].name;d.readAsBinaryString(a.files[0])}}}
1431 function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0].name:"");b=b.split(" ").join("");var c=b.split("-");3==c.length&&12>c[0].length&&12>c[1].length&&(Q("mstoragevendor").value=c[0],Q("mstorageapplication").value=c[1],b=c[2]);b=b.split("-").join("");b.endsWith(".gz")&&(b=b.substring(0,b.length-3));b.endsWith(".htm")||b.endsWith(".html")?Q("mstoragetype").value="text/html":b.endsWith(".txt")&&(Q("mstoragetype").value="text/plain");11<b.length&&(b=b.substring(0,11));Q("mstoragefilename").value=
1432 b}
1410 -function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var g=Q("mstoragetype").value;""==g&&(g="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1411 -"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+g+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1433 +function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1434 +"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1435 function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," giorni").replace("H"," ore").replace("M"," minuti");b=b.replace(" 1 giorni"," 1 giorno").replace(" 1 ora"," 1 ora").replace(" 1 minuti "," 1 minuto ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1413 -function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gestisci sveglie.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,g){if(200==g){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, svegliati "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," a"),void 0!=d[c].Interval&&(a+=" e ciascuno"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+=", eliminare al termine"),b+=
1414 -"<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("Modificare...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>Nessun allarme di sveglia registrato.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("Rimuovi tutti gli allarmi","RemoveAllAlarms()")+AddButton("Inserisci",
1415 -"showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
1416 -function prepareAlarmOccurenceTemplate(b,c,a,d,g){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1417 -g+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"Rimuovi tutti gli allarmi di riattivazione",3,RemoveAllAlarmsEx,"Conferma la rimozione di tutti gli allarmi di riattivazione?")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,g,v){0==--b&&PullAlarms()})}
1436 +function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gestisci sveglie.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, svegliati "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," a"),void 0!=d[c].Interval&&(a+=" e ciascuno"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+=", eliminare al termine"),b+=
1437 +"<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("Modificare...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>Nessun allarme di sveglia registrato.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton2("Rimuovi tutti gli allarmi","RemoveAllAlarms()",xxAlarms?
1438 +"":"disabled")+AddButton("Inserisci","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(58,b)}},null,!0)}
1439 +function prepareAlarmOccurenceTemplate(b,c,a,d,e){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1440 +e+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"Rimuovi tutti gli allarmi di riattivazione",3,RemoveAllAlarmsEx,"Conferma la rimozione di tutti gli allarmi di riattivazione?")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,e,v){0==--b&&PullAlarms()})}
1441 function showAddAlarm(b){if(!xxdialogMode){QE("d25alarm_name",!b);if(void 0!=b){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime);Q("d25alarm_name").value=c.ElementName;Q("d25alarm_sdate").value=a.getFullYear()+"-"+_fmttimepad(a.getMonth()+1)+"-"+_fmttimepad(a.getDate());Q("d25alarm_stime").value=a.getHours()+":"+_fmttimepad(a.getMinutes())+":"+_fmttimepad(a.getSeconds());if(c.Interval){var a=c.Interval.Interval.replace("P","").replace("T","").replace("D","D,").replace("H","H,").replace("M","M,").split(","),
1419 -d=[0,0,0],g;for(g in a){var v=a[g].length-1;"D"==a[g][v]&&(d[0]=parseInt(a[g].substring(0,v)));"H"==a[g][v]&&(d[1]=parseInt(a[g].substring(0,v)));"M"==a[g][v]&&(d[2]=parseInt(a[g].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1420 -Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"Aggiungi nuova sveglia",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c54",b)}
1421 -function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),g=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],g[0],g[1],g[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",g=Q("d25alarm_interval").value.split("-");3!=g.length&&(g=[0,0,0]);var g=
1422 -"P"+g[0]+"DT"+g[1]+"H"+g[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,g,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("Aggiungi allarme",format("Impossibile aggiungere l'allarme. Stato: {0}. <br/> Verifica che l'allarme sia per un momento futuro.",d)):0!=c.Body.ReturnValue?messagebox("Aggiungi allarme",format("Impossibile aggiungere la sveglia {0}. <br/> Verifica che la sveglia sia per un momento futuro.",
1423 -c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+g+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("Modifica sveglia",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1442 +d=[0,0,0],e;for(e in a){var v=a[e].length-1;"D"==a[e][v]&&(d[0]=parseInt(a[e].substring(0,v)));"H"==a[e][v]&&(d[1]=parseInt(a[e].substring(0,v)));"M"==a[e][v]&&(d[2]=parseInt(a[e].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1443 +Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"Aggiungi nuova sveglia",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c106",b)}
1444 +function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),e=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],e[0],e[1],e[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",e=Q("d25alarm_interval").value.split("-");3!=e.length&&(e=[0,0,0]);var e=
1445 +"P"+e[0]+"DT"+e[1]+"H"+e[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,e,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("Aggiungi allarme",format("Impossibile aggiungere l'allarme. Stato: {0}. <br/> Verifica che l'allarme sia per un momento futuro.",d)):0!=c.Body.ReturnValue?messagebox("Aggiungi allarme",format("Impossibile aggiungere la sveglia {0}. <br/> Verifica che la sveglia sia per un momento futuro.",
1446 +c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+e+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("Modifica sveglia",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1447 function showAlertDetails(b){if(!xxdialogMode){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime),a="<div style=text-align:left>"+addHtmlValue("Nome",c.ElementName)+addHtmlValue("Tempo di sveglia",a.toLocaleString().replace(", "," at "));void 0!=c.Interval&&(a+=addHtmlValue("Interno",_fmtinterval(c.Interval.Interval)));a+=addHtmlValue("Dopo la veglia",1==c.DeleteOnCompletion?"Elimina allarme":"Mantieni allarme")+"</div>";messagebox(format("Allarme {0}",c.ElementName),a);setDialogMode(11,"Allarme"+
1448 c.ElementName,5,showAlertDetailsDelete,a,b)}}function showAlertDetailsDelete(b,c){2==b&&amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,b,c,v){PullAlarms()})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag;
1426 -function setDialogMode(b,c,a,d,g,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c54",!0);QV("c54",a&1);QV("c53",a&2);QV(58,a&2);QV("c55",a&4);c&&QH(59,c);for(c=1;27>c;c++)QV("dialog"+c,c==b);QV("dialog",b);g&&(11==b?QH(63,g):QH(60,g));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1449 +function setDialogMode(b,c,a,d,e,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c106",!0);QV("c106",a&1);QV("c105",a&2);QV(59,a&2);QV("c107",a&4);c&&QH(60,c);for(c=1;28>c;c++)QV("dialog"+c,c==b);QV("dialog",b);e&&(11==b?QH(64,e):QH(61,e));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1450 function dialogclose(b){var c=xxdialogFunc,a=xxdialogButtons,d=xxdialogTag;setDialogMode();(a&8||b)&&c&&c(b,d)}
1428 -function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(41).offsetWidth&&(QS("Desk")["max-width"]=Q(41).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1429 -"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(60,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(60,c);setDialogMode(1,b)}
1430 -function SaveJsonFile(b,c,a,d){var g="",v={},n=new Date;amtsysstate&&(g="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));g+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1431 -n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+g+".json")}var httpErrorTable={200:"ok",401:"Errore di autenticazione",408:"Errore di timeout",601:"Errore di analisi WSMAN",602:"Impossibile analizzare l'intestazione della risposta HTTP",603:"Risposta enum HTTP inattesa",604:"Risposta pull HTTP inaspettata",997:"Digest Realm non valido"};
1451 +function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(42).offsetWidth&&(QS("Desk")["max-width"]=Q(42).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1452 +"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(61,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(61,c);setDialogMode(1,b)}
1453 +function SaveJsonFile(b,c,a,d){var e="",v={},n=new Date;amtsysstate&&(e="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));e+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1454 +n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+e+".json")}var httpErrorTable={200:"ok",401:"Errore di autenticazione",408:"Errore di timeout",601:"Errore di analisi WSMAN",602:"Impossibile analizzare l'intestazione della risposta HTTP",603:"Risposta enum HTTP inattesa",604:"Risposta pull HTTP inaspettata",997:"Digest Realm non valido"};
1455 function errcheck(b,c){if(null==wsstack||amtstack!=c)return!0;200!=b&&9!=b&&(setDialogMode(),wsstack.comm.FailAllError=999,amtstack.CancelAllQueries(999),QH(5,httpErrorTable[b]?httpErrorTable[b]:format("Errore # {0}",b)),401==b&&QH(5,'Errore di autenticazione<br /><br /><input type=button value="Set new credentials" onclick=meshcentral2credCallback(true)></input>'),go(100),QS(3).width=0);return 200!=b}
1456 function goiFrame(b,c,a){if(!xxdialogMode){go(c);if(1==b.shiftKey||0==Q(13).src.endsWith(a))Q(13).src=a;QV(14,!1);QV(12,!0)}}function go(b,c){if(!xxdialogMode||1==c){QV(12,!1);QV(14,!0);QV(4,100==b);QV(6,100>b);for(var a=0;80>a;a++){QV("p"+a,a==b);var d=QS("go"+a);d&&(d["background-color"]=a==b?"#abcae1":"");d&&(d["background-color"]=a==b?"gray":"")}currentView=b;center()}}
1434 -function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,g=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:g};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(g=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:g}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(g=parseInt(a[2]));return{host:a[0],http:d,redir:g}}
1457 +function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,e=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:e};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(e=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:e}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(e=parseInt(a[2]));return{host:a[0],http:d,redir:e}}
1458 function addLink(b,c){return"<a style=cursor:pointer;color:blue onclick='"+c+"'>&diams; "+b+"</a>"}function addLinkConditional(b,c,a){return a?addLink(b,c):b}function haltEvent(b){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1}function addOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;Q(b).add(d)}function addDisabledOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;d.disabled=1;Q(b).add(d)}
1436 -function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,g=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:g=1}return 4==c+a+d+g}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("Errore di chiamata",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}
1459 +function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,e=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:e=1}return 4==c+a+d+e}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("Errore di chiamata",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}
1460 function TableStart2(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><p><td>"}function TableEntry(b,c){return"<tr><td class=r1><p>"+b+"<td class=r1>"+c}function FullTable(b,c){var a=TableStart();for(i in b)i&&b[i]&&(a+=TableEntry(i,b[i]));return a+TableEnd(c)}function TableEnd(b){return"<tr><td colspan=2><p>"+(b?b:"")+"</table>"}function AddButton(b,c){return"<input type=button value='"+b+"' onclick='"+c+"' style=margin:4px>"}
1461 function AddButton2(b,c,a){return"<input type=button value='"+b+"' onclick='"+c+"' "+a+">"}function AddRefreshButton(b){return'<input type=button name=refreshbtn value="ricaricare" onclick=\'refreshButtons(false);'+b+"' style=margin:4px "+(0==refreshButtonsState?"disabled":"")+">"}function MoreStart(){return'<a style=cursor:pointer;color:blue id=morexxx1 onclick=QV("morexxx1",false);QV("morexxx2",true)>&#x25BC; More</a><div id=morexxx2 style=display:none><br><hr>'}
1439 -function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,g=b.options.length;d<g;d++)a=b.options[d],a.selected&&c.push(a.value);return c}function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}
1462 +function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,e=b.options.length;d<e;d++)a=b.options[d],a.selected&&c.push(a.value);return c}function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}
1463 function guidToStr(b){return b.substring(6,8)+b.substring(4,6)+b.substring(2,4)+b.substring(0,2)+"-"+b.substring(10,12)+b.substring(8,10)+"-"+b.substring(14,16)+b.substring(12,14)+"-"+b.substring(16,20)+"-"+b.substring(20)}function getUrlVars(){for(var b,c=[],a=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),d=0;d<a.length;d++)b=a[d].indexOf("="),0<b&&(c[a[d].substring(0,b)]=a[d].substring(b+1,a[d].length));return c}
1464 function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}
1465 function getDocHeight(){return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight&&0!=document.documentElement.clientHeight?document.documentElement.clientHeight:document.getElementsByTagName("body")[0].clientHeight}function addHtmlValue(b,c){return'<div style=height:20px><div style=float:right;width:220px;overflow:hidden><b title="'+c+'">'+c+"</b></div><div>"+b+"</div></div>"}
public/commander-ja.htm
+931 -909
@@ -1,8 +1,8 @@
1 -<!DOCTYPE html><html lang="ja" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=接続する 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>切断された</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>システムステータス</a><p id=go14 class=nav1 onclick=go(14)><a>リモートデスクトップ</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>ファイル</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>ハードウェア情報</a><p id=go6 class=nav1 onclick=go(6)><a>イベントログ</a><p id=go15 class=nav1 onclick=go(15)><a>監査ログ</a><p id=go21 class=nav1 onclick=go(21)><a>ストレージ</a><p id=go8 class=nav1 onclick=go(8)><a>ネットワーク設定</a><p id=go17 class=nav1 onclick=go(17)><a>インターネット設定</a><p id=go16 class=nav1 onclick=go(16)><a>セキュリティ設定</a><p id=go19 class=nav1 onclick=go(19)><a>エージェントの存在</a><p id=go18 class=nav1 onclick=go(18)><a>システム防御</a><p id=go11 class=nav1 onclick=go(11)><a>ユーザーアカウント</a><p id=go22 class=nav1 onclick=go(22)><a>定期購入</a><p id=go23 class=nav1 onclick=go(23)><a>ウェイクアラーム</a><p id=go12 class=nav1 onclick=go(12)><a>WSMANブラウザ</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value=ディスクマップ onclick=iderToggleDiskMap()><input type=button value=IDE-Rセッションを停止 onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>フロッピー、ブロックは512バイトです。</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM、ブロックは2048バイトです。</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>このコンピューターのファームウェアを更新する必要があります。&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>こちらをご確認ください</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>読み込んでいます...</h1></div><div id=p1 style=display:none><h1>システムステータス</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>ハードウェア情報</h1><span id=16></span></div><div id=p6 style=display:none><h1>イベントログ</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>ネットワーク設定</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>ユーザーアカウント</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMANブラウザ</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><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=クエリ style=margin:4px onclick=wsmanQuery()><input type=button value=晴れ style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=フィルタ style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Serial-over-LANターミナル</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>インテル®AMTリダイレクションポートまたはSerial-over-LAN機能が無効になっています<span id=26>、ここをクリックして有効にします。</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>リモートコンピュータの電源が入っていません。ここをクリックして電源コマンドを発行してください。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=パワーアクション... onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=アイダー title="リモートディスクマウント操作を開始する" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=キャプチャを開始 title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=接続する onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>切断されました。</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="リターンキーが送信するものを切り替えます" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="端子サイズを切り替え" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="インテル(F10 = ESC + [OM)" title="F1キーからF10キーへのエミュレーションタイプを切り替える" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value=拡張アスキー title="端末エミュレーションタイプを切り替え" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>バックスペース<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=送る onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=ペースト disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>リモートデスクトップ</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>インテル®AMTリダイレクションポートまたはKVM機能が無効になっています<span id=37>、ここをクリックして有効にします。</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>リモートコンピュータの電源が入っていません。ここをクリックして電源コマンドを発行してください。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="左に回転" onclick=drotate(-1)>↺</div><div class=rb title="右に回る" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="全画面モードを切り替え" onkeypress="return false" onkeydown="return false" value=いっぱい onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="リモートデスクトップのスクリーンショットを保存する" onkeypress="return false" onkeydown="return false" value=セーブ... onclick=deskSaveImage() style=margin-right:3px><input type=button value=設定... title="リモートデスクトップ設定を編集する" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=アイダー title="リモートディスクマウント操作を開始する" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="リモートマシンの電源状態を変更する" onkeypress="return false" onkeydown="return false" value=パワーアクション... onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=接続する onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>切断されました。</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>勝つ<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>勝利+左<option value=24>勝利+右<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=送る onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=タイプ onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>空白の画面&nbsp;</span><span id=47><input id=48 type=checkbox>表示のみ&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>監査ログ</h1><span id=50></span></div><div id=p16 style=display:none><h1>セキュリティ設定</h1><span id=51></span></div><div id=p17 style=display:none><h1>インターネット設定</h1><span id=52></span></div><div id=p18 style=display:none><h1>システム防御</h1><span id=53></span></div><div id=p19 style=display:none><h1>エージェントの存在</h1><span id=54></span></div><div id=p21 style=display:none><h1>ストレージ</h1><span id=55></span></div><div id=p22 style=display:none><h1>イベントのサブスクリプション</h1><span id=56></span></div><div id=p23 style=display:none><h1>ウェイクアラーム</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>ファイル</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=アップ>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value=すべて選択 onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=リネーム onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=削除する onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value=新しいフォルダ onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=アップロードする onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=切る onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=コピーする onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=ペースト onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=リフレッシュ onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">名前順<option value=2>サイズで並べ替え<option value=3>日付けで並び替え<option value=4>名前で降順<option value=5>サイズで降順<option value=6>日付で降順</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 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=60 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>ユーザー名</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>パスワード*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>パスワードを認証する</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>地元<option value=1>通信網<option value=2>どれか</select><div>許可</div></div><div>付与された権限</div><ul id=62 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>*大文字、小文字、0〜9、および!@#$%^&*()+-のいずれかを含む最小8文字</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>パワーアクション</div></div><div><span style=color:red>警告:</span>電源操作によっては、データが失われたり、デスクトップ、ターミナル、またはディスクのリダイレクトセッションが切断されたりする場合があります。</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>同意コード</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>プライマリディスプレイ<option value=1>セカンダリディスプレイ<option id=d6ThirdDisplay value=2 style=display:none>3番目のディスプレイ</select><div>同意表示</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>画像エンコーディング</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>無効<option value=2>Automatic<option value=3>有効</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>ローカルマウスカーソルを表示</label><br><label><input type=checkbox id=d7showcad>Ctrl-Alt-Delを表示する</label><br><label><input type=checkbox id=d7limitFrameRate>フレームレートを制限</label><br><label><input type=checkbox id=d7noMouseRotate>マウスを回転させない</label><br></div><div>その他の設定</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">ソフトウェアKVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>品質</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>スケーリング</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=管理者 style=float:right;width:220px><div style=height:20px>ユーザー名</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>パスワード</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>リダイレクトポート</label><label id=c15 style=display:block><input type=checkbox id=c16>KVMリモートデスクトップ</label><label style=display:block><input type=checkbox id=c17>IDEリダイレクト<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>不要<br></label><label><input type=radio name=d10 id=c20 value=1>KVMにのみ必要<br></label><label><input type=radio name=d10 id=c21 value=4294967295>常に必要<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最大32文字"><div title="最大32文字">プロファイル名</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最大32文字"><div title="最大32文字">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>優先</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>認証</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>無し</select><div>暗号化</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8〜63文字の長さ"><div title="8〜63文字の長さ">パスワード*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8〜63文字の長さ"><div title="8〜63文字の長さ">パスワードを認証する</div></div></div><div id=dialog19 style=margin:auto;margin:3px>これにより、このマシンのインテル®AMTの状態全体がファイルに保存されます。パスワードは保存されませんが、一部の機密データが含まれる場合があります。<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>無効<br><input type=radio name=d20 id=d20b value=1>ICMP応答<br><input type=radio name=d20 id=d20c value=2>RMCP応答<br><input type=radio name=d20 id=d20d value=3>ICMPおよびRMCP応答<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>オペレーティングシステムのIPアドレスの同期</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IPアドレス</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>サブネットマーク</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>ゲートウェイ</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>プライマリDNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>代替DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>無効<option value=1>無効、DHCPアップデート<option value=2>有効</select><div>動的DNSクライアント</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>更新間隔(分)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL(秒)</div></div><div style=font-size:10px><br>デフォルトの間隔は1440分、デフォルトのTTLは900秒です。</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>パワーアップ<option value=10>リセット<option value=5>パワーサイクル<option value=8>パワーダウン<option id=d24p500 value=500>スタンバイからのOSウェイク<option id=d24p501 value=501>OSの省電力<option value=999>起動オプションを設定する</select><div>リモートコマンド</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS一時停止</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>セキュアブートを強制する</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS設定</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>強制進行イベント</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>ロック電源ボタン</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>ロックリセットボタン</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>ロックスリープボタン</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>キーボードをロック</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOSパスワードバイパス</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOSの再フラッシュ</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>セーフモード</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>IDERを使用する</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>インテル®リモートセキュア消去</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>起動設定</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>無し<option id=ForceDVDBootOption value=1>CD / DVDブートを強制する<option id=ForcePXEBootOption value=2>PXEブートを強制する<option id=ForceHDBootOption value=3>強制的にハードディスクを起動<option id=ForceDiagBootOption value=4>診断ブートを強制</select><div>ブートソース</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>無し<option value=1>インデックス1<option value=2>インデックス2<option value=3>インデックス3<option value=3>インデックス4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>フロッピーから起動<option value=1>CDROMから起動</select><div>IDERブートデバイス</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>システムのデフォルト<option id=c46 value=1>静か<option id=c47 value=2>冗長<option id=c48 value=3>空白の画面</select><div>冗長</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パスワード</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>アラーム名</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>ウェイク日(年月日)</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>ウェイク時間(時:分:秒)</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>間隔(日-時間-分)</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>アラームを保持<option value=1>完了時に削除</select></div><div style=padding-top:4px>起きた後</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>有効<br></label><label><input type=radio name=d26b id=c50 value=0>無効<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>有効<br></label><label><input type=radio name=d26a id=c52 value=0>無効<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=キャンセル style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=削除する style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="ja" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=接続する 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>切断された</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>システムステータス</a><p id=go14 class=nav1 onclick=go(14)><a>リモートデスクトップ</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>ファイル</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>ハードウェア情報</a><p id=go6 class=nav1 onclick=go(6)><a>イベントログ</a><p id=go15 class=nav1 onclick=go(15)><a>監査ログ</a><p id=go21 class=nav1 onclick=go(21)><a>ストレージ</a><p id=go8 class=nav1 onclick=go(8)><a>ネットワーク設定</a><p id=go17 class=nav1 onclick=go(17)><a>インターネット設定</a><p id=go16 class=nav1 onclick=go(16)><a>セキュリティ設定</a><p id=go19 class=nav1 onclick=go(19)><a>エージェントの存在</a><p id=go18 class=nav1 onclick=go(18)><a>システム防御</a><p id=go11 class=nav1 onclick=go(11)><a>ユーザーアカウント</a><p id=go22 class=nav1 onclick=go(22)><a>定期購入</a><p id=go23 class=nav1 onclick=go(23)><a>ウェイクアラーム</a><p id=go12 class=nav1 onclick=go(12)><a>WSMANブラウザ</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value=ディスクマップ onclick=iderToggleDiskMap()><input type=button value=IDE-Rセッションを停止 onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>フロッピー、ブロックは512バイトです。</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM、ブロックは2048バイトです。</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>このコンピューターのファームウェアを更新する必要があります。&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>こちらをご確認ください</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>読み込んでいます...</h1></div><div id=p1 style=display:none><h1>システムステータス</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>ハードウェア情報</h1><span id=16></span></div><div id=p6 style=display:none><h1>イベントログ</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>ネットワーク設定</h1><span id=19></span><span id=20></span><span id=21></span></div><div id=p11 style=display:none><h1>ユーザーアカウント</h1><span id=22></span></div><div id=p12 style=display:none><h1>WSMANブラウザ</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=23 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=24 type=button value=クエリ style=margin:4px onclick=wsmanQuery()><input type=button value=晴れ style=margin:4px onclick="QH(25, '')"><input id=c0 placeholder=フィルタ style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=25></div></div><div id=p13 style=display:none;min-width:780px><h1>Serial-over-LANターミナル</h1><br><div id=26 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>インテル®AMTリダイレクションポートまたはSerial-over-LAN機能が無効になっています<span id=27>、ここをクリックして有効にします。</span></div></div><div id=28 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>リモートコンピュータの電源が入っていません。ここをクリックして電源コマンドを発行してください。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=29></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=パワーアクション... onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=アイダー title="リモートディスクマウント操作を開始する" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=キャプチャを開始 title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=接続する onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=30>切断されました。</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="リターンキーが送信するものを切り替えます" onclick="termToggleCr();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="端子サイズを切り替え" onclick="termToggleSize();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="インテル(F10 = ESC + [OM)" title="F1キーからF10キーへのエミュレーションタイプを切り替える" onclick="termToggleFx();Q(33).blur()"><input id=34 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value=拡張アスキー title="端末エミュレーションタイプを切り替え" onclick="termToggleType();Q(34).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>バックスペース<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=送る onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=35 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=ペースト disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=36><h1>リモートデスクトップ</h1><br></div><div id=37 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>インテル®AMTリダイレクションポートまたはKVM機能が無効になっています<span id=38>、ここをクリックして有効にします。</span></div></div><div id=39 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>リモートコンピュータの電源が入っていません。ここをクリックして電源コマンドを発行してください。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=40></span>&nbsp;<div class=rb title="左に回転" onclick=drotate(-1)>↺</div><div class=rb title="右に回る" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="全画面モードを切り替え" onkeypress="return false" onkeydown="return false" value=いっぱい onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="リモートデスクトップのスクリーンショットを保存する" onkeypress="return false" onkeydown="return false" value=セーブ... onclick=deskSaveImage() style=margin-right:3px><input type=button value=設定... title="リモートデスクトップ設定を編集する" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=アイダー title="リモートディスクマウント操作を開始する" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="リモートマシンの電源状態を変更する" onkeypress="return false" onkeydown="return false" value=パワーアクション... onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=接続する onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=41>切断されました。</span></div><tr><td id=42 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onwheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=43 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Win<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Win + Left<option value=24>Win + Right<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12<option value=25>Enter</select><input id=DeskWD type=button value=送る onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=44 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=45 type=button value=タイプ onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=46><input id=47 type=checkbox>空白の画面&nbsp;</span><span id=48><input id=49 type=checkbox>表示のみ&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=50></span><h1>監査ログ</h1><span id=51></span></div><div id=p16 style=display:none><h1>セキュリティ設定</h1><span id=52></span></div><div id=p17 style=display:none><h1>インターネット設定</h1><span id=53></span></div><div id=p18 style=display:none><h1>システム防御</h1><span id=54></span></div><div id=p19 style=display:none><h1>エージェントの存在</h1><span id=55></span></div><div id=p21 style=display:none><h1>ストレージ</h1><span id=56></span></div><div id=p22 style=display:none><h1>イベントのサブスクリプション</h1><span id=57></span></div><div id=p23 style=display:none><h1>ウェイクアラーム</h1><span id=58></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>ファイル</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=アップ>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value=すべて選択 onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=リネーム onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=削除する onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value=新しいフォルダ onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=アップロードする onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=切る onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=コピーする onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=ペースト onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=リフレッシュ onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">名前順<option value=2>サイズで並べ替え<option value=3>日付けで並び替え<option value=4>名前で降順<option value=5>サイズで降順<option value=6>日付で降順</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=59 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=60 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=61 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>ユーザー名</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>パスワード*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>パスワードを認証する</div></div><div id=62><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>地元<option value=1>通信網<option value=2>どれか</select><div>許可</div></div><div>付与された権限</div><ul id=63 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>*大文字、小文字、0〜9、および!@#$%^&*()+-のいずれかを含む最小8文字</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>パワーアクション</div></div><div><span style=color:red>警告:</span>電源操作によっては、データが失われたり、デスクトップ、ターミナル、またはディスクのリダイレクトセッションが切断されたりする場合があります。</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>同意コード</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>プライマリディスプレイ<option value=1>セカンダリディスプレイ<option id=d6ThirdDisplay value=2 style=display:none>3番目のディスプレイ</select><div>同意表示</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>画像エンコーディング</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>無効<option value=2>Automatic<option value=3>有効</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>ローカルマウスカーソルを表示</label><br><label><input type=checkbox id=d7showcad>Ctrl-Alt-Delを表示する</label><br><label><input type=checkbox id=d7limitFrameRate>フレームレートを制限</label><br><label><input type=checkbox id=d7noMouseRotate>マウスを回転させない</label><br><label><input type=checkbox id=d7kvmrmw>Reverse Mouse Wheel</label><br></div><div>その他の設定</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">ソフトウェアKVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>品質</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>スケーリング</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=管理者 style=float:right;width:220px><div style=height:20px>ユーザー名</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>パスワード</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>リダイレクトポート</label><label id=c15 style=display:block><input type=checkbox id=c16>KVMリモートデスクトップ</label><label style=display:block><input type=checkbox id=c17>IDEリダイレクト<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>不要<br></label><label><input type=radio name=d10 id=c20 value=1>KVMにのみ必要<br></label><label><input type=radio name=d10 id=c21 value=4294967295>常に必要<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=64></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最大32文字"><div title="最大32文字">プロファイル名</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最大32文字"><div title="最大32文字">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>優先</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()></select><div>認証</div></div><div style=height:26px><select id=c26 style=float:right;width:200px onclick=updateWifiDialog()><option id=65 value=4>CCMP-AES<option id=66 value=3>TKIP-RC4</select><div>暗号化</div></div><div id=c27><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8〜63文字の長さ"><div title="8〜63文字の長さ">パスワード*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8〜63文字の長さ"><div title="8〜63文字の長さ">パスワードを認証する</div></div></div><div id=c30 style=display:none><div id=c31 style=height:26px><select id=c32 style=float:right;width:200px onchange=updateNetAuth2Dialog(event)><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>プロトコル</div></div><div id=c33 style=height:26px><input id=c34 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="最大32文字"><div title="最大32文字">Server Name</div></div><div id=c35 style=height:26px><select id=c36 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c37 style=height:26px><input id=c38 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c39 style=height:26px><input id=c40 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">ユーザー名</div></div><div id=c41 style=height:26px><input id=c42 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuth2Dialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">パスワード</div></div><div id=c43 style=height:26px><input id=c44 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuth2Dialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c45 style=height:26px><input id=c46 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c47 style=height:26px><input id=c48 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c49 style=height:26px><select id=c50 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Client Certificate</div></div><div id=c51 style=height:26px><select id=c52 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Server Issuer Cert</div></div><div id=c53 style=height:26px><select id=c54 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=1>有効<option value=0>無効</select><div>Active in S0</div></div></div></div><div id=dialog19 style=margin:auto;margin:3px>これにより、このマシンのインテル®AMTの状態全体がファイルに保存されます。パスワードは保存されませんが、一部の機密データが含まれる場合があります。<br><br><input id=c55 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>無効<br><input type=radio name=d20 id=d20b value=1>ICMP応答<br><input type=radio name=d20 id=d20c value=2>RMCP応答<br><input type=radio name=d20 id=d20d value=3>ICMPおよびRMCP応答<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=67><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>オペレーティングシステムのIPアドレスの同期</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=68><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c56 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IPアドレス</div></div><div style=height:26px id=69><input id=c57 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>サブネットマーク</div></div><div style=height:26px><input id=c58 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>ゲートウェイ</div></div><div style=height:26px><input id=c59 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>プライマリDNS</div></div><div style=height:26px><input id=c60 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>代替DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c61 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>無効<option value=1>無効、DHCPアップデート<option value=2>有効</select><div>動的DNSクライアント</div></div><div style=height:26px><input id=c62 style=float:right;width:200px><div>更新間隔(分)</div></div><div style=height:26px><input id=c63 style=float:right;width:200px><div>TTL(秒)</div></div><div style=font-size:10px><br>デフォルトの間隔は1440分、デフォルトのTTLは900秒です。</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c64 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>パワーアップ<option value=10>リセット<option value=5>パワーサイクル<option value=8>パワーダウン<option id=d24p500 value=500>スタンバイからのOSウェイク<option id=d24p501 value=501>OSの省電力<option value=999>起動オプションを設定する</select><div>リモートコマンド</div></div><div style=height:80px><div id=c65 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS一時停止</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>セキュアブートを強制する</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS設定</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>強制進行イベント</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>ロック電源ボタン</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>ロックリセットボタン</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>ロックスリープボタン</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>キーボードをロック</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOSパスワードバイパス</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOSの再フラッシュ</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>セーフモード</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>IDERを使用する</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>インテル®リモートセキュア消去</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>起動設定</div></div><div style=height:26px><select id=c66 style=float:right;width:200px onchange=showAdvPowerDlgChange()></select><div>ブートソース</div></div><div id=c67 style=height:26px><select id=c68 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>無し<option value=1>インデックス1<option value=2>インデックス2<option value=3>インデックス3<option value=3>インデックス4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c69 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>フロッピーから起動<option value=1>CDROMから起動</select><div>IDERブートデバイス</div></div><div style=height:26px><select id=c70 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>システムのデフォルト<option id=c71 value=1>静か<option id=c72 value=2>冗長<option id=c73 value=3>空白の画面</select><div>冗長</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パスワード</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>アラーム名</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>ウェイク日(年月日)</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>ウェイク時間(時:分:秒)</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>間隔(日-時間-分)</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>アラームを保持<option value=1>完了時に削除</select></div><div style=padding-top:4px>起きた後</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c74 value=2>有効<br></label><label><input type=radio name=d26b id=c75 value=0>無効<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c76 value=1>有効<br></label><label><input type=radio name=d26a id=c77 value=0>無効<br></label></div><div id=dialog27 style=margin:auto;margin:3px><br><div style=height:26px><select id=c78 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>無効<option value=1>有効</select><div>有効</div></div><div id=c79 style=height:26px><select id=c80 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>プロトコル</div></div><div id=c81 style=height:26px><input id=c82 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="最大32文字"><div title="最大32文字">Server Name</div></div><div id=c83 style=height:26px><select id=c84 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c85 style=height:26px><input id=c86 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c87 style=height:26px><input id=c88 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">ユーザー名</div></div><div id=c89 style=height:26px><input id=c90 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuthDialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">パスワード</div></div><div id=c91 style=height:26px><input id=c92 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c93 style=height:26px><input id=c94 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c95 style=height:26px><input id=c96 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c97 style=height:26px><select id=c98 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Client Certificate</div></div><div id=c99 style=height:26px><select id=c100 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Server Issuer Cert</div></div><div id=c101 style=height:26px><select id=c102 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>有効<option value=1>無効</select><div>Active in S0</div></div><div id=c103 style=height:26px><input id=c104 style=float:right;width:200px onkeyup=updateNetAuthDialog()><div>PXE Timeout</div></div></div></div><div style=padding:10px;margin-bottom:4px><input id=c105 type=button value=キャンセル style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c106 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c107 type=button value=削除する style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
5 -$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var g=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==g&&$jscomp.global.Object.defineProperty(b,d,g)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
5 +$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var e=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==e&&$jscomp.global.Object.defineProperty(b,d,e)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
6 String.prototype.endsWith||(String.prototype.endsWith=function(b){return-1!==this.indexOf(b,this.length-b.length)});function Q(b){return document.getElementById(b)}function QS(b){try{return Q(b).style}catch(c){}}function QE(b,c){try{Q(b).disabled=!c}catch(a){}}function QV(b,c){try{QS(b).display=c?"":"none"}catch(a){}}function QA(b,c){Q(b).innerHTML+=c}function QH(b,c){Q(b).innerHTML=c}function inputBoxFocus(b){Q(b).focus();var c=Q(b).value;Q(b).value="";Q(b).value=c}
7 function ReadShort(b,c){return(b.charCodeAt(c)<<8)+b.charCodeAt(c+1)}function ReadShortX(b,c){return(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}function ReadInt(b,c){return 16777216*b.charCodeAt(c)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadSInt(b,c){return(b.charCodeAt(c)<<24)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadIntX(b,c){return 16777216*b.charCodeAt(c+3)+(b.charCodeAt(c+2)<<16)+(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}
8 function ShortToStr(b){return String.fromCharCode(b>>8&255,b&255)}function ShortToStrX(b){return String.fromCharCode(b&255,b>>8&255)}function IntToStr(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}function IntToStrX(b){return String.fromCharCode(b&255,b>>8&255,b>>16&255,b>>24&255)}function MakeToArray(b){return b&&null!=b&&"object"!=typeof b?[b]:b}function SplitArray(b){return b.split(",")}function Clone(b){return JSON.parse(JSON.stringify(b))}
@@ -12,156 +12,156 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a,d){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(d?d:32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,u,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.floppyReady)return g.floppyReady=!0,g.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.cdromReady)return g.cdromReady=!0,g.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}g.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,u);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),g.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 -d=0;switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}g.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),u&1);return}g.SendCommandEndResponse(1,5,c,36,0);break;case 27:g.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==g.floppy||176==c&&null==g.cdrom)return g.SendCommandEndResponse(1,
18 -2,c,58,0),-1;g.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}g.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),u&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.floppy&&(d=(g.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.cdrom&&(d=(g.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);g.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),u&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,F,d);a(c,F,d,u);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);g.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return g.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?g.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -u&1):0==N&&(H?g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),u&1):g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),u&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=r;if(16==v||N&&16>v)H+=K;if(30==
22 -v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=A;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));g.SendDataToHost(c,!0,H,u&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");g.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=g.floppy?d=2:176==c&&null!=g.cdrom&&(d=2);g.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),u&1);break;case 76:g.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),g.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),g.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;F=0;160==c?null!=g.floppy&&(F=g.floppy.size>>9):null!=g.cdrom&&(F=g.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?y:R:z;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?q:l:D;break;case 26:176==c&&(H=e);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?g.SendCommandEndResponse(0,5,c,32,0):g.SendDataToHost(c,!0,H,u&1);break;case 81:g.SendDataToHost(c,!0,E,u&1);break;case 172:g.SendDataToHost(c,!0,O,u&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),g.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 -b,x,e){var c=null,y=0;160==a&&(c=g.floppy,null!=g.floppy&&(y=g.floppy.size>>9));176==a&&(c=g.cdrom,null!=g.cdrom&&(y=g.cdrom.size>>11));if(0>x||b+x>y)return g.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return g.SendCommandEndResponse(1,0,a,0,0),0;null!=c&&(g.sectorStats&&g.sectorStats(1,160==a?0:1,y,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==u?H.push({media:c,dev:a,lba:b,len:x,fr:e}):(u=c,T=a,P=b,F=x,d(e)))}function d(a){var b=F,x=P;F>g.iderinfo.readbfr&&(b=g.iderinfo.readbfr);F-=b;P+=b;var e=
26 -new FileReader;e.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));g.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(u=null,N?(g.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),u=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};e.readAsBinaryString?e.readAsBinaryString(u.slice(x,x+b)):e.readAsArrayBuffer(u.slice(x,x+b))}var g={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,q,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,q);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),q&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),q&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);e.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),q&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,F,d);a(c,F,d,q);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);e.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +q&1):0==N&&(H?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),q&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),q&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=u;if(16==v||N&&16>v)H+=K;if(30==
22 +v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=z;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));e.SendDataToHost(c,!0,H,q&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),q&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;F=0;160==c?null!=e.floppy&&(F=e.floppy.size>>9):null!=e.cdrom&&(F=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?A:R:y;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?r:l:D;break;case 26:176==c&&(H=g);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,H,q&1);break;case 81:e.SendDataToHost(c,!0,E,q&1);break;case 172:e.SendDataToHost(c,!0,O,q&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 +b,x,c){var g=null,p=0;160==a&&(g=e.floppy,null!=e.floppy&&(p=e.floppy.size>>9));176==a&&(g=e.cdrom,null!=e.cdrom&&(p=e.cdrom.size>>11));if(0>x||b+x>p)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,p,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==q?H.push({media:g,dev:a,lba:b,len:x,fr:c}):(q=g,T=a,P=b,F=x,d(c)))}function d(a){var b=F,x=P;F>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);F-=b;P+=b;var c=
26 +new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));e.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(q=null,N?(e.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),q=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(q.slice(x,x+b)):c.readAsArrayBuffer(q.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
27 iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,
28 -0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),e=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 -18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),r=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 -0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),A=String.fromCharCode(1,5,3,0),y=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),z=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);g.xxStateChange=function(a){b("IDER-StateChange",a);
31 -0==a&&g.Stop();3==a&&g.Start()};g.Start=function(){b("IDER-Start");b(g.floppy,g.cdrom);g.bytesToAmt=0;g.bytesFromAmt=0;g.inSequence=0;g.outSequence=0;H=[];g.SendCommand(64,ShortToStrX(g.rx_timeout)+ShortToStrX(g.tx_timeout)+ShortToStrX(g.heartbeat)+IntToStrX(g.version));g.sectorStats&&(g.sectorStats(0,0,g.floppy?g.floppy.size>>9:0),g.sectorStats(0,1,g.cdrom?g.cdrom.size>>11:0))};g.Stop=function(){b("IDER-Stop");g.parent.Stop()};g.ProcessData=function(a){g.bytesFromAmt+=a.length;g.acc+=a;null!=v&&
32 -v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",g.acc.length,rstr2hex(g.acc));;){a=g.ProcessDataEx();if(0==a)break;if(g.inSequence!=ReadIntX(g.acc,4)){b("ERROR: Out of sequence",g.inSequence,ReadIntX(g.acc,4));g.Stop();break}g.inSequence++;g.acc=g.acc.substring(a)}};g.SendCommand=function(a,x,e,c){null==x&&(x="");e=50<a&&1==e?2:0;c&&(e+=1);x=String.fromCharCode(a,0,0,e)+IntToStrX(g.outSequence++)+x;g.parent.xxSend(x);g.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 -"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};g.SendCommandEndResponse=function(a,b,x,e,c){a?g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,e,c),!0)};g.SendDataToHost=function(a,b,x,e){var c=e?0:x.length;1==b?g.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,e):g.SendCommand(84,
34 -String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,e)};g.SendGetDataFromHost=function(a,b){g.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};g.SendDisableEnableFeatures=function(a,b){null==b&&(b="");g.SendCommand(72,String.fromCharCode(a)+b)};g.ProcessDataEx=function(){if(8>g.acc.length)return 0;switch(g.acc.charCodeAt(0)){case 65:if(30>g.acc.length)break;var a=g.acc.charCodeAt(29);
35 -if(g.acc.length<30+a)break;g.iderinfo={};g.iderinfo.major=g.acc.charCodeAt(8);g.iderinfo.minor=g.acc.charCodeAt(9);g.iderinfo.fwmajor=g.acc.charCodeAt(10);g.iderinfo.fwminor=g.acc.charCodeAt(11);g.iderinfo.readbfr=ReadShortX(g.acc,16);g.iderinfo.writebfr=ReadShortX(g.acc,18);g.iderinfo.proto=g.acc.charCodeAt(21);g.iderinfo.iana=ReadIntX(g.acc,25);b(g.iderinfo);0!=g.iderinfo.proto&&(b("Unknown proto",g.iderinfo.proto),g.Stop());8192<g.iderinfo.readbfr&&(b("Illegal read buffer size",g.iderinfo.readbfr),
36 -g.Stop());8192<g.iderinfo.writebfr&&(b("Illegal write buffer size",g.iderinfo.writebfr),g.Stop());0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),g.Stop(),8;case 68:return g.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>g.acc.length)break;a=g.acc.charCodeAt(8);null===u?(g.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 -a));return 9;case 73:if(13>g.acc.length)break;var a=g.acc.charCodeAt(8),x=ReadIntX(g.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:g.enabled=x&2?!0:!1;b("IDER Status: "+g.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>g.acc.length)break;b("IDER: ABORT",g.acc.charCodeAt(8));
38 -return 11;case 75:return 8;case 80:if(28>g.acc.length)break;var a=g.acc.charCodeAt(14)&16?176:160,x=g.acc.charCodeAt(14),e=g.acc.substring(16,28),y=g.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(e),y,x);c(a,e,y,x);return 28;case 83:if(14>g.acc.length)break;a=ReadShortX(g.acc,9);if(g.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",g.acc[0]),g.Stop()}return 0};
39 -var H=[],N=!1,u=null,T,P,F;return g},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 -a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,g,v,n){b("SIDER-Start",a,d,g,v,n);c.host=a;c.port=d;c.user=g;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==g?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+g:"")+"&tls1only="+
41 -c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(g){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
28 +0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),r=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 +18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 +0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);
31 +0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;H=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&
32 +v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 +"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,
34 +String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);
35 +if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),
36 +e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===q?(e.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 +a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));
38 +return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),p=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),p,x);c(a,g,p,x);return 28;case 83:if(14>e.acc.length)break;a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};
39 +var H=[],N=!1,q=null,T,P,F;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 +a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+
41 +c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
42 b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);break;
43 -default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,g){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){e.socketState=2;e.socketParseState=0;e.socketAccumulator="";e.socketHeader=null;e.socketData="";
44 -for(i in e.pendingAjaxCall)e.sendRequest(e.pendingAjaxCall[i][0],e.pendingAjaxCall[i][3],e.pendingAjaxCall[i][4])}function p(a){var b=e.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(e.socketAccumulator=b+a;;){if(0==e.socketParseState){b=e.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;e.socketHeader=e.socketAccumulator.substring(0,b).split("\r\n");if(null==e.amtVersion)for(var c in e.socketHeader)0==e.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 -(e.amtVersion=e.socketHeader[c].substring(46));e.socketAccumulator=e.socketAccumulator.substring(b+4);e.socketParseState=1;e.socketData="";e.socketXHeader={Directive:e.socketHeader[0].split(" ")};for(c in e.socketHeader)0!=c&&(b=e.socketHeader[c].indexOf(":"),e.socketXHeader[e.socketHeader[c].substring(0,b).toLowerCase()]=e.socketHeader[c].substring(b+2))}if(1==e.socketParseState){b=-1;if(void 0==e.socketXHeader.connection||"close"!=e.socketXHeader.connection.toLowerCase()||void 0!=e.socketXHeader["transfer-encoding"]&&
46 -"chunked"==e.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=e.socketXHeader["content-length"]){b=parseInt(e.socketXHeader["content-length"]);if(e.socketAccumulator.length<b)break;a=e.socketAccumulator.substring(0,b);e.socketAccumulator=e.socketAccumulator.substring(b);e.socketData=a;b=0}else{var p=e.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(e.socketAccumulator.substring(0,p),16);if(isNaN(b)){e.websocket&&e.websocket.close();break}if(e.socketAccumulator.length<p+2+b+2)break;
47 -a=e.socketAccumulator.substring(p+2,p+2+b);e.socketAccumulator=e.socketAccumulator.substring(p+2+b+2);e.socketData+=a}else b=0;if(0==b){p=e.socketXHeader;b=e.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++e.authcounter){if(e.challengeParams=e.parseDigest(p["www-authenticate"]),null!=e.challengeParams.qop){b=e.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 -e.challengeParams.qop="auth-int":e.challengeParams.qop="auth"}}else p=e.pendingAjaxCall.shift(),e.authcounter=0,e.ActiveAjaxCount--,e.gotNextMessages(b,"success",{status:a},p),e.PerformNextAjax();e.socketParseState=0;e.socketHeader=null}}}}function q(a){0==e.inDataCount&&(e.tlsv1only=1-e.tlsv1only);e.socketState=0;null!=e.socket&&(e.socket.close(),e.socket=null);if(0<e.pendingAjaxCall.length){a=e.pendingAjaxCall.shift();var b=a[5];e.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var e={PendingAjax:[],
49 -ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};e.host=b;e.port=c;e.user=a;e.pass=d;e.tls=g;e.tlsv1only=0;e.inDataCount=0;e.amtVersion=null;e.digestRealmMatch=null;e.digestRealm=null;e.PerformAjax=function(a,b,c,p,d,h){e.ActiveAjaxCount<e.MaxActiveAjaxCount&&0==e.PendingAjax.length?e.PerformAjaxEx(a,b,c,d,h):1==p?e.PendingAjax.unshift([a,b,c,d,h]):e.PendingAjax.push([a,b,c,d,h])};e.PerformNextAjax=function(){if(!(e.ActiveAjaxCount>=
50 -e.MaxActiveAjaxCount||0==e.PendingAjax.length)){var a=e.PendingAjax.shift();e.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);e.PerformNextAjax()}};e.PerformAjaxEx=function(a,b,c,p,d){if(0!=e.FailAllError)e.gotNextMessagesError({status:e.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),e.ActiveAjaxCount++,e.PerformAjaxExNodeJS(a,b,c,p,d)};e.pendingAjaxCall=[];e.PerformAjaxExNodeJS=function(a,b,c,p,d){e.PerformAjaxExNodeJS2(a,
51 -b,c,p,d,5)};e.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=e.FailAllError?(e.ActiveAjaxCount--,999!=e.FailAllError&&e.gotNextMessages(null,"error",{status:0==e.FailAllError?408:e.FailAllError},[a,b,c,p,d]),e.PerformNextAjax()):(e.pendingAjaxCall.push([a,b,c,p,d,h]),0==e.socketState?e.xxConnectHttpSocket():2==e.socketState&&e.sendRequest(a,p,d))};e.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=e.challengeParams){e.digestRealm=e.challengeParams.realm;
52 -if(e.digestRealmMatch&&e.digestRealm!=e.digestRealmMatch){e.FailAllError=997;e.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(e.user+":"+e.challengeParams.realm+":"+e.pass)+":"+e.challengeParams.nonce+":"+n(e.noncecounter)+":"+d+":"+e.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==e.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+e.renderDigest({username:e.user,realm:e.challengeParams.realm,nonce:e.challengeParams.nonce,uri:b,qop:e.challengeParams.qop,
53 -response:c,nc:n(e.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+e.host+":"+e.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==e.socketState&&null!=e.socket&&e.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{e.socket.send(b.buffer)}catch(h){}}};e.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var e=b.trim().split("=");a[e[0]]=e[1].replace(RegExp('"',"g"),"");return a},{})};e.renderDigest=function(a){var b=
54 -[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,e){return b+","+("nc"==e||"qop"==e?e+"="+a[e]:e+'="'+a[e]+'"')},"").substring(1)};e.xxConnectHttpSocket=function(){e.inDataCount=0;e.socketState=1;e.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+e.host+"&port="+e.port+"&tls="+e.tls+"&tls1only="+e.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 -typeof d?"&serverauth=1&user="+a:""));e.socket.binaryType="arraybuffer";e.socket.onopen=l;e.socket.onmessage=p;e.socket.onclose=q};e.gotNextMessages=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](a,c.status,p[2])};e.gotNextMessagesError=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](e,null,{Header:{HttpError:a.status}},a.status,p[2])};e.CancelAllQueries=function(a){for(;0<e.PendingAjax.length;){var b=
56 -e.PendingAjax.shift();b[1](null,a,b[2])}null!=e.websocket&&(e.websocket.close(),e.websocket=null,e.socketState=0)};return e},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
43 +default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){g.socketState=2;g.socketParseState=0;g.socketAccumulator="";g.socketHeader=null;g.socketData="";
44 +for(i in g.pendingAjaxCall)g.sendRequest(g.pendingAjaxCall[i][0],g.pendingAjaxCall[i][3],g.pendingAjaxCall[i][4])}function p(a){var b=g.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(g.socketAccumulator=b+a;;){if(0==g.socketParseState){b=g.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;g.socketHeader=g.socketAccumulator.substring(0,b).split("\r\n");if(null==g.amtVersion)for(var c in g.socketHeader)0==g.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 +(g.amtVersion=g.socketHeader[c].substring(46));g.socketAccumulator=g.socketAccumulator.substring(b+4);g.socketParseState=1;g.socketData="";g.socketXHeader={Directive:g.socketHeader[0].split(" ")};for(c in g.socketHeader)0!=c&&(b=g.socketHeader[c].indexOf(":"),g.socketXHeader[g.socketHeader[c].substring(0,b).toLowerCase()]=g.socketHeader[c].substring(b+2))}if(1==g.socketParseState){b=-1;if(void 0==g.socketXHeader.connection||"close"!=g.socketXHeader.connection.toLowerCase()||void 0!=g.socketXHeader["transfer-encoding"]&&
46 +"chunked"==g.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=g.socketXHeader["content-length"]){b=parseInt(g.socketXHeader["content-length"]);if(g.socketAccumulator.length<b)break;a=g.socketAccumulator.substring(0,b);g.socketAccumulator=g.socketAccumulator.substring(b);g.socketData=a;b=0}else{var p=g.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(g.socketAccumulator.substring(0,p),16);if(isNaN(b)){g.websocket&&g.websocket.close();break}if(g.socketAccumulator.length<p+2+b+2)break;
47 +a=g.socketAccumulator.substring(p+2,p+2+b);g.socketAccumulator=g.socketAccumulator.substring(p+2+b+2);g.socketData+=a}else b=0;if(0==b){p=g.socketXHeader;b=g.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++g.authcounter){if(g.challengeParams=g.parseDigest(p["www-authenticate"]),null!=g.challengeParams.qop){b=g.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 +g.challengeParams.qop="auth-int":g.challengeParams.qop="auth"}}else p=g.pendingAjaxCall.shift(),g.authcounter=0,g.ActiveAjaxCount--,g.gotNextMessages(b,"success",{status:a},p),g.PerformNextAjax();g.socketParseState=0;g.socketHeader=null}}}}function r(a){0==g.inDataCount&&(g.tlsv1only=1-g.tlsv1only);g.socketState=0;null!=g.socket&&(g.socket.close(),g.socket=null);if(0<g.pendingAjaxCall.length){a=g.pendingAjaxCall.shift();var b=a[5];g.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var g={PendingAjax:[],
49 +ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};g.host=b;g.port=c;g.user=a;g.pass=d;g.tls=e;g.tlsv1only=0;g.inDataCount=0;g.amtVersion=null;g.digestRealmMatch=null;g.digestRealm=null;g.PerformAjax=function(a,b,c,p,d,h){g.ActiveAjaxCount<g.MaxActiveAjaxCount&&0==g.PendingAjax.length?g.PerformAjaxEx(a,b,c,d,h):1==p?g.PendingAjax.unshift([a,b,c,d,h]):g.PendingAjax.push([a,b,c,d,h])};g.PerformNextAjax=function(){if(!(g.ActiveAjaxCount>=
50 +g.MaxActiveAjaxCount||0==g.PendingAjax.length)){var a=g.PendingAjax.shift();g.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);g.PerformNextAjax()}};g.PerformAjaxEx=function(a,b,c,p,d){if(0!=g.FailAllError)g.gotNextMessagesError({status:g.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),g.ActiveAjaxCount++,g.PerformAjaxExNodeJS(a,b,c,p,d)};g.pendingAjaxCall=[];g.PerformAjaxExNodeJS=function(a,b,c,p,d){g.PerformAjaxExNodeJS2(a,
51 +b,c,p,d,5)};g.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=g.FailAllError?(g.ActiveAjaxCount--,999!=g.FailAllError&&g.gotNextMessages(null,"error",{status:0==g.FailAllError?408:g.FailAllError},[a,b,c,p,d]),g.PerformNextAjax()):(g.pendingAjaxCall.push([a,b,c,p,d,h]),0==g.socketState?g.xxConnectHttpSocket():2==g.socketState&&g.sendRequest(a,p,d))};g.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=g.challengeParams){g.digestRealm=g.challengeParams.realm;
52 +if(g.digestRealmMatch&&g.digestRealm!=g.digestRealmMatch){g.FailAllError=997;g.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(g.user+":"+g.challengeParams.realm+":"+g.pass)+":"+g.challengeParams.nonce+":"+n(g.noncecounter)+":"+d+":"+g.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==g.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+g.renderDigest({username:g.user,realm:g.challengeParams.realm,nonce:g.challengeParams.nonce,uri:b,qop:g.challengeParams.qop,
53 +response:c,nc:n(g.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+g.host+":"+g.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==g.socketState&&null!=g.socket&&g.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{g.socket.send(b.buffer)}catch(h){}}};g.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};g.renderDigest=function(a){var b=
54 +[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+","+("nc"==c||"qop"==c?c+"="+a[c]:c+'="'+a[c]+'"')},"").substring(1)};g.xxConnectHttpSocket=function(){g.inDataCount=0;g.socketState=1;g.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+g.host+"&port="+g.port+"&tls="+g.tls+"&tls1only="+g.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 +typeof d?"&serverauth=1&user="+a:""));g.socket.binaryType="arraybuffer";g.socket.onopen=l;g.socket.onmessage=p;g.socket.onclose=r};g.gotNextMessages=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](a,c.status,p[2])};g.gotNextMessagesError=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](g,null,{Header:{HttpError:a.status}},a.status,p[2])};g.CancelAllQueries=function(a){for(;0<g.PendingAjax.length;){var b=
56 +g.PendingAjax.shift();b[1](null,a,b[2])}null!=g.websocket&&(g.websocket.close(),g.websocket=null,g.socketState=0)};return g},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
57 function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;
58 d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?
59 d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,
60 0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):d.Stop(2);
61 -else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),e=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),q=q+(e+
62 -1),e=0,e=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(e=n[q],e=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),w="00000002:"+C+":"+e+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(q+=e.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 -p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(e.length)+e);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
61 +else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var r=0,p=n[r],l=a(new Uint8Array(n.buffer.slice(r+1,r+1+p))),r=r+(p+1),g=n[r],p=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),r=r+(g+
62 +1),g=0,g=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[r],g=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),w="00000002:"+C+":"+g+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));r=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(r+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(r)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 +p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
64 break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;
65 break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&
66 1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+
67 "/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=
68 --1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,g,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
68 +-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
69 b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b="",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";
70 var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";
71 -b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,g,v);q.PerformAjax=function(a,b,c,p,d){null==d&&(d="");q.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" '+
72 -d+"><Header><a:Action>"+a,function(a,c,e){var p=q.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(q,p.Header.ResourceURI,p,c,e)}else b(q,null,{Header:{HttpError:c}},601,e)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,h,g,l,B){var x="",A="";
73 -g="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 -B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",A='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=g&&(g="<a:ReferenceParameters><m:arg>"+g+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+
75 -"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+g+"</e:NotifyTo>"+A+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=
76 -function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 -q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=q.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var g in b)if(b.hasOwnProperty(g)&&0!==g.indexOf("__")&&0!==g.indexOf("@")&&null!=b[g]&&"function"!==typeof b[g])if("object"===typeof b[g]&&
78 -b[g].ReferenceParameters){a+="<r:"+g+"><a:Address>"+b[g].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[g].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[g].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+g+">"}else if(Array.isArray(b[g]))for(B=0;B<b[g].length;B++)a+=
79 -"<r:"+g+">"+b[g][B].toString()+"</r:"+g+">";else a+="<r:"+g+">"+b[g].toString()+"</r:"+g+">";b=a+("</r:"+h+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var h=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
80 -p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var g in b)a+="<g:"+g+">"+b[g]+"</g:"+g+">";q.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
81 -p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>",b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,
82 -h){var g="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])g+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else g+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,g,p,d,k,h)};q.ExecMethodXml=function(a,b,c,d,m,k,h){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
83 -p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>',
84 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var g=a.getElementsByTagName("Body")[0];g||(g=a.getElementsByTagName("a:Body")[0]);
86 -if(!g)return null;if(0<g.childNodes.length){k=g.childNodes[0].localName;var q=k.indexOf("_OUTPUT");-1!=q&&q==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(g.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",g,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
87 -function AmtStackCreateService(b){function c(){var a=e.GetPendingActions();C<a&&(C=a);null!=e.onProcessChanged&&w!=a&&(w=a,e.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,z,h,k){200!=z?(c(e,a,null,z,h),g(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?e.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,e,p,z){d(a,p,c,e,[],z,h,k)}):(c(e,a,null,603,h),g(1))}function d(a,b,p,h,z,E,k,m){if(200!=E)p(e,a,null,E,k),g(1);else if(null==b||"PullResponse"!=b.Header.Method)p(e,
88 -a,null,604,k),g(1);else{for(var r in b.Body.Items)if(b.Body.Items[r]instanceof Array)for(var q in b.Body.Items[r])"function"!=typeof b.Body.Items[r][q]&&z.push(b.Body.Items[r][q]);else"function"!=typeof b.Body.Items[r]&&z.push(b.Body.Items[r]);b.Body.EnumerationContext?e.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,e,A){d(a,e,p,c,z,A,k,1)}):(g(1),p(e,a,z,E,k),c())}}function g(a){e.ActiveEnumsCount-=a;e.ActiveEnumsCount>=e.MaxActiveEnumsCount||0==e.PendingEnums.length?c():(a=e.PendingEnums.shift(),
89 -e.Enum(a[0],a[1],a[2]),g(0))}function v(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]),function(b,c,p,d){null==p||200!=d?a.callback(e,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](e,null,d[2]);else e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,z){if(200!=d||"0"!=c.Body.ReturnValue)z[0](e,
90 -null,z[2]);else{var h,m,g;b=z[2];d=new Date;var r=c.Body.RecordArray;"string"===typeof r&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in r){a=null;try{a=window.atob(r[h])}catch(q){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){g={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),
91 -EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)g.EventData.push(a.charCodeAt(m));g.EntityStr=k[g.Entity];g.Desc=p(g.EventSensorType,g.EventOffset,g.EventData,g.Entity);g.EntityStr||(g.EntityStr="Unknown");b.push(g)}}if(1!=c.Body.NoMoreRecords)e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[z[0],b,z[2]]);else z[0](e,b,z[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"\u7121\u52b9\u306a\u30c7\u30fc\u30bf";if(0==b)return D[c[1]];if(3==b){if(170==
92 -c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",r[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",
71 +b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var r={NextMessageId:1,Address:"/wsman"};r.comm=CreateWsmanComm(b,c,a,d,e,v);r.PerformAjax=function(a,b,c,p,d){null==d&&(d="");r.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" '+
72 +d+"><Header><a:Action>"+a,function(a,c,g){var p=r.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(r,p.Header.ResourceURI,p,c,g)}else b(r,null,{Header:{HttpError:c}},601,g)},c,p)};r.CancelAllQueries=function(a){r.comm.CancelAllQueries(a)};r.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};r.ExecSubscribe=function(a,b,c,d,m,k,h,e,l,B){var x="",z="";
73 +e="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 +B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=e&&(e="<a:ReferenceParameters><m:arg>"+e+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+r.Address+
75 +"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+e+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";r.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};r.ExecUnSubscribe=
76 +function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";r.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};r.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 +r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=r.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var e in b)if(b.hasOwnProperty(e)&&0!==e.indexOf("__")&&0!==e.indexOf("@")&&null!=b[e]&&"function"!==typeof b[e])if("object"===typeof b[e]&&
78 +b[e].ReferenceParameters){a+="<r:"+e+"><a:Address>"+b[e].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[e].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[e].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+e+">"}else if(Array.isArray(b[e]))for(B=0;B<b[e].length;B++)a+=
79 +"<r:"+e+">"+b[e][B].toString()+"</r:"+e+">";else a+="<r:"+e+">"+b[e].toString()+"</r:"+e+">";b=a+("</r:"+h+">")}else b="";r.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};r.ExecCreate=function(a,b,c,d,m,k){var h=r.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
80 +p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";r.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};r.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
81 +p(b)+"</Header><Body /></Envelope>";r.PerformAjax(a,c,d,m)};r.ExecGet=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>",b,c,p)};r.ExecMethod=function(a,b,c,p,d,k,
82 +h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])e+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";r.ExecMethodXml(a,b,e,p,d,k,h)};r.ExecMethodXml=function(a,b,c,d,m,k,h){r.PerformAjax(a+"/"+b+"</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
83 +p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};r.ExecEnum=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>',
84 +b,c,p)};r.ExecPull=function(a,b,c,p,d){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 +c,p,d)};r.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var e=a.getElementsByTagName("Body")[0];e||(e=a.getElementsByTagName("a:Body")[0]);
86 +if(!e)return null;if(0<e.childNodes.length){k=e.childNodes[0].localName;var r=k.indexOf("_OUTPUT");-1!=r&&r==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(e.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",e,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return r};
87 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();C<a&&(C=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,g,p,y){d(a,p,c,g,[],y,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,p,h,y,E,k,m){if(200!=E)p(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(g,
88 +a,null,604,k),e(1);else{for(var u in b.Body.Items)if(b.Body.Items[u]instanceof Array)for(var r in b.Body.Items[u])"function"!=typeof b.Body.Items[u][r]&&y.push(b.Body.Items[u][r]);else"function"!=typeof b.Body.Items[u]&&y.push(b.Body.Items[u]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,p,c,y,z,k,1)}):(e(1),p(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
89 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
90 +null,y[2]);else{var h,m,e;b=y[2];d=new Date;var u=c.Body.RecordArray;"string"===typeof u&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in u){a=null;try{a=window.atob(u[h])}catch(r){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){e={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),
91 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)e.EventData.push(a.charCodeAt(m));e.EntityStr=k[e.Entity];e.Desc=p(e.EventSensorType,e.EventOffset,e.EventData,e.Entity);e.EntityStr||(e.EntityStr="Unknown");b.push(e)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"\u7121\u52b9\u306a\u30c7\u30fc\u30bf";if(0==b)return D[c[1]];if(3==b){if(170==
92 +c[0]&&48==c[1])return format("One Click Recovery: {0}",u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("One Click Recovery: {0}",h[c[2]]):format("One Click Recovery: Unknown progress event {0}",
93 c[2]);if(170==c[0]&&64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";
94 -if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==a&&170==c[0])return"\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... \u306b\u5909\u308f\u3063\u305f"+e.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"\u30b1\u30fc\u30b9\u4fb5\u5165";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"\u30ea\u30e2\u30fc\u30c8\u30b7\u30ea\u30a2\u30eb\u30aa\u30fc\u30d0\u30fcLAN\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u78ba\u7acb\u3055\u308c\u307e\u3057\u305f\u3002";
94 +if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==a&&170==c[0])return"\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... \u306b\u5909\u308f\u3063\u305f"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"\u30b1\u30fc\u30b9\u4fb5\u5165";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"\u30ea\u30e2\u30fc\u30c8\u30b7\u30ea\u30a2\u30eb\u30aa\u30fc\u30d0\u30fcLAN\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u78ba\u7acb\u3055\u308c\u307e\u3057\u305f\u3002";
95 if(1==c[2])return"\u30ea\u30e2\u30fc\u30c8\u30b7\u30ea\u30a2\u30eb\u30aa\u30fc\u30d0\u30fcLAN\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002\u30e6\u30fc\u30b6\u30fc\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u304c\u5fa9\u5143\u3055\u308c\u307e\u3057\u305f\u3002";if(2==c[2])return"\u30ea\u30e2\u30fc\u30c8IDE\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u78ba\u7acb\u3055\u308c\u307e\u3057\u305f\u3002";if(3==c[2])return"\u30ea\u30e2\u30fc\u30c8IDE\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002\u30e6\u30fc\u30b6\u30fc\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u304c\u5fa9\u5143\u3055\u308c\u307e\u3057\u305f\u3002"}if(36==
96 a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="\u6709\u7dda"),4294967293==a?"\u53d7\u4fe1\u3057\u305f\u3059\u3079\u3066\u306e\u30d1\u30b1\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u304c\u4e00\u81f4\u3057\u307e\u3057\u305f"+b+" \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3002":4294967292==a?"\u3059\u3079\u3066\u306e\u9001\u4fe1\u30d1\u30b1\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u304c\u4e00\u81f4\u3057\u307e\u3057\u305f"+b+" \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3002":
97 4294967290==a?"\u30b9\u30d7\u30fc\u30d5\u30a3\u30f3\u30b0\u3055\u308c\u305f\u30d1\u30b1\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u304c\u4e00\u81f4\u3057\u307e\u3057\u305f"+b+" \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3002":"\u30d5\u30a3\u30eb\u30bf"+a+" \u306b\u4e00\u81f4\u3057\u307e\u3057\u305f"+b+" \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3002";if(192==a)return 0==c[2]?"\u547c\u3073\u51fa\u3055\u308c\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30dd\u30ea\u30b7\u30fc\u3002\u4e00\u90e8\u307e\u305f\u306f\u3059\u3079\u3066\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\uff08TX\uff09\u304c\u505c\u6b62\u3057\u307e\u3057\u305f\u3002":
98 2==c[2]?"\u547c\u3073\u51fa\u3055\u308c\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30dd\u30ea\u30b7\u30fc\u3002\u4e00\u90e8\u307e\u305f\u306f\u3059\u3079\u3066\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\uff08RX\uff09\u304c\u505c\u6b62\u3057\u307e\u3057\u305f\u3002":"\u547c\u3073\u51fa\u3055\u308c\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30dd\u30ea\u30b7\u30fc\u3002";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"\u30ea\u30e2\u30fc\u30c8\u63a5\u7d9a\u306e\u30e6\u30fc\u30b6\u30fc\u8981\u6c42\u3002";
99 if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"EAC\u30a8\u30e9\u30fc\uff1aIntel AMT\u306eNAC\u304c\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u304d\u306b\u30dd\u30b9\u30c1\u30e3\u3092\u53d6\u5f97\u3057\u3088\u3046\u3068\u3057\u307e\u3057\u305f\u3002";if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"HWA\u30a8\u30e9\u30fc\uff1a\u4e00\u822c\u7684\u306a\u30a8\u30e9\u30fc"}return 6==a?"\u8a8d\u8a3c\u306b\u5931\u6557\u3057\u307e\u3057\u305f"+(c[1]+(c[2]<<8))+" \u56de\u3002\u30b7\u30b9\u30c6\u30e0\u304c\u653b\u6483\u3092\u53d7\u3051\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002":
100 30==a?"\u30d6\u30fc\u30bf\u30d6\u30eb\u30e1\u30c7\u30a3\u30a2\u306a\u3057":32==a?"\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306e\u30ed\u30c3\u30af\u30a2\u30c3\u30d7\u307e\u305f\u306f\u96fb\u6e90\u306e\u4e2d\u65ad":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"\u30b7\u30b9\u30c6\u30e0\u306e\u8d77\u52d5\u5931\u6557":37==a?"\u30b7\u30b9\u30c6\u30e0\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u304c\u8d77\u52d5\u3057\u307e\u3057\u305f\uff08\u5c11\u306a\u304f\u3068\u30821\u3064\u306eCPU\u304c\u6b63\u3057\u304f\u5b9f\u884c\u3055\u308c\u3066\u3044\u307e\u3059\uff09\u3002":
101 -"\u4e0d\u660e\u306a\u30bb\u30f3\u30b5\u30fc\u30bf\u30a4\u30d7\uff03"+a}function q(a,b,c,p,d){if(200!=p)d[0](e,[],p);else{var h,k,m=d[1],g=new Date,r;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];
102 -b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>\u5730\u5143</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM\u30c7\u30d5\u30a9\u30eb\u30c8\u30dd\u30fc\u30c8</i>",h=5);r=ReadInt(a,h);b.Time=new Date(1E3*(r+60*g.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);
103 -r=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+r);h+=r;r=a.charCodeAt(h++);b.Ex=a.substring(h,h+r);b.ExStr=e.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)e.AMT_AuditLog_ReadRecords(m.length+1,q,[d[0],m]);else d[0](e,m,p)}}var e={};e.wsman=b;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;
104 -e.ActiveEnumsCount=0;e.MaxActiveEnumsCount=1;e.onProcessChanged=null;var C=0,w=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,b,p,d,z,h,k,m,g,r){e.wsman.ExecSubscribe(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,y,A,z)},0,h,k,m,g,r);c()};e.UnSubscribe=function(a,b,p,d,z){e.wsman.ExecUnSubscribe(e.CompleteName(a),function(d,z,h,k){c();b(e,a,h,k,p)},
105 -0,d,z);c()};e.Get=function(a,b,p,d){e.wsman.ExecGet(e.CompleteName(a),function(d,h,k,m){c();b(e,a,k,m,p)},0,d);c()};e.Put=function(a,b,p,d,z,h){e.wsman.ExecPut(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z,h);c()};e.Create=function(a,b,p,d,z){e.wsman.ExecCreate(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Delete=function(a,b,p,d,z){e.wsman.ExecDelete(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Exec=function(a,b,p,d,z,h,k){e.wsman.ExecMethod(e.CompleteName(a),
106 -b,p,function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.ExecWithXml=function(a,b,p,d,z,h,k){e.wsman.ExecMethodXml(e.CompleteName(a),b,execArgumentsToXml(p),function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.Enum=function(b,p,d,h){e.ActiveEnumsCount<e.MaxActiveEnumsCount?(e.ActiveEnumsCount++,e.wsman.ExecEnum(e.CompleteName(b),function(e,d,y,h,k){c();a(b,y,p,d,h,k)},d,h)):e.PendingEnums.push([b,p,d,h]);c()};e.BatchEnum=function(a,b,p,d,z,h){z={_pending:b.length};
107 -e.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],g=e.Enum;"*"==m[0]&&(g=e.Get,m=m.substring(1));g(m,function(b,z,A,h,k){e.PendingBatchOperations--;c();k[2][z]={response:null==A?null:A.Body,responses:A,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(e,e,a,k[2],h,d))},[a,b,z,g==e.Get?"Get":"Enum"],h)}};e.BatchGet=function(a,b,p,e,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:e,pri:d});c()};e.CompleteName=function(a){if(0==a.indexOf("AMT_"))return e.pfx[0]+a;if(0==
108 -a.indexOf("CIM_"))return e.pfx[1]+a;if(0==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,b){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>',
109 -null,null,b)};e.RequestOSPowerStateChange=function(a,b){e.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
110 -null,null,b)};e.SetBootConfigRole=function(a,b){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>',
111 -a,b)};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,b){e.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
112 -k,m,g){e.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,g)};e.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){e.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};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=
113 -function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){e.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};e.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA",
114 -"DeleteAllActions",{_method_dummy:a},b)};e.AMT_AuditLog_ClearLog=function(a){e.Exec("AMT_AuditLog","ClearLog",{},a)};e.AMT_AuditLog_RequestStateChange=function(a,b,c){e.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_AuditLog_ReadRecords=function(a,b,c){e.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};e.AMT_AuditLog_SetAuditLock=function(a,b,c,p){e.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};e.AMT_AuditLog_ExportAuditLogSignature=
115 -function(a,b){e.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};e.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){e.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule",
116 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){e.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};e.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){e.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};e.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService",
117 -"GetUserAclEntryEx",{Handle:a},b,c)};e.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){e.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};e.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){e.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};e.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
118 -{Username:a,DigestPassword:b},c)};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,b,c,p){e.Exec("AMT_AuthorizationService",
119 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};e.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){e.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};e.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_EndpointAccessControlService_GetPosture=function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};e.AMT_EndpointAccessControlService_GetPostureHash=
120 -function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};e.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){e.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};e.AMT_EndpointAccessControlService_GetEacOptions=function(a){e.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};e.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
121 -PostureHashAlgorithm:b},c)};e.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};e.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};e.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){e.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};e.AMT_GeneralSettings_AMTAuthenticate=
122 -function(a,b){e.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};e.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){e.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};e.AMT_KerberosSettingData_GetCredentialCacheState=function(a){e.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};e.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){e.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
123 -b)};e.AMT_MessageLog_CancelIteration=function(a,b){e.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};e.AMT_MessageLog_RequestStateChange=function(a,b,c){e.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_MessageLog_ClearLog=function(a){e.Exec("AMT_MessageLog","ClearLog",{},a)};e.AMT_MessageLog_GetRecords=function(a,b,c,p){e.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};e.AMT_MessageLog_GetRecord=function(a,
124 -b,c){e.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};e.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){e.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};e.AMT_MessageLog_PositionToFirstRecord=function(a,b){e.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};e.AMT_MessageLog_FreezeLog=function(a,b){e.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};e.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){e.Exec("AMT_PublicKeyManagementService",
125 -"AddCRL",{Url:a,SerialNumbers:b},c)};e.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){e.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};e.AMT_PublicKeyManagementService_AddCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddKey=
126 -function(a,b){e.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};e.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};e.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};e.AMT_PublicKeyManagementService_GenerateKeyPair=
127 -function(a,b,c){e.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};e.AMT_RedirectionService_RequestStateChange=function(a,b){e.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};e.AMT_RedirectionService_TerminateSession=function(a,b){e.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};e.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,g){e.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
128 -Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},g)};e.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){e.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};e.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){e.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){e.Exec("AMT_SetupAndConfigurationService",
129 -"CommitChanges",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_Unprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};e.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
130 -e.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};e.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){e.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};e.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){e.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){e.Exec("AMT_SetupAndConfigurationService",
131 -"GetProvisioningAuditRecord",{},a)};e.AMT_SetupAndConfigurationService_GetUuid=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};e.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){e.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};e.AMT_SystemDefensePolicy_GetTimeout=
132 -function(a){e.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};e.AMT_SystemDefensePolicy_SetTimeout=function(a,b){e.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};e.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){e.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};e.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){e.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};e.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
133 -function(a,b){e.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};e.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){e.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};e.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){e.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WebUIService_RequestStateChange=function(a,b,c){e.Exec("AMT_WebUIService",
134 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
135 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};e.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};e.CIM_Account_RequestStateChange=function(a,b,c){e.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
136 -c)};e.CIM_AccountManagementService_CreateAccount=function(a,b,c){e.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};e.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){e.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};e.CIM_BootService_SetBootConfigRole=function(a,b,c){e.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};e.CIM_BootService_RequestStateChange=function(a,b,c,p){e.Exec("CIM_BootService","RequestStateChange",
137 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};e.CIM_Card_ConnectorPower=function(a,b,c){e.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};e.CIM_Card_IsCompatible=function(a,b){e.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};e.CIM_Chassis_IsCompatible=function(a,b){e.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};e.CIM_Fan_SetSpeed=function(a,b){e.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};e.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){e.Exec("CIM_KVMRedirectionSAP",
138 -"RequestStateChange",{RequestedState:a},c)};e.CIM_MediaAccessDevice_LockMedia=function(a,b){e.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};e.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){e.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_MediaAccessDevice_Reset=function(a){e.Exec("CIM_MediaAccessDevice","Reset",{},a)};e.CIM_MediaAccessDevice_EnableDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};e.CIM_MediaAccessDevice_OnlineDevice=
139 -function(a,b){e.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};e.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};e.CIM_MediaAccessDevice_SaveProperties=function(a){e.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};e.CIM_MediaAccessDevice_RestoreProperties=function(a){e.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};e.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){e.Exec("CIM_MediaAccessDevice","RequestStateChange",
140 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_PhysicalFrame_IsCompatible=function(a,b){e.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};e.CIM_PhysicalPackage_IsCompatible=function(a,b){e.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};e.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){e.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.CIM_PowerSupply_SetPowerState=function(a,
141 -b,c){e.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_PowerSupply_Reset=function(a){e.Exec("CIM_PowerSupply","Reset",{},a)};e.CIM_PowerSupply_EnableDevice=function(a,b){e.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};e.CIM_PowerSupply_OnlineDevice=function(a,b){e.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};e.CIM_PowerSupply_QuiesceDevice=function(a,b){e.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};e.CIM_PowerSupply_SaveProperties=function(a){e.Exec("CIM_PowerSupply",
142 -"SaveProperties",{},a)};e.CIM_PowerSupply_RestoreProperties=function(a){e.Exec("CIM_PowerSupply","RestoreProperties",{},a)};e.CIM_PowerSupply_RequestStateChange=function(a,b,c){e.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Processor_SetPowerState=function(a,b,c){e.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Processor_Reset=function(a){e.Exec("CIM_Processor","Reset",{},a)};e.CIM_Processor_EnableDevice=function(a,b){e.Exec("CIM_Processor",
143 -"EnableDevice",{Enabled:a},b)};e.CIM_Processor_OnlineDevice=function(a,b){e.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};e.CIM_Processor_QuiesceDevice=function(a,b){e.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Processor_SaveProperties=function(a){e.Exec("CIM_Processor","SaveProperties",{},a)};e.CIM_Processor_RestoreProperties=function(a){e.Exec("CIM_Processor","RestoreProperties",{},a)};e.CIM_Processor_RequestStateChange=function(a,b,c){e.Exec("CIM_Processor","RequestStateChange",
144 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RecordLog_ClearLog=function(a){e.Exec("CIM_RecordLog","ClearLog",{},a)};e.CIM_RecordLog_RequestStateChange=function(a,b,c){e.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RedirectionService_RequestStateChange=function(a,b,c){e.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Sensor_SetPowerState=function(a,b,c){e.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
145 -c)};e.CIM_Sensor_Reset=function(a){e.Exec("CIM_Sensor","Reset",{},a)};e.CIM_Sensor_EnableDevice=function(a,b){e.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};e.CIM_Sensor_OnlineDevice=function(a,b){e.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};e.CIM_Sensor_QuiesceDevice=function(a,b){e.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Sensor_SaveProperties=function(a){e.Exec("CIM_Sensor","SaveProperties",{},a)};e.CIM_Sensor_RestoreProperties=function(a){e.Exec("CIM_Sensor","RestoreProperties",
146 -{},a)};e.CIM_Sensor_RequestStateChange=function(a,b,c){e.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_StatisticalData_ResetSelectedStats=function(a,b){e.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};e.CIM_Watchdog_KeepAlive=function(a){e.Exec("CIM_Watchdog","KeepAlive",{},a)};e.CIM_Watchdog_SetPowerState=function(a,b,c){e.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Watchdog_Reset=function(a){e.Exec("CIM_Watchdog",
147 -"Reset",{},a)};e.CIM_Watchdog_EnableDevice=function(a,b){e.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};e.CIM_Watchdog_OnlineDevice=function(a,b){e.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};e.CIM_Watchdog_QuiesceDevice=function(a,b){e.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};e.CIM_Watchdog_SaveProperties=function(a){e.Exec("CIM_Watchdog","SaveProperties",{},a)};e.CIM_Watchdog_RestoreProperties=function(a){e.Exec("CIM_Watchdog","RestoreProperties",{},a)};e.CIM_Watchdog_RequestStateChange=
148 -function(a,b,c){e.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_WiFiPort_SetPowerState=function(a,b,c){e.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_WiFiPort_Reset=function(a){e.Exec("CIM_WiFiPort","Reset",{},a)};e.CIM_WiFiPort_EnableDevice=function(a,b){e.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};e.CIM_WiFiPort_OnlineDevice=function(a,b){e.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};e.CIM_WiFiPort_QuiesceDevice=function(a,
149 -b){e.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};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,b,c){e.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){e.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
150 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};e.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};e.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){e.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},h)};e.IPS_HostBasedSetupService_UpgradeClientToAdmin=
151 -function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};e.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){e.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};e.IPS_KVMRedirectionSettingData_TerminateSession=function(a){e.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){e.Exec("IPS_KVMRedirectionSettingData",
152 -"DataChannelRead",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){e.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};e.IPS_OptInService_StartOptIn=function(a){e.Exec("IPS_OptInService","StartOptIn",{},a)};e.IPS_OptInService_CancelOptIn=function(a){e.Exec("IPS_OptInService","CancelOptIn",{},a)};e.IPS_OptInService_SendOptInCode=function(a,b){e.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};e.IPS_OptInService_StartService=function(a){e.Exec("IPS_OptInService",
153 -"StartService",{},a)};e.IPS_OptInService_StopService=function(a){e.Exec("IPS_OptInService","StopService",{},a)};e.IPS_OptInService_RequestStateChange=function(a,b,c){e.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){e.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.IPS_ProvisioningRecordLog_RequestStateChange=
154 -function(a,b,c){e.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_ProvisioningRecordLog_ClearLog=function(a,b){e.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};e.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){e.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};e.IPS_SecIOService_RequestStateChange=function(a,b,c){e.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
155 -TimeoutPeriod:b},c)};e.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){e.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};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",
156 -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",
157 -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",
158 -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",
159 -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,b){e.AMT_MessageLog_PositionToFirstRecord(n,
160 -[a,b,[]])};var D="Unspecified\u3002;\u30b7\u30b9\u30c6\u30e0\u306b\u30b7\u30b9\u30c6\u30e0\u30e1\u30e2\u30ea\u304c\u7269\u7406\u7684\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002;\u4f7f\u7528\u53ef\u80fd\u306a\u30b7\u30b9\u30c6\u30e0\u30e1\u30e2\u30ea\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30e1\u30e2\u30ea\u306b\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002;\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30cf\u30fc\u30c9\u30c7\u30a3\u30b9\u30af/ ATAPI / IDE\u30c7\u30d0\u30a4\u30b9\u306e\u30a8\u30e9\u30fc\u3002;\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30b7\u30b9\u30c6\u30e0\u30dc\u30fc\u30c9\u306e\u30a8\u30e9\u30fc\u3002;\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30c7\u30a3\u30b9\u30b1\u30c3\u30c8\u30b5\u30d6\u30b7\u30b9\u30c6\u30e0\u969c\u5bb3\u3002;\u56de\u5fa9\u4e0d\u80fd\u306a\u30cf\u30fc\u30c9\u30c7\u30a3\u30b9\u30af\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u969c\u5bb3\u3002;\u56de\u5fa9\u4e0d\u80fd\u306aPS / 2\u307e\u305f\u306fUSB\u30ad\u30fc\u30dc\u30fc\u30c9\u969c\u5bb3\u3002;\u30ea\u30e0\u30fc\u30d0\u30d6\u30eb\u30d6\u30fc\u30c8\u30e1\u30c7\u30a3\u30a2\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002;\u56de\u5fa9\u4e0d\u80fd\u306a\u30d3\u30c7\u30aa\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u969c\u5bb3\u3002;\u30d3\u30c7\u30aa\u30c7\u30d0\u30a4\u30b9\u304c\u691c\u51fa\u3055\u308c\u307e\u305b\u3093\u3002;\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\uff08BIOS\uff09ROM\u7834\u640d\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\u3002; CPU\u96fb\u5727\u306e\u4e0d\u4e00\u81f4\uff08\u540c\u3058\u96fb\u6e90\u3092\u5171\u6709\u3059\u308b\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc\u306e\u96fb\u5727\u8981\u4ef6\u304c\u4e00\u81f4\u3057\u3066\u3044\u307e\u305b\u3093\uff09; CPU\u901f\u5ea6\u306e\u4e00\u81f4\u306e\u5931\u6557".split(";"),
101 +"\u4e0d\u660e\u306a\u30bb\u30f3\u30b5\u30fc\u30bf\u30a4\u30d7\uff03"+a}function r(a,b,c,p,d){if(200!=p)d[0](g,[],p);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];
102 +b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>\u5730\u5143</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM\u30c7\u30d5\u30a9\u30eb\u30c8\u30dd\u30fc\u30c8</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);
103 +u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,r,[d[0],m]);else d[0](g,m,p)}}var g={};g.wsman=b;g.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/"];g.PendingEnums=[];g.PendingBatchOperations=0;
104 +g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var C=0,w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,p,d,y,h,k,m,e,u){g.wsman.ExecSubscribe(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,A,z,y)},0,h,k,m,e,u);c()};g.UnSubscribe=function(a,b,p,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,p)},
105 +0,d,y);c()};g.Get=function(a,b,p,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,p)},0,d);c()};g.Put=function(a,b,p,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,p,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,p,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,p,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),
106 +b,p,function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,p,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,p,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(g,d,A,h,k){c();a(b,A,p,d,h,k)},d,h)):g.PendingEnums.push([b,p,d,h]);c()};g.BatchEnum=function(a,b,p,d,y,h){y={_pending:b.length};
107 +g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],e=g.Enum;"*"==m[0]&&(e=g.Get,m=m.substring(1));e(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(g,g,a,k[2],h,d))},[a,b,y,e==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,p,g,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:g,pri:d});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==
108 +a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.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>',
109 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
110 +null,null,b)};g.SetBootConfigRole=function(a,b){g.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>',
111 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
112 +k,m,e){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,e)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
113 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
114 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,p){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};g.AMT_AuditLog_ExportAuditLogSignature=
115 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule",
116 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
117 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
118 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){g.Exec("AMT_AuthorizationService",
119 +"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
120 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
121 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
122 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
123 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,p){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};g.AMT_MessageLog_GetRecord=function(a,
124 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
125 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
126 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
127 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,e){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
128 +Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},e)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
129 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
130 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
131 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
132 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
133 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
134 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){console.log(JSON.stringify({WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},null,2));g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=
135 +function(a,b,c,p,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},
136 +b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,
137 +Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,p){g.Exec("CIM_BootService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c,p,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan",
138 +"SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=
139 +function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",
140 +{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",
141 +{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply",
142 +"QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply","SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor",
143 +"Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor","EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=
144 +function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,
145 +b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=
146 +function(a){g.Exec("CIM_Sensor","RestoreProperties",{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},
147 +c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog","Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog",
148 +"RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",
149 +{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){g.Exec("IPS_HostBasedSetupService",
150 +"Setup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,
151 +DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=
152 +function(a){g.Exec("IPS_KVMRedirectionSettingData","DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};
153 +g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService","StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,
154 +Time:c,TimeoutPeriod:p},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=
155 +function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",
156 +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",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",
157 +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",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",
158 +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",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",
159 +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",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",
160 +4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,[a,b,[]])};var D="Unspecified\u3002;\u30b7\u30b9\u30c6\u30e0\u306b\u30b7\u30b9\u30c6\u30e0\u30e1\u30e2\u30ea\u304c\u7269\u7406\u7684\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002;\u4f7f\u7528\u53ef\u80fd\u306a\u30b7\u30b9\u30c6\u30e0\u30e1\u30e2\u30ea\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30e1\u30e2\u30ea\u306b\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002;\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30cf\u30fc\u30c9\u30c7\u30a3\u30b9\u30af/ ATAPI / IDE\u30c7\u30d0\u30a4\u30b9\u306e\u30a8\u30e9\u30fc\u3002;\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30b7\u30b9\u30c6\u30e0\u30dc\u30fc\u30c9\u306e\u30a8\u30e9\u30fc\u3002;\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30c7\u30a3\u30b9\u30b1\u30c3\u30c8\u30b5\u30d6\u30b7\u30b9\u30c6\u30e0\u969c\u5bb3\u3002;\u56de\u5fa9\u4e0d\u80fd\u306a\u30cf\u30fc\u30c9\u30c7\u30a3\u30b9\u30af\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u969c\u5bb3\u3002;\u56de\u5fa9\u4e0d\u80fd\u306aPS / 2\u307e\u305f\u306fUSB\u30ad\u30fc\u30dc\u30fc\u30c9\u969c\u5bb3\u3002;\u30ea\u30e0\u30fc\u30d0\u30d6\u30eb\u30d6\u30fc\u30c8\u30e1\u30c7\u30a3\u30a2\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002;\u56de\u5fa9\u4e0d\u80fd\u306a\u30d3\u30c7\u30aa\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u969c\u5bb3\u3002;\u30d3\u30c7\u30aa\u30c7\u30d0\u30a4\u30b9\u304c\u691c\u51fa\u3055\u308c\u307e\u305b\u3093\u3002;\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\uff08BIOS\uff09ROM\u7834\u640d\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\u3002; CPU\u96fb\u5727\u306e\u4e0d\u4e00\u81f4\uff08\u540c\u3058\u96fb\u6e90\u3092\u5171\u6709\u3059\u308b\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc\u306e\u96fb\u5727\u8981\u4ef6\u304c\u4e00\u81f4\u3057\u3066\u3044\u307e\u305b\u3093\uff09; CPU\u901f\u5ea6\u306e\u4e00\u81f4\u306e\u5931\u6557".split(";"),
161 m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS 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(";"),
162 k="\u672a\u6307\u5b9a;\u305d\u306e\u4ed6;\u4e0d\u660e;\u30d7\u30ed\u30bb\u30c3\u30b5;\u30c7\u30a3\u30b9\u30af;\u5468\u8fba\u6a5f\u5668;\u30b7\u30b9\u30c6\u30e0\u7ba1\u7406\u30e2\u30b8\u30e5\u30fc\u30eb;\u30b7\u30b9\u30c6\u30e0\u30dc\u30fc\u30c9;\u30e1\u30e2\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb;\u30d7\u30ed\u30bb\u30c3\u30b5\u30e2\u30b8\u30e5\u30fc\u30eb;\u96fb\u6e90\u88c5\u7f6e;\u30ab\u30fc\u30c9\u306b\u8ffd\u52a0;\u30d5\u30ed\u30f3\u30c8\u30d1\u30cd\u30eb\u30dc\u30fc\u30c9;\u30d0\u30c3\u30af\u30d1\u30cd\u30eb\u30dc\u30fc\u30c9;\u96fb\u6e90\u30b7\u30b9\u30c6\u30e0\u30dc\u30fc\u30c9;\u30c9\u30e9\u30a4\u30d6\u30d0\u30c3\u30af\u30d7\u30ec\u30fc\u30f3;\u30b7\u30b9\u30c6\u30e0\u5185\u90e8\u62e1\u5f35\u30dc\u30fc\u30c9;\u305d\u306e\u4ed6\u306e\u30b7\u30b9\u30c6\u30e0\u30dc\u30fc\u30c9;\u30d7\u30ed\u30bb\u30c3\u30b5\u30dc\u30fc\u30c9;\u96fb\u6e90\u30e6\u30cb\u30c3\u30c8;\u96fb\u6e90\u30e2\u30b8\u30e5\u30fc\u30eb;\u96fb\u6e90\u7ba1\u7406\u30dc\u30fc\u30c9;\u30b7\u30e3\u30fc\u30b7\u30d0\u30c3\u30af\u30d1\u30cd\u30eb\u30dc\u30fc\u30c9;\u30b7\u30b9\u30c6\u30e0\u30b7\u30e3\u30fc\u30b7;\u30b5\u30d6\u30b7\u30e3\u30fc\u30b7;\u305d\u306e\u4ed6\u306e\u30b7\u30e3\u30fc\u30b7\u30dc\u30fc\u30c9;\u30c7\u30a3\u30b9\u30af\u30d9\u30a4;\u5468\u8fba\u6a5f\u5668\u30d9\u30a4;\u30c7\u30d0\u30a4\u30b9\u30d9\u30a4;\u30d5\u30a1\u30f3\u51b7\u5374;\u51b7\u5374\u30e6\u30cb\u30c3\u30c8;\u30b1\u30fc\u30d6\u30eb\u76f8\u4e92\u63a5\u7d9a;\u30e1\u30e2\u30ea\u30c7\u30d0\u30a4\u30b9;\u30b7\u30b9\u30c6\u30e0\u7ba1\u7406\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2; BIOS ; Intel\uff08r\uff09ME ;\u30b7\u30b9\u30c6\u30e0\u30d0\u30b9;\u30b0\u30eb\u30fc\u30d7; Intel\uff08r\uff09ME ;\u5916\u90e8\u74b0\u5883;\u30d0\u30c3\u30c6\u30ea\u30fc;\u51e6\u7406\u30d6\u30ec\u30fc\u30c9;\u63a5\u7d9a\u30b9\u30a4\u30c3\u30c1;\u30d7\u30ed\u30bb\u30c3\u30b5/\u30e1\u30e2\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb; I / O\u30e2\u30b8\u30e5\u30fc\u30eb;\u30d7\u30ed\u30bb\u30c3\u30b5I / O\u30e2\u30b8\u30e5\u30fc\u30eb;\u7ba1\u7406\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2; IPMI\u30c1\u30e3\u30cd\u30eb; PCI\u30d0\u30b9; PCI\u30a8\u30af\u30b9\u30d7\u30ec\u30b9\u30d0\u30b9; SCSI\u30d0\u30b9; SATA / SAS\u30d0\u30b9;\u30d7\u30ed\u30bb\u30c3\u30b5\u30d5\u200b\u200b\u30ed\u30f3\u30c8\u30b5\u30a4\u30c9\u30d0\u30b9".split(";");
163 -e.RealmNames=";;\u30ea\u30c0\u30a4\u30ec\u30af\u30c8;;\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u30a2\u30bb\u30c3\u30c8;\u30ea\u30e2\u30fc\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb;\u30b9\u30c8\u30ec\u30fc\u30b8;\u30a4\u30d9\u30f3\u30c8\u30de\u30cd\u30fc\u30b8\u30e3;\u30b9\u30c8\u30ec\u30fc\u30b8\u7ba1\u7406;\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30b9\u30ed\u30fc\u30ab\u30eb;\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30b9\u30ea\u30e2\u30fc\u30c8;\u56de\u8def\u906e\u65ad\u5668;\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u6642\u9593;\u4e00\u822c\u60c5\u5831;\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u306e\u66f4\u65b0; EIT ; LocalUN ;\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u30a2\u30af\u30bb\u30b9\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb;\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u30a2\u30af\u30bb\u30b9\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u7ba1\u7406;\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0\u30ea\u30fc\u30c0\u30fc;\u76e3\u67fb\u30ed\u30b0; ACL\u30ec\u30eb\u30e0;;;\u30ed\u30fc\u30ab\u30eb\u30b7\u30b9\u30c6\u30e0".split(";");
164 -e.WatchdogCurrentStates={1:"\u59cb\u307e\u3063\u3066\u3044\u306a\u3044",2:"\u505c\u6b62",4:"\u30e9\u30f3\u30cb\u30f3\u30b0",8:"\u671f\u9650\u5207\u308c",16:"\u4e00\u6642\u505c\u6b62"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),r=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
163 +g.RealmNames=";;\u30ea\u30c0\u30a4\u30ec\u30af\u30c8;;\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u30a2\u30bb\u30c3\u30c8;\u30ea\u30e2\u30fc\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb;\u30b9\u30c8\u30ec\u30fc\u30b8;\u30a4\u30d9\u30f3\u30c8\u30de\u30cd\u30fc\u30b8\u30e3;\u30b9\u30c8\u30ec\u30fc\u30b8\u7ba1\u7406;\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30b9\u30ed\u30fc\u30ab\u30eb;\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30b9\u30ea\u30e2\u30fc\u30c8;\u56de\u8def\u906e\u65ad\u5668;\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u6642\u9593;\u4e00\u822c\u60c5\u5831;\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u306e\u66f4\u65b0; EIT ; LocalUN ;\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u30a2\u30af\u30bb\u30b9\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb;\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u30a2\u30af\u30bb\u30b9\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u7ba1\u7406;\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0\u30ea\u30fc\u30c0\u30fc;\u76e3\u67fb\u30ed\u30b0; ACL\u30ec\u30eb\u30e0;;;\u30ed\u30fc\u30ab\u30eb\u30b7\u30b9\u30c6\u30e0".split(";");
164 +g.WatchdogCurrentStates={1:"\u59cb\u307e\u3063\u3066\u3044\u306a\u3044",2:"\u505c\u6b62",4:"\u30e9\u30f3\u30cb\u30f3\u30b0",8:"\u671f\u9650\u5207\u308c",16:"\u4e00\u6642\u505c\u6b62"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
165 K={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},B={16:"\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u7ba1\u7406\u8005",17:"RCO",18:"\u30ea\u30c0\u30a4\u30ec\u30af\u30b7\u30e7\u30f3\u30de\u30cd\u30fc\u30b8\u30e3\u30fc",19:"\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u66f4\u65b0\u30de\u30cd\u30fc\u30b8\u30e3\u30fc",20:"\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u76e3\u67fb\u30ed\u30b0",21:"\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u6642\u9593",22:"\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7ba1\u7406",23:"\u30b9\u30c8\u30ec\u30fc\u30b8\u7ba1\u7406",
166 24:"\u30a4\u30d9\u30f3\u30c8\u30de\u30cd\u30fc\u30b8\u30e3",25:"\u30b5\u30fc\u30ad\u30c3\u30c8\u30d6\u30ec\u30fc\u30ab\u30fc\u30de\u30cd\u30fc\u30b8\u30e3\u30fc",26:"\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30b9\u30de\u30cd\u30fc\u30b8\u30e3\u30fc",27:"\u30ef\u30a4\u30e4\u30ec\u30b9\u69cb\u6210",28:"EAC",29:"KVM",30:"\u30e6\u30fc\u30b6\u30fc\u306e\u30aa\u30d7\u30c8\u30a4\u30f3\u30a4\u30d9\u30f3\u30c8",32:"\u753b\u9762\u306e\u30d6\u30e9\u30f3\u30ad\u30f3\u30b0",33:"\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u30a4\u30d9\u30f3\u30c8",
167 1600:"\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u304c\u958b\u59cb\u3055\u308c\u307e\u3057\u305f",1601:"\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f",1602:"\u8ffd\u52a0\u3055\u308c\u305fACL\u30a8\u30f3\u30c8\u30ea",1603:"ACL\u30a8\u30f3\u30c8\u30ea\u304c\u5909\u66f4\u3055\u308c\u307e\u3057\u305f",1604:"\u524a\u9664\u3055\u308c\u305fACL\u30a8\u30f3\u30c8\u30ea",1605:"\u7121\u52b9\u306a\u8a8d\u8a3c\u60c5\u5831\u306b\u3088\u308bACL\u30a2\u30af\u30bb\u30b9",
@@ -177,110 +177,110 @@ K={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},B={16:"\u30bb\u30ad\u30e5\u30ea\u30c6
177 2506:"CB\u30d2\u30e5\u30fc\u30ea\u30b9\u30c6\u30a3\u30c3\u30af\u30b9\u72b6\u614b\u304c\u30af\u30ea\u30a2\u3055\u308c\u307e\u3057\u305f",2600:"\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f",2601:"\u524a\u9664\u3055\u308c\u305f\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0",2602:"\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u30a2\u30af\u30b7\u30e7\u30f3\u30bb\u30c3\u30c8",
178 2700:"\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f",2701:"\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u304c\u524a\u9664\u3055\u308c\u307e\u3057\u305f",2702:"\u66f4\u65b0\u3055\u308c\u305f\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",
179 2800:"EAC\u59ff\u52e2\u7f72\u540d\u8005\u30bb\u30c3\u30c8",2801:"EAC\u6709\u52b9",2802:"EAC\u7121\u52b9",2803:"EAC\u59ff\u52e2\u72b6\u614b",2804:"EAC\u30bb\u30c3\u30c8\u30aa\u30d7\u30b7\u30e7\u30f3",2900:"KVM\u30aa\u30d7\u30c8\u30a4\u30f3\u304c\u6709\u52b9",2901:"KVM\u30aa\u30d7\u30c8\u30a4\u30f3\u7121\u52b9",2902:"KVM\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u5909\u66f4\u3055\u308c\u307e\u3057\u305f",2903:"KVM\u306e\u540c\u610f\u306b\u6210\u529f\u3057\u307e\u3057\u305f",2904:"KVM\u540c\u610f\u306b\u5931\u6557\u3057\u307e\u3057\u305f",
180 -3E3:"\u30aa\u30d7\u30c8\u30a4\u30f3\u30dd\u30ea\u30b7\u30fc\u306e\u5909\u66f4",3001:"\u540c\u610f\u30b3\u30fc\u30c9\u30a4\u30d9\u30f3\u30c8\u306e\u9001\u4fe1",3002:"\u30aa\u30d7\u30c8\u30a4\u30f3\u30d6\u30ed\u30c3\u30af\u30a4\u30d9\u30f3\u30c8\u306e\u958b\u59cb",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};e.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,
180 +3E3:"\u30aa\u30d7\u30c8\u30a4\u30f3\u30dd\u30ea\u30b7\u30fc\u306e\u5909\u66f4",3001:"\u540c\u610f\u30b3\u30fc\u30c9\u30a4\u30d9\u30f3\u30c8\u306e\u9001\u4fe1",3002:"\u30aa\u30d7\u30c8\u30a4\u30f3\u30d6\u30ed\u30c3\u30af\u30a4\u30d9\u30f3\u30c8\u306e\u958b\u59cb",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,
181 2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["\u7121\u52b9\u306aME\u30a2\u30af\u30bb\u30b9","\u7121\u52b9\u306aMEBx\u30a2\u30af\u30bb\u30b9"][b.charCodeAt(0)];if(1606==a){var c=["\u7121\u52b9","\u6709\u52b9"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+="\u3001"+b.substring(3));return c}return 1607==a?"\u30ea\u30e2\u30fc\u30c8"+["NoAuth","ServerAuth","\u76f8\u4e92\u8a8d\u8a3c"][b.charCodeAt(0)]+"\u3001 \u5730\u5143"+["NoAuth","ServerAuth","\u76f8\u4e92\u8a8d\u8a3c"][b.charCodeAt(1)]:
182 -1617==a?e.RealmNames[ReadInt(b,0)]+"\u3001"+["NoAuth","Auth","\u7121\u52b9"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","\u30ed\u30fc\u30ab\u30ebMEI","\u30ed\u30fc\u30ab\u30ebWSMAN","\u30ea\u30e2\u30fc\u30c8WSAMN"][b.charCodeAt(0)]:1900==a?"\u304b\u3089"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \u306b"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):
183 -3E3==a?"\u304b\u3089"+["\u7121\u3057","KVM","\u3059\u3079\u3066"][b.charCodeAt(0)]+" \u306b"+["\u7121\u3057","KVM","\u3059\u3079\u3066"][b.charCodeAt(1)]:3001==a?["\u6210\u529f","3\u56de\u5931\u6557"][b.charCodeAt(0)]:null};e.GetAuditLog=function(a){e.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return e}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
182 +1617==a?g.RealmNames[ReadInt(b,0)]+"\u3001"+["NoAuth","Auth","\u7121\u52b9"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","\u30ed\u30fc\u30ab\u30ebMEI","\u30ed\u30fc\u30ab\u30ebWSMAN","\u30ea\u30e2\u30fc\u30c8WSAMN"][b.charCodeAt(0)]:1900==a?"\u304b\u3089"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \u306b"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):
183 +3E3==a?"\u304b\u3089"+["\u7121\u3057","KVM","\u3059\u3079\u3066"][b.charCodeAt(0)]+" \u306b"+["\u7121\u3057","KVM","\u3059\u3079\u3066"][b.charCodeAt(1)]:3001==a?["\u6210\u529f","3\u56de\u5931\u6557"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,r,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
184 function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
185 -function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",g=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+g+v+">"));return a+("</r:"+b+">")}
185 +function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">";if("string"==typeof c)a+=c;else for(var v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
186 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
187 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
188 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
189 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function g(a,b){var c,p,e,d,x,h,k,m,g,q=b&&b.split("/"),w=r.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){q=q.slice(0,q.length-1);a=a.split("/");x=a.length-1;r.nodeIdCompat&&A.test(a[x])&&(a[x]=a[x].replace(A,""));a=q.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
190 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((q||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(q)for(g=q.length;0<g;--g)if(e=w[q.slice(0,g).join("/")])if(e=e[p]){d=e;h=x;break}if(d)break;!k&&l&&l[p]&&(k=l[p],m=x)}!d&&k&&(d=k,h=m);d&&(c.splice(0,h,d),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return g(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
191 -a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function e(a){return function(){return r&&r.config&&r.config[a]||{}}}var C,w,D,m,k={},h={},r={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,A=/\.js$/;D=function(a,b){var c,e=q(a),d=e[0];a=e[1];d&&(d=g(d,b),c=p(d));d?a=c&&c.normalize?c.normalize(a,n(b)):g(a,b):(a=g(a,b),e=q(a),
192 -d=e[0],a=e[1],d&&(c=p(d)));return{f:d?d+"!"+a:a,n:a,pr:d,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:e(a)}}};C=function(a,b,c,e){var x,g,A,r,q=[];g=typeof c;var w;e=e||a;if("undefined"===g||"function"===g){b=!b.length&&c.length?["require","exports","module"]:b;for(r=0;r<b.length;r+=1)if(A=D(b[r],e),g=A.f,"require"===g)q[r]=m.require(a);else if("exports"===g)q[r]=m.exports(a),
193 -w=!0;else if("module"===g)x=q[r]=m.module(a);else if(B.call(k,g)||B.call(h,g)||B.call(K,g))q[r]=p(g);else if(A.p)A.p.load(A.n,v(e,!0),l(g),{}),q[r]=k[g];else throw Error(a+" missing "+g);b=c?c.apply(k[a],q):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,e,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){r=a;r.deps&&w(r.deps,r.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
194 -typeof c&&(c=e,e=x);e?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(e.isArrayBuffer(a)||e.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
195 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var e=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)e.nextTick=process.nextTick,e.setImmediate="function"===typeof setImmediate?setImmediate:e.nextTick;else if("function"===typeof setImmediate)e.setImmediate=setImmediate,e.nextTick=function(a){return setImmediate(a)};
196 -else{e.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];e.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
197 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var d=e.setImmediate;e.setImmediate=function(e){15<Date.now()-b?(b=Date.now(),d(e)):(a.push(e),1===a.length&&p.setAttribute("a",c=!c))}}e.nextTick=e.setImmediate}})();e.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};e.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};e.isArrayBufferView=function(a){return a&&
198 -e.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};e.ByteBuffer=c;e.ByteStringBuffer=c;e.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};e.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};e.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};e.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
199 -e.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};e.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};e.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(e.encodeUtf8(a))};e.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
200 -255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
201 -8&255))};e.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};e.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};e.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
202 -e.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};e.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};e.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
203 -16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};e.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24Le=
204 -function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};e.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};e.ByteStringBuffer.prototype.getSignedInt=
205 -function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};e.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
206 -a)};e.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};e.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};e.ByteStringBuffer.prototype.copy=function(){var a=e.createBuffer(this.data);a.read=this.read;return a};e.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};e.ByteStringBuffer.prototype.clear=
207 -function(){this.data="";this.read=0;return this};e.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};e.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.ByteStringBuffer.prototype.toString=function(){return e.decodeUtf8(this.bytes())};e.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
208 -0;this.growSize=b.growSize||1024;var c=e.isArrayBuffer(a),p=e.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};e.DataBuffer.prototype.length=function(){return this.write-this.read};e.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
209 -e.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),p=new Uint8Array(this.length()+b);p.set(c);this.data=new DataView(p.buffer);return this};e.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};e.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
210 -return this};e.DataBuffer.prototype.putBytes=function(a,b){if(e.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var d=new Uint8Array(this.data.buffer,this.write);d.set(c);this.write+=p;return this}if(e.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),d=new Uint8Array(this.data.buffer),d.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof e.DataBuffer||"object"===typeof a&&"number"===
211 -typeof a.read&&"number"===typeof a.write&&e.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),d=new Uint8Array(a.data.byteLength,this.write),d.set(c),this.write+=c.byteLength,this;a instanceof e.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.hex.decode(a,c,this.write),this;if("base64"===
212 -b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=e.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=e.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
213 -b);}throw Error("Invalid parameter: "+a);};e.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};e.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};e.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};e.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
214 -e.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};e.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};e.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};e.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
215 -a,!0);this.write+=4;return this};e.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};e.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};e.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};e.DataBuffer.prototype.getInt24=
216 -function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};e.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};e.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};e.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};e.DataBuffer.prototype.getInt32Le=function(){var a=
217 -this.data.getInt32(this.read,!0);this.read+=4;return a};e.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};e.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
218 -e.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};e.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};e.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};e.DataBuffer.prototype.copy=function(){return new e.DataBuffer(this)};e.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
219 -new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};e.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};e.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};e.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
220 -this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return e.binary.raw.encode(b);if("hex"===a)return e.binary.hex.encode(b);if("base64"===a)return e.binary.base64.encode(b);if("utf8"===a)return e.text.utf8.decode(b);if("utf16"===a)return e.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};e.createBuffer=function(a,b){void 0!==a&&"utf8"===
221 -(b||"raw")&&(a=e.encodeUtf8(a));return new e.ByteBuffer(a)};e.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};e.xorBytes=function(a,b,c){for(var p="",d="",e="",h=0,k=0;0<c;--c,++h)d=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(p+=e,e="",k=0),e+=String.fromCharCode(d),++k;return p+e};e.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};e.bytesToHex=
222 -function(a){return e.createBuffer(a).toHex()};e.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var d=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];e.encode64=function(a,b){for(var c="",p="",d,e,h,k=0;k<a.length;)d=
223 -a.charCodeAt(k++),e=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&3)<<4|e>>4),isNaN(e)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,b)+"\r\n",c=c.substr(b));return p+
224 -c};e.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,p,e,h,k=0;k<a.length;)c=d[a.charCodeAt(k++)-43],p=d[a.charCodeAt(k++)-43],e=d[a.charCodeAt(k++)-43],h=d[a.charCodeAt(k++)-43],b+=String.fromCharCode(c<<2|p>>4),64!==e&&(b+=String.fromCharCode((p&15)<<4|e>>2),64!==h&&(b+=String.fromCharCode((e&3)<<6|h)));return b};e.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};e.decodeUtf8=function(a){return decodeURIComponent(escape(a))};e.binary={raw:{},hex:{},base64:{}};
225 -e.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};e.binary.raw.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(a.length));for(var e=c=c||0,d=0;d<a.length;++d)p[e++]=a.charCodeAt(d);return b?e-c:p};e.binary.hex.encode=e.bytesToHex;e.binary.hex.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var e=0,d=c;a.length&1&&(e=1,p[d++]=parseInt(a[0],16));for(;e<a.length;e+=2)p[d++]=parseInt(a.substr(e,2),16);return b?d-c:p};e.binary.base64.encode=
226 -function(a,b){for(var c="",p="",e,d,h,k=0;k<a.byteLength;)e=a[k++],d=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,
227 -b)+"\r\n",c=c.substr(b));return p+c};e.binary.base64.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var e,h,k,m,g=0,r=c;g<a.length;)e=d[a.charCodeAt(g++)-43],h=d[a.charCodeAt(g++)-43],k=d[a.charCodeAt(g++)-43],m=d[a.charCodeAt(g++)-43],p[r++]=e<<2|h>>4,64!==k&&(p[r++]=(h&15)<<4|k>>2,64!==m&&(p[r++]=(k&3)<<6|m));return b?r-c:p.subarray(0,r)};e.text={utf8:{},utf16:{}};e.text.utf8.encode=function(a,b,c){a=e.encodeUtf8(a);
228 -var p=b;p||(p=new Uint8Array(a.length));for(var d=c=c||0,h=0;h<a.length;++h)p[d++]=a.charCodeAt(h);return b?d-c:p};e.text.utf8.decode=function(a){return e.decodeUtf8(String.fromCharCode.apply(null,a))};e.text.utf16.encode=function(a,b,c){var p=b;p||(p=new Uint8Array(2*a.length));for(var e=new Uint16Array(p.buffer),d=c=c||0,h=c,k=0;k<a.length;++k)e[h++]=a.charCodeAt(k),d+=2;return b?d-c:p};e.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};e.deflate=function(a,
229 -b,c){b=e.decode64(a.deflate(e.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};e.inflate=function(a,b,c){a=a.inflate(e.encode64(b)).rval;return null===a?null:e.decode64(a)};var g=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=e.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
230 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(e.decode64(c)));return c},m=function(a,b,c,p){var e=l(a,b);null===e&&(e={});e[c]=p;g(a,b,e)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var p=l(a,b);if(null!==p&&c in p){delete p[c];c=!0;for(var e in p){c=!1;break}c&&(p=null);g(a,b,p)}},r=function(a,b){g(a,b,null)},K=function(a,b,
231 -c){var p=null;"undefined"===typeof c&&(c=["web","flash"]);var e,d=!1,h=null,k;for(k in c){e=c[k];try{if("flash"===e||"both"===e){if(null===b[0])throw Error("Flash local storage not available.");p=a.apply(this,b);d="flash"===e}if("web"===e||"both"===e)b[0]=localStorage,p=a.apply(this,b),d=!0}catch(m){h=m}if(d)break}if(!d)throw h;return p};e.setItem=function(a,b,c,p,e){K(m,arguments,e)};e.getItem=function(a,b,c,p){return K(k,arguments,p)};e.removeItem=function(a,b,c,p){K(h,arguments,p)};e.clearItems=
232 -function(a,b,c){K(r,arguments,c)};e.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;e.getQueryVariables=function(a){var b=function(a){var b=
233 -{};a=a.split("&");for(var c=0;c<a.length;c++){var p=a[c].indexOf("="),e;0<p?(e=a[c].substring(0,p),p=a[c].substring(p+1)):(e=a[c],p=null);e in b||(b[e]=[]);e in Object.prototype||null===p||b[e].push(unescape(p))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};e.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
234 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:e.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};e.makeRequest=function(a){var b=e.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var p;"undefined"===typeof a?p=b.query:(p=b.query[a])&&"undefined"!==typeof c&&(p=p[c]);return p},getQueryLast:function(a,b){var p=c.getQuery(a);return p?p[p.length-1]:b}};return c};e.makeLink=function(a,
235 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};e.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var p=0,e=b.length;p<e;){var d=b[p++];if(p==e)a[d]=c;else{var h=d in a;if(!h||h&&"object"!==typeof a[d]||h&&null===a[d])a[d]={};a=a[d]}}};e.getPath=function(a,b,c){for(var p=0,e=b.length,d=!0;d&&p<e&&"object"===typeof a&&null!==a;){var h=b[p++];(d=h in a)&&(a=a[h])}return d?a:c};e.deletePath=function(a,b){if("object"===
236 -typeof a&&null!==a)for(var c=0,p=b.length;c<p;){var e=b[c++];if(c==p)delete a[e];else{if(!(e in a)||"object"!==typeof a[e]||null===a[e])break;a=a[e]}}};e.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};e.format=function(a){var b=/%./g,c,p,e=0,d=[];for(p=0;c=b.exec(a);)switch(p=a.substring(p,b.lastIndex-2),0<p.length&&d.push(p),p=b.lastIndex,c=c[0][1],c){case "s":case "o":e<arguments.length?d.push(arguments[e++ +1]):d.push("<?>");break;case "%":d.push("%");break;default:d.push("<#"+
237 -c+"?>")}d.push(a.substring(p));return d.join("")};e.formatNumber=function(a,b,c,p){var e=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;p=void 0===p?".":p;c=0>a?"-":"";var d=parseInt(a=Math.abs(+a||0).toFixed(e),10)+"",h=3<d.length?d.length%3:0;return c+(h?d.substr(0,h)+p:"")+d.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+p)+(e?b+Math.abs(a-d).toFixed(e).slice(2):"")};e.formatSize=function(a){return a=1073741824<=a?e.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?e.formatNumber(a/1048576,2,".","")+
238 -" MiB":1024<=a?e.formatNumber(a/1024,0)+" KiB":e.formatNumber(a,0)+" bytes"};e.bytesFromIP=function(a){return-1!==a.indexOf(".")?e.bytesFromIPv4(a):-1!==a.indexOf(":")?e.bytesFromIPv6(a):null};e.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=e.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};e.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
239 -2*(8-a.length+b),p=e.createBuffer(),d=0;8>d;++d)if(a[d]&&0!==a[d].length){var h=e.hexToBytes(a[d]);2>h.length&&p.putByte(0);p.putBytes(h)}else p.fillWithByte(0,c),c=0;return p.getBytes()};e.bytesToIP=function(a){return 4===a.length?e.bytesToIPv4(a):16===a.length?e.bytesToIPv6(a):null};e.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};e.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,d=0;d<a.length;d+=
240 -2){for(var h=e.bytesToHex(a[d]+a[d+1]);"0"===h[0]&&"0"!==h;)h=h.substr(1);if("0"===h){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(h)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};e.estimateCores=function(a,b){function c(a,k,m){if(0===k){var g=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);e.cores=
241 -Math.max(1,g);URL.revokeObjectURL(h);return b(null,e.cores)}p(m,function(b,p){a.push(d(m,p));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],e=0;e<a;++e){var z=new Worker(h);z.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(z)}for(e=0;e<a;++e)c[e].postMessage(e)}function d(a,b){for(var c=[],p=0;p<a;++p)for(var e=b[p],h=c[p]=[],z=0;z<a;++z)if(p!==z){var k=b[z];(e.st>k.st&&e.st<k.et||k.st>e.st&&k.st<e.et)&&h.push(z)}return c.reduce(function(a,
242 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in e&&!a.update)return b(null,e.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return e.cores=navigator.hardwareConcurrency,b(null,e.cores);if("undefined"===typeof Worker)return e.cores=1,b(null,e.cores);if("undefined"===typeof Blob)return e.cores=2,b(null,e.cores);var h=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
243 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var q=0;q<g.length;++q)g[q](c);
244 -return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
189 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,g,x,h,k,m,e,r=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){r=r.slice(0,r.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=r.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
190 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((r||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(r)for(e=r.length;0<e;--e)if(d=w[r.slice(0,e).join("/")])if(d=d[p]){g=d;h=x;break}if(g)break;!k&&l&&l[p]&&(k=l[p],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
191 +a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function r(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var C,w,D,m,k={},h={},u={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=r(a),g=d[0];a=d[1];g&&(g=e(g,b),c=p(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=r(a),
192 +g=d[0],a=d[1],g&&(c=p(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};C=function(a,b,c,g){var x,e,z,u,r=[];e=typeof c;var w;g=g||a;if("undefined"===e||"function"===e){b=!b.length&&c.length?["require","exports","module"]:b;for(u=0;u<b.length;u+=1)if(z=D(b[u],g),e=z.f,"require"===e)r[u]=m.require(a);else if("exports"===e)r[u]=m.exports(a),
193 +w=!0;else if("module"===e)x=r[u]=m.module(a);else if(B.call(k,e)||B.call(h,e)||B.call(K,e))r[u]=p(e);else if(z.p)z.p.load(z.n,v(g,!0),l(e),{}),r[u]=k[e];else throw Error(a+" missing "+e);b=c?c.apply(k[a],r):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
194 +typeof c&&(c=g,g=x);g?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(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(b){for(var p=
195 +0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.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)};
196 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
197 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}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&&
198 +d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
199 +d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
200 +255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
201 +8&255))};d.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};d.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};d.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
202 +d.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};d.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};d.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
203 +16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};d.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24Le=
204 +function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};d.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};d.ByteStringBuffer.prototype.getSignedInt=
205 +function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
206 +a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
207 +function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
208 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
209 +d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
210 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
211 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
212 +b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
213 +b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
214 +d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
215 +a,!0);this.write+=4;return this};d.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};d.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};d.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};d.DataBuffer.prototype.getInt24=
216 +function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};d.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};d.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};d.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};d.DataBuffer.prototype.getInt32Le=function(){var a=
217 +this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};d.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
218 +d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
219 +new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
220 +this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
221 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
222 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
223 +a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
224 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
225 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
226 +function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
227 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,u=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[u++]=p<<2|g>>4,64!==h&&(d[u++]=(g&15)<<4|h>>2,64!==k&&(d[u++]=(h&3)<<6|k));return b?u-c:d.subarray(0,u)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
228 +var p=b;p||(p=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)p[y++]=a.charCodeAt(h);return b?y-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
229 +b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
230 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},K=function(a,b,
231 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){K(m,arguments,p)};d.getItem=function(a,b,c,d){return K(k,arguments,d)};d.removeItem=function(a,b,c,d){K(h,arguments,d)};d.clearItems=
232 +function(a,b,c){K(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;d.getQueryVariables=function(a){var b=function(a){var b=
233 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
234 +0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
235 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
236 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
237 +c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
238 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
239 +2*(8-a.length+b),p=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&p.putByte(0);p.putBytes(k)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,h=0;h<a.length;h+=
240 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],e=b.length;m&&e===m.end+1?(m.end=e,m.end-m.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:e,end:e})}b.push(k)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,e){if(0===m){var u=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
241 +Math.max(1,u);URL.revokeObjectURL(k);return b(null,d.cores)}p(e,function(b,d){a.push(h(e,d));c(a,m-1,e)})}function p(a,b){for(var c=[],d=[],g=0;g<a;++g){var h=new Worker(k);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(g=0;g<a;++g)c[g].postMessage(g)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],g=c[d]=[],y=0;y<a;++y)if(d!==y){var k=b[y];(p.st>k.st&&p.st<k.et||k.st>p.st&&k.st<p.et)&&g.push(y)}return c.reduce(function(a,
242 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
243 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var r=0;r<e.length;++r)e[r](c);
244 +return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
245 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
246 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
247 this.mode.start(c)};c.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()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
248 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
249 -c.defined.cipher=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
250 -4<b.length){var d=b;b=a.util.createBuffer();for(var e=0;e<d.length;++e)b.putByte(d[e])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function g(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
248 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
249 +c.defined.cipher=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
250 +4<b.length){var d=b;b=a.util.createBuffer();for(var g=0;g<d.length;++g)b.putByte(d[g])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
251 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
252 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.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);
253 this._outBlock=Array(this._ints)};w.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=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
254 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
255 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
256 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32()^this._outBlock[d],b.putInt32(this._inBlock[d]);else{var e=(this.blockSize-p)%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]);
257 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
258 -p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32(),b.putInt32(this._inBlock[d]^this._outBlock[d]);else{var e=(this.blockSize-p)%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);
259 -if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
260 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)b.putInt32(a.getInt32()^this._outBlock[d]),this._inBlock[d]=this._outBlock[d];else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(d=0;d<this._ints;++d)this._partialOutput.putInt32(a.getInt32()^
261 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
262 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var g=0;g<
263 -this._ints;++g)b.putInt32(a.getInt32()^this._outBlock[g]);else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);0<q&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
256 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
257 +if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
258 +d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
259 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
260 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
261 +this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
262 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var e=0;e<
263 +this._ints;++e)b.putInt32(a.getInt32()^this._outBlock[e]);else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);0<r&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<r&&!c)return b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
264 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
265 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.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,
266 -this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(g(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=g(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
267 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var g=0;g<this._ints;++g)b.putInt32(this._outBlock[g]^=a.getInt32());this._cipherLength+=this.blockSize}else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();
268 -for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);if(0===q||c){c?(g=p%this.blockSize,this._cipherLength+=g,this._partialOutput.truncate(this.blockSize-g)):this._cipherLength+=this.blockSize;for(g=0;g<this._ints;++g)this._outBlock[g]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),
269 -this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
270 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var e=this._aDataLength.concat(g(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,e);e=[];this.cipher.encrypt(this._j0,e);for(var q=0;q<
271 -this._ints;++q)this.tag.putInt32(this._s[q]^e[q]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],p=b.slice(0),d=0;128>d;++d)a[d/32|0]&1<<31-d%32&&(c[0]^=p[0],c[1]^=p[1],c[2]^=p[2],c[3]^=p[3]),this.pow(p,p);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,p=3;0<p;--p)b[p]=a[p]>>>1|(a[p-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
272 -[0,0,0,0],c=0;32>c;++c){var p=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=p[0];b[1]^=p[1];b[2]^=p[2];b[3]^=p[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,p=4*c,c=16*c,d=Array(c),e=0;e<c;++e){var g=[0,0,0,0];g[e/p|0]=1<<b-1<<(p-1-e%p)*b;d[e]=this.generateSubHashTable(this.multiply(g,a),b)}return d};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
273 -p=c>>>1,d=Array(c);d[p]=a.slice(0);for(var e=p>>>1;0<e;)this.pow(d[2*e],d[e]=[]),e>>=1;for(e=2;e<p;){for(var g=1;g<e;++g){var q=d[e],w=d[g];d[e+g]=[q[0]^w[0],q[1]^w[1],q[2]^w[2],q[3]^w[3]]}e*=2}d[0]=[0,0,0,0];for(e=p+1;e<c;++e)g=d[e^p],d[e]=[a[0]^g[0],a[1]^g[1],a[2]^g[2],a[3]^g[3]];return d}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=
274 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
275 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);r=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,e,g,k,q,u,b=0;256>b;++b){q=p^p<<1^p<<2^p<<3^p<<4;q=q>>8^q&255^99;h[c]=q;r[q]=c;u=a[q];e=a[c];g=a[e];k=a[g];u^=u<<24^q<<16^q<<8^q;g=(e^g^k)<<24^(c^
276 -k)<<16^(c^g^k)<<8^c^e^k;for(var w=0;4>w;++w)B[w][c]=u,x[w][q]=g,u=u<<24|u>>>8,g=g<<24|g>>>8;0===c?c=p=1:(c=e^a[a[a[e^k]]],p^=a[a[p]])}}function g(a,b){for(var c=a.slice(0),p,d=1,e=c.length,m=k*(e+6+1),q=e;q<m;++q)p=c[q-1],0===q%e?(p=h[p>>>16&255]<<24^h[p>>>8&255]<<16^h[p&255]<<8^h[p>>>24]^K[d]<<24,d++):6<e&&4===q%e&&(p=h[p>>>24]<<24^h[p>>>16&255]<<16^h[p>>>8&255]<<8^h[p&255]),c[q]=c[q-e]^p;if(b){for(var d=x[0],e=x[1],r=x[2],w=x[3],l=c.slice(0),m=c.length,q=0,F=m-k;q<m;q+=k,F-=k)if(0===q||q===m-k)l[q]=
277 -c[F],l[q+1]=c[F+3],l[q+2]=c[F+2],l[q+3]=c[F+1];else for(var B=0;B<k;++B)p=c[F+B],l[q+(3&-B)]=d[h[p>>>24]]^e[h[p>>>16&255]]^r[h[p>>>8&255]]^w[h[p&255]];c=l}return c}function w(a,b,c,p){var d=a.length/4-1,e,g,k,m,q;p?(e=x[0],g=x[1],k=x[2],m=x[3],q=r):(e=B[0],g=B[1],k=B[2],m=B[3],q=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[p?3:1]^a[1];C=b[2]^a[2];b=b[p?1:3]^a[3];for(var n=3,v=1;v<d;++v)L=e[w>>>24]^g[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=e[l>>>24]^g[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=e[C>>>24]^
278 -g[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=e[b>>>24]^g[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=q[w>>>24]<<24^q[l>>>16&255]<<16^q[C>>>8&255]<<8^q[b&255]^a[++n];c[p?3:1]=q[l>>>24]<<24^q[C>>>16&255]<<16^q[b>>>8&255]<<8^q[w&255]^a[++n];c[2]=q[C>>>24]<<24^q[b>>>16&255]<<16^q[w>>>8&255]<<8^q[l&255]^a[++n];c[p?1:3]=q[b>>>24]<<24^q[w>>>16&255]<<16^q[l>>>8&255]<<8^q[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
279 -a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;e.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!1,mode:p});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!0,mode:p});a.start(b);return a};a.aes.createDecryptionCipher=
266 +this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
267 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var e=0;e<this._ints;++e)b.putInt32(this._outBlock[e]^=a.getInt32());this._cipherLength+=this.blockSize}else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();
268 +for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(0===r||c){c?(e=p%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<r&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),
269 +this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
270 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var u=0;u<
271 +this._ints;++u)this.tag.putInt32(this._s[u]^g[u]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
272 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),g=0;g<c;++g){var e=[0,0,0,0];e[g/d|0]=1<<b-1<<(d-1-g%d)*b;p[g]=this.generateSubHashTable(this.multiply(e,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
273 +d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(p[2*g],p[g]=[]),g>>=1;for(g=2;g<d;){for(var e=1;e<g;++e){var r=p[g],w=p[e];p[g+e]=[r[0]^w[0],r[1]^w[1],r[2]^w[2],r[3]^w[3]]}g*=2}p[0]=[0,0,0,0];for(g=d+1;g<c;++g)e=p[g^d],p[g]=[a[0]^e[0],a[1]^e[1],a[2]^e[2],a[3]^e[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=
274 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
275 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,g,e,k,r,q,b=0;256>b;++b){r=p^p<<1^p<<2^p<<3^p<<4;r=r>>8^r&255^99;h[c]=r;u[r]=c;q=a[r];g=a[c];e=a[g];k=a[e];q^=q<<24^r<<16^r<<8^r;e=(g^e^k)<<24^(c^
276 +k)<<16^(c^e^k)<<8^c^g^k;for(var w=0;4>w;++w)B[w][c]=q,x[w][r]=e,q=q<<24|q>>>8,e=e<<24|e>>>8;0===c?c=p=1:(c=g^a[a[a[g^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,g=c.length,m=k*(g+6+1),r=g;r<m;++r)d=c[r-1],0===r%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^K[p]<<24,p++):6<g&&4===r%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[r]=c[r-g]^d;if(b){for(var p=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),m=c.length,r=0,F=m-k;r<m;r+=k,F-=k)if(0===r||r===m-k)l[r]=
277 +c[F],l[r+1]=c[F+3],l[r+2]=c[F+2],l[r+3]=c[F+1];else for(var B=0;B<k;++B)d=c[F+B],l[r+(3&-B)]=p[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,g,e,k,m,r;d?(g=x[0],e=x[1],k=x[2],m=x[3],r=u):(g=B[0],e=B[1],k=B[2],m=B[3],r=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[d?3:1]^a[1];C=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)L=g[w>>>24]^e[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^e[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=g[C>>>24]^
278 +e[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^e[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=r[w>>>24]<<24^r[l>>>16&255]<<16^r[C>>>8&255]<<8^r[b&255]^a[++n];c[d?3:1]=r[l>>>24]<<24^r[C>>>16&255]<<16^r[b>>>8&255]<<8^r[w&255]^a[++n];c[2]=r[C>>>24]<<24^r[b>>>16&255]<<16^r[w>>>8&255]<<8^r[l&255]^a[++n];c[d?1:3]=r[b>>>24]<<24^r[w>>>16&255]<<16^r[l>>>8&255]<<8^r[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
279 +a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;g.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
280 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
281 -c;for(var c=a.util.createBuffer(),e=0;e<d.length;++e)c.putByte(d[e])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,e=0;e<h;++e)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=g(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return g(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
282 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,r,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
283 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
281 +c;for(var c=a.util.createBuffer(),g=0;g<d.length;++g)c.putByte(d[g])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,g=0;g<h;++g)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
282 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
283 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
284 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
285 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
286 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -294,336 +294,336 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
294 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
295 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
296 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
297 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var q=0;q<g.length;++q)g[q](c);return c.oids}},
298 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
299 -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};c.create=function(b,c,d,e){if(a.util.isArray(e)){for(var h=[],g=0;g<e.length;++g)void 0!==e[g]&&h.push(e[g]);e=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(e),value:e}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,g){void 0===g&&(g=!0);
300 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,r=d(b);if(b.length()<r){if(g)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+r,m;r=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<r){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===r-(b.read-
301 -x))++x,--r}catch(A){}b.read=x}if(l)if(l=[],void 0===r)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,g))}else for(x=b.length();0<r;)l.push(c.fromDer(b,g)),r-=x-b.length(),x=b.length();else{if(void 0===r){if(g)throw Error("Non-constructed ASN.1 object of indefinite length.");r=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<r;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(r)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
302 -e=b.tagClass|b.type,g=a.util.createBuffer();if(b.composed){b.constructed?e|=32:g.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&g.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)g.putInt16(b.value.charCodeAt(h));else g.putBytes(b.value);d.putByte(e);if(127>=g.length())d.putByte(g.length()&127);else{h=g.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(g);
303 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,e,h,g,q=2;q<b.length;++q){d=!0;e=[];h=parseInt(b[q],10);do g=h&127,h>>>=7,d||(g|=128),e.push(g),d=!1;while(0<h);for(d=e.length-1;0<=d;--d)c.putByte(e[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var e=0;0<b.length();)d=b.getByte(),e<<=7,d&128?e+=d&127:(c+="."+(e+d),e=0);
304 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,e=parseInt(a.substr(4,2),10),p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,e);b.setUTCHours(p,g,q,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
305 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,e=parseInt(a.substr(6,2),10),p=parseInt(a.substr(8,2),10),g=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),x=0,l=0,y=!1;"Z"===a.charAt(a.length-1)&&(y=!0);var R=a.length-5,z=a.charAt(R);if("+"===z||"-"===z)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===z&&(l*=-1),y=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
306 -10));y?(b.setUTCFullYear(c,d,e),b.setUTCHours(p,g,q,x),b.setTime(+b+l)):(b.setFullYear(c,d,e),b.setHours(p,g,q,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
297 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var r=0;r<e.length;++r)e[r](c);return c.oids}},
298 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
299 +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};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
300 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
301 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
302 +g=b.tagClass|b.type,e=a.util.createBuffer();if(b.composed){b.constructed?g|=32:e.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&e.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)e.putInt16(b.value.charCodeAt(h));else e.putBytes(b.value);d.putByte(g);if(127>=e.length())d.putByte(e.length()&127);else{h=e.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(e);
303 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,r=2;r<b.length;++r){d=!0;g=[];h=parseInt(b[r],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
304 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),r=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(r=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(g,e,r,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
305 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),r=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
306 +10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(g,e,r,x),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(g,e,r,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
307 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
308 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,e,g){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)g&&(b.tagClass!==d.tagClass&&g.push("["+d.name+'] Expected tag class "'+d.tagClass+
309 -'", got "'+b.tagClass+'"'),b.type!==d.type&&g.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var r=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[r]&&((h=c.validate(b.value[r],d.value[l],e,g))?++r:d.value[l].optional&&(h=!0)),!h&&g&&g.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
310 -b.value.length+'"');h&&e&&(d.capture&&(e[d.capture]=b.value),d.captureAsn1&&(e[d.captureAsn1]=b))}else g&&g.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var g=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,e){var k="";d=d||0;e=e||2;0<d&&(k+="\n");for(var h="",r=0;r<d*e;++r)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
308 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
309 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
310 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
311 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
312 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
313 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",r=0;r<b.value.length;++r)void 0!==b.value[r]&&(l+=1,B+=c.prettyPrint(b.value[r],d+1,e),r+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
314 -c.Type.OCTETSTRING?(g.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:g.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
315 -c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<g.length;++q)g[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
313 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,B+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
314 +c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
315 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var r=0;r<e.length;++r)e[r](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
316 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[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];m=[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];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
317 -Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var e,p,h,g,z,E,q,l=c.length();64<=l;){p=a.h0;h=a.h1;g=a.h2;z=a.h3;for(q=0;16>q;++q)b[q]=c.getInt32Le(),e=z^h&(g^z),e=p+e+k[q]+b[q],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;32>q;++q)e=g^z&(h^g),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;48>q;++q)e=h^g^z,e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;64>q;++q)e=g^(h|~z),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;a.h0=a.h0+p|0;a.h1=a.h1+h|0;a.h2=a.h2+g|0;a.h3=
318 -a.h3+z|0;l-=64}}var g=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=g;g.create=function(){h||c();var b=null,g=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);g=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
319 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],z=m.fullMessageLength.length-1;0<=z;--z)m.fullMessageLength[z]+=q[1],q[1]=q[0]+(m.fullMessageLength[z]/4294967296>>>0),m.fullMessageLength[z]>>>=0,q[0]=q[1]/4294967296>>>0;g.putBytes(c);d(b,k,g);(2048<g.read||0===g.length())&&g.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(g.bytes());c.putBytes(l.substr(0,
320 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,q=0,z=m.fullMessageLength.length-1;0<=z;--z)h=8*m.fullMessageLength[z]+q,q=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=
321 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
322 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,A,y,w,z=d.length();64<=z;){p=a.h0;g=a.h1;q=a.h2;l=a.h3;A=a.h4;for(w=0;16>w;++w)e=d.getInt32(),b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;20>w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;32>
323 -w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;40>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;60>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g&q|l&(g^q),e=(p<<5|p>>>27)+y+A+2400959708+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;80>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>
324 -27)+y+A+3395469782+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;a.h0=a.h0+p|0;a.h1=a.h1+g|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+A|0;z-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),e=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
325 -0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,e=0;e<c;++e)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var w=g.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
326 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],A=0;A<h.fullMessageLength.length;++A)w=8*h.fullMessageLength[A+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
327 -h4:b.h4};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var g=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
328 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,y,w,z,E,O,H,C,u,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
329 -for(;64>l;++l)e=b[l-2],e=(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10,p=b[l-15],p=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,b[l]=e+b[l-7]+p+b[l-16]|0;y=a.h0;w=a.h1;z=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;u=a.h7;for(l=0;64>l;++l)e=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),g=C^O&(H^C),p=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),q=y&w|z&(y^w),e=u+e+g+n[l]+b[l],p+=q,u=C,C=H,H=O,O=E+e|0,E=z,z=w,w=y,y=e+p|0;a.h0=a.h0+y|0;a.h1=a.h1+w|0;a.h2=a.h2+z|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+u|0;v-=
330 -64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.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,
331 -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],l=!0);var b=null,d=a.util.createBuffer(),e=Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,
332 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){r.messageLength=0;r.fullMessageLength=r.messageLength64=[];for(var c=r.messageLengthSize/4,e=0;e<c;++e)r.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return r}};r.start();r.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var x=g.length;r.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=r.fullMessageLength.length-
333 -1;0<=w;--w)r.fullMessageLength[w]+=x[1],x[1]=x[0]+(r.fullMessageLength[w]/4294967296>>>0),r.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return r};r.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,r.blockLength-(r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize&r.blockLength-1)));a.util.createBuffer();for(var w,x,A=8*r.fullMessageLength[0],y=0;y<r.fullMessageLength.length;++y)w=
334 -8*r.fullMessageLength[y+1],x=w/4294967296>>>0,A+=x,l.putInt32(A>>>0),A=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return r};var g=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
335 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
336 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,k,q,z,E,l,w,C,u,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)q=b[S-2],w=q[0],q=q[1],e=((w>>>19|q<<13)^(q>>>29|w<<3)^w>>>6)>>>0,p=((w<<13|q>>>19)^(q<<3|w>>>29)^(w<<26|q>>>6))>>>0,q=b[S-15],w=q[0],q=q[1],g=((w>>>1|q<<31)^(w>>>8|q<<24)^w>>>7)>>>0,k=((w<<31|q>>>1)^(w<<24|q>>>8)^(w<<25|q>>>7))>>>0,w=b[S-7],C=b[S-
337 -16],q=p+w[1]+k+C[1],b[S][0]=e+w[0]+g+C[0]+(q/4294967296>>>0)>>>0,b[S][1]=q>>>0;w=a[0][0];C=a[0][1];u=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)e=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,q=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,p=(ba^D&(J^ba))>>>0,z=(W^V&(aa^W))>>>0,g=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
338 -E=(w&u|v&(w^u))>>>0,l=(C&n|F&(C^n))>>>0,q=G+q+z+m[S][1]+b[S][1],e=I+e+p+m[S][0]+b[S][0]+(q/4294967296>>>0)>>>0,p=q>>>0,q=k+l,g=g+E+(q/4294967296>>>0)>>>0,k=q>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,q=L+p,D=Y+e+(q/4294967296>>>0)>>>0,V=q>>>0,Y=v,L=F,v=u,F=n,u=w,n=C,q=p+k,w=e+g+(q/4294967296>>>0)>>>0,C=q>>>0;q=a[0][1]+C;a[0][0]=a[0][0]+w+(q/4294967296>>>0)>>>0;a[0][1]=q>>>0;q=a[1][1]+n;a[1][0]=a[1][0]+u+(q/4294967296>>>0)>>>0;a[1][1]=q>>>0;q=a[2][1]+F;a[2][0]=a[2][0]+v+(q/4294967296>>>0)>>>0;a[2][1]=q>>>0;
339 -q=a[3][1]+L;a[3][0]=a[3][0]+Y+(q/4294967296>>>0)>>>0;a[3][1]=q>>>0;q=a[4][1]+V;a[4][0]=a[4][0]+D+(q/4294967296>>>0)>>>0;a[4][1]=q>>>0;q=a[5][1]+aa;a[5][0]=a[5][0]+J+(q/4294967296>>>0)>>>0;a[5][1]=q>>>0;q=a[6][1]+W;a[6][0]=a[6][0]+ba+(q/4294967296>>>0)>>>0;a[6][1]=q>>>0;q=a[7][1]+G;a[7][0]=a[7][0]+I+(q/4294967296>>>0)>>>0;a[7][1]=q>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var g=a.sha384=a.sha512.sha384=a.sha512.sha384||
340 -{};g.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=g;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
317 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var p,g,h,e,y,E,r,l=c.length();64<=l;){g=a.h0;h=a.h1;e=a.h2;y=a.h3;for(r=0;16>r;++r)b[r]=c.getInt32Le(),p=y^h&(e^y),p=g+p+k[r]+b[r],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;32>r;++r)p=e^y&(h^e),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;48>r;++r)p=h^e^y,p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;64>r;++r)p=e^(h|~y),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;a.h0=a.h0+g|0;a.h1=a.h1+h|0;a.h2=a.h2+e|0;a.h3=
318 +a.h3+y|0;l-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
319 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var r=c.length;m.messageLength+=r;for(var r=[r/4294967296>>>0,r>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=r[1],r[1]=r[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,r[0]=r[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
320 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,r=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+r,r=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
321 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
322 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;r=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;32>
323 +w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&r|l&(e^r),p=(g<<5|g>>>27)+A+z+2400959708+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>
324 +27)+A+z+3395469782+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+r|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
325 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
326 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
327 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
328 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,A,w,y,E,O,H,C,q,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
329 +for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=p+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;q=a.h7;for(l=0;64>l;++l)p=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),e=C^O&(H^C),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),r=A&w|y&(A^w),p=q+p+e+n[l]+b[l],g+=r,q=C,C=H,H=O,O=E+p|0,E=y,y=w,w=A,A=p+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+q|0;v-=
330 +64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.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,
331 +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],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
332 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
333 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
334 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
335 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
336 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,k,r,y,E,l,w,C,q,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)r=b[S-2],w=r[0],r=r[1],p=((w>>>19|r<<13)^(r>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|r>>>19)^(r<<3|w>>>29)^(w<<26|r>>>6))>>>0,r=b[S-15],w=r[0],r=r[1],e=((w>>>1|r<<31)^(w>>>8|r<<24)^w>>>7)>>>0,k=((w<<31|r>>>1)^(w<<24|r>>>8)^(w<<25|r>>>7))>>>0,w=b[S-7],C=b[S-
337 +16],r=g+w[1]+k+C[1],b[S][0]=p+w[0]+e+C[0]+(r/4294967296>>>0)>>>0,b[S][1]=r>>>0;w=a[0][0];C=a[0][1];q=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)p=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,r=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(J^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
338 +E=(w&q|v&(w^q))>>>0,l=(C&n|F&(C^n))>>>0,r=G+r+y+m[S][1]+b[S][1],p=I+p+g+m[S][0]+b[S][0]+(r/4294967296>>>0)>>>0,g=r>>>0,r=k+l,e=e+E+(r/4294967296>>>0)>>>0,k=r>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,r=L+g,D=Y+p+(r/4294967296>>>0)>>>0,V=r>>>0,Y=v,L=F,v=q,F=n,q=w,n=C,r=g+k,w=p+e+(r/4294967296>>>0)>>>0,C=r>>>0;r=a[0][1]+C;a[0][0]=a[0][0]+w+(r/4294967296>>>0)>>>0;a[0][1]=r>>>0;r=a[1][1]+n;a[1][0]=a[1][0]+q+(r/4294967296>>>0)>>>0;a[1][1]=r>>>0;r=a[2][1]+F;a[2][0]=a[2][0]+v+(r/4294967296>>>0)>>>0;a[2][1]=r>>>0;
339 +r=a[3][1]+L;a[3][0]=a[3][0]+Y+(r/4294967296>>>0)>>>0;a[3][1]=r>>>0;r=a[4][1]+V;a[4][0]=a[4][0]+D+(r/4294967296>>>0)>>>0;a[4][1]=r>>>0;r=a[5][1]+aa;a[5][0]=a[5][0]+J+(r/4294967296>>>0)>>>0;a[5][1]=r>>>0;r=a[6][1]+W;a[6][0]=a[6][0]+ba+(r/4294967296>>>0)>>>0;a[6][1]=r>>>0;r=a[7][1]+G;a[7][0]=a[7][0]+I+(r/4294967296>>>0)>>>0;a[7][1]=r>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
340 +{};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
341 3609767458],[1899447441,602891725],[3049323471,3964484399],[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],
342 [1555081692,3175218132],[1996064986,2198950837],[2554220882,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,
343 106217008],[3516065817,3606008344],[3600352804,1432725776],[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],
344 [3515267271,566280711],[3940187606,3454069534],[4118630271,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]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
345 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,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,
346 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],e=null,g=a.util.createBuffer(),x=Array(80),A=0;80>A;++A)x[A]=Array(2);var y={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){y.messageLength=
347 -0;y.fullMessageLength=y.messageLength128=[];for(var b=y.messageLengthSize/4,c=0;c<b;++c)y.fullMessageLength.push(0);g=a.util.createBuffer();e=Array(d.length);for(c=0;c<d.length;++c)e[c]=d[c].slice(0);return y}};y.start();y.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;y.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=y.fullMessageLength.length-1;0<=k;--k)y.fullMessageLength[k]+=h[1],h[1]=h[0]+(y.fullMessageLength[k]/4294967296>>>0),y.fullMessageLength[k]>>>=0,h[0]=
348 -h[1]/4294967296>>>0;g.putBytes(b);c(e,x,g);(2048<g.read||0===g.length())&&g.compact();return y};y.digest=function(){var d=a.util.createBuffer();d.putBytes(g.bytes());d.putBytes(l.substr(0,y.blockLength-(y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize&y.blockLength-1)));a.util.createBuffer();for(var z,k,m=8*y.fullMessageLength[0],r=0;r<y.fullMessageLength.length;++r)z=8*y.fullMessageLength[r+1],k=z/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=z;z=Array(e.length);for(r=0;r<e.length;++r)z[r]=
349 -e[r].slice(0);c(z,x,d);d=a.util.createBuffer();k="SHA-512"===b?z.length:"SHA-384"===b?z.length-2:z.length-4;for(r=0;r<k;++r)d.putInt32(z[r][0]),r===k-1&&"SHA-512/224"===b||d.putInt32(z[r][1]);return d};return y};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
350 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
351 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md}},l=a;a=function(b,
352 -c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,g={start:function(g,m){if(null!==g)if("string"===typeof g)if(g=g.toLowerCase(),g in a.md.algorithms)b=
353 -a.md.algorithms[g].create();else throw Error('Unknown hash algorithm "'+g+'"');else b=g;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
354 -d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};g.digest=g.getMac;return g}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
355 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<g.length;++q)g[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],e=function(a,
356 -b){return" "+b},p=0;p<a.values.length;++p)d.push(a.values[p].replace(/^(\S+\r\n)/,e));b+=d.join(",")+"\r\n";d=0;a=-1;for(p=0;p<b.length;++p,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=p-a-1,a=-1,++p;else if(" "===b[p]||"\t"===b[p]||","===b[p])a=p;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var e="-----BEGIN "+b.type+"-----\r\n",g;b.procType&&(g={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
357 -e+=c(g));b.contentDomain&&(g={name:"Content-Domain",values:[b.contentDomain]},e+=c(g));b.dekInfo&&(g={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&g.values.push(b.dekInfo.parameters),e+=c(g));if(b.headers)for(g=0;g<b.headers.length;++g)e+=c(b.headers[g]);b.procType&&(e+="\r\n");e+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return e+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
358 -e=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,g=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var q={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(q);if(h[2]){for(var l=h[2].split(g),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var A=l[x];if(!/\s/.test(A[0]))break;h+=A;B=x}if(h=h.match(e)){for(var x={name:h[1],values:[]},A=h[2].split(","),y=0;y<A.length;++y)x.values.push(A[y].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
359 -"Content-Domain"!==x.name)if(q.dekInfo||"DEK-Info"!==x.name)q.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:A[0],parameters:A[1]||null}}else q.contentDomain=A[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
360 -q.procType={version:A[0],type:A[1]}}}++B}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
361 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
362 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,e){var p=32===a.length?3:9;e=3===p?e?[30,-2,-2]:[0,32,2]:e?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=b[0],q=b[1];b=(g>>>4^q)&252645135;q^=b;g^=b<<4;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(g>>>1^q)&1431655765;for(var q=q^b,g=g^b<<1,g=g<<1|g>>>31,q=q<<1|q>>>31,H=0;H<p;H+=3){for(var C=e[H+1],u=e[H+2],T=e[H];T!=C;T+=u){var P=q^a[T],F=(q>>>4|q<<28)^a[T+1];b=g;
363 -g=q;q=b^(n[P>>>24&63]|k[P>>>16&63]|r[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=g;g=q;q=b}g=g>>>1|g<<31;q=q>>>1|q<<31;b=(g>>>1^q)&1431655765;q^=b;g^=b<<1;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(g>>>4^q)&252645135;c[0]=g^b<<4;c[1]=q^b}function g(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var g=
364 -null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;e.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return g({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return g({key:a,
346 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
347 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
348 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
349 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
350 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
351 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md}},l=a;a=function(b,
352 +c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
353 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
354 +d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
355 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var r=0;r<e.length;++r)e[r](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
356 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
357 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
358 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var r={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(r);if(h[2]){for(var l=h[2].split(e),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;B=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(r.procType)if(r.contentDomain||
359 +"Content-Domain"!==x.name)if(r.dekInfo||"DEK-Info"!==x.name)r.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');r.dekInfo={algorithm:z[0],parameters:z[1]||null}}else r.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
360 +r.procType={version:z[0],type:z[1]}}}++B}if("ENCRYPTED"===r.procType&&!r.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
361 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
362 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,g){var p=32===a.length?3:9;g=3===p?g?[30,-2,-2]:[0,32,2]:g?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],r=b[1];b=(e>>>4^r)&252645135;r^=b;e^=b<<4;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(e>>>1^r)&1431655765;for(var r=r^b,e=e^b<<1,e=e<<1|e>>>31,r=r<<1|r>>>31,H=0;H<p;H+=3){for(var C=g[H+1],q=g[H+2],T=g[H];T!=C;T+=q){var P=r^a[T],F=(r>>>4|r<<28)^a[T+1];b=e;
363 +e=r;r=b^(n[P>>>24&63]|k[P>>>16&63]|u[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=e;e=r;r=b}e=e>>>1|e<<31;r=r>>>1|r<<31;b=(e>>>1^r)&1431655765;r^=b;e^=b<<1;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(e>>>4^r)&252645135;c[0]=e^b<<4;c[1]=r^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
364 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
365 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
366 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[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],
367 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],r=[0,268435456,8,268435464,0,268435456,
366 +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],
367 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],r=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
368 8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],F=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],B=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],L=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
369 1,C=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],K=0,D,W=0;W<n;W++){var I=b.getInt32(),G=b.getInt32();D=(I>>>4^G)&252645135;G^=D;I^=D<<4;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>2^G)&858993459;G^=D;I^=D<<2;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=(G>>>8^I)&16711935;I^=D;G^=D<<8;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=I<<8|G>>>20&240;for(var I=G<<24|G<<8&16711680|G>>>8&65280|G>>>24&240,G=D,S=0;S<v.length;++S){v[S]?(I=I<<2|I>>>26,G=G<<2|G>>>26):(I=I<<1|I>>>27,G=G<<1|G>>>27);
370 -var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|e[I>>>20&15]|g[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|q[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|r[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
370 +var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|g[I>>>20&15]|e[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|r[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|u[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
371 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[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,
372 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,
373 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[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,
374 8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[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],h=[256,34078976,34078720,1107296512,
375 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,
376 -524288,0,1074266112,34078976,1073742080],r=[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,
376 +524288,0,1074266112,34078976,1073742080],u=[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,
377 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[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,
378 67108866,67110912,2048,2097154],B=[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,
379 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<g.length;++q)g[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,
380 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,g;e&&!a.disableNativeCode&&(g=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,q){function l(){if(N>A)return q(null,z);n.start(null,
381 -null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();u=2;B()}function B(){if(u<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++u,a.util.setImmediate(B);z+=N<A?E:E.substr(0,y);++N;l()}"function"===typeof h&&(q=h,h=null);if(e&&!a.disableNativeCode&&g.pbkdf2&&(null===h||"object"!==typeof h)&&(4<g.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),q?4===g.pbkdf2Sync.length?g.pbkdf2(b,
382 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):g.pbkdf2(b,c,d,k,h,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===g.pbkdf2Sync.length?g.pbkdf2Sync(b,c,d,k).toString("binary"):g.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
383 -if(q)return q(b);throw b;}var A=Math.ceil(k/x),y=k-(A-1)*x,n=a.hmac.create();n.start(h,b);var z="",E,O,H;if(!q){for(var N=1;N<=A;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var u=2;u<=d;++u)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;z+=N<A?E:E.substr(0,y)}return z}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
384 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
385 -"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
386 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function g(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
387 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)e.putInt32(k[h])}catch(z){if(!("undefined"!==typeof QuotaExceededError&&z instanceof QuotaExceededError))throw z;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
388 -e.putByte(String.fromCharCode(k&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),q=0;32>q;++q)h[q]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(g(k.key,h(k.seed)));k.seed=z(g(k.key,k.seed));
389 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,q=k.plugin.formatKey,z=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var z=c(k.key,
390 -k.seed);k.generated+=z.length;q.putBytes(z);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,g(a))}catch(c){b(c)}},k.seedFileSync=g);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
379 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var r=0;r<e.length;++r)e[r](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
380 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},g="undefined"!==typeof process&&process.versions&&process.versions.node,e;g&&!a.disableNativeCode&&(e=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,r){function l(){if(N>z)return r(null,y);n.start(null,
381 +null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();q=2;B()}function B(){if(q<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++q,a.util.setImmediate(B);y+=N<z?E:E.substr(0,A);++N;l()}"function"===typeof h&&(r=h,h=null);if(g&&!a.disableNativeCode&&e.pbkdf2&&(null===h||"object"!==typeof h)&&(4<e.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),r?4===e.pbkdf2Sync.length?e.pbkdf2(b,
382 +c,d,k,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):e.pbkdf2(b,c,d,k,h,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):4===e.pbkdf2Sync.length?e.pbkdf2Sync(b,c,d,k).toString("binary"):e.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
383 +if(r)return r(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,n=a.hmac.create();n.start(h,b);var y="",E,O,H;if(!r){for(var N=1;N<=z;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var q=2;q<=d;++q)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;y+=N<z?E:E.substr(0,A)}return y}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
384 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
385 +"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,g=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(g=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
386 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function e(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var g=
387 +a.util.createBuffer();if(c)for(;g.length()<b;){var h=Math.max(1,Math.min(b-g.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)g.putInt32(k[h])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(g.length()<b)for(c=Math.floor(65536*Math.random());g.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
388 +g.putByte(String.fromCharCode(k&255));return g.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),r=0;32>r;++r)h[r]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function g(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(g)});l=e(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=r(e(k.key,h(k.seed)));k.seed=y(e(k.key,k.seed));
389 +a.util.setImmediate(g)}if(!d)return k.generateSync(b);var e=k.plugin.cipher,h=k.plugin.increment,r=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;g()};k.generateSync=function(b){var c=k.plugin.cipher,g=k.plugin.increment,e=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var r=a.util.createBuffer();r.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
390 +k.seed);k.generated+=y.length;r.putBytes(y);k.key=e(c(k.key,g(k.seed)));k.seed=h(c(k.key,k.seed))}return r.getBytes(b)};g?(k.seedFile=function(a,b){g.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return g.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,e(a))}catch(c){b(c)}},k.seedFileSync=e);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
391 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
392 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<g.length;++q)g[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
393 -0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},g=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
394 -b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,g,!1);l.putInt32(g[0]);l.putInt32(g[1]);l.putInt32(g[2]);l.putInt32(g[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
395 -process.versions.node,h=null;if("undefined"!==typeof window){var r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(h=function(a){return r.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
396 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<g.length;++q)g[q](c);
397 -return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
392 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var r=0;r<e.length;++r)e[r](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
393 +0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
394 +b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
395 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
396 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var r=0;r<e.length;++r)e[r](c);
397 +return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
398 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,
399 -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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
400 -1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var g=function(b,c,g){var k=!1,h=null,q=null,l=null,n,x,A,y,v=[];b=a.rc2.expandKey(b,c);for(A=0;64>A;A++)v.push(b.getInt16Le());g?(n=function(a){for(A=0;4>A;A++){a[A]+=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);var b=a[A],c=d[A];a[A]=b<<c&65535|(b&65535)>>16-c;y++}},x=function(a){for(A=0;4>A;A++)a[A]+=v[a[(A+3)%4]&63]}):(n=function(a){for(A=3;0<=A;A--){var b=a[A],c=d[A];a[A]=
401 -(b&65535)>>c|b<<16-c&65535;a[A]-=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);y--}},x=function(a){for(A=3;0<=A;A--)a[A]-=v[a[(A+3)%4]&63]});var z=null;return z={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();q=c||new a.util.createBuffer;l=b;z.output=q},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(A=0;4>A;A++){var c=h.getInt16Le();null!==l&&(g?c^=l.getInt16Le():l.putInt16Le(c));
402 -b.push(c&65535)}y=g?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(A=0;4>A;A++)null!==l&&(g?l.putInt16Le(b[A]):b[A]^=l.getInt16Le()),q.putInt16Le(b[A])}},finish:function(a){var b=!0;if(g)if(a)b=a(8,h,!g);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,z.update());!g&&(b=0===h.length())&&(a?b=a(8,q,!g):(a=q.length(),c=q.at(a-1),c>a?b=!1:q.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
403 -a.rc2.createEncryptionCipher=function(a,b){return g(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return g(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
404 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
405 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function g(a,b,c,d,e,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+e;e=Math.floor(h/67108864);c.data[d++]=h&67108863}return e}function l(a,b,c,d,e,p){var g=b&32767;for(b>>=15;0<=--p;){var h=this.data[a]&32767,z=this.data[a++]>>15,k=b*h+z*g,h=g*h+((k&32767)<<15)+c.data[d]+(e&1073741823);e=(h>>>30)+(k>>>15)+b*z+(e>>>30);c.data[d++]=h&1073741823}return e}function n(a,b,
406 -c,d,e,g){var p=b&16383;for(b>>=14;0<=--g;){var h=this.data[a]&16383,z=this.data[a++]>>14,k=b*h+z*p,h=p*h+((k&16383)<<14)+c.data[d]+e;e=(h>>28)+(k>>14)+b*z;c.data[d++]=h&268435455}return e}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function r(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
407 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function A(a,b){return a^b}function y(a,b){return a&~b}function R(){}function z(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
408 -navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=g,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],u;H=48;for(u=0;9>=u;++u)N[H++]=u;H=97;for(u=10;36>u;++u)N[H++]=u;H=65;for(u=10;36>u;++u)N[H++]=u;r.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};r.prototype.revert=function(a){return a};r.prototype.reduce=
409 -function(a){a.divRemTo(this.m,null,a)};r.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};r.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
399 +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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var g=b,e=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=e;128>n;n++)g.putByte(c[g.at(n-
400 +1)+g.at(n-e)&255]);g.setAt(128-l,c[g.at(128-l)&h]);for(n=127-l;0<=n;n--)g.setAt(n,c[g.at(n+1)^g.at(n+l)]);return g};var e=function(b,c,e){var k=!1,h=null,r=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
401 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();r=c||new a.util.createBuffer;l=b;y.output=r},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
402 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),r.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,r,!e):(a=r.length(),c=r.at(a-1),c>a?b=!1:r.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
403 +a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
404 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
405 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,g,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+g;g=Math.floor(h/67108864);c.data[d++]=h&67108863}return g}function l(a,b,c,d,g,e){var p=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,y=this.data[a++]>>15,k=b*h+y*p,h=p*h+((k&32767)<<15)+c.data[d]+(g&1073741823);g=(h>>>30)+(k>>>15)+b*y+(g>>>30);c.data[d++]=h&1073741823}return g}function n(a,b,
406 +c,d,g,e){var p=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,y=this.data[a++]>>14,k=b*h+y*p,h=p*h+((k&16383)<<14)+c.data[d]+g;g=(h>>28)+(k>>14)+b*y;c.data[d++]=h&268435455}return g}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
407 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
408 +navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=e,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],q;H=48;for(q=0;9>=q;++q)N[H++]=q;H=97;for(q=10;36>q;++q)N[H++]=q;H=65;for(q=10;36>q;++q)N[H++]=q;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
409 +function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
410 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
411 -c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var e=a.length,p=!1,g=0;0<=--e;){var h=8==d?a[e]&255:m(a,e);0>h?"-"==a.charAt(e)&&(p=!0):(p=!1,0==g?this.data[this.t++]=h:g+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-g)-1)<<g,this.data[this.t++]=
412 -h>>this.DB-g):this.data[this.t-1]|=h<<g,g+=d,g>=this.DB&&(g-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<g&&(this.data[this.t-1]|=(1<<this.DB-g)-1<<g));this.clamp();p&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
413 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,e=(1<<d)-1,g=Math.floor(a/this.DB),p=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+g+1]=this.data[h]>>d|p,p=(this.data[h]&e)<<c;for(h=g-1;0<=h;--h)b.data[h]=0;b.data[g]=p;b.t=this.t+g+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,e=this.DB-d,g=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var p=
414 -c+1;p<this.t;++p)b.data[p-c-1]|=(this.data[p]&g)<<e,b.data[p-c]=this.data[p]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&g)<<e);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
415 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),e=a.abs(),g=d.t;for(b.t=g+e.t;0<=--g;)b.data[g]=0;for(g=0;g<e.t;++g)b.data[g+d.t]=d.am(0,e.data[g],b,g,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
416 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,g){var p=a.abs();if(!(0>=p.t)){var z=this.abs();if(z.t<p.t)null!=b&&b.fromInt(0),null!=g&&this.copyTo(g);else{null==g&&(g=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),z.lShiftTo(l,g)):(p.copyTo(k),z.copyTo(g));p=k.t;z=k.data[p-1];if(0!=z){var E=z*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),u=this.FV/E,E=(1<<this.F1)/E,y=1<<this.F2,r=g.t,x=r-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=g.compareTo(w)&&
417 -(g.data[g.t++]=1,g.subTo(w,g));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=g.data[--r]==z?this.DM:Math.floor(g.data[r]*u+(g.data[r-1]+y)*E);if((g.data[r]+=k.am(0,O,g,x,0,p))<O)for(k.dlShiftTo(x,w),g.subTo(w,g);g.data[r]<--O;)g.subTo(w,g)}null!=b&&(g.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));g.t=p;g.clamp();0<l&&g.rShiftTo(l,g);0>m&&c.ZERO.subTo(g,g)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
418 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var g=d(),p=d(),z=b.convert(this),k=h(a)-1;for(z.copyTo(g);0<=--k;)if(b.sqrTo(g,p),0<(a&1<<k))b.mulTo(p,z,g);else var m=g,g=p,p=m;return b.revert(g)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
419 -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 b=(1<<a)-1,c,d=!1,e="",g=this.t,p=this.DB-g*this.DB%a;if(0<g--)for(p<this.DB&&0<(c=this.data[g]>>p)&&(d=!0,e="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=g;)p<a?(c=(this.data[g]&(1<<p)-1)<<a-p,c|=this.data[--g]>>(p+=this.DB-a)):(c=this.data[g]>>(p-=a)&b,0>=p&&(p+=this.DB,--g)),0<c&&(d=!0),d&&(e+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?e:"0"};c.prototype.negate=function(){var a=
411 +c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var g=a.length,e=!1,p=0;0<=--g;){var h=8==d?a[g]&255:m(a,g);0>h?"-"==a.charAt(g)&&(e=!0):(e=!1,0==p?this.data[this.t++]=h:p+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-p)-1)<<p,this.data[this.t++]=
412 +h>>this.DB-p):this.data[this.t-1]|=h<<p,p+=d,p>=this.DB&&(p-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<p&&(this.data[this.t-1]|=(1<<this.DB-p)-1<<p));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
413 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,g=(1<<d)-1,p=Math.floor(a/this.DB),e=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+p+1]=this.data[h]>>d|e,e=(this.data[h]&g)<<c;for(h=p-1;0<=h;--h)b.data[h]=0;b.data[p]=e;b.t=this.t+p+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,g=this.DB-d,p=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var e=
414 +c+1;e<this.t;++e)b.data[e-c-1]|=(this.data[e]&p)<<g,b.data[e-c]=this.data[e]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&p)<<g);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,g=Math.min(a.t,this.t);c<g;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
415 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),g=a.abs(),p=d.t;for(b.t=p+g.t;0<=--p;)b.data[p]=0;for(p=0;p<g.t;++p)b.data[p+d.t]=d.am(0,g.data[p],b,p,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
416 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,p){var e=a.abs();if(!(0>=e.t)){var y=this.abs();if(y.t<e.t)null!=b&&b.fromInt(0),null!=p&&this.copyTo(p);else{null==p&&(p=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(e.data[e.t-1]);0<l?(e.lShiftTo(l,k),y.lShiftTo(l,p)):(e.copyTo(k),y.copyTo(p));e=k.t;y=k.data[e-1];if(0!=y){var E=y*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),q=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=p.t,x=u-e,w=null==b?d():b;k.dlShiftTo(x,w);0<=p.compareTo(w)&&
417 +(p.data[p.t++]=1,p.subTo(w,p));c.ONE.dlShiftTo(e,w);for(w.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--x;){var O=p.data[--u]==y?this.DM:Math.floor(p.data[u]*q+(p.data[u-1]+A)*E);if((p.data[u]+=k.am(0,O,p,x,0,e))<O)for(k.dlShiftTo(x,w),p.subTo(w,p);p.data[u]<--O;)p.subTo(w,p)}null!=b&&(p.drShiftTo(e,b),m!=a&&c.ZERO.subTo(b,b));p.t=e;p.clamp();0<l&&p.rShiftTo(l,p);0>m&&c.ZERO.subTo(p,p)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
418 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var p=d(),e=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(p);0<=--k;)if(b.sqrTo(p,e),0<(a&1<<k))b.mulTo(e,y,p);else var l=p,p=e,e=l;return b.revert(p)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
419 +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 b=(1<<a)-1,c,d=!1,p="",g=this.t,e=this.DB-g*this.DB%a;if(0<g--)for(e<this.DB&&0<(c=this.data[g]>>e)&&(d=!0,p="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=g;)e<a?(c=(this.data[g]&(1<<e)-1)<<a-e,c|=this.data[--g]>>(e+=this.DB-a)):(c=this.data[g]>>(e-=a)&b,0>=e&&(e+=this.DB,--g)),0<c&&(d=!0),d&&(p+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?p:"0"};c.prototype.negate=function(){var a=
420 d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
421 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new r(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=z;R.prototype.revert=z;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
421 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
422 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)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var T=[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,
423 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],P=67108864/T[T.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
424 -b),c=k(b),g=d(),p=d(),h="";for(this.divRemTo(c,g,p);0<g.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,g.divRemTo(c,g,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,z=0;z<a.length;++z){var k=m(a,z);0>k?"-"==a.charAt(z)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
425 -this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var e=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<e?d[0]&(1<<e)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,e,g=Math.min(a.t,this.t);for(d=
426 -0;d<g;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){e=a.s&this.DM;for(d=g;d<this.t;++d)c.data[d]=b(this.data[d],e);c.t=this.t}else{e=this.s&this.DM;for(d=g;d<a.t;++d)c.data[d]=b(e,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
424 +b),c=k(b),p=d(),e=d(),h="";for(this.divRemTo(c,p,e);0<p.signum();)h=(b+e.intValue()).toString(a).substr(1)+h,p.divRemTo(c,p,e);return e.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),p=Math.pow(b,d),g=!1,e=0,h=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(g=!0):(h=b*h+k,++e>=d&&(this.dMultiply(p),this.dAddOffset(h,0),h=e=0))}0<e&&(this.dMultiply(Math.pow(b,e)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
425 +this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var p=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<p?d[0]&(1<<p)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,p,g=Math.min(a.t,this.t);for(d=
426 +0;d<g;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){p=a.s&this.DM;for(d=g;d<this.t;++d)c.data[d]=b(this.data[d],p);c.t=this.t}else{p=this.s&this.DM;for(d=g;d<a.t;++d)c.data[d]=b(p,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
427 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
428 -0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var e;for(e=c.t-this.t;d<e;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(e=Math.min(a.t,b);d<e;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
429 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var z=1;z++<d&&0!=
430 -p.compareTo(b);)if(p=p.modPowInt(2,this),0==p.compareTo(c.ONE))return!1;if(0!=p.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.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]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
431 -function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,e=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[e++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==e&&
432 -(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,A,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
433 -y,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
434 -0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,e=0;0!=d;)d&=d-1,++e;a+=e}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
435 -y)};c.prototype.flipBit=function(a){return this.changeBit(a,A)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
436 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),g,p=k(1),z;if(0>=c)return p;g=18>c?1:48>c?3:144>c?4:768>c?5:6;z=8>c?new r(b):b.isEven()?new E(b):new v(b);var m=[],l=3,q=g-1,u=(1<<g)-1;m[1]=z.convert(this);if(1<g)for(c=d(),z.sqrTo(m[1],c);l<=u;)m[l]=d(),z.mulTo(c,m[l-2],m[l]),l+=2;for(var y=a.t-1,x,w=!0,O=d(),c=h(a.data[y])-1;0<=y;){c>=q?x=a.data[y]>>c-q&u:(x=(a.data[y]&(1<<c+1)-1)<<q-c,0<y&&(x|=a.data[y-1]>>this.DB+c-q));for(l=g;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--y);
437 -if(w)m[x].copyTo(p),w=!1;else{for(;1<l;)z.sqrTo(p,O),z.sqrTo(O,p),l-=2;0<l?z.sqrTo(p,O):(l=p,p=O,O=l);z.mulTo(O,m[x],p)}for(;0<=y&&0==(a.data[y]&1<<c);)z.sqrTo(p,O),l=p,p=O,O=l,0>--c&&(c=this.DB-1,--y)}return z.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),g=k(1),p=k(0),h=k(0),z=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(g.isEven()&&p.isEven()||(g.addTo(this,g),p.subTo(a,p)),g.rShiftTo(1,
438 -g)):p.isEven()||p.subTo(a,p),p.rShiftTo(1,p);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&z.isEven()||(h.addTo(this,h),z.subTo(a,z)),h.rShiftTo(1,h)):z.isEven()||z.subTo(a,z),z.rShiftTo(1,z);0<=d.compareTo(e)?(d.subTo(e,d),b&&g.subTo(h,g),p.subTo(z,p)):(e.subTo(d,e),b&&h.subTo(g,h),z.subTo(p,z))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=z.compareTo(a))return z.subtract(a);if(0>z.signum())z.addTo(a,z);else return z;return 0>z.signum()?z.add(a):z};c.prototype.pow=function(a){return this.exp(a,
428 +0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var p;for(p=c.t-this.t;d<p;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(p=Math.min(a.t,b);d<p;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
429 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var p=b.shiftRight(d),g=O(),e,h=0;h<a;++h){do e=new c(this.bitLength(),g);while(0>=e.compareTo(c.ONE)||0<=e.compareTo(b));e=e.modPow(p,this);if(0!=e.compareTo(c.ONE)&&0!=e.compareTo(b)){for(var y=1;y++<d&&0!=
430 +e.compareTo(b);)if(e=e.modPowInt(2,this),0==e.compareTo(c.ONE))return!1;if(0!=e.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.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]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
431 +function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,p=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[p++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==p&&
432 +(this.s&128)!=(d&128)&&++p,0<p||d!=this.s)b[p++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
433 +A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
434 +0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,p=0;0!=d;)d&=d-1,++p;a+=p}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
435 +A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
436 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),p,e=k(1),y;if(0>=c)return e;p=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var l=[],m=3,r=p-1,q=(1<<p)-1;l[1]=y.convert(this);if(1<p)for(c=d(),y.sqrTo(l[1],c);m<=q;)l[m]=d(),y.mulTo(c,l[m-2],l[m]),m+=2;for(var A=a.t-1,x,w=!0,O=d(),c=h(a.data[A])-1;0<=A;){c>=r?x=a.data[A]>>c-r&q:(x=(a.data[A]&(1<<c+1)-1)<<r-c,0<A&&(x|=a.data[A-1]>>this.DB+c-r));for(m=p;0==(x&1);)x>>=1,--m;0>(c-=m)&&(c+=this.DB,--A);
437 +if(w)l[x].copyTo(e),w=!1;else{for(;1<m;)y.sqrTo(e,O),y.sqrTo(O,e),m-=2;0<m?y.sqrTo(e,O):(m=e,e=O,O=m);y.mulTo(O,l[x],e)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(e,O),m=e,e=O,O=m,0>--c&&(c=this.DB-1,--A)}return y.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),p=this.clone(),e=k(1),g=k(0),h=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&g.isEven()||(e.addTo(this,e),g.subTo(a,g)),e.rShiftTo(1,
438 +e)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);for(;p.isEven();)p.rShiftTo(1,p),b?(h.isEven()&&y.isEven()||(h.addTo(this,h),y.subTo(a,y)),h.rShiftTo(1,h)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(p)?(d.subTo(p,d),b&&e.subTo(h,e),g.subTo(y,g)):(p.subTo(d,p),b&&h.subTo(e,h),y.subTo(g,y))}if(0!=p.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
439 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
440 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
441 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<g.length;++l)g[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
440 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],p=b+1;p<T.length&&d<P;)d*=T[p++];for(d=c.modInt(d);b<p;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
441 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<e.length;++l)e[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
442 0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var l=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+l);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
443 v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
444 v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
445 2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
446 -0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs1}},
447 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?g(a,b,p,h):d(a,b,p,h)}function d(b,c,g,k){var m=l(b,c),z=0,q=n(m.bitLength());"millerRabinTests"in
448 -g&&(q=g.millerRabinTests);var r=10;"maxBlockTime"in g&&(r=g.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(q))return k(null,m);m.dAddOffset(h[z++%8],0)}while(0>r||+new Date-v<r);a.util.setImmediate(function(){d(b,c,g,k)})}function g(b,c,h,m){function q(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}z.bitLength()>b&&(z=l(b,c));h=z.toString(16);e.target.postMessage({hex:h,workLoad:r});
449 -z.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var z=l(b,c),E=h.workers,r=h.workLoad||100,n=30*r/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;q()});q()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(r).byteValue(),0);return c}
450 -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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],r=new k(null);r.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
451 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
452 -0;l<g.length;++l)g[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
446 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
447 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?e(a,b,p,h):d(a,b,p,h)}function d(b,c,e,k){var m=l(b,c),y=0,r=n(m.bitLength());"millerRabinTests"in
448 +e&&(r=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(r))return k(null,m);m.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,m){function r(){function a(e){if(!g){--p;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();g=!0;return m(null,new k(h.prime,16))}y.bitLength()>b&&(y=l(b,c));h=y.toString(16);e.target.postMessage({hex:h,workLoad:u});
449 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var p=E,e=0;e<E;++e)d[e].addEventListener("message",a);var g=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;r()});r()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
450 +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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
451 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
452 +0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
453 Error("Message is too long for PKCS#1 v1.5 padding."),g.length=b.length,g.max=d-11,g;g.putByte(0);g.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var h=0;h<d;++h)g.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),h=0;h<d;++h)e=l.charCodeAt(h),0===e?++k:g.putByte(e);d=k}g.putByte(0);g.putBytes(b);return g}function d(b,c,e,g){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var h=b.getByte(),k=b.getByte();if(0!==h||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
454 -typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function g(b,c,d){function e(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
455 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var g=b.p;b.p=b.q;b.q=g}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,e()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,e()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
456 -(g=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,g,b.p,b.q,g.mod(b.p1),g.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);e()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
457 -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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,r=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
454 +typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
455 +b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,r,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
456 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var r={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(r.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
457 +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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
458 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},B={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
459 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
460 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
461 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},A=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
462 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},y=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
461 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
462 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
463 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
464 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
465 -b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,g,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
466 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,g).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,g):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
465 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
466 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,e):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
467 c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:g,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},g=+new Date,p,k=0;null===a.keys&&
468 -(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(r[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
468 +(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
469 null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(p=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,p,a.p,a.q,
470 p.mod(a.p1),p.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});p=+new Date;k+=p-g;g=p}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
471 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var e=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(e,0),e.keys;g(e,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,g){var l={n:b,e:g,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
471 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var g=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(g,0),g.keys;e(g,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
472 b,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+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
473 -l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,g,k,l,m,q,r){var x={n:b,e:c,d:g,p:k,q:l,dP:m,dQ:q,qInv:r,decrypt:function(b,c,g){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,g)}};else if(-1!==["RAW","NONE",
474 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:y},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
473 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,l,m,r,u){var x={n:b,e:c,d:e,p:k,q:l,dP:m,dQ:r,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
474 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
475 [k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,B,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
476 -c.errors=d,c;var e,g,l,q,y,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();y=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
477 -16),new m(e,16),new m(g,16),new m(l,16),new m(q,16),new m(y,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
478 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,A,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
476 +c.errors=d,c;var e,g,l,r,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();r=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
477 +16),new m(e,16),new m(g,16),new m(l,16),new m(r,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
478 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
479 c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
480 -!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||
481 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<g.length;++l)g[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
482 -b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var g=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encryptionOid"},
483 -{name:"AlgorithmIdentifier.parameters",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
484 -tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:g.Class.UNIVERSAL,
485 -type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"salt"},
486 -{name:"pkcs-12PbeParams.iterations",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var e=a.random.getBytesSync(d.saltSize),h=d.count,k=g.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var z,q;switch(d.algorithm){case "aes128":z=m=16;d=n["aes128-CBC"];q=a.aes.createEncryptionCipher;break;case "aes192":m=24;
487 -z=16;d=n["aes192-CBC"];q=a.aes.createEncryptionCipher;break;case "aes256":m=32;z=16;d=n["aes256-CBC"];q=a.aes.createEncryptionCipher;break;case "des":z=m=8;d=n.desCBC;q=a.des.createEncryptionCipher;break;default:throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;}var v=a.pkcs5.pbkdf2(c,e,h,m);c=a.random.getBytesSync(z);h=q(v);h.start(c);h.update(g.toDer(b));h.finish();b=h.output.getBytes();e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,
488 -g.Type.OID,!1,g.oidToDer(n.pkcs5PBES2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n.pkcs5PBKDF2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(d).getBytes()),g.create(g.Class.UNIVERSAL,
489 -g.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(e),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(g.toDer(b)),h.finish(),b=h.output.getBytes(),e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,
490 -!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]);else throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[e,g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,e={},h=[];if(!g.validate(b,m,e,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=g.derToOid(e.encryptionOid);
491 -h=l.pbe.getCipher(h,e.encryptionParams,c);e=a.util.createBuffer(e.encryptedData);h.update(e);h.finish()&&(d=g.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:g.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
492 -b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return g.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var e,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
493 -h=24;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
494 -e.substr(0,8),h);c=k(c);c.start(e);c.update(g.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(e).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,e=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==e.type&&"PRIVATE KEY"!==e.type&&"RSA PRIVATE KEY"!==e.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".'),
495 -d.headerType=d,d;if(e.procType&&"ENCRYPTED"===e.procType.type){var h,k;switch(e.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
496 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+e.dekInfo.algorithm+'".'),d.algorithm=e.dekInfo.algorithm,d;}var m=a.util.hexToBytes(e.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(e.body));if(k.finish())d=k.output.getBytes();else return d}else d=
497 -e.body;d="ENCRYPTED PRIVATE KEY"===e.type?l.decryptPrivateKeyInfo(g.fromDer(d),c):g.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,q=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var u=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,q);
498 -var C=q*Math.ceil(u/q);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%u));C=q*Math.ceil(b/q);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<q;l++)D.putByte(C.at(l%m));var Y=Math.ceil(u/q)+Math.ceil(b/q),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(q)),
480 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
481 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
482 +b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
483 +{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"}]},k={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",
484 +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,
485 +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"}]}]},h={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"},
486 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var g=a.random.getBytesSync(d.saltSize),h=d.count,k=e.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,r;switch(d.algorithm){case "aes128":y=m=16;d=n["aes128-CBC"];r=a.aes.createEncryptionCipher;break;case "aes192":m=24;
487 +y=16;d=n["aes192-CBC"];r=a.aes.createEncryptionCipher;break;case "aes256":m=32;y=16;d=n["aes256-CBC"];r=a.aes.createEncryptionCipher;break;case "des":y=m=8;d=n.desCBC;r=a.des.createEncryptionCipher;break;default:throw g=Error("Cannot encrypt private key. Unknown encryption algorithm."),g.algorithm=d.algorithm,g;}var v=a.pkcs5.pbkdf2(c,g,h,m);c=a.random.getBytesSync(y);h=r(v);h.start(c);h.update(e.toDer(b));h.finish();b=h.output.getBytes();g=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
488 +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,
489 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(g),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(e.toDer(b)),h.finish(),b=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,
490 +!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,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,g={},h=[];if(!e.validate(b,m,g,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=e.derToOid(g.encryptionOid);
491 +h=l.pbe.getCipher(h,g.encryptionParams,c);g=a.util.createBuffer(g.encryptedData);h.update(g);h.finish()&&(d=e.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
492 +b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var g,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
493 +h=24;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
494 +g.substr(0,8),h);c=k(c);c.start(g);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(g).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,g=a.pem.decode(b)[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".'),
495 +d.headerType=d,d;if(g.procType&&"ENCRYPTED"===g.procType.type){var h,k;switch(g.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
496 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+g.dekInfo.algorithm+'".'),d.algorithm=g.dekInfo.algorithm,d;}var m=a.util.hexToBytes(g.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(g.body));if(k.finish())d=k.output.getBytes();else return d}else d=
497 +g.body;d="ENCRYPTED PRIVATE KEY"===g.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,r=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var q=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,r);
498 +var C=r*Math.ceil(q/r);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%q));C=r*Math.ceil(b/r);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<r;l++)D.putByte(C.at(l%m));var Y=Math.ceil(q/r)+Math.ceil(b/r),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(r)),
499 V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);L.putBuffer(ea)}v=L;n.putBuffer(C)}n.truncate(n.length()-g);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
500 -"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var e={};b=[];if(!g.validate(c,k,e,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=g.derToOid(e.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=g.derToOid(e.encOid);if(b!==l.oids["aes128-CBC"]&&
501 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=e.kdfSalt;var m=a.util.createBuffer(e.kdfIterationCount),m=m.getInt(m.length()<<3),q;switch(l.oids[b]){case "aes128-CBC":q=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":q=24;h=a.aes.createDecryptionCipher;break;
502 -case "aes256-CBC":q=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":q=24;h=a.des.createDecryptionCipher;break;case "desCBC":q=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,q);e=e.encIv;h=h(b);h.start(e);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var e={},k=[];if(!g.validate(c,h,e,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(e.salt),e=a.util.createBuffer(e.iterations),
503 -e=e.getInt(e.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,e,m);d=l.pbe.generatePkcs12Key(d,k,2,e,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
504 -typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
505 -0;l<g.length;++l)g[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
506 -a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var g={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
500 +"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var g={};b=[];if(!e.validate(c,k,g,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=e.derToOid(g.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=e.derToOid(g.encOid);if(b!==l.oids["aes128-CBC"]&&
501 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=g.kdfSalt;var m=a.util.createBuffer(g.kdfIterationCount),m=m.getInt(m.length()<<3),r;switch(l.oids[b]){case "aes128-CBC":r=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":r=24;h=a.aes.createDecryptionCipher;break;
502 +case "aes256-CBC":r=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":r=24;h=a.des.createDecryptionCipher;break;case "desCBC":r=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,r);g=g.encIv;h=h(b);h.start(g);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
503 +g=g.getInt(g.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,g,m);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
504 +typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
505 +0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
506 +a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
507 tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",
508 -tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(g)};d.encryptedDataValidator={name:"EncryptedData",
509 -tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(g)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
508 +tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(e)};d.encryptedDataValidator={name:"EncryptedData",
509 +tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(e)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
510 captureAsn1:"digestAlgorithms"},a,{name:"SignedData.Certificates",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,capture:"signerInfos",optional:!0,value:[{name:"SignerInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:c.Class.UNIVERSAL,
511 type:c.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
512 value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,
513 constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]}]}]};d.recipientInfoValidator={name:"RecipientInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,
514 constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
515 -value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
516 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
517 -["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var g=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());g.putBuffer(b.digest())}g.truncate(g.length()-d);return g.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
518 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
519 -Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
520 -{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
521 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,g=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,x=Math.ceil(v/8),A=b.digest().getBytes();
522 -if(x<g+m+2)throw Error("Message is too long to encrypt.");var y;y=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(A);n.putBytes(y);c.start();c.update(n.getBytes());A=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-g-2);n.putByte(1);n.putBytes(y);var R=n.getBytes(),z=x-g-1,E=d.generate(A,z);y="";for(n=0;n<z;n++)y+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;y=String.fromCharCode(y.charCodeAt(0)&~v)+y.substr(1);
523 -return y+A+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<g+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-g-1,v=k.substr(0,n);k=k.substr(n,g);var y=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&y))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),z="";for(q=0;q<n;q++)z+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
524 -z=String.fromCharCode(z.charCodeAt(0)&~y)+z.substr(1);l=l-g-m-2;for(q=0;q<l;q++)if(0!==z.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==z.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=z.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,
525 -module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
515 +value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
516 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
517 +["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var e=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());e.putBuffer(b.digest())}e.truncate(e.length()-d);return e.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
518 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
519 +Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
520 +{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
521 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,r){var n,v=r-1,x=Math.ceil(v/8),z=b.digest().getBytes();
522 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
523 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var r;r=l-1;l=Math.ceil(r/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-r&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(r=0;r<n;r++)y+=String.fromCharCode(v.charCodeAt(r)^R.charCodeAt(r));
524 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(r=0;r<l;r++)if(0!==y.charCodeAt(r))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
525 +module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
526 ["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
527 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function g(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
528 -v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===r.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
527 +var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
528 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
529 typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
530 (e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
531 -"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in r?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
531 +"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
532 d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
533 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
534 -d.extension=b,d;return b}function n(a,b){switch(a){case r["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
534 +d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
535 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
536 !1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
537 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},r=h.oids,v={};v.CN=r.commonName;v.commonName="CN";v.C=r.countryName;v.countryName="C";v.L=r.localityName;v.localityName="L";v.ST=r.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=r.organizationName;v.organizationName="O";v.OU=r.organizationalUnitName;v.organizationalUnitName="OU";v.E=r.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
537 +h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
538 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
539 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
540 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
541 {name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},B,{name:"Certificate.TBSCertificate.issuerUniqueID",
542 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
543 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
544 -{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},A={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
544 +{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
545 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
546 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
547 -tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},y={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
547 +tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
548 tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},B,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
549 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
550 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in r&&(g.name=r[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
551 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in r&&(p.name=r[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===r.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==r["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:r.sha1},mgf:{algorithmOid:r.mgf1,hash:{algorithmOid:r.sha1}},
552 -saltLength:20});c={};a=[];if(!k.validate(b,A,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
550 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
551 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
552 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
553 b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
554 return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
555 body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
556 break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
557 c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
558 -null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){g([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){g(a);
559 -b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){g(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
560 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
561 -e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in r)switch(r[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
562 -e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case r.sha1WithRSAEncryption:l=void 0;break;case r["RSASSA-PSS"]:d=r[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=r[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
563 -e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=r[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
564 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=r.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
565 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,x,e,l))throw e=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),e.errors=l,e;if("string"!==typeof e.certSignature){for(var l="\x00",m=0;m<e.certSignature.length;++m)l+=k.toDer(e.certSignature[m]).getBytes();e.certSignature=l}var l=k.derToOid(e.publicKeyOid),y=h.createCertificate();y.version=e.certVersion?e.certVersion.charCodeAt(0):
566 -0;m=a.util.createBuffer(e.certSerialNumber);y.serialNumber=m.toHex();y.signatureOid=a.asn1.derToOid(e.certSignatureOid);y.signatureParameters=R(y.signatureOid,e.certSignatureParams,!0);y.siginfo.algorithmOid=a.asn1.derToOid(e.certinfoSignatureOid);y.siginfo.parameters=R(y.siginfo.algorithmOid,e.certinfoSignatureParams,!1);m=a.util.createBuffer(e.certSignature);++m.read;y.signature=m.getBytes();m=[];void 0!==e.certValidity1UTCTime&&m.push(k.utcTimeToDate(e.certValidity1UTCTime));void 0!==e.certValidity2GeneralizedTime&&
567 -m.push(k.generalizedTimeToDate(e.certValidity2GeneralizedTime));void 0!==e.certValidity3UTCTime&&m.push(k.utcTimeToDate(e.certValidity3UTCTime));void 0!==e.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(e.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
568 -y.validity.notBefore=m[0];y.validity.notAfter=m[1];y.tbsCertificate=e.tbsCertificate;if(d){y.md=null;if(y.signatureOid in r)switch(l=r[y.signatureOid],l){case "sha1WithRSAEncryption":y.md=a.md.sha1.create();break;case "md5WithRSAEncryption":y.md=a.md.md5.create();break;case "sha256WithRSAEncryption":y.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":y.md=a.md.sha512.create();break;case "RSASSA-PSS":y.md=a.md.sha256.create()}if(null===y.md)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
569 -e.signatureOid=y.signatureOid,e;m=k.toDer(y.tbsCertificate);y.md.update(m.getBytes())}m=a.md.sha1.create();y.issuer.getField=function(a){return c(y.issuer,a)};y.issuer.addField=function(a){g([a]);y.issuer.attributes.push(a)};y.issuer.attributes=h.RDNAttributesAsArray(e.certIssuer,m);e.certIssuerUniqueId&&(y.issuer.uniqueId=e.certIssuerUniqueId);y.issuer.hash=m.digest().toHex();m=a.md.sha1.create();y.subject.getField=function(a){return c(y.subject,a)};y.subject.addField=function(a){g([a]);y.subject.attributes.push(a)};
570 -y.subject.attributes=h.RDNAttributesAsArray(e.certSubject,m);e.certSubjectUniqueId&&(y.subject.uniqueId=e.certSubjectUniqueId);y.subject.hash=m.digest().toHex();y.extensions=e.certExtensions?h.certificateExtensionsFromAsn1(e.certExtensions):[];l===h.oids.rsaEncryption&&(y.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo));return y};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
571 -return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in r)if(c.name=r[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
558 +null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
559 +b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
560 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
561 +e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
562 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
563 +e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
564 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
565 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),q=h.createCertificate();q.version=g.certVersion?g.certVersion.charCodeAt(0):
566 +0;m=a.util.createBuffer(g.certSerialNumber);q.serialNumber=m.toHex();q.signatureOid=a.asn1.derToOid(g.certSignatureOid);q.signatureParameters=R(q.signatureOid,g.certSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;q.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
567 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
568 +q.validity.notBefore=m[0];q.validity.notAfter=m[1];q.tbsCertificate=g.tbsCertificate;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===q.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
569 +g.signatureOid=q.signatureOid,g;m=k.toDer(q.tbsCertificate);q.md.update(m.getBytes())}m=a.md.sha1.create();q.issuer.getField=function(a){return c(q.issuer,a)};q.issuer.addField=function(a){e([a]);q.issuer.attributes.push(a)};q.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(q.issuer.uniqueId=g.certIssuerUniqueId);q.issuer.hash=m.digest().toHex();m=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};
570 +q.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(q.subject.uniqueId=g.certSubjectUniqueId);q.subject.hash=m.digest().toHex();q.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return q};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
571 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
572 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
573 -k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in r?c[r[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
574 -g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,y,e,l))throw e=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),e.errors=l,e;if("string"!==typeof e.csrSignature){for(var l=
575 -"\x00",m=0;m<e.csrSignature.length;++m)l+=k.toDer(e.csrSignature[m]).getBytes();e.csrSignature=l}l=k.derToOid(e.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var u=h.createCertificationRequest();u.version=e.csrVersion?e.csrVersion.charCodeAt(0):0;u.signatureOid=a.asn1.derToOid(e.csrSignatureOid);u.signatureParameters=R(u.signatureOid,e.csrSignatureParams,!0);u.siginfo.algorithmOid=a.asn1.derToOid(e.csrSignatureOid);u.siginfo.parameters=R(u.siginfo.algorithmOid,
576 -e.csrSignatureParams,!1);l=a.util.createBuffer(e.csrSignature);++l.read;u.signature=l.getBytes();u.certificationRequestInfo=e.certificationRequestInfo;if(d){u.md=null;if(u.signatureOid in r)switch(l=r[u.signatureOid],l){case "sha1WithRSAEncryption":u.md=a.md.sha1.create();break;case "md5WithRSAEncryption":u.md=a.md.md5.create();break;case "sha256WithRSAEncryption":u.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":u.md=a.md.sha512.create();break;case "RSASSA-PSS":u.md=a.md.sha256.create()}if(null===
577 -u.md)throw e=Error("Could not compute certification request digest. Unknown signature OID."),e.signatureOid=u.signatureOid,e;l=k.toDer(u.certificationRequestInfo);u.md.update(l.getBytes())}l=a.md.sha1.create();u.subject.getField=function(a){return c(u.subject,a)};u.subject.addField=function(a){g([a]);u.subject.attributes.push(a)};u.subject.attributes=h.RDNAttributesAsArray(e.certificationRequestInfoSubject,l);u.subject.hash=l.digest().toHex();u.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo);
578 -u.getAttribute=function(a){return c(u,a)};u.addAttribute=function(a){g([a]);u.attributes.push(a)};u.attributes=h.CRIAttributesAsArray(e.certificationRequestInfoAttributes||[]);return u};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
579 -null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){g([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){g(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){g(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
580 -e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in r)switch(r[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
581 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case r["RSASSA-PSS"]:c=r[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=r[b.signatureParameters.mgf.algorithmOid];
582 -if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=r[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
573 +k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
574 +g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
575 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var q=h.createCertificationRequest();q.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;q.signatureOid=a.asn1.derToOid(g.csrSignatureOid);q.signatureParameters=R(q.signatureOid,g.csrSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,
576 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;q.signature=l.getBytes();q.certificationRequestInfo=g.certificationRequestInfo;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===
577 +q.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=q.signatureOid,g;l=k.toDer(q.certificationRequestInfo);q.md.update(l.getBytes())}l=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};q.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);q.subject.hash=l.digest().toHex();q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
578 +q.getAttribute=function(a){return c(q,a)};q.addAttribute=function(a){e([a]);q.attributes.push(a)};q.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return q};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
579 +null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
580 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
581 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
582 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
583 h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
584 k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
585 !1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
586 return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
587 return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
588 -h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return g.certs[b.hash]||
589 -null}var g={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in g.certs?(c=g.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):g.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
590 -for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)g.addCertificate(b[l]);return g};h.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"};
591 -h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var q=c.shift(),y=null,r=!1;if(g<q.validity.notBefore||g>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:g};if(null===k){y=c[0]||b.getIssuer(q);null===y&&q.isIssuer(q)&&(r=!0,y=q);if(y){var n=y;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){y=n.shift();
592 -try{x=y.verify(q)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||y&&!r||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&y&&!q.isIssuer(y)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<q.extensions.length;++x){var w=q.extensions[x];!w.critical||w.name in n||(k=
593 -{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||y&&!r)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
594 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
595 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
596 -c.defined.x509=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
597 -[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function g(b,c,h,q){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
598 -for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],r,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},u=null,u=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(u.tagClass!==m.Class.UNIVERSAL||u.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");u=d(u).value;break;case k.oids.encryptedData:var A=q,x={},B=[];if(!m.validate(u,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
599 -b.errors=B,b;u=m.derToOid(x.contentType);if(u!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=u,b;u=m.derToOid(x.encAlgorithm);u=k.pbe.getCipher(u,x.encParameter,A);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);u.update(x);if(!u.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");u=u.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
600 -l(u,h,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var q,r,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
601 -k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:q=A;r=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
602 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(x,q,g,h))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=h,a;r()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
603 -a.pkcs12||{},r={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
604 -r,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
588 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
589 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
590 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.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"};
591 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var r=c.shift(),A=null,u=!1;if(g<r.validity.notBefore||g>r.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:r.validity.notBefore,notAfter:r.validity.notAfter,now:g};if(null===k){A=c[0]||b.getIssuer(r);null===A&&r.isIssuer(r)&&(u=!0,A=r);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
592 +try{x=A.verify(r)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(r)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&A&&!r.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<r.extensions.length;++x){var w=r.extensions[x];!w.critical||w.name in n||(k=
593 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=r.getExtension("basicConstraints"),r=r.getExtension("keyUsage"),null!==r&&(r.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
594 +null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==r&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));r=null===k?!0:k.error;l=d?d(r,m,e):r;if(!0===l)k=null;else{!0===r&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
595 +if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
596 +c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
597 +[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,r){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
598 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},q=null,q=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(q.tagClass!==m.Class.UNIVERSAL||q.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");q=d(q).value;break;case k.oids.encryptedData:var z=r,x={},B=[];if(!m.validate(q,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
599 +b.errors=B,b;q=m.derToOid(x.contentType);if(q!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=q,b;q=m.derToOid(x.encAlgorithm);q=k.pbe.getCipher(q,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);q.update(x);if(!q.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");q=q.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
600 +l(q,h,r);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var r,u,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
601 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:r=z;u=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
602 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==r&&!m.validate(x,r,g,h))throw a=Error("Cannot read PKCS#12 "+r.name),a.errors=h,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
603 +a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
604 +u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
605 tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},B={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
606 value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
607 -capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},A={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
608 -h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var r={};if(!m.validate(b,v,r,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:r.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
609 -(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==r.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=r.version.charCodeAt(0),l;if(m.derToOid(r.contentType)!==k.oids.data)throw l=
610 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(r.contentType),l;b=r.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(r.mac){var w=null,A=0,u=m.derToOid(r.macAlgorithm);switch(u){case k.oids.sha1:w=a.md.sha1.create();A=20;break;case k.oids.sha256:w=a.md.sha256.create();A=32;break;case k.oids.sha384:w=a.md.sha384.create();A=48;break;case k.oids.sha512:w=a.md.sha512.create();
611 -A=64;break;case k.oids.md5:w=a.md.md5.create(),A=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+u);var u=new a.util.ByteBuffer(r.macSalt),B="macIterations"in r?parseInt(a.util.bytesToHex(r.macIterations),16):1,A=h.generateKey(n,u,3,B,A,w),u=a.hmac.create();u.start(w,A);u.update(b.value);if(u.getMac().getBytes()!==r.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}g(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
612 -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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(q)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);q=[];null!==
613 -g&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
614 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));g=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],n=0;n<q.length;++n){c=q[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
615 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
607 +capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
608 +h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
609 +(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
610 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var w=null,z=0,q=m.derToOid(u.macAlgorithm);switch(q){case k.oids.sha1:w=a.md.sha1.create();z=20;break;case k.oids.sha256:w=a.md.sha256.create();z=32;break;case k.oids.sha384:w=a.md.sha384.create();z=48;break;case k.oids.sha512:w=a.md.sha512.create();
611 +z=64;break;case k.oids.md5:w=a.md.md5.create(),z=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+q);var q=new a.util.ByteBuffer(u.macSalt),B="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,z=h.generateKey(n,q,3,B,z,w),q=a.hmac.create();q.start(w,z);q.update(b.value);if(q.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
612 +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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var r=a.util.isArray(c)?c[0]:c;"string"===typeof r&&(r=k.certificateFromPem(r));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(r)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);r=[];null!==
613 +g&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
614 +0<r.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,r));g=[];r=[];null!==c&&(r=a.util.isArray(c)?c:[c]);for(var u=[],n=0;n<r.length;++n){c=r[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
615 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);u.push(c)}0<u.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,u),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
616 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
617 [m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var v;e.useMac&&(g=a.md.sha1.create(),v=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,v,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),v=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
618 !0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,v.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
619 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
620 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
621 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var g=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
622 -g.headerType=b.type;throw g;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,g){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:g})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
623 -typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
619 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
620 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
621 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
622 +e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
623 +typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
624 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var g=a.util.createBuffer(),h=b.length>>1,l=h+(b.length&1),k=b.substr(0,l),l=b.substr(h,l);b=a.util.createBuffer();h=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);h.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
625 -for(var q=0;q<m;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
626 -a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},g=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
625 +for(var r=0;r<m;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(r=0;r<c;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
626 +a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
627 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
628 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
629 certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};m.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};m.CipherSuites={};m.getCipherSuite=function(a){var b=null,c;for(c in m.CipherSuites){var d=m.CipherSuites[c];if(d.id[0]===a.charCodeAt(0)&&d.id[1]===a.charCodeAt(1)){b=d;break}}return b};
@@ -634,41 +634,41 @@ send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protoco
634 b.session.compressionMethod=g?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.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,
635 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
636 (a.expect=B,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
637 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:z,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
637 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
638 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
639 !1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
640 -l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:z:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:z)):b.error(b,{message:e?"No server certificate provided.":
641 -"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=r;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
640 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
641 +"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
642 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
643 try{var g=b.session.sp;g.pre_master_secret=d.decrypt(c);var h=b.session.clientHelloVersion;if(h.major!==g.pre_master_secret.charCodeAt(0)||h.minor!==g.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){g.pre_master_secret=a.random.getBytes(48)}b.expect=O;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
644 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
645 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(g){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=O;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
646 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
647 -return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=y;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
647 +return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
648 data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=B;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
649 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:H;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var g=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
650 e.putBuffer(b.session.sha1.digest());var h=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,h?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(g);b.session.sha1.update(g);if(b.session.resuming&&h||!b.session.resuming&&!h)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
651 -data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?A:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
651 +data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?z:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
652 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
653 "Bad certificate.";break;case m.Alert.Description.unsupported_certificate:d="Unsupported certificate.";break;case m.Alert.Description.certificate_revoked:d="Certificate revoked.";break;case m.Alert.Description.certificate_expired:d="Certificate expired.";break;case m.Alert.Description.certificate_unknown:d="Certificate unknown.";break;case m.Alert.Description.illegal_parameter:d="Illegal parameter.";break;case m.Alert.Description.unknown_ca:d="Unknown certificate authority.";break;case m.Alert.Description.access_denied:d=
654 "Access denied.";break;case m.Alert.Description.decode_error:d="Decode error.";break;case m.Alert.Description.decrypt_error:d="Decrypt error.";break;case m.Alert.Description.export_restriction:d="Export restriction.";break;case m.Alert.Description.protocol_version:d="Unsupported protocol version.";break;case m.Alert.Description.insufficient_security:d="Insufficient security.";break;case m.Alert.Description.internal_error:d="Internal error.";break;case m.Alert.Description.user_canceled:d="User canceled.";
655 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt24();if(g>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var h=d.bytes(g+
656 4);d.read+=4;e in J[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(h),b.session.sha1.update(h)),J[b.entity][b.expect][e](b,c,g)):
657 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt16(),d=d.getBytes(g);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||g>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
658 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,r=3,v=4,B=5,x=6,A=7,y=8,R=1,z=2,E=3,O=4,H=5,N=6,u=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];ea[m.ConnectionEnd.server]=[[u,P,F,u,L],[u,
659 -P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[u,u,m.handleServerHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,P,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,L,u,u,u,u,u,u],
660 -[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];J[m.ConnectionEnd.server]=[[u,m.handleClientHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,P,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleClientKeyExchange,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleCertificateVerify,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,
661 -u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
658 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,B=5,x=6,z=7,A=8,R=1,y=2,E=3,O=4,H=5,N=6,q=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];ea[m.ConnectionEnd.server]=[[q,P,F,q,L],[q,
659 +P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[q,q,m.handleServerHello,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,P,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,L,q,q,q,q,q,q],
660 +[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q]];J[m.ConnectionEnd.server]=[[q,m.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,P,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.handleClientKeyExchange,q,q,q,q],[q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,m.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,
661 +q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[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]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
662 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};g&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
663 cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
664 a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
665 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=g;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
665 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
666 }return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
667 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
668 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
667 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var r=a.util.createBuffer();
668 +n(r,2,k);n(l,2,r);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
669 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var g=
670 -null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(q.bytes(),!1));
671 -var y=a.util.createBuffer();n(y,3,q);e.putBuffer(y)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
670 +null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var r=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(r.bytes(),!1));
671 +var u=a.util.createBuffer();n(u,3,r);e.putBuffer(u)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(q){return b.error(b,{message:"Could not send certificate list.",cause:q,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
672 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
673 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(g){b.error(b,{message:"Could not get private key.",cause:g,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
674 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var g=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(g))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -690,199 +690,199 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_versio
690 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_message}})),c.record.ready=!0));c=b}if(!h.fail&&null!==h.record&&h.record.ready)if(b=h.record,d=b.type-m.ContentType.change_cipher_spec,e=ea[h.entity][h.expect],d in e)e[d](h,b);else m.handleUnexpected(h,b)}return c};h.prepare=function(b){m.queue(h,m.createRecord(h,{type:m.ContentType.application_data,data:a.util.createBuffer(b)}));return m.flush(h)};h.prepareHeartbeatRequest=function(b,c){b instanceof a.util.ByteBuffer&&
691 (b=b.bytes());"undefined"===typeof c&&(c=b.length);h.expectedHeartbeatPayload=b;m.queue(h,m.createRecord(h,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_request,b,c)}));return m.flush(h)};h.close=function(a){if(!h.fail&&h.sessionCache&&h.session){var b={id:h.session.id,version:h.session.version,sp:h.session.sp};b.sp.keys=null;h.sessionCache.setSession(b.id,b)}if(h.open){h.open=!1;h.input.clear();if(h.isConnected||h.handshaking)h.isConnected=h.handshaking=!1,
692 m.queue(h,m.createAlert(h,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(h);h.closed(h)}h.reset(a)};return h};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
693 -return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<g.length;++l)g[l](c);return c.tls}},
694 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,g,l){g=g.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
695 -g?l.keys.server_write_key:l.keys.client_write_key),iv:g?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",g?l.keys.client_write_key:l.keys.server_write_key),iv:g?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var e=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
696 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(g)&&(b.fragment=k.output,b.length=b.fragment.length(),e=!0);return e}function g(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
697 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,q=a.random.getBytesSync(g),y=e.output.length();y>=g?(b.fragment=e.output.getBytes(y-g),q=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
698 -b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;y=a.hmac.create();y.start("SHA1",e);y.update(q);q=y.digest().getBytes();y.start(null,null);y.update(g);g=y.digest().getBytes();return q===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
693 +return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
694 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
695 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
696 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
697 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,r=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),r=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
698 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(r);r=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return r===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
699 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
700 -20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<g.length;++l)g[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
701 -typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
702 -a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
703 -function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<g.length;++l)g[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
704 -(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<q;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var g=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(g.getBytesSync(h)),
705 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));h-=q.length;0<h&&(q=a.util.fillString(String.fromCharCode(0),h)+q);h=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:h,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
706 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<g.length;++l)g[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
707 -"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],g=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var g=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):g<=c[m.level].index&&
700 +20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
701 +typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
702 +a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
703 +function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
704 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,r=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<r;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),r;do r=(new d(a.util.bytesToHex(e.getBytesSync(h)),
705 +16)).mod(c.n);while(r.equals(d.ZERO));r=a.util.hexToBytes(r.toString(16));h-=r.length;0<h&&(r=a.util.fillString(String.fromCharCode(0),h)+r);h=c.encrypt(r,"NONE");r=b.generate(r,l);return{encapsulation:h,key:r}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
706 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
707 +"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
708 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
709 a.log.logMessage({timestamp:new Date,level:b,category:c,message:d,arguments:e})}})(n[l]);a.log.makeLogger=function(b){b={flags:0,f:b};a.log.setLevel(b,"none");return b};a.log.setLevel=function(b,c){var d=!1;if(b&&!(b.flags&a.log.LEVEL_LOCKED))for(var e=0;e<a.log.levels.length;++e)if(c==a.log.levels[e]){b.level=c;d=!0;break}return d};a.log.lock=function(b,c){b.flags="undefined"===typeof c||c?b.flags|a.log.LEVEL_LOCKED:b.flags&~a.log.LEVEL_LOCKED};a.log.addLogger=function(a){d.push(a)};if("undefined"!==
710 -typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},g=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else g=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};g=a.log.makeLogger(g);a.log.setLevel(g,"debug");a.log.addLogger(g)}else console={log:function(){}};
711 -null!==g&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(g,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(g));a.log.consoleLogger=g}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
712 -c.defined.log=!0;for(var l=0;l<g.length;++l)g[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!r.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
713 -b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:r.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
714 -r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.encryptedContent.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]),r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function g(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
715 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.digestAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(r.create(r.Class.UNIVERSAL,
716 -r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.signatureAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]));c.value.push(r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=r.create(r.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
717 -r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?r.utcTimeToDate(e):r.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?r.create(r.Class.UNIVERSAL,r.Type.UTCTIME,!1,r.dateToUtcTime(e)):
718 -r.create(r.Class.UNIVERSAL,r.Type.GENERALIZEDTIME,!1,r.dateToGeneralizedTime(e))}return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[c])])}function m(b){return[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,
719 -r.Type.OCTETSTRING,!1,b.parameter.getBytes())]),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!r.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(r.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
720 -0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:r.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
710 +typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},e=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else e=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};e=a.log.makeLogger(e);a.log.setLevel(e,"debug");a.log.addLogger(e)}else console={log:function(){}};
711 +null!==e&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(e,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(e));a.log.consoleLogger=e}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
712 +c.defined.log=!0;for(var l=0;l<e.length;++l)e[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!u.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
713 +b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:u.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
714 +u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.encryptedContent.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]),u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function e(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
715 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.digestAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(u.create(u.Class.UNIVERSAL,
716 +u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.signatureAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]));c.value.push(u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=u.create(u.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
717 +u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?u.utcTimeToDate(e):u.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?u.create(u.Class.UNIVERSAL,u.Type.UTCTIME,!1,u.dateToUtcTime(e)):
718 +u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
719 +u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
720 +0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
721 c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
722 -break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var r=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
723 -b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=r.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:r.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!r.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=r.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
722 +break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
723 +b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
724 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
725 -c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
726 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.signerInfos));return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),
725 +c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
726 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
727 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
728 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
729 -signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(r.create(r.Class.CONTEXT_SPECIFIC,
730 -0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(g).getBytes()),r.create(r.Class.UNIVERSAL,
731 -r.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=r.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=r.toDer(d);h.getByte();r.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
732 -}else{e.authenticatedAttributesAsn1=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=r.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
728 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var r=c[m];if(!l&&r.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&r.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
729 +signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
730 +0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
731 +u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
732 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var r=e.authenticatedAttributes[m];r.type===a.pki.oids.messageDigest?r.value=c[e.digestAlgorithm].digest():r.type!==a.pki.oids.signingTime||r.value||(r.value=k);h.value.push(n(r));e.authenticatedAttributesAsn1.value.push(n(r))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
733 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
734 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,
735 -!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,g(b.recipients)),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
734 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
735 +!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
736 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
737 }h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
738 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
739 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
740 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
741 -Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function g(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
742 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=g(w.bytes()),b.truncate(b.length()-
743 -x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(g("\x00\x00\x00\x00",l)),x.putBuffer(g("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=g("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
744 -h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,g){g=g||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+g};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
745 -function(b,g){g=g||{};var l=g.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===g.encoding)return l=l.toHex(),g.delimiter?l.match(/.{2}/g).join(g.delimiter):l;if("binary"===g.encoding)return l.getBytes();if(g.encoding)throw Error('Unknown encoding "'+g.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
746 -(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<g.length;++l)g[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
747 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var g={};a.debug.set("forge.task","queues",g);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
740 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
741 +Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
742 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
743 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
744 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
745 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
746 +(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
747 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
748 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
749 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
750 -this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",g)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
750 +this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
751 (c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
752 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
753 this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
754 a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
755 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in g?0===g[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):g[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(g[b.type].shift(),0===g[b.type].length?delete g[b.type]:g[b.type][0].start()):a.log.error("forge.task",
756 -"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in g?g[a.type].push(b):(g[b.type]=[b],m(b))};a.task.cancel=function(a){a in g&&(g[a]=[g[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
757 -a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<g.length;++l)g[l](c);return c.task}},
758 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
759 -return}var g,v=function(a,b){b.exports=function(b){var c=g.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){g="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
755 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
756 +"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
757 +a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
758 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
759 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
760 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});
761 -function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var g=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),g=g.substring(0,g.length-24),v=0;v<c.length;v++)if(g===c[v].DERKey||g==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
762 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),g=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(g,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
763 -var e=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,e,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,g){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,g)}
764 -function amtcert_createCertificate(b,c,a,d,g){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
765 -value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==g?g={name:"extKeyUsage",serverAuth:!0}:g.name="extKeyUsage",
766 -n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},g,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
767 -function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,g=b.length;d<g;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
761 +function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),e=e.substring(0,e.length-24),v=0;v<c.length;v++)if(e===c[v].DERKey||e==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
762 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),r=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(r).getBytes();
763 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
764 +function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
765 +value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
766 +n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
767 +function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,e=b.length;d<e;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
768 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
769 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
770 -require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var g="";a.on("data",function(a){null!=g&&(g+=a.toString("binary"));5E5<g.length&&(g=null)});a.on("end",function(){certUrlCache[b]={data:btoa(g),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,g)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
771 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,e,k,m,q){var r=a[b++];q={};var u=0,B=0;if(0==r){if(2==h.bpp)for(e=0;e<m;e++)n(a[b++]+(a[b++]<<8),e);else for(e=0;e<m;e++)v(a[b++],e);g(h.spare,c,d)}else if(1==r)h.graymode?(r=a[b++],h.lowcolor&&(r<<=4),h.canvas.fillStyle="rgb("+r+","+r+","+r+")"):(r=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(r&224)+","+((r&28)<<3)+","+D((r&3)<<6):(r>>8&248)+","+(r>>3&252)+","+
772 -((r&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,e,k);else if(1<r&&17>r){k=4;B=15;if(2==h.bpp){for(e=0;e<r;e++)q[e]=a[b++]+(a[b++]<<8);2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)n(q[r>>e&B],u++)}else{for(e=0;e<r;e++)q[e]=a[b++];2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)v(q[r>>e&B],u++)}g(h.spare,c,d)}else if(128==r){if(2==h.bpp)for(;u<m&&b<a.byteLength;){r=a[b++]+(a[b++]<<8);B=1;do B+=e=a[b++];while(255==e);if(0==
773 -h.rotation)p(r,u,B),u+=B;else for(;0<=--B;)n(r,u++)}else for(;u<m&&b<a.byteLength;){r=a[b++];B=1;do B+=e=a[b++];while(255==e);if(0==h.rotation)l(r,u,B),u+=B;else for(;0<=--B;)v(r,u++)}g(h.spare,c,d)}else if(129<r){if(2==h.bpp)for(e=0;e<r-128;e++)q[e]=a[b++]+(a[b++]<<8);else for(e=0;e<r-128;e++)q[e]=a[b++];for(;u<m&&b<a.byteLength;){B=1;e=a[b++];r=q[e%128];if(127<e){do B+=e=a[b++];while(255==e)}if(0==h.rotation)2==h.bpp?p(r,u,B):l(r,u,B),u+=B;else if(2==h.bpp)for(;0<=--B;)n(r,u++);else for(;0<=--B;)v(r,
774 -u++)}g(h.spare,c,d)}}function g(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
770 +require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
771 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,r){var u=a[b++];r={};var q=0,B=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
772 +((u&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;B=15;if(2==h.bpp){for(g=0;g<u;g++)r[g]=a[b++]+(a[b++]<<8);2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(r[u>>g&B],q++)}else{for(g=0;g<u;g++)r[g]=a[b++];2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(r[u>>g&B],q++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;q<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);B=1;do B+=g=a[b++];while(255==g);if(0==
773 +h.rotation)p(u,q,B),q+=B;else for(;0<=--B;)n(u,q++)}else for(;q<m&&b<a.byteLength;){u=a[b++];B=1;do B+=g=a[b++];while(255==g);if(0==h.rotation)l(u,q,B),q+=B;else for(;0<=--B;)v(u,q++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)r[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)r[g]=a[b++];for(;q<m&&b<a.byteLength;){B=1;g=a[b++];u=r[g%128];if(127<g){do B+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?p(u,q,B):l(u,q,B),q+=B;else if(2==h.bpp)for(;0<=--B;)n(u,q++);else for(;0<=--B;)v(u,
774 +q++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
775 h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
776 b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
777 -1]=e,h.spare.data[b+2]=a,b+=4}function q(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function e(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
778 -2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):r[c.code];
779 -null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
780 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
781 -0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
782 -h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var e=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)e=12,h.state=1,h.parent&&delete h.parent.connectTime,
783 -h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)e=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){e=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;e=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
777 +1]=e,h.spare.data[b+2]=a,b+=4}function r(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
778 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];null!=c&&h.sendkey(c,
779 +a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);173==c&&(d=45);186==c&&
780 +(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=0;h.spareh2=0;
781 +h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=h.rwidth=
782 +h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
783 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
784 h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
785 0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
786 -50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);e=4;break;case 2:e=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)e=0;else if(b=l.getUint32(4)+8,c.byteLength<b)e=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
786 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
787 0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
788 -h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}e=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),e=l.getUint16(4),q=l.getUint16(6),p=e*q,r=l.getUint32(8);if(17>r){if(1>e||64<e||1>q||
789 -64<q)return console.log("Invalid tile size ("+e+","+q+"), disconnecting."),h.Stop();if(h.sparew!=e||h.spareh!=q){h.sparew=h.sparew2=e;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=e;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==r){h.canvas.canvas.width=h.rwidth=h.width=e;h.canvas.canvas.height=h.rheight=
790 -h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));e=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==r){r=12;e=12+p*h.bpp;if(h.acc.byteLength<e)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(r,!0),w),r+=2;else for(w=0;w<p;w++)v(h.acc[r++],w);g(h.spare,b,c)}else if(16==r){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
791 -16+w)break;r=16;if(5<w&&0==h.acc[r]&&l.getUint16(r+1,!0)==w-5)d(h.acc,r+5,b,c,e,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(r,r+w-0)))),0<l.length){for(var r=l,N=new Uint8Array(r.length),u=0,C=r.length;u<C;++u)N[u]=r.charCodeAt(u);d(N,0,b,c,e,q,p,l.length)}else console.log("Invalid deflate data");e=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==e)break;h.acc=e!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(e)):
788 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),r=l.getUint16(6),p=g*r,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>r||
789 +64<r)return console.log("Invalid tile size ("+g+","+r+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=r){h.sparew=h.sparew2=g;h.spareh=h.spareh2=r;if(1==h.rotation||3==h.rotation)h.sparew2=r,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
790 +h.height=r;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
791 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,r,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,N=new Uint8Array(u.length),q=0,C=u.length;q<C;++q)N[q]=u.charCodeAt(q);d(N,0,b,c,g,r,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
792 null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
793 function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
794 -h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,C(0,0),w(0,0));h.width=h.canvas.canvas.width;
795 -h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var r={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
795 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
796 NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
797 F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
798 h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
799 h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var K=!1,B=!1;h.GrabMouseInput=function(){if(1!=K){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;K=!0}};h.UnGrabMouseInput=function(){if(0!=K){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;K=!1}};h.GrabKeyInput=function(){1!=B&&(document.onkeyup=
800 h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,B=!0)};h.UnGrabKeyInput=function(){0!=B&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,B=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
801 0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){h.ReverseMouseWheel&&(b*=-1);var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/
802 -Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,g=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-g[0])*d;h.my=(event.pageY-g[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=q(h.mx,h.my),h.my=e(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
802 +Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=r(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
803 h.mNagleTimer=null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=
804 -0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;
805 -a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,g="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?g:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");
806 -a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&
807 -a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var g=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<g&&0!=a.State)for(a.PendingOperations.push([g,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];
808 -if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&
809 -255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),g=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),n=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,n,b,e,g,n,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);
810 -a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();
811 -if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,e=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,
812 -4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),e=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+
813 -q+" Y="+e);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,e);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,e);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,
814 -4));break;case 11:c=0;q={};e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<e)for(c=((b.charCodeAt(6+2*e)&255)<<8)+(b.charCodeAt(7+2*e)&255),n=0;n<e;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,
815 -4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);g=v[b];d&&(a.CanvasId.style.cursor=g)}return w+D}}};a.MouseButton=
816 -{NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,
817 -Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?
818 -d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,
819 -a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,
820 -67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,g;for(g in a.TouchArray)g==b?e=c:1==a.TouchArray[g].f?(e=65542,a.TouchArray[g].f=3):e=2==a.TouchArray[g].f?262144:131078,d+=String.fromCharCode(g)+a.intToStr(e)+a.shortToStr(a.TouchArray[g].x)+a.shortToStr(a.TouchArray[g].y),2==a.TouchArray[g].f&&
821 -delete a.TouchArray[g];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,g=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-g[0])*e,d=(c.pageY-
822 -g[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var n=g=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?g=a.MouseButton.LEFT:2==c.which?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT:c.button&&(0==c.button?g=a.MouseButton.LEFT:1==c.button?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?n=-120*c.detail:c.wheelDelta&&(n=3*c.wheelDelta));var v="",v=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,
823 -a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,n/256&255,n&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?g:2*g&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(v),a.Alternate=1):a.Alternate=0:a.send(v)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",
824 -b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,
825 -a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&
826 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&
827 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&
828 -(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&
829 -a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};
830 -a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,g=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]=
831 -{x:e,y:g});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
832 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<
833 -b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/
834 -a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=
835 -a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
836 -null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=
837 -null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;
838 -if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||
839 -3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,
840 -0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};
841 -a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;
842 -d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var g=new FileReader,v=!1,n=[];g.readAsBinaryString?g.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:g.readAsBinaryString(new Blob([n.shift()]))}:g.readAsArrayBuffer&&(g.onloadend=function(a){d.xxOnSocketData(a.target.result);
843 -0==n.length?v=!1:g.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(g.readAsBinaryString)v=!0,g.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,g.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=
844 -function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=
845 -a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");
846 -d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(u[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<
847 -b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){y[m][D]=a;A[m][D]=(e<<6)+(C<<12)+q}function g(){for(var a=(e<<6)+(C<<12)+q,b=D;b<l.width;b++)y[m][b]=" ",A[m][b]=a}function v(a){for(var b=(e<<6)+(C<<12)+q,c=0;c<l.width;c++)y[a][c]=" ",A[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)y[b]=y[b+a],A[b]=A[b+a];for(b=E[1]-a+1;b<=
848 -E[1];b++)for(y[b]=[],A[b]=[],a=0;a<l.width;a++)y[b][a]=" ",A[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,e=7,C=0,w=!0,D=0,m=0,k=0,h=0,r=0,K=[],B=0,x=0,A=[],y=[],R=!1,z=!0,E,O=!1,H=[],
849 -N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){y[c]=[];A[c]=[];for(var d=0;d<l.width;d++)y[c][d]=" ",A[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=
850 -decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(r){case 0:switch(n){case 27:r=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":r=2;break;case "(":r=4;break;case ")":r=5;break;case "]":r=6;break;case "=":O=!0;r=0;break;case ">":O=!1;r=0;break;case "7":k=D;h=m;r=0;break;case "8":D=k;m=h;r=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var u=0;u<l.width;u++)y[n][u]=y[n-1][u],A[n][u]=A[n-1][u];for(n=
851 -E[0]+1-1;n>E[0]-1;n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;r=0;break;default:console.log("unknown terminal short code",p),r=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,u=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(z=!1);break;case "h":25==n[0]&&(z=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==u&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==
852 -u&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==u&&(0==n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==u&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==u&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==u&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==u&&(p=n[0]);for(J=D;J<l.width-p;J++)y[m][J]=y[m][J+p],A[m][J]=A[m][J+p];for(J=l.width-p;J<l.width;J++)y[m][J]=" ",A[m][J]=448;break;case "L":J=1;1==u&&(J=n[0]);0==J&&(J=1);
853 -for(n=E[1];n>=m+J;n--)y[n]=y[n-J],A[n]=A[n-J];for(n=m;n<m+J;n++)for(y[n]=[],A[n]=[],p=0;p<l.width;p++)y[n][p]=" ",A[n][p]=448;break;case "J":if(1==u&&2==n[0])l.TermClear((C<<12)+(e<<6)),m=D=0,H=[];else if(0==u||1==u&&0==n[0])for(g(),J=m+1;J<l.height;J++)v(J);else if(1==u&&1==n[0])for(g(),J=0;J<m-1;J++)v(J);break;case "H":2==u?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<u;J++)n[J]&&0!=n[J]?1==n[J]?
854 -8>e&&(e+=8):2==n[J]||22==n[J]?8<=e&&(e-=8):7==n[J]?q=2:27==n[J]?q=0:30<=n[J]&&37>=n[J]?(p=8<=e,e=n[J]-30,p&&8>=e&&(e+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?e=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,e=7,q=0);break;case "K":if(0!=u&&(1!=u||n[0]&&0!=n[0])){if(1==u)if(1==n[0])for(n=(e<<6)+(C<<12)+q,u=0;u<D;u++)y[m][u]=" ",A[m][u]=n;else 2==n[0]&&v(m)}else g();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==u&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-
855 -1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=E[1]);break;case "S":p=1;1==u&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "M":p=1;1==u&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "T":p=1;1==u&&(p=n[0]);for(n=E[1];n>E[0]+
856 -p;n--)for(u=0;u<l.width;u++)y[n][u]=y[n-p][u],A[n][u]=A[n-p][u];for(n=E[0]+p;n>E[0];n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "X":p=1;J=D;R=m;for(1==u&&(p=n[0]);0<p&&R<l.height;)y[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}r=0}break;case 4:r=0;break;case 5:r=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(u=parseInt(n[0]),(0==u||2==u)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,
857 -l.title=n[1]);r=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var u=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
858 -9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,
859 -9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)y[b][c]=" ",A[b][c]=a;H=[]};l.TermResetScreen=function(){q=0;e=7;C=0;w=z=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);
860 -N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};
861 -l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,
862 -79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,
863 -91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;
864 -var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
865 -a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=A[b][h],D==h&&m==b&&z&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=y[b][h],d){case "&":a+="&amp;";
804 +0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=
805 +700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
806 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
807 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
808 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
809 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
810 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
811 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,r=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
812 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),r=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+r+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
813 +a.ProcessPictureMsg(c,r,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(r,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;r={};g=((b.charCodeAt(4)&255)<<8)+
814 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);r[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,r,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
815 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
816 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
817 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&
818 +7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==
819 +a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&
820 +a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+
821 +a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
822 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
823 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
824 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
825 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
826 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
827 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
828 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
829 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
830 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
831 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
832 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
833 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
834 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
835 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
836 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
837 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
838 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
839 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
840 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
841 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
842 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
843 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
844 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
845 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
846 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(q[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
847 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(C<<12)+r}function e(){for(var a=(g<<6)+(C<<12)+r,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(C<<12)+r,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
848 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),r=0,g=7,C=0,w=!0,D=0,m=0,k=0,h=0,u=0,K=[],B=0,x=0,z=[],A=[],R=!1,y=!0,E,O=!1,H=[],N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
849 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=
850 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":O=!0;u=0;break;case ">":O=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var q=0;q<l.width;q++)A[n][q]=A[n-1][q],z[n][q]=z[n-1][q];for(n=E[0]+1-1;n>E[0]-1;n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;u=0;break;
851 +default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,q=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==q&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==q&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==q&&(0==
852 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==q&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==q&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==q&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==q&&(p=n[0]);for(J=D;J<l.width-p;J++)A[m][J]=A[m][J+p],z[m][J]=z[m][J+p];for(J=l.width-p;J<l.width;J++)A[m][J]=" ",z[m][J]=448;break;case "L":J=1;1==q&&(J=n[0]);0==J&&(J=1);for(n=E[1];n>=m+J;n--)A[n]=A[n-J],z[n]=z[n-J];for(n=m;n<m+J;n++)for(A[n]=[],
853 +z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==q&&2==n[0])l.TermClear((C<<12)+(g<<6)),m=D=0,H=[];else if(0==q||1==q&&0==n[0])for(e(),J=m+1;J<l.height;J++)v(J);else if(1==q&&1==n[0])for(e(),J=0;J<m-1;J++)v(J);break;case "H":2==q?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<q;J++)n[J]&&0!=n[J]?1==n[J]?8>g&&(g+=8):2==n[J]||22==n[J]?8<=g&&(g-=8):7==n[J]?r=2:27==n[J]?r=0:30<=n[J]&&
854 +37>=n[J]?(p=8<=g,g=n[J]-30,p&&8>=g&&(g+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?g=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,g=7,r=0);break;case "K":if(0!=q&&(1!=q||n[0]&&0!=n[0])){if(1==q)if(1==n[0])for(n=(g<<6)+(C<<12)+r,q=0;q<D;q++)A[m][q]=" ",z[m][q]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==q&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
855 +E[1]);break;case "S":p=1;1==q&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "M":p=1;1==q&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "T":p=1;1==q&&(p=n[0]);for(n=E[1];n>E[0]+p;n--)for(q=0;q<l.width;q++)A[n][q]=A[n-p][q],z[n][q]=z[n-p][q];for(n=
856 +E[0]+p;n>E[0];n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "X":p=1;J=D;R=m;for(1==q&&(p=n[0]);0<p&&R<l.height;)A[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(q=parseInt(n[0]),(0==q||2==q)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=
857 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var q=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
858 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
859 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;H=[]};l.TermResetScreen=function(){r=0;g=7;C=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
860 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
861 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
862 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
863 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
864 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
865 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
866 break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<H.length&&(H=H.slice(H.length-800));c=H.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
867 l.Init();return l},ZLIB=ZLIB||{};
868 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
869 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
870 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,x,A,B,D,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=A=1;15>=p;p++)if(A<<=1,A-=M[p],0>A)return-1;if(0<A&&(0==
871 -b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(q=0;q<n;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=r,fa=K,ga=ca=0,U=-1}q=D=0;p=d;S=c;n=w;x=0;W=-1;B=1<<w;I=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[q]<U?G.val=e[q]:e[q]>U?(G.op=fa[ga+e[q]],G.val=Z[ca+e[q]]):G.op=96;A=1<<p-x;d=C=1<<n;do C-=A,m[S+(D>>>x)+C]=G;while(0!=C);for(A=1<<p-1;D&A;)A>>>=1;
872 -0!=A?(D&=A-1,D+=A):D=0;q++;if(0==--M[p]){if(p==v)break;p=g[l+e[q]]}if(p>w&&(D&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(A=1<<n;n+x<v;){A-=M[n+x];if(0>=A)break;n++;A<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=D&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=D&&(m[S+D]={op:64,bits:p-x,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function g(){var a;this.total=this.check=
870 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,p;p=1==b?a.nlen:2==b?a.ndist:19;var n,r,v,w,x,z,D,B,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(n=0;15>=n;n++)M[n]=0;for(r=0;r<p;r++)M[g[l+r]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(n=z=1;15>=n;n++)if(z<<=1,z-=M[n],0>z)return-1;if(0<z&&(0==
871 +b||1!=v))return a.next=c,-1;x[1]=0;for(n=1;15>n;n++)x[n+1]=x[n]+M[n];for(r=0;r<p;r++)0!=g[l+r]&&(e[x[g[l+r]]++]=r);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=u,fa=K,ga=ca=0,U=-1}r=B=0;n=d;S=c;p=w;x=0;W=-1;D=1<<w;I=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){G={op:0,bits:n-x,val:0};e[r]<U?G.val=e[r]:e[r]>U?(G.op=fa[ga+e[r]],G.val=Z[ca+e[r]]):G.op=96;z=1<<n-x;d=C=1<<p;do C-=z,m[S+(B>>>x)+C]=G;while(0!=C);for(z=1<<n-1;B&z;)z>>>=1;
872 +0!=z?(B&=z-1,B+=z):B=0;r++;if(0==--M[n]){if(n==v)break;n=g[l+e[r]]}if(n>w&&(B&I)!=W){0==x&&(x=w);S+=d;p=n-x;for(z=1<<p;p+x<v;){z-=M[p+x];if(0>=z)break;p++;z<<=1}D+=1<<p;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&I;m[c+W]={op:p,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:n-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
873 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
874 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function e(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function C(a,b){return a.hold&
875 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
874 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function r(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!r(a))return!1;return!0}function C(a,b){return a.hold&
875 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
876 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
877 -e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new g;ZLIB.inflateReset(b,
878 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,g,h,k,r,u=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);g={};n(a,g);h=g.have;k=g.left;
879 -P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!e(g,16))break a;if(d.wrap&2&&35615==g.hold){d.check=a.checksum_function(0,null,0,0);v(a,g.hold);p(g);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(g,8)<<8)+(g.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(g,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(g,4);u=C(g,4)+8;if(0==d.wbits)d.wbits=u;else if(u>d.wbits){a.msg="invalid window size";d.mode=
880 -29;break}d.dmax=1<<u;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=g.hold&512?9:11;p(g);break;case 1:if(!e(g,16))break a;d.flags=g.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=g.hold>>>8&1);d.flags&512&&v(a,g.hold);p(g);d.mode=2;case 2:if(!e(g,32))break a;null!==d.head&&(d.head.time=g.hold);d.flags&512&&(r=g.hold,a.state.check=a.checksum_function(a.state.check,
881 -[r&255,r>>>8&255,r>>>16&255,r>>>24&255],0,4));p(g);d.mode=3;case 3:if(!e(g,16))break a;null!==d.head&&(d.head.xflags=g.hold&255,d.head.os=g.hold>>>8);d.flags&512&&v(a,g.hold);p(g);d.mode=4;case 4:if(d.flags&1024){if(!e(g,16))break a;d.length=g.hold;null!==d.head&&(d.head.extra_len=g.hold);d.flags&512&&v(a,g.hold);p(g);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(r=d.length,r>g.have&&(r=g.have),r&&(null!==d.head&&null!==d.head.extra&&(u=d.head.extra_len-
882 -d.length,d.head.extra+=a.input_data.substring(g.next,g.next+(u+r>d.head.extra_max?d.head.extra_max-u:r))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r)),g.have-=r,g.next+=r,d.length-=r),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==g.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");r=0;do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=u,d.length++)}while(r<g.have);d.flags&
883 -512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==g.have)break a;r=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=u,d.length++)}while(r<g.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=
884 -r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!e(g,16))break a;if(g.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(g)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!e(g,32))break a;a.adler=d.check=m(g.hold);p(g);d.mode=10;case 10:if(0==d.havedict)return l(g),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
885 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(g);d.mode=26;break}if(!e(g,3))break a;d.last=C(g,1);w(g,1);switch(C(g,2)){case 0:d.mode=13;break;case 1:r=d;u=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
877 +e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
878 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,q=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
879 +P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);q=C(e,4)+8;if(0==d.wbits)d.wbits=q;else if(q>d.wbits){a.msg="invalid window size";d.mode=
880 +29;break}d.dmax=1<<q;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
881 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(q=d.head.extra_len-
882 +d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(q+u>d.head.extra_max?d.head.extra_max-q:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=q,d.length++)}while(u<e.have);d.flags&
883 +512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=q,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
884 +u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
885 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=C(e,1);w(e,1);switch(C(e,2)){case 0:d.mode=13;break;case 1:u=d;q=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
886 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
887 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
888 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -905,28 +905,28 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
905 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
906 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
907 {op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
908 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);r.lencode=0;r.distcode=512;for(u=0;512>u;u++)r.codes[u]=B[u];for(u=0;32>u;u++)r.codes[u+512]=x[u];r.lenbits=9;r.distbits=5;
909 -d.mode=19;if(c==ZLIB.Z_TREES){w(g,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(g,2);break;case 13:D(g);if(!e(g,32))break a;if((g.hold&65535)!=(g.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=g.hold&65535;p(g);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(r=d.length){r>g.have&&(r=g.have);r>g.left&&(r=g.left);if(0==r)break a;a.output_data+=a.input_data.substring(g.next,g.next+r);a.next_out+=r;g.have-=
910 -r;g.next+=r;g.left-=r;d.length-=r;break}d.mode=11;break;case 16:if(!e(g,14))break a;d.nlen=C(g,5)+257;w(g,5);d.ndist=C(g,5)+1;w(g,5);d.ncode=C(g,4)+4;w(g,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!e(g,3))break a;r=C(g,3);d.lens[A[d.have++]]=r;w(g,3)}for(;19>d.have;)d.lens[A[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
911 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(16>r.val)w(g,r.bits),d.lens[d.have++]=r.val;else{if(16==r.val){if(!e(g,r.bits+2))break a;w(g,r.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}u=d.lens[d.have-1];r=3+C(g,2);w(g,2)}else if(17==r.val){if(!e(g,r.bits+3))break a;w(g,r.bits);u=0;r=3+C(g,3);w(g,3)}else{if(!e(g,r.bits+7))break a;w(g,r.bits);u=0;r=11+C(g,7);w(g,7)}if(d.have+r>d.nlen+d.ndist){a.msg=
912 -"invalid bit length repeat";d.mode=29;break}for(;r--;)d.lens[d.have++]=u}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=g.have&&258<=g.left){l(g);r=a;var F=K=u=void 0,Y=void 0,L=void 0,
913 -ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,u=r.state,K=r.input_data,F=r.next_in,Y=F+r.avail_in-5,L=r.next_out,ea=L-(k-r.avail_out),V=L+(r.avail_out-257),J=u.wsize,aa=u.whave,ba=u.wnext,W=u.window,I=u.hold,G=u.bits,S=u.codes,Z=u.lencode,ca=u.distcode,fa=(1<<u.lenbits)-1,ga=(1<<u.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
914 -G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)r.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
915 -u.sane){r.msg="invalid distance too far back";u.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,r.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)r.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);r.output_data+=r.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),X-=3;X&&(r.output_data+=r.output_data.charAt(U++),
916 -1<X&&(r.output_data+=r.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{r.msg="invalid distance code";u.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?u.mode=11:(r.msg="invalid literal/length code",u.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;r.next_in=F;r.next_out=L;r.avail_in=F<Y?5+(Y-F):5-(F-Y);r.avail_out=L<V?257+(V-L):257-(L-V);u.hold=I;u.bits=G;n(a,g);11==d.mode&&(d.back=-1);
917 -break}for(d.back=0;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(r.op&&0==(r.op&240)){for(u=r;;){r=d.codes[d.lencode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;d.length=r.val;if(0==r.op){d.mode=25;break}if(r.op&32){d.back=-1;d.mode=11;break}if(r.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=r.op&15;d.mode=21;case 21:if(d.extra){if(!e(g,d.extra))break a;
918 -d.length+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){r=d.codes[d.distcode+C(g,d.distbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(0==(r.op&240)){for(u=r;;){r=d.codes[d.distcode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;if(r.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=r.val;d.extra=r.op&15;d.mode=23;case 23:if(d.extra){if(!e(g,d.extra))break a;
919 -d.offset+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==g.left)break a;r=k-g.left;if(d.offset>r){r=d.offset-r;if(r>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}r>d.wnext?(r-=d.wnext,u=d.wsize-r):u=d.wnext-r;K=-1;r>d.length&&(r=d.length)}else u=-1,K=a.next_out-d.offset,r=d.length;r>g.left&&(r=g.left);g.left-=r;d.length-=r;if(0<=u)a.output_data+=d.window.substring(u,u+r),a.next_out+=r;else{a.next_out+=r;do a.output_data+=a.output_data.charAt(K++);while(--r)}0==
920 -d.length&&(d.mode=20);break;case 25:if(0==g.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;g.left--;d.mode=20;break;case 26:if(d.wrap){if(!e(g,32))break a;k-=g.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=g.left;if((d.flags?g.hold:m(g.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(g)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!e(g,32))break a;if(g.hold!=(d.total&4294967295)){a.msg="incorrect length check";
921 -d.mode=29;break}p(g)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(g);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))g=a.state,r=a.output_data.length,null===g.window&&(g.window=""),0==g.wsize&&(g.wsize=1<<g.wbits),g.window=r>=g.wsize?a.output_data.substring(r-g.wsize):g.whave+r<g.wsize?g.window+a.output_data:g.window.substring(g.whave-(g.wsize-r))+a.output_data,g.whave=g.window.length,
922 -g.wnext=g.whave<g.wsize?g.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
908 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(q=0;512>q;q++)u.codes[q]=B[q];for(q=0;32>q;q++)u.codes[q+512]=x[q];u.lenbits=9;u.distbits=5;
909 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
910 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=C(e,5)+257;w(e,5);d.ndist=C(e,5)+1;w(e,5);d.ncode=C(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=C(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
911 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}q=d.lens[d.have-1];u=3+C(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);q=0;u=3+C(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);q=0;u=11+C(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
912 +"invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=q}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var F=K=q=void 0,Y=void 0,L=void 0,
913 +ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,q=u.state,K=u.input_data,F=u.next_in,Y=F+u.avail_in-5,L=u.next_out,ea=L-(k-u.avail_out),V=L+(u.avail_out-257),J=q.wsize,aa=q.whave,ba=q.wnext,W=q.window,I=q.hold,G=q.bits,S=q.codes,Z=q.lencode,ca=q.distcode,fa=(1<<q.lenbits)-1,ga=(1<<q.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
914 +G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)u.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
915 +q.sane){u.msg="invalid distance too far back";q.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)u.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);u.output_data+=u.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),X-=3;X&&(u.output_data+=u.output_data.charAt(U++),
916 +1<X&&(u.output_data+=u.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{u.msg="invalid distance code";q.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?q.mode=11:(u.msg="invalid literal/length code",q.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;u.next_in=F;u.next_out=L;u.avail_in=F<Y?5+(Y-F):5-(F-Y);u.avail_out=L<V?257+(V-L):257-(L-V);q.hold=I;q.bits=G;n(a,e);11==d.mode&&(d.back=-1);
917 +break}for(d.back=0;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(u.op&&0==(u.op&240)){for(q=u;;){u=d.codes[d.lencode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
918 +d.length+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+C(e,d.distbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(0==(u.op&240)){for(q=u;;){u=d.codes[d.distcode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
919 +d.offset+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,q=d.wsize-u):q=d.wnext-u;K=-1;u>d.length&&(u=d.length)}else q=-1,K=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=q)a.output_data+=d.window.substring(q,q+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(K++);while(--u)}0==
920 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
921 +d.mode=29;break}p(e)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
922 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
923 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
924 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
925 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
926 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
927 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;a%=65521;n%=65521}return a|n<<16}function c(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b[c],65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),
928 a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b[c++],n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=
929 -a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,g,v){return"string"===typeof d?b(a,d,g,v):c(a,d,g,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
929 +a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,e,v){return"string"===typeof d?b(a,d,e,v):c(a,d,e,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
930 65521);131042<=v&&(v-=131042);65521<=v&&(v-=65521);return c|v<<16}})();"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-crc32.js");
931 (function(){function b(a,b){var c,n=0;for(c=0;b;)b&1&&(c^=a[n]),b>>=1,n++;return c}function c(a,c){var v;for(v=0;32>v;v++)a[v]=b(c,c[v])}var a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,
932 3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,
@@ -935,32 +935,32 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
935 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
936 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
937 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
938 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,g,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^g}})();
939 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),g=b.webkitRequestFileSystem,v=b.requestFileSystem||g||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
940 -b.chrome?c():setTimeout(c,500)},q=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(g){n(g)}}},e=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},C=function(n,m,k){k||(n=e(n));var h=this;k=n.type;var r=!1,w,B,x=function(){q(h,["writestart","progress","write","writeend"])},A=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
941 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(r||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},y=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},z;h.readyState=h.INIT;m||(m="download");if(a)w=
942 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(z=n.slice||n.webkitSlice,n=z.call(n,0,n.size,"application/octet-stream"),r=!0);g&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||g)B=b;v?(l+=n.size,v(b.TEMPORARY,l,y(function(a){a.root.getDirectory("saved",C,y(function(a){var b=function(){a.getFile(m,C,y(function(a){a.createWriter(y(function(b){b.onwriteend=
943 -function(b){B.location.href=a.toURL();h.readyState=h.DONE;q(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&A()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),A)}),A)};a.getFile(m,{create:!1},y(function(a){a.remove();b()}),y(function(a){a.code===a.NOT_FOUND_ERR?b():A()}))}),A)}),A)):A()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
944 -b,c){c||(a=e(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
938 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,r;if(0>=v)return a;p=Array(32);r=Array(32);r[0]=3988292384;for(n=l=1;32>n;n++)r[n]=l,l<<=1;c(p,r);c(r,p);do{c(p,r);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(r,p);v&1&&(a=b(r,a));v>>=1}while(0!=v);return a^e}})();
939 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
940 +b.chrome?c():setTimeout(c,500)},r=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(g){n(g)}}},g=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},C=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){r(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
941 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
942 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",C,A(function(a){var b=function(){a.getFile(m,C,A(function(a){a.createWriter(A(function(b){b.onwriteend=
943 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;r(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
944 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;r(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
945 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
946 -var version="0.9.3",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
946 +var version="0.9.7",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
947 null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetAuth NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
948 StatusStrs=["\u5207\u65ad\u3055\u308c\u305f","\u63a5\u7d9a\u3057\u3066\u3044\u307e\u3059...","\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7...","\u63a5\u7d9a\u3055\u308c\u3066\u3044\u307e\u3059"],t,t2,rsepass=null;
949 -function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
950 -applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
951 -haltEvent,!1);document.addEventListener("dragleave",haltEvent,!1);document.addEventListener("drop",documentFileSelectHandler,!1);Q("p16").addEventListener("dragover",haltEvent,!1);Q("p16").addEventListener("dragleave",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",
952 -p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
949 +function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(23).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
950 +urlvars.kvmenc&&(c=parseInt(urlvars.kvmenc),"number"==typeof c&&(desktopsettings.encflags=c));urlvars.kvmdec&&(c=parseInt(urlvars.kvmdec),"number"==typeof c&&(desktopsettings.decimationMode=c));applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(34).value=terminalEmulations[terminal.m.terminalEmulation];Q(31).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",
951 +haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);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",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);
952 +document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
953 function documentFileSelectHandler(b){haltEvent(b);for(var c=!0,a=0;a<b.dataTransfer.files.length;a++)0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".img")&&0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".iso")&&(c=!1);1==c&&null!=b.dataTransfer&&0<currentView&&100>currentView&&(1==b.dataTransfer.files.length||2==b.dataTransfer.files.length)?(a=c=null,b.dataTransfer.files[0].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[0]),b.dataTransfer.files[0].name.toLowerCase().endsWith(".img")&&
954 (c=b.dataTransfer.files[0]),2==b.dataTransfer.files.length&&(b.dataTransfer.files[1].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[1]),b.dataTransfer.files[1].name.toLowerCase().endsWith(".img")&&(c=b.dataTransfer.files[1])),null==c&&null==a||iderStart3(c,a,1)):null!=b.dataTransfer&&1==b.dataTransfer.files.length&&(c=b.dataTransfer.files[0].name.toLowerCase(),21==currentView&&UploadToStorage(b.dataTransfer.files[0],c))}
955 function connectButtonfunction(){wsstack&&0!=wsstack.socketState?disconnect():meshcentral2credCallback()}function connectButtonfunctionEx(){currentMeshNode=parent.getCurrentNode();connect(currentMeshNode._id,16992,null,null,0);Q("xconnectbutton1").value="\u5207\u65ad\u3059\u308b"}function getCurrentMeshNode(){return currentMeshNode}function setConnectionState(b){QE("xconnectbutton1",b);0==b&&disconnect()}function setFrameHeight(b){}function setAuthCallback(b){meshcentral2credCallback=b}
956 function setUrlVar(b,c){urlvars||(urlvars={});urlvars[b]=c}function cleanup(){c3.value="\u30ad\u30e3\u30d7\u30c1\u30e3\u3092\u958b\u59cb";terminal.m.capture&&delete terminal.m.capture;terminal.Stop();desktop.disconnectCode=0;desktop.Stop()}
957 -function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
958 -function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
959 -function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
960 -function connect(b,c,a,d,g,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,g);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(28,"");QH(39,"");amtversion=amtversionmin=amtFirstPull=
961 -0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(21,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(49,"");
962 -QH(50,LoadingHtml);xxCertificates=null;QH(51,LoadingHtml);QH(24,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(52,LoadingHtml);QH(54,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
963 -!1;QH(53,LoadingHtml);QE(43,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(48,!1),Q(48).checked=!0);QE(44,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
957 +function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
958 +function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
959 +function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
960 +function connect(b,c,a,d,e,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,e);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(29,"");QH(40,"");amtversion=amtversionmin=amtFirstPull=
961 +0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(22,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(50,"");
962 +QH(51,LoadingHtml);xxCertificates=null;QH(52,LoadingHtml);QH(25,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(53,LoadingHtml);QH(55,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
963 +!1;QH(54,LoadingHtml);QE(44,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(49,!1),Q(49).checked=!0);QE(45,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
964 function disconnect(){null!=desktopPollTimer&&(clearInterval(desktopPollTimer),desktopPollTimer=null);fullscreen&&deskToggleFull();iderStop();StopDefenseStatsTimer();dialogclose(0);amtstack&&(amtstack.onProcessChanged=null,amtstack.CancelAllQueries(999),amtstack=null);cleanup();wsstack=null;delete amtstack;onProcessChanged(0,1);go(101);Q("xconnectbutton1").value="\u63a5\u7d9a\u3059\u308b";QH(5,"\u5207\u65ad\u3055\u308c\u305f");go(100)}
965 function onProcessChanged(b,c){QS(3).width=100*b/c+"%";0==b&&refreshButtons(!0);0==b&&amtstack&&(0<amtversion&&0==(amtFirstPull&64)?(amtFirstPull|=64,PullPowerPolicy(),subscriptionsFilters=null,PullEventSubscriptions(),PullWatchdog(),5<amtversion&&(PullCertificates(),PullRemoteAccess())):0==(amtFirstPull&1)?PullHardware():0==(amtFirstPull&16)?PullEventLog():0==(amtFirstPull&32)&&PullAuditLog())}
966 function checkAmtVersion(b){var c=b.split(".");b=parseInt(c[0]);var a=parseInt(c[1]),c=parseInt(c[2]),c=1E3*a+c,d=0;5>=b||12<=b?d=1:6==b&&2061<=c?d=1:7==b&&1091<=c?d=1:8==b&&1071<=c?d=1:9==b?5>a&&1041<=c?d=1:5061<=c&&(d=1):10==b&&55<=c?d=1:11==b&&(5>a&&25<=c?d=1:6027<=c&&(d=1));return 0==d}
@@ -969,39 +969,40 @@ function processSystemVersion(b,c,a,d){if(200==d||400==d){if(200==d){amtlogicale
969 1==urlvars.sol&&(go(13),connectTerminal())}else errcheck(d,b)}var refreshButtonsState=!0;function refreshButtons(b){if(refreshButtonsState!=b){refreshButtonsState=b;for(var c=0,a=document.getElementsByTagName("input");c<a.length;c++)"refreshbtn"==a[c].name&&(a[c].disabled=!b)}}
970 function PullPowerState(){amtstack&&0==amtstack.GetPendingActions()&&amtsysstate&&amtsysstate.CIM_ServiceAvailableToElement&&amtstack.Enum("CIM_ServiceAvailableToElement",function(b,c,a,d){200==d&&(amtsysstate.CIM_ServiceAvailableToElement.responses=a,9<amtversion&&null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?
971 amtstack.Get("IPS_PowerManagementService",function(a,b,c,d){200==d&&(amtsysstate.IPS_PowerManagementService.response=c.Body,updateSystemStatus())}):updateSystemStatus())})}
972 -function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c=["CIM_ServiceAvailableToElement","*AMT_GeneralSettings","AMT_EthernetPortSettings","*AMT_RedirectionService","CIM_ElementSettingData"];5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");15<amtversion&&1==amtstack.wsman.comm.xtls&&
973 -c.push("*CIM_BootService");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
972 +function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c="CIM_ServiceAvailableToElement *AMT_GeneralSettings AMT_EthernetPortSettings *AMT_RedirectionService CIM_ElementSettingData *AMT_BootCapabilities".split(" ");5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");
973 +15<amtversion&&c.push("*CIM_BootService");2<amtversion&&c.push("*AMT_8021XProfile");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
974 function processSystemStatus(b,c,a,d){if(void 0==a.IPS_ScreenConfigurationService||400==a.IPS_ScreenConfigurationService.status)a.IPS_ScreenConfigurationService=null;if(void 0==a.IPS_KVMRedirectionSettingData||400==a.IPS_KVMRedirectionSettingData.status)a.IPS_KVMRedirectionSettingData=null;if(void 0==a.CIM_KVMRedirectionSAP||400==a.CIM_KVMRedirectionSAP.status)a.CIM_KVMRedirectionSAP=null;if(void 0==a.IPS_OptInService||400==a.IPS_OptInService.status)a.IPS_OptInService=null;void 0!=a.AMT_RedirectionService&&
975 -200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var g in a)null!=a[g]&&a[g].status>d&&(d=a[g].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"\u30af\u30ed\u30c3\u30af\u3092\u540c\u671f",3,syncClockEx,"\u30a4\u30f3\u30c6\u30ebAMT\u30af\u30ed\u30c3\u30af\u3092\u3053\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u3068\u540c\u671f\u3057\u307e\u3059\u304b\uff1f")}
975 +200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var e in a)null!=a[e]&&a[e].status>d&&(d=a[e].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"\u30af\u30ed\u30c3\u30af\u3092\u540c\u671f",3,syncClockEx,"\u30a4\u30f3\u30c6\u30ebAMT\u30af\u30ed\u30c3\u30af\u3092\u3053\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u3068\u540c\u671f\u3057\u307e\u3059\u304b\uff1f")}
976 function syncClockEx(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(b,c,a,d){200!=d?messagebox("","\u6642\u9593\u306e\u8a2d\u5b9a\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3001\u30b9\u30c6\u30fc\u30bf\u30b9="+d):0!=a.Body.ReturnValue?messagebox("","\u6642\u9593\u306e\u8a2d\u5b9a\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3001\u30a8\u30e9\u30fc\uff1a"+a.Body.ReturnValueStr):(b=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(a.Body.Ta0,
977 b,b,function(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}))})}var DMTFPowerStates=" \u96fb\u6e90\u30aa\u30f3 \u6d45\u3044\u7720\u308a \u6df1\u3044\u7720\u308a \u30d1\u30ef\u30fc\u30b5\u30a4\u30af\u30eb\uff08\u30bd\u30d5\u30c8\u30aa\u30d5\uff09 \u30aa\u30d5-\u30cf\u30fc\u30c9 \u30cf\u30a4\u30d0\u30cd\u30fc\u30c8\uff08\u30aa\u30d5\u30bd\u30d5\u30c8\uff09 \u30bd\u30d5\u30c8\u30aa\u30d5 \u30d1\u30ef\u30fc\u30b5\u30a4\u30af\u30eb\uff08\u30aa\u30d5\u30cf\u30fc\u30c9\uff09 \u30e1\u30a4\u30f3\u30d0\u30b9\u30ea\u30bb\u30c3\u30c8 \u8a3a\u65ad\u5272\u308a\u8fbc\u307f\uff08NMI\uff09 \u9069\u7528\u3067\u304d\u307e\u305b\u3093 \u30aa\u30d5-\u512a\u96c5\u306a\u30bd\u30d5\u30c8 \u30aa\u30d5-\u512a\u96c5\u306a\u30cf\u30fc\u30c9 \u30de\u30b9\u30bf\u30fc\u30d0\u30b9\u306e\u30ea\u30bb\u30c3\u30c8 \u30d1\u30ef\u30fc\u30b5\u30a4\u30af\u30eb\uff08\u30aa\u30d5-\u30bd\u30d5\u30c8\u30b0\u30ec\u30fc\u30b9\u30d5\u30eb\uff09 \u30d1\u30ef\u30fc\u30b5\u30a4\u30af\u30eb\uff08\u30aa\u30d5-\u512a\u96c5\u306a\u30cf\u30fc\u30c9\uff09 \u8a3a\u65ad\u5272\u308a\u8fbc\u307f\uff08INIT\uff09".split(" ");
978 -function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),g="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>\u308f\u304b\u3089\u306a\u3044</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"\u96fb\u6e90\u30aa\u30f3"==n&&amtsysstate.IPS_PowerManagementService&&
979 -amtsysstate.IPS_PowerManagementService.response&&3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=["\u3001 \u5dee\u3057\u8fbc\u3080","\u3001 \u96fb\u6c60\u3067"][v.PowerSource]);d+=TableEntry("\u529b",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>\u7121\u3057</i>":EscapeHtml(c);d+=TableEntry("\u540d\u524d\u3068\u30c9\u30e1\u30a4\u30f3",
978 +function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>\u308f\u304b\u3089\u306a\u3044</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"\u96fb\u6e90\u30aa\u30f3"==n&&amtsysstate.IPS_PowerManagementService&&
979 +amtsysstate.IPS_PowerManagementService.response&&3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(29,n),QH(40,n));v.PowerSource&&(n+=["\u3001 \u5dee\u3057\u8fbc\u3080","\u3001 \u30d0\u30c3\u30c6\u30ea\u30fc\u3067"][v.PowerSource]);d+=TableEntry("\u529b",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>\u7121\u3057</i>":EscapeHtml(c);d+=TableEntry("\u540d\u524d\u3068\u30c9\u30e1\u30a4\u30f3",
980 addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?d+=TableEntry("\u30b7\u30b9\u30c6\u30e0ID",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("\u30b7\u30b9\u30c6\u30e0ID",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" \u7ba1\u7406\u5236\u5fa1\u30e2\u30fc\u30c9\uff08ACM\uff09\u3067\u30a2\u30af\u30c6\u30a3\u30d6\u5316",
981 -4==l.ProvisioningMode&&(n=" \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5236\u5fa1\u30e2\u30fc\u30c9\uff08CCM\uff09\u3067\u30a2\u30af\u30c6\u30a3\u30d6\u5316",b=9));d+=TableEntry("\u30a4\u30f3\u30c6\u30eb&reg;ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),
982 -QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),e=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),e=amtfeatures[3]=6==
983 -amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(g+="\u3001\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u30dd\u30fc\u30c8");q&&(g+="\u3001Serial-over-LAN");n&&(g+="\u3001IDE\u30ea\u30c0\u30a4\u30ec\u30af\u30c8");e&&(g+="\u3001KVM");""==g&&(g=" \u7121\u3057");d+=TableEntry("\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u6a5f\u80fd",
984 -addLinkConditional(g.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,g="\u30d7\u30e9\u30a4\u30de\u30ea\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(g=["\u30d7\u30e9\u30a4\u30de\u30ea\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4","\u30bb\u30ab\u30f3\u30c0\u30ea\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4",
985 -"\u7b2c3\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4"][n.DefaultScreen]),g='<span title="'+format("\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30ea\u30e2\u30fc\u30c8\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306f{0}\u3067\u3059",g.toLowerCase())+'">'+g+"</span>",1==n.Is5900PortEnabled&&(g+="\u3001\u30dd\u30fc\u30c85900\u304c\u6709\u52b9"),1==n.OptInPolicy&&(g+="\u3001"+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"\u79d2\u30aa\u30d7\u30c8\u30a4\u30f3":"2\u756a\u76ee\u306e\u30aa\u30d7\u30c8\u30a4\u30f3")),g+="\u3001"+
986 -n.SessionTimeout+" \u5206"+(0<n.SessionTimeout?"s":"")+" \u30bb\u30c3\u30b7\u30e7\u30f3\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(g+="\u3001\u30d6\u30e9\u30f3\u30ad\u30f3\u30b0\u53ef\u80fd"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7",addLinkConditional(g,"showDesktopSettingsDlg()",
987 -xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!e);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(g="\u4e0d\u660e\u306a\u72b6\u614b",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(g="\u4e0d\u8981"),1==p&&(g="KVM\u306b\u306e\u307f\u5fc5\u8981"),4294967295==p&&(g="\u5e38\u306b\u5fc5\u8981"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&
988 -(g=addLinkConditional(g,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f",g));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(g={0:"\u308f\u304b\u3089\u306a\u3044",1:"\u305d\u306e\u4ed6\u306e",2:"\u6709\u52b9",3:"\u7121\u52b9",4:"\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3",5:"\u9069\u7528\u3067\u304d\u307e\u305b\u3093",6:"\u6709\u52b9\u3060\u304c\u30aa\u30d5\u30e9\u30a4\u30f3",
989 -7:"\u30c6\u30b9\u30c8\u4e2d",8:"\u636e\u3048\u7f6e\u304d",9:"\u4f11\u6b62",10:"\u8d77\u52d5",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(g[32768]="OCR & RPE Disabled",g[32769]="OCR Enabled, RPE Disabled"),n=g[amtsysstate.CIM_BootService.response.EnabledState]?g[amtsysstate.CIM_BootService.response.EnabledState]:"\u308f\u304b\u3089\u306a\u3044",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));
990 -if(null!=AmtSystemPowerSchemes)for(var g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)if(g[C].SettingData&&1==g[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==g[C].SettingData.ReferenceParameters.ResourceURI)for(p=g[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("\u96fb\u6e90\u30dd\u30ea\u30b7\u30fc",addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],
991 -'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\u65e5\u4ed8\u6642\u523b",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));g=AddRefreshButton("PullSystemStatus()")+" ";g+=AddButton("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3...","showPowerActionDlg()")+" ";g+=AddButton("\u72b6\u614b\u3092\u4fdd\u5b58...","saveEntireAmtState()")+" ";d+=TableEnd(g);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
992 -QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u3068\u3001\u3053\u306e\u30da\u30fc\u30b8\u304c\u4f7f\u7528\u3067\u304d\u306a\u304f\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002");d=d+"<br><h2>\u4e00\u822c\u8a2d\u5b9a</h2>"+TableStart();g="";"<i>\u7121\u3057</i>"!=c&&(1==v.SharedFQDN&&
993 -(g="\u3001OS\u3068\u5171\u6709"),0==v.SharedFQDN&&(g="\u3001OS\u3068\u306f\u7570\u306a\u308a\u307e\u3059"));d+=TableEntry("\u540d\u524d\u3068\u30c9\u30e1\u30a4\u30f3",addLinkConditional(c+g,"showEditNameDlg(1)",xxAccountAdminName));c="\u7121\u52b9";1==v.DDNSUpdateEnabled?c="\u305d\u308c\u305e\u308c\u6709\u52b9"+v.DDNSPeriodicUpdateInterval+" \u5206\u3001TTL\u306f"+v.DDNSTTL+" \u5206":1==v.DDNSUpdateByDHCPServerEnabled&&(c="DHCP\u30b5\u30fc\u30d0\u30fc\u306b\u3088\u308b\u66f4\u65b0");d+=TableEntry("\u30c0\u30a4\u30ca\u30df\u30c3\u30afDNS",
994 -addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"\u7121\u7dda\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9":"\u6709\u7dda\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9")+"</h2>";d+=TableStart();d+=TableEntry("\u30ea\u30f3\u30af\u72b6\u614b",
995 -1==c.LinkIsUp?"\u30ea\u30f3\u30af\u306f\u30a2\u30c3\u30d7\u3057\u3066\u3044\u307e\u3059":"\u30ea\u30f3\u30af\u304c\u30c0\u30a6\u30f3\u3057\u3066\u3044\u307e\u3059");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);g=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&g.push("S0 / AC"),14==c.LinkPolicy[C]&&g.push("Sx / AC"),16==c.LinkPolicy[C]&&g.push("S0 / DC"),224==c.LinkPolicy[C]&&g.push("Sx / DC");0==g.length&&g.push("");d+=TableEntry("\u30ea\u30f3\u30af\u30dd\u30ea\u30b7\u30fc",addLinkConditional(0==
996 -g.length?"\u5229\u7528\u4e0d\u53ef":"\u3067\u5229\u7528\u53ef\u80fd\uff1a"+g.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("Mac\u30a2\u30c9\u30ec\u30b9",c.MACAddress));amtwirelessif==a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("\u72b6\u614b",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,
997 -d+=TableEntry("\u30e9\u30b8\u30aa\u5dde",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+"\u3001SSID\uff1a"+(s?s:"<i>\u7121\u3057</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?
998 -"\u6709\u52b9":"\u7121\u52b9","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"\u6709\u52b9":"\u7121\u52b9",
999 -"showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("ping\u306b\u5fdc\u7b54\u3059\u308b",addLinkConditional(["\u7121\u52b9","ICMP\u5fdc\u7b54","RMCP\u5fdc\u7b54","ICMP\u304a\u3088\u3073RMCP\u5fdc\u7b54"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),g=1==c.DHCPEnabled?"DHCP\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u7528\u3057\u3066\u81ea\u52d5":"\u9759\u7684IP\u30a2\u30c9\u30ec\u30b9",
1000 -1==c.IpSyncEnabled&&(g+=", IP sync with OS"),d+=TableEntry("IPv4\u72b6\u614b",addLinkConditional(g,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("IPv4\u30a2\u30c9\u30ec\u30b9",isIpAddress(c.IPAddress,"\u7121\u3057"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4/\u30de\u30b9\u30af",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"\u7121\u3057")));g=c.PrimaryDNS;isIpAddress(g)&&(c.SecondaryDNS&&(g+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4\u30c9\u30e1\u30a4\u30f3\u30cd\u30fc\u30e0\u30b5\u30fc\u30d0\u30fc",
1001 -g));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="\u7121\u52b9",w,g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)g[C].SettingData&&g[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==g[C].IsCurrent);1==w&&(p=(g=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"\u6709\u52b9\u3001\u81ea\u52d5\u304a\u3088\u3073\u624b\u52d5\u30a2\u30c9\u30ec\u30b9":
1002 -"\u6709\u52b9\u3001\u81ea\u52d5\u30a2\u30c9\u30ec\u30b9");d+=TableEntry("IPv6\u72b6\u614b",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+="\u3001"),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("IPv6\u30a2\u30c9\u30ec\u30b9",addLink(ipv6addr,"showIPv6AddrDlg("+
1003 -a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6\u30a2\u30c9\u30ec\u30b9","\u7121\u3057");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6\u30c7\u30d5\u30a9\u30eb\u30c8\u30eb\u30fc\u30bf\u30fc",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(g=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(g+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6\u30c9\u30e1\u30a4\u30f3\u30cd\u30fc\u30e0\u30b5\u30fc\u30d0\u30fc",g))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&
1004 -(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
981 +4==l.ProvisioningMode&&(n=" \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5236\u5fa1\u30e2\u30fc\u30c9\uff08CCM\uff09\u3067\u30a2\u30af\u30c6\u30a3\u30d6\u5316",b=9));d+=TableEntry("\u30a4\u30f3\u30c6\u30eb&reg;ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(28,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),
982 +QV(39,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,r=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==
983 +amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(e+="\u3001\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u30dd\u30fc\u30c8");r&&(e+="\u3001Serial-over-LAN");n&&(e+="\u3001IDE\u30ea\u30c0\u30a4\u30ec\u30af\u30c8");g&&(e+="\u3001KVM");""==e&&(e=" \u7121\u3057");d+=TableEntry("\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u6a5f\u80fd",
984 +addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="\u30d7\u30e9\u30a4\u30de\u30ea\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["\u30d7\u30e9\u30a4\u30de\u30ea\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4","\u30bb\u30ab\u30f3\u30c0\u30ea\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4",
985 +"\u7b2c3\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4"][n.DefaultScreen]),e='<span title="'+format("\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30ea\u30e2\u30fc\u30c8\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306f{0}\u3067\u3059",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+="\u3001\u30dd\u30fc\u30c85900\u304c\u6709\u52b9"),1==n.OptInPolicy&&(e+="\u3001"+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"\u79d2\u30aa\u30d7\u30c8\u30a4\u30f3":"2\u756a\u76ee\u306e\u30aa\u30d7\u30c8\u30a4\u30f3")),e+="\u3001"+
986 +n.SessionTimeout+" \u5206"+(0<n.SessionTimeout?"s":"")+" \u30bb\u30c3\u30b7\u30e7\u30f3\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+="\u3001\u30d6\u30e9\u30f3\u30ad\u30f3\u30b0\u53ef\u80fd"),QV(46,n),Q(47).checked=!1):QV(46,!1),d+=TableEntry("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7",addLinkConditional(e,"showDesktopSettingsDlg()",
987 +xxAccountAdminName)));QV(26,!p||!r);QV(27,xxAccountAdminName);QV(37,!p||!g);QV(38,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="\u4e0d\u660e\u306a\u72b6\u614b",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(e="\u4e0d\u8981"),1==p&&(e="KVM\u306b\u306e\u307f\u5fc5\u8981"),4294967295==p&&(e="\u5e38\u306b\u5fc5\u8981"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&
988 +(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f",e));null!=amtsysstate.AMT_BootCapabilities.response.PlatformErase&&0<amtsysstate.AMT_BootCapabilities.response.PlatformErase&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"\u308f\u304b\u3089\u306a\u3044",1:"\u305d\u306e\u4ed6\u306e",2:"\u6709\u52b9",3:"\u7121\u52b9",4:"\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3",5:"\u9069\u7528\u3067\u304d\u307e\u305b\u3093",
989 +6:"\u6709\u52b9\u3060\u304c\u30aa\u30d5\u30e9\u30a4\u30f3",7:"\u30c6\u30b9\u30c8\u4e2d",8:"\u636e\u3048\u7f6e\u304d",9:"\u4f11\u6b62",10:"\u8d77\u52d5",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:"\u308f\u304b\u3089\u306a\u3044",d+=TableEntry("Boot Features",
990 +addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)if(e[C].SettingData&&1==e[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[C].SettingData.ReferenceParameters.ResourceURI)for(p=e[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,r=0;r<AmtSystemPowerSchemes.length;r++)AmtSystemPowerSchemes[r].SchemeGUID==p&&(d+=TableEntry("\u96fb\u6e90\u30dd\u30ea\u30b7\u30fc",
991 +addLinkConditional(AmtSystemPowerSchemes[r].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\u65e5\u4ed8\u6642\u523b",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3...","showPowerActionDlg()")+" ";e+=AddButton("\u72b6\u614b\u3092\u4fdd\u5b58...","saveEntireAmtState()")+
992 +" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u3068\u3001\u3053\u306e\u30da\u30fc\u30b8\u304c\u4f7f\u7528\u3067\u304d\u306a\u304f\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002");
993 +d=d+"<br><h2>\u4e00\u822c\u8a2d\u5b9a</h2>"+TableStart();e="";"<i>\u7121\u3057</i>"!=c&&(1==v.SharedFQDN&&(e="\u3001OS\u3068\u5171\u6709"),0==v.SharedFQDN&&(e="\u3001OS\u3068\u306f\u7570\u306a\u308a\u307e\u3059"));d+=TableEntry("\u540d\u524d\u3068\u30c9\u30e1\u30a4\u30f3",addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));c="\u7121\u52b9";1==v.DDNSUpdateEnabled?c="\u305d\u308c\u305e\u308c\u6709\u52b9"+v.DDNSPeriodicUpdateInterval+" \u5206\u3001TTL\u306f"+v.DDNSTTL+" \u5206":1==v.DDNSUpdateByDHCPServerEnabled&&
994 +(c="DHCP\u30b5\u30fc\u30d0\u30fc\u306b\u3088\u308b\u66f4\u65b0");d+=TableEntry("\u30c0\u30a4\u30ca\u30df\u30c3\u30afDNS",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"\u7121\u7dda\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9":
995 +"\u6709\u7dda\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9")+"</h2>";d+=TableStart();d+=TableEntry("\u30ea\u30f3\u30af\u72b6\u614b",1==c.LinkIsUp?"\u30ea\u30f3\u30af\u306f\u30a2\u30c3\u30d7\u3057\u3066\u3044\u307e\u3059":"\u30ea\u30f3\u30af\u304c\u30c0\u30a6\u30f3\u3057\u3066\u3044\u307e\u3059");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);e=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&e.push("S0 / AC"),14==c.LinkPolicy[C]&&e.push("Sx / AC"),16==c.LinkPolicy[C]&&e.push("S0 / DC"),224==
996 +c.LinkPolicy[C]&&e.push("Sx / DC");0==e.length&&e.push("");d+=TableEntry("\u30ea\u30f3\u30af\u30dd\u30ea\u30b7\u30fc",addLinkConditional(0==e.length?"\u5229\u7528\u4e0d\u53ef":"\u3067\u5229\u7528\u53ef\u80fd\uff1a"+e.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("Mac\u30a2\u30c9\u30ec\u30b9",c.MACAddress));amtwirelessif==a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("\u72b6\u614b",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],
997 +"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("\u30e9\u30b8\u30aa\u5dde",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+"\u3001SSID\uff1a"+(s?s:"<i>\u7121\u3057</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==
998 +xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"\u6709\u52b9":"\u7121\u52b9","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?
999 +"\u6709\u52b9":"\u7121\u52b9","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("ping\u306b\u5fdc\u7b54\u3059\u308b",addLinkConditional(["\u7121\u52b9","ICMP\u5fdc\u7b54","RMCP\u5fdc\u7b54","ICMP\u304a\u3088\u3073RMCP\u5fdc\u7b54"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-FAST/TLS".split(" "),
1000 +p="\u7121\u52b9",amtsysstate.AMT_8021XProfile.responses.Body.Enabled&&(p="\u6709\u52b9\u3001"+e[amtsysstate.AMT_8021XProfile.responses.Body.AuthenticationProtocol]),d+=TableEntry("802.1x",addLinkConditional(p,"editNetAuthProfile()",xxAccountAdminName)),e=1==c.DHCPEnabled?"DHCP\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u7528\u3057\u3066\u81ea\u52d5":"\u9759\u7684IP\u30a2\u30c9\u30ec\u30b9",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("IPv4\u72b6\u614b",addLinkConditional(e,"showIPSetupDlg()",
1001 +xxAccountAdminName)));d+=TableEntry("IPv4\u30a2\u30c9\u30ec\u30b9",isIpAddress(c.IPAddress,"\u7121\u3057"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4/\u30de\u30b9\u30af",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"\u7121\u3057")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4\u30c9\u30e1\u30a4\u30f3\u30cd\u30fc\u30e0\u30b5\u30fc\u30d0\u30fc",e));if(5<amtversion&&200==amtsysstate.IPS_IPv6PortSettings.status){c=
1002 +amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="\u7121\u52b9",w,e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)e[C].SettingData&&e[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[C].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"\u6709\u52b9\u3001\u81ea\u52d5\u304a\u3088\u3073\u624b\u52d5\u30a2\u30c9\u30ec\u30b9":"\u6709\u52b9\u3001\u81ea\u52d5\u30a2\u30c9\u30ec\u30b9");
1003 +d+=TableEntry("IPv6\u72b6\u614b",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+="\u3001"),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("IPv6\u30a2\u30c9\u30ec\u30b9",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6\u30a2\u30c9\u30ec\u30b9",
1004 +"\u7121\u3057");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6\u30c7\u30d5\u30a9\u30eb\u30c8\u30eb\u30fc\u30bf\u30fc",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6\u30c9\u30e1\u30a4\u30f3\u30cd\u30fc\u30e0\u30b5\u30fc\u30d0\u30fc",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,
1005 +d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
1006 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
1007 "")+">Available in S0/DC - Powered on & on battery</label><br>";a+="<label><input type=checkbox id=d11p4 value=224 "+(0<=c.LinkPolicy.indexOf(224)?"checked":"")+">Available in Sx/DC - Sleeping & on battery</label><br>";setDialogMode(11,"\u30ea\u30f3\u30af\u30dd\u30ea\u30b7\u30fc",3,showLinkPolicyDlgEx,a,b)}}
1008 function showLinkPolicyDlgEx(b,c){var a=Clone(amtsysstate.AMT_EthernetPortSettings.responses[c]);a.DHCPEnabled&&(delete a.IPAddress,delete a.SubnetMask,delete a.DefaultGateway,delete a.PrimaryDNS,delete a.SecondaryDNS);a.LinkPolicy=[];Q("d11p1").checked&&a.LinkPolicy.push(1);Q("d11p2").checked&&a.LinkPolicy.push(14);Q("d11p3").checked&&a.LinkPolicy.push(16);Q("d11p4").checked&&a.LinkPolicy.push(224);amtstack.Put("AMT_EthernetPortSettings",a,showLinkPolicyDlgExDone,0,1,a)}
@@ -1010,32 +1011,32 @@ function showAuthCsme(){if(!xxdialogMode){var b;b="<div style=margin-top:8px>Int
1011 for(var c in amtstack.amtauth.Certificates){var a=amtstack.amtauth.Certificates[c];b+="<tr><td style=width:32px;vertical-align:top><img src=images-commander/cert1.png height=32 width=32 />";b+="<td style=padding-bottom:6px><b>"+EscapeHtml(a.subject.getField("CN").value)+(!0===a.xTrusted?", <span style=color:#080>\u4fe1\u983c\u3067\u304d\u308b</span>":"")+"</b><br />";a.subject.getField("OU")&&(b+=EscapeHtml(a.subject.getField("OU").value)+"<br />");b+=amtstack.amtauth.CertificatesDer[c].length+" \u30d0\u30a4\u30c8\u3001<a style=cursor:pointer;color:blue onclick=downloadAuthCert("+
1012 c+")>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9</a>";a.xCrl&&(b+="<br />CRL "+a.xCrl.length+" \u30d0\u30a4\u30c8\u3001<a style=cursor:pointer;color:blue onclick=downloadCertCrl("+c+")>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9</a>")}setDialogMode(11,"Authentic CSME",1,null,b+"</table><div>")}}function downloadCertCrl(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.Certificates[b].xCrl),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".crl")}
1013 function downloadAuthCert(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.CertificatesDer[b]),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".cer")}var IntelAmtEntireState,IntelAmtEntireStateCalls;
1013 -function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c30.value="amtstate"+b+".json";setDialogMode(19,"\u30a4\u30f3\u30c6\u30eb&reg;AMT\u306e\u72b6\u614b\u5168\u4f53\u3092\u4fdd\u5b58",3,saveEntireAmtStateOk)}}
1014 -function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(60,"Fetching entire state, please wait...");setDialogMode(1,"\u30a4\u30f3\u30c6\u30eb&reg;AMT\u306e\u72b6\u614b\u5168\u4f53\u3092\u4fdd\u5b58",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
1015 -function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c30.value))}
1014 +function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c55.value="amtstate"+b+".json";setDialogMode(19,"\u30a4\u30f3\u30c6\u30eb&reg;AMT\u306e\u72b6\u614b\u5168\u4f53\u3092\u4fdd\u5b58",3,saveEntireAmtStateOk)}}
1015 +function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(61,"Fetching entire state, please wait...");setDialogMode(1,"\u30a4\u30f3\u30c6\u30eb&reg;AMT\u306e\u72b6\u614b\u5168\u4f53\u3092\u4fdd\u5b58",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
1016 +function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c55.value))}
1017 function showDesktopSettingsDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_KVMRedirectionSettingData.response,c;c="<div style=text-align:left><div style=height:26px;margin-top:4px><select id=subddisplay style=float:right;width:200px><option value=0>\u30d7\u30e9\u30a4\u30de\u30ea\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4</option><option value=1>\u30bb\u30ab\u30f3\u30c0\u30ea\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4</option>";9<amtversion&&(c+="<option value=2>\u7b2c3\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4</option>");
1018 c+='</select><div style=padding-top:4px>\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u8868\u793a</div></div><div style=height:26px;margin-top:4px><input id=subsessiontimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\uff08\u5206\uff09</div></div>';1==b.OptInPolicy&&(c+='<div style=height:26px;margin-top:4px><input id=suboptintimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>\u30aa\u30d7\u30c8\u30a4\u30f3\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\uff08\u79d2\uff09</div></div>');
1019 c+="<div style=height:26px;margin-top:4px><select id=subdlegacy style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>\u7121\u52b9\u3001\u63a8\u5968</option><option value=1>\u6709\u52b9\u3001\u30ec\u30ac\u30b7\u30fcKVM\u30d3\u30e5\u30fc\u30a2</option></select><div style=padding-top:4px>\u30dd\u30fc\u30c85900</div></div>";c+="<div style=height:26px;margin-top:4px id=subspassx><input id=subspass type=password autocomplete=off style=float:right;width:200px maxlength=8 onkeyup=showDesktopSettingsDlgUpdate()><div style=padding-top:4px>5900\u30d1\u30b9\u30ef\u30fc\u30c9\uff088\u6587\u5b57\uff09</div></div>";
1020 9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(c+='<div style=height:26px;margin-top:4px><select id=subsb style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>\u7121\u52b9</option><option value=1>\u6709\u52b9</option></select><div style=padding-top:4px title="\u3053\u306e\u6a5f\u80fd\u306f\u591a\u304f\u306e\u5834\u5408\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093">\u753b\u9762\u306e\u30d6\u30e9\u30f3\u30ad\u30f3\u30b0</div></div>');
1021 c+="</div>";setDialogMode(11,"\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u8a2d\u5b9a",3,showDesktopSettingsDlgOk,c);Q("subddisplay").value=b.DefaultScreen;Q("subsessiontimeout").value=b.SessionTimeout;1==b.OptInPolicy&&(Q("suboptintimeout").value=b.OptInPolicyTimeout);Q("subdlegacy").value=1==b.Is5900PortEnabled?1:0;9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(Q("subsb").value=amtsysstate.IPS_ScreenConfigurationService.response.EnabledState);showDesktopSettingsDlgUpdate()}}
1021 -function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c54",b)}
1022 +function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c106",b)}
1023 function showDesktopSettingsDlgOk(){var b=Clone(amtsysstate.IPS_KVMRedirectionSettingData.response);b.DefaultScreen=Q("subddisplay").value;b.SessionTimeout=Q("subsessiontimeout").value;b.Is5900PortEnabled=1==Q("subdlegacy").value;1==b.OptInPolicy&&(b.OptInPolicyTimeout=Q("suboptintimeout").value);1==b.Is5900PortEnabled&&(b.RFBPassword=Q("subspass").value);amtstack.Put("IPS_KVMRedirectionSettingData",b,showDesktopSettingsDlgOk2);b=Clone(amtsysstate.IPS_ScreenConfigurationService.response);b.EnabledState=
1024 parseInt(Q("subsb").value);amtstack.Put("IPS_ScreenConfigurationService",b,showDesktopSettingsDlgOk3)}function showDesktopSettingsDlgOk2(b,c,a,d){200==d?PullSystemStatus():messagebox("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u8a2d\u5b9a",format("\u30a8\u30e9\u30fc{0}\u3001\u5024\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002",d))}
1025 function showDesktopSettingsDlgOk3(b,c,a,d){200!=d?messagebox("\u30a8\u30e9\u30fc",format("\u753b\u9762\u30d6\u30e9\u30f3\u30ad\u30f3\u30b0\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3053\u306e\u30b7\u30b9\u30c6\u30e0\uff08{0}\uff09\u3067\u306f\u30d6\u30e9\u30f3\u30ad\u30f3\u30b0\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002",d)):amtstack.Get("IPS_ScreenConfigurationService",function(a,b,c,d){200==
1026 d&&(amtsysstate.IPS_ScreenConfigurationService.response=c.Body,updateSystemStatus())},0,1)}function PullEventLog(b){1==b&&xxdialogMode||(amtFirstPull|=16,amtstack.Enum("AMT_MessageLog",processMessageLog0),amtstack.GetMessageLog(processMessageLog1))}var processMessageLog0responses=null;
1027 function processMessageLog0(b,c,a,d){200==d&&(d&&QV("go6",!0),a&&(processMessageLog0responses=a),b="",c="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>",null!=processMessageLog0responses&&(b=1==processMessageLog0responses[0].IsFrozen?AddButton("\u51cd\u7d50\u89e3\u9664\u30ed\u30b0","FreezeLog(0)"):AddButton("\u51cd\u7d50\u30ed\u30b0","FreezeLog(1)")),c+=TableEnd('<div style=float:right><input id=eventFilter placeholder="\u30d5\u30a3\u30eb\u30bf" style=margin:4px onkeyup=eventFilter()>&nbsp;</div><div>&nbsp;'+
1028 AddRefreshButton("PullEventLog(1)")+AddButton("\u30ed\u30b0\u3092\u30af\u30ea\u30a2","ClearLog()")+AddButton("\u30bb\u30fc\u30d6...","SaveEventLog()")+b),QH(17,c+"<br>"))}function SaveEventLog(){xxdialogMode||null==eventmessages||SaveJsonFile("IntelAmtEventlog","events","Intel AMT Event Log",eventmessages)}var eventmessages=null;
1028 -function processMessageLog1(b,c){eventmessages=c;var a,d=0,g;g="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>\u30bd\u30fc\u30b9</b><td class=r1><b>\u8aac\u660e</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);g+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1029 -a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}g+=TableEnd(0==d?"&nbsp;":"");QH(18,g+"<br>");processMessageLog0()}
1030 -function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(60,"\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0\u3092\u6d88\u53bb\u3057\u307e\u3059\u304b\uff1f"),setDialogMode(1,"\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0",3,ClearLogEx))}
1029 +function processMessageLog1(b,c){eventmessages=c;var a,d=0,e;e="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>\u30bd\u30fc\u30b9</b><td class=r1><b>\u8aac\u660e</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);e+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1030 +a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}e+=TableEnd(0==d?"&nbsp;":"");QH(18,e+"<br>");processMessageLog0()}
1031 +function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(61,"\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0\u3092\u6d88\u53bb\u3057\u307e\u3059\u304b\uff1f"),setDialogMode(1,"\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0",3,ClearLogEx))}
1032 function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0","\u30af\u30ea\u30a2\u3067\u304d\u307e\u305b\u3093\u3001\u30a8\u30e9\u30fc\uff1a "+d):PullEventLog()})}
1033 function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("\u6642\u9593",c.Time.toLocaleString());a+=addHtmlValue("\u30bd\u30fc\u30b9",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("\u8aac\u660e",c.Desc);a+=MoreStart();a+=addHtmlValue("\u30c7\u30d0\u30a4\u30b9\u30a2\u30c9\u30ec\u30b9",c.DeviceAddress);a+=addHtmlValue("\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3",c.Entity);a+=addHtmlValue("\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9",
1033 -c.EntityInstance);var d="",g;for(g in c.EventData)0<d.length&&(d+=","),d+=c.EventData[g];a+=addHtmlValue("\u30c7\u30fc\u30bf",d);a+=addHtmlValue("\u30aa\u30d5\u30bb\u30c3\u30c8",c.EventOffset);a+=addHtmlValue("\u30bb\u30f3\u30b5\u30fc\u30bf\u30a4\u30d7",c.EventSensorType);a+=addHtmlValue("\u91cd\u75c7\u5ea6",c.EventSeverity);a+=addHtmlValue("\u30bd\u30fc\u30b9\u306e\u7a2e\u985e",c.EventSourceType);a+=addHtmlValue("\u30bf\u30a4\u30d7",c.EventType);a+=addHtmlValue("\u30bb\u30f3\u30b5\u30fc\u756a\u53f7",
1034 +c.EntityInstance);var d="",e;for(e in c.EventData)0<d.length&&(d+=","),d+=c.EventData[e];a+=addHtmlValue("\u30c7\u30fc\u30bf",d);a+=addHtmlValue("\u30aa\u30d5\u30bb\u30c3\u30c8",c.EventOffset);a+=addHtmlValue("\u30bb\u30f3\u30b5\u30fc\u30bf\u30a4\u30d7",c.EventSensorType);a+=addHtmlValue("\u91cd\u75c7\u5ea6",c.EventSeverity);a+=addHtmlValue("\u30bd\u30fc\u30b9\u306e\u7a2e\u985e",c.EventSourceType);a+=addHtmlValue("\u30bf\u30a4\u30d7",c.EventType);a+=addHtmlValue("\u30bb\u30f3\u30b5\u30fc\u756a\u53f7",
1035 c.SensorNumber);a+=MoreEnd();a+="</div>";messagebox(format("\u30a4\u30d9\u30f3\u30c8\uff03{0}\u306e\u8a73\u7d30",b+1),a)}}function eventFilter(){var b=Q("eventFilter").value.toLowerCase(),c;for(c in eventmessages)QV("xamtevent"+c,""==b||0<=eventmessages[c].Desc.toLowerCase().indexOf(b)||0<=eventmessages[c].EntityStr.toLowerCase().indexOf(b))}var subscriptionsFilters=null,subscriptionsListeners=null;
1036 function PullEventSubscriptions(){null==subscriptionsFilters&&amtstack.Enum("CIM_FilterCollection",processEventSubscriptions0);amtstack.BatchEnum(null,["CIM_ListenerDestination","CIM_FilterCollectionSubscription"],processEventSubscriptions1)}function processEventSubscriptions0(b,c,a,d){408!=d&&400!=d&&(d&&errcheck(d,b)||(subscriptionsFilters=a))}
1036 -function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u30a4\u30d9\u30f3\u30c8\u306e\u30b5\u30d6\u30b9\u30af\u30e9\u30a4\u30d0\u30fc\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";for(var g in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[g].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)",
1037 -"&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[g],b+='<div class=itemBar onclick="showSubscriptionDetails('+g+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002</i></div><br>");
1038 -g="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(g+=AddButton("\u65b0\u3057\u3044\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3","newSubscriptionButton()"));b+="<br><td class=r1>"+TableEnd(g+"</div>");QH(56,b)}}var subscriptionDeliveryModes={2:"\u62bc\u3059",3:"ACK\u3067\u30d7\u30c3\u30b7\u30e5",4:"\u30a4\u30d9\u30f3\u30c8",5:"\u5f15\u304f"};
1037 +function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u30a4\u30d9\u30f3\u30c8\u306e\u30b5\u30d6\u30b9\u30af\u30e9\u30a4\u30d0\u30fc\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";for(var e in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[e].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)",
1038 +"&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[e],b+='<div class=itemBar onclick="showSubscriptionDetails('+e+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002</i></div><br>");
1039 +e="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(e+=AddButton("\u65b0\u3057\u3044\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3","newSubscriptionButton()"));b+="<br><td class=r1>"+TableEnd(e+"</div>");QH(57,b)}}var subscriptionDeliveryModes={2:"\u62bc\u3059",3:"ACK\u3067\u30d7\u30c3\u30b7\u30e5",4:"\u30a4\u30d9\u30f3\u30c8",5:"\u5f15\u304f"};
1040 function showSubscriptionDetails(b){if(!xxdialogMode){var c=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[b].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),a=subscriptionsListeners.CIM_ListenerDestination.responses[b],d;d="<div style=text-align:left>"+addHtmlValue("\u5148",a.Destination);d+=addHtmlValue("\u30d5\u30a3\u30eb\u30bf",c);d+=addHtmlValue("\u914d\u4fe1\u30e2\u30fc\u30c9",subscriptionDeliveryModes[a.DeliveryMode]);setDialogMode(11,"\u7533\u3057\u8fbc\u307f"+
1041 (b+1),xxAccountAdminName?5:1,deleteSubscriptionButton,d+"</div>",b)}}
1042 function deleteSubscriptionButton(b,c){2==b&&amtstack.UnSubscribe("CIM_FilterCollectionSubscription",PullEventSubscriptions,null,1,{Filter:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_FilterCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+subscriptionsListeners.CIM_FilterCollectionSubscription.responses[c].Filter.ReferenceParameters.SelectorSet.Selector.Value+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference>",
@@ -1043,27 +1044,27 @@ Handler:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/a
1044 function newSubscriptionButton(){if(!xxdialogMode&&null!=subscriptionsFilters){var b;b="<div style=height:26px;margin-top:4px><select id=subtype style=float:right;width:260px><option value=Push>\u62bc\u3059</option><option value=PushWithAck>ACK\u3067\u30d7\u30c3\u30b7\u30e5</option></select><div style=padding-top:4px>\u30bf\u30a4\u30d7</div></div><div style=height:26px;margin-top:4px><select id=subfilter style=float:right;width:260px>";for(var c in subscriptionsFilters)b+='<option value="'+subscriptionsFilters[c].InstanceID+
1045 '">'+subscriptionsFilters[c].CollectionName.substring(13)+"</option>";b+="</select><div style=padding-top:4px>\u30d5\u30a3\u30eb\u30bf</div></div>";b+='<div style=height:26px;margin-top:4px><input id=suburl style=float:right;width:260px maxlength=253 onkeyup=newSubscriptionUpdate() value="http://"><div style=padding-top:4px>URL</div></div>';b+="<div style=height:26px;margin-top:4px><select id=subauth style=float:right;width:260px onchange=newSubscriptionUpdate()><option value=0>\u7121\u3057</option><option value=1>\u30c0\u30a4\u30b8\u30a7\u30b9\u30c8</option></select><div style=padding-top:4px>\u8a8d\u8a3c</div></div>";
1046 b+="<div style=height:26px;margin-top:4px id=subxuser><input id=subuser style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>\u30e6\u30fc\u30b6\u30fc\u540d</div></div>";b+="<div style=height:26px;margin-top:4px id=subxpass><input id=subpass style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>\u30d1\u30b9\u30ef\u30fc\u30c9</div></div>";b+="<div style=height:26px;margin-top:4px><input id=subargs style=float:right;width:260px maxlength=128><div style=padding-top:4px>\u8b70\u8ad6</div></div>";
1046 -setDialogMode(11,"\u30a4\u30d9\u30f3\u30c8\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c54",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1047 +setDialogMode(11,"\u30a4\u30d9\u30f3\u30c8\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c106",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1048 function newSubscriptionButtonOk(){var b=0==Q("subuser").value.length?void 0:Q("subuser").value,c=0==Q("subpass").value.length?void 0:Q("subpass").value;amtstack.Subscribe("CIM_FilterCollection",Q("subtype").value,Q("suburl").value,newSubscriptionButtonOk2,null,1,{InstanceID:Q("subfilter").value},0<Q("subargs").value.length?Q("subargs").value:null,b,c)}function newSubscriptionButtonOk2(b,c,a,d){200==d&&PullEventSubscriptions()}
1049 function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AMT_AuditLog",processAuditLog0))}var auditLog=null,auditLogEnabledStates="\u308f\u304b\u3089\u306a\u3044 \u305d\u306e\u4ed6\u306e \u6709\u52b9 \u7121\u52b9 \u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3 \u9069\u7528\u3067\u304d\u307e\u305b\u3093 \u6709\u52b9\u3060\u304c\u30aa\u30d5\u30e9\u30a4\u30f3 \u30c6\u30b9\u30c8\u4e2d \u636e\u3048\u7f6e\u304d \u4f11\u6b62 \u8d77\u52d5".split(" ");
1049 -function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"\u7121\u52b9":"\u6709\u52b9",c&2&&(b+="\u3001\u30ed\u30c3\u30af"),c&4&&(b+="\u3001 \u307b\u307c\u3044\u3063\u3071\u3044"),c&8&&(b+="\u3001\u30d5\u30eb"),c&16&&(b+="\u3001NoKey"),c="<h1>\u76e3\u67fb\u30ed\u30b0\u8a2d\u5b9a</h1>"+TableStart(),c+=TableEntry("\u72b6\u614b",b),c+=TableEntry("\u30b9\u30c8\u30ec\u30fc\u30b8",a[0].CurrentNumberOfRecords+" \u8a18\u9332\uff09\u3001"+a[0].PercentageFree+"\uff05 \u81ea\u7531"),
1050 -c+=TableEntry("\u4e0a\u66f8\u304d\u30dd\u30ea\u30b7\u30fc",2==a[0].OverwritePolicy?"\u3044\u3063\u3071\u3044\u306b\u306a\u3063\u305f\u3068\u304d\u306b\u30e9\u30c3\u30d7":"\u4e0a\u66f8\u304d\u3057\u306a\u3044"),c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1050 +function processAuditLog0(b,c,a,d){200==d&&a&&0<a.length&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"\u7121\u52b9":"\u6709\u52b9",c&2&&(b+="\u3001\u30ed\u30c3\u30af"),c&4&&(b+="\u3001 \u307b\u307c\u3044\u3063\u3071\u3044"),c&8&&(b+="\u3001\u30d5\u30eb"),c&16&&(b+="\u3001NoKey"),c="<h1>\u76e3\u67fb\u30ed\u30b0\u8a2d\u5b9a</h1>"+TableStart(),c+=TableEntry("\u72b6\u614b",b),c+=TableEntry("\u30b9\u30c8\u30ec\u30fc\u30b8",a[0].CurrentNumberOfRecords+" \u8a18\u9332\u3001"+a[0].PercentageFree+"\uff05 \u81ea\u7531"),
1051 +c+=TableEntry("\u4e0a\u66f8\u304d\u30dd\u30ea\u30b7\u30fc",2==a[0].OverwritePolicy?"\u3044\u3063\u3071\u3044\u306b\u306a\u3063\u305f\u3068\u304d\u306b\u30e9\u30c3\u30d7":"\u4e0a\u66f8\u304d\u3057\u306a\u3044"),c+=TableEnd(),QH(50,c),amtstack.GetAuditLog(processAuditLog1))}
1052 function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="\u30d5\u30a3\u30eb\u30bf" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("\u30bb\u30fc\u30d6...","SaveAuditLog()")+AddButton("\u30ed\u30b0\u3092\u30af\u30ea\u30a2","ClearAuditLog()"))+"<br>");if(0==c.length)d="\u76e3\u67fb\u30ed\u30b0\u30a4\u30d9\u30f3\u30c8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002";
1052 -else{var g=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>\u6642\u9593</b><td class=r1 style=width:260px><b>\u30a4\u30cb\u30b7\u30a8\u30fc\u30bf</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;g++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+="\u3001"+v.Event);null!=v.ExStr&&
1053 -(n+="\u3001"+v.ExStr);""!=l&&""!=p&&(l+="\u3001");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==g?"&nbsp;":"")+"<br>"}QH(50,d)}
1054 -function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Intel AMT\u76e3\u67fb\u30ed\u30b0",auditLog)}function ClearAuditLog(b){QH(60,"\u76e3\u67fb\u30ed\u30b0\u3092\u6d88\u53bb\u3057\u307e\u3059\u304b\uff1f");setDialogMode(1,"\u76e3\u67fb\u30ed\u30b0",3,ClearAuditLogEx)}
1053 +else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>\u6642\u9593</b><td class=r1 style=width:260px><b>\u30a4\u30cb\u30b7\u30a8\u30fc\u30bf</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+="\u3001"+v.Event);null!=v.ExStr&&
1054 +(n+="\u3001"+v.ExStr);""!=l&&""!=p&&(l+="\u3001");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(51,d)}
1055 +function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Intel AMT\u76e3\u67fb\u30ed\u30b0",auditLog)}function ClearAuditLog(b){QH(61,"\u76e3\u67fb\u30ed\u30b0\u3092\u6d88\u53bb\u3057\u307e\u3059\u304b\uff1f");setDialogMode(1,"\u76e3\u67fb\u30ed\u30b0",3,ClearAuditLogEx)}
1056 function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("\u76e3\u67fb\u30ed\u30b0","\u30a8\u30e9\u30fc\uff1a"+d)}
1056 -function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("\u6642\u9593",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("\u30a4\u30cb\u30b7\u30a8\u30fc\u30bf",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("\u4f4f\u6240",a.NetAddress));d+=addHtmlValue("\u5fdc\u7528",a.AuditApp);d+=addHtmlValue("\u30a4\u30d9\u30f3\u30c8",a.Event);if(null!=a.ExStr)d+=addHtmlValue("\u62e1\u5f35\u30c7\u30fc\u30bf",a.ExStr);else if(0<a.Ex.length){var g=
1057 -"";for(c in a.Ex)0<g.length&&(g+=","),g+=a.Ex.charCodeAt(c);""!=g&&(d+=addHtmlValue("\u30c7\u30fc\u30bf\u5024",g));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("\u30c7\u30fc\u30bf\u6587\u5b57\u5217",a.Ex.substring(2)))}messagebox("\u76e3\u67fb\u30a4\u30d9\u30f3\u30c8\uff03"+(b+1)+" \u7d30\u90e8",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1057 +function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("\u6642\u9593",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("\u30a4\u30cb\u30b7\u30a8\u30fc\u30bf",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("\u4f4f\u6240",a.NetAddress));d+=addHtmlValue("\u5fdc\u7528",a.AuditApp);d+=addHtmlValue("\u30a4\u30d9\u30f3\u30c8",a.Event);if(null!=a.ExStr)d+=addHtmlValue("\u62e1\u5f35\u30c7\u30fc\u30bf",a.ExStr);else if(0<a.Ex.length){var e=
1058 +"";for(c in a.Ex)0<e.length&&(e+=","),e+=a.Ex.charCodeAt(c);""!=e&&(d+=addHtmlValue("\u30c7\u30fc\u30bf\u5024",e));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("\u30c7\u30fc\u30bf\u6587\u5b57\u5217",a.Ex.substring(2)))}messagebox("\u76e3\u67fb\u30a4\u30d9\u30f3\u30c8\uff03"+(b+1)+" \u8a73\u7d30",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1059 function PullCertificates(){amtstack.BatchEnum(null,["AMT_PublicKeyCertificate","AMT_PublicPrivateKeyPair","AMT_TLSSettingData","AMT_TLSCredentialContext"],processCerts1)}
1059 -function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var g in xxCertificates)xxCertificates[g].InstanceID==b&&(xxTlsCurrentCert=
1060 -g)}for(g in xxCertificates)xxCertificates[g].TrustedRootCertficate=1==xxCertificates[g].TrustedRootCertficate,xxCertificates[g].X509Certificate=window.atob(xxCertificates[g].X509Certificate),xxCertificates[g].XIssuer=parseCertName(xxCertificates[g].Issuer),xxCertificates[g].XSubject=parseCertName(xxCertificates[g].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1060 +function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var e in xxCertificates)xxCertificates[e].InstanceID==b&&(xxTlsCurrentCert=
1061 +e)}for(e in xxCertificates)xxCertificates[e].TrustedRootCertficate=1==xxCertificates[e].TrustedRootCertficate,xxCertificates[e].X509Certificate=window.atob(xxCertificates[e].X509Certificate),xxCertificates[e].XIssuer=parseCertName(xxCertificates[e].Issuer),xxCertificates[e].XSubject=parseCertName(xxCertificates[e].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1062 function parseCertName(b){var c={},a=b.split(","),d;for(d in a)b=a[d].indexOf("="),c[a[d].substring(0,b)]=a[d].substring(b+1);return c}
1063 function getTlsSecurityState(b){if(0==xxTlsSettings[b].Enabled)return"\u7121\u52b9";var c=(1==xxTlsSettings[b].MutualAuthentication?"\u76f8\u4e92\u8a8d\u8a3cTLS":"\u30b5\u30fc\u30d0\u30fc\u8a8d\u8a3cTLS")+(1==xxTlsSettings[b].AcceptNonSecureConnections?" \u304a\u3088\u3073\u975eTLS":"");1==xxTlsSettings[b].MutualAuthentication&&xxTlsSettings[b].TrustedCN&&(b=MakeToArray(xxTlsSettings[b].TrustedCN),0<b.length&&(c+=", "+(1<b.length?"Trusted names":"Trusted name")+": "+b.join(", ")+"."));return c}
1064 function updateCertificates(){if(null!=xxCertificates){var b="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,c=1-b,a=TableStart(),a=a+TableEntry("\u30ea\u30e2\u30fc\u30c8TLS\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3",addLinkConditional(getTlsSecurityState(c),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEntry("\u30ed\u30fc\u30ab\u30ebTLS\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3",addLinkConditional(getTlsSecurityState(b),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEnd(),
1065 a=a+("<br>"+TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u3053\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306e\u30a4\u30f3\u30c6\u30eb&reg;AMT\u8a3c\u660e\u66f8\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>");if(0==xxCertificates.length&&0==xxCertPrivateKeys.length)a+="<div style=padding-left:15px><br><i>\u8a3c\u660e\u66f8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002</i></div><br>";else{for(var d in xxCertificates)b="",xxCertificates[d].TrustedRootCertficate&&
1066 (b="\u3001\u4fe1\u983c\u3055\u308c\u305f\u30eb\u30fc\u30c8"),xxCertificates[d].XPrivateKey&&(b="\u3001\u79d8\u5bc6\u9375"),d==xxTlsCurrentCert&&(b+="\u3001TLS\u8a3c\u660e\u66f8"),a+="<div class=itemBar onclick=showCertDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(xxCertificates[d].XSubject.CN)+"</b><i>"+b+"</i></div></div>";for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>\u5272\u308a\u5f53\u3066\u3089\u308c\u3066\u3044\u306a\u3044\u79d8\u5bc6\u9375\u30da\u30a2\uff03"+
1066 -d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("\u8a3c\u660e\u66f8\u3092\u8ffd\u52a0...","addCertButton()")+AddButton("\u8a3c\u660e\u66f8\u3092\u767a\u884c...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(51,a)}}
1067 +d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("\u8a3c\u660e\u66f8\u3092\u8ffd\u52a0...","addCertButton()")+AddButton("\u8a3c\u660e\u66f8\u3092\u767a\u884c...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(52,a)}}
1068 function showKeyPairDetails(b){setDialogMode(11,"\u30ad\u30fc\u30da\u30a2\uff03"+b,5,function(c){2==c&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertPrivateKeys[b].InstanceID},PullCertificates,0,1)},"\u3053\u308c\u306f\u3001\u3069\u306e\u8a3c\u660e\u66f8\u306b\u3082\u5c5e\u3057\u3066\u3044\u306a\u3044\u516c\u958b/\u79d8\u5bc6\u8a3c\u660e\u66f8\u306e\u30ad\u30fc\u30da\u30a2\u3067\u3059\u3002\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u306f\u4e00\u6642\u7684\u306a\u3082\u306e\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002")}
1069 var xxCertSubjectNames={CN:"\u4e00\u822c\u540d",O:"\u7d44\u7e54",OU:"\u7d44\u7e54\u90e8\u9580",S:"\u90fd\u9053\u5e9c\u770c",ST:"\u90fd\u9053\u5e9c\u770c",L:"\u5730\u57df",C:"\u56fd",SN:"\u59d3",GN:"\u540d"};
1070 function showCertDetails(b){if(!xxdialogMode){var c=xxCertificates[b],a;a="<br>"+addHtmlValue("\u8a3c\u66f8",c.X509Certificate.length+" \u30d0\u30a4\u30c8\u3001<a style=cursor:pointer;color:blue onclick=downloadCert("+b+")>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9</a>");a+=addHtmlValue("\u4fe1\u983c\u3055\u308c\u305f\u30eb\u30fc\u30c8",c.TrustedRootCertficate?"\u306f\u3044":"\u756a\u53f7");0==c.TrustedRootCertficate&&c.XPrivateKey&&(a+=addHtmlValue("\u79d8\u5bc6\u9375","\u30d7\u30ec\u30bc\u30f3\u30c8"));
@@ -1071,55 +1072,55 @@ a+='<br><div style="border-bottom:1px solid gray"><i>\u8a3c\u660e\u66f8\u306e\u4
1072 EscapeHtml(c.XSubject.CN),5,function(a){2==a&&(xxCertificates[b].XPrivateKey&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertificates[b].XPrivateKey.InstanceID},function(){},0,1),amtstack.Delete("AMT_PublicKeyCertificate",xxCertificates[b],certificateRemoved,0,1))},a)}}function downloadCert(b){saveAs(data2blob(xxCertificates[b].X509Certificate),xxCertificates[b].XSubject.CN+".cer")}
1073 function cert_FileSelectHandler(b){haltEvent(b);1==b.dataTransfer.files.length&&(b.dataTransfer.files[0].name.toLowerCase().endsWith(".p12")?issueCertButton(b.dataTransfer.files):addCertButton(b.dataTransfer.files))}var xxDragDropCertFiles=null;
1074 function addCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen onchange=addCertButtonUpdate() type=file style=float:right;width:260px accept=".cer,.pem">',xxDragDropCertFiles&&(b='<input style=float:right;width:260px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b="<div style=height:10px></div>"+("<div style=height:26px;margin-top:4px>"+b+"<div style=padding-top:4px>\u8a3c\u660e\u66f8\u30d5\u30a1\u30a4\u30eb</div></div>")+"<div style=height:26px;margin-top:4px><select id=certtype style=float:right;width:260px><option value=1>\u4fe1\u983c\u3055\u308c\u305f\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8</option><option value=0>\u30c1\u30a7\u30fc\u30f3\u8a3c\u660e\u66f8</option></select><div style=padding-top:4px>\u8a3c\u660e\u66f8\u306e\u7a2e\u985e</div></div>",
1074 -setDialogMode(11,"\u8a3c\u660e\u66f8\u3092\u8ffd\u52a0",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c54",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1075 +setDialogMode(11,"\u8a3c\u660e\u66f8\u3092\u8ffd\u52a0",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c106",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1076 function addCertButtonOk2(b){b=b.target.result;var c=b.indexOf("-----BEGIN CERTIFICATE-----");0<=c?(b=b.substring(c+27),c=b.indexOf("-----END CERTIFICATE-----"),0<=c&&(b=b.substring(0,c)),b=b.replace(/\r\n/g,"")):b=btoa(b);1==getSelectElement("certtype").value?amtstack.AMT_PublicKeyManagementService_AddTrustedRootCertificate(b,certificateAdded):amtstack.AMT_PublicKeyManagementService_AddCertificate(b,certificateAdded)}
1077 function issueCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen type=file style=float:right;width:230px onchange=issueCertButtonUpdate() accept=".p12">',xxDragDropCertFiles&&(b='<input style=float:right;width:230px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b=""+("<div styleheight:26px;margin-top:14px>"+b+"<div style=padding-top:4px>Certificate file</div></div>")+"<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certopenpass type=password autocomplete=off style=float:right;width:230px><div style=padding-top:4px>\u8a3c\u660e\u66f8\u306e\u30d1\u30b9\u30ef\u30fc\u30c9</div></div>",
1078 b+='<br><div style="border-bottom:1px solid gray"><i>\u30a4\u30f3\u30c6\u30eb&reg;AMT\u8a3c\u660e\u66f8</i></div>',b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certcn style=float:right;width:230px><div style=padding-top:4px>\u4e00\u822c\u540d</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certo style=float:right;width:230px><div style=padding-top:4px>\u7d44\u7e54</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certst style=float:right;width:230px><div style=padding-top:4px>\u90fd\u9053\u5e9c\u770c</div></div>",
1079 b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certc style=float:right;width:230px><div style=padding-top:4px>\u56fd</div></div>",b+='<div>\u8a3c\u660e\u66f8\u306e\u4f7f\u7528</div><ul 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">',b+="<li><label><input type=checkbox id=d11_cu4 checked>TLS\u30b5\u30fc\u30d0\u30fc\uff08HTTPS\uff09</label></li>",b+="<li><label><input type=checkbox id=d11_cu5>TLS\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\uff08HTTPS\uff09</label></li>",
1080 b+="<li><label><input type=checkbox id=d11_cu6>\u30e1\u30fc\u30eb\u4fdd\u8b77</label></li>",b+="<li><label><input type=checkbox id=d11_cu7>\u30b3\u30fc\u30c9\u7f72\u540d</label></li>",b+="<li><label><input type=checkbox id=d11_cu8>\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7</label></li>",b+="</ul>",setDialogMode(11,"\u8a3c\u660e\u66f8\u3092\u767a\u884c",3,issueCertButtonOk,b),issueCertButtonUpdate())}
1080 -function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c54",c)}
1081 +function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c106",c)}
1082 function issueCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length?(b=new FileReader,b.onload=issueCertButtonOk2,b.readAsBinaryString(c[0])):issueCertButtonOk3(null)}function issueCertButtonOk2(b){0==amtcert_loadP12File(b.target.result,Q("certopenpass").value,issueCertButtonOk3)&&messagebox("\u8a3c\u660e\u66f8\u3092\u767a\u884c","\u8a3c\u660e\u66f8\u3092\u5fa9\u53f7\u5316/\u30c7\u30b3\u30fc\u30c9\u3067\u304d\u307e\u305b\u3093\u3002")}
1083 function issueCertButtonOk3(b,c,a){xxCaPrivateKey=b;xxCaSubjectAttributes=c;amtstack.AMT_PublicKeyManagementService_GenerateKeyPair(0,2048,GenerateKeyPairResponse)}
1084 function GenerateKeyPairResponse(b,c,a,d){200!=d?messagebox("\u8a3c\u660e\u66f8\u3092\u767a\u884c","\u9375\u30da\u30a2\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u72b6\u614b\uff1a"+d):0!=a.Body.ReturnValue?messagebox("\u8a3c\u660e\u66f8\u3092\u767a\u884c","\u9375\u30da\u30a2\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3001"+a.Body.ReturnValueStr):amtstack.Enum("AMT_PublicPrivateKeyPair",GenerateKeyPairResponse2,a.Body.KeyPair.ReferenceParameters.SelectorSet.Selector.Value)}
1084 -function GenerateKeyPairResponse2(b,c,a,d,g){if(200!=d)messagebox("\u8a3c\u660e\u66f8\u3092\u767a\u884c","\u9375\u30da\u30a2\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u72b6\u614b\uff1a"+d);else{b=null;for(var v in a)a[v].InstanceID==g&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};g={CN:"\u4fe1\u983c\u3055\u308c\u3066\u3044\u306a\u3044\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8"};
1085 -if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in g={},xxCaSubjectAttributes)g[xxCaSubjectAttributes[v].shortName]=xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,g,v);null==v?messagebox("\u8a3c\u660e\u66f8\u3092\u767a\u884c","\u8a3c\u660e\u66f8\u306b\u7f72\u540d\u3067\u304d\u307e\u305b\u3093\u3002"):
1085 +function GenerateKeyPairResponse2(b,c,a,d,e){if(200!=d)messagebox("\u8a3c\u660e\u66f8\u3092\u767a\u884c","\u9375\u30da\u30a2\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u72b6\u614b\uff1a"+d);else{b=null;for(var v in a)a[v].InstanceID==e&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};e={CN:"\u4fe1\u983c\u3055\u308c\u3066\u3044\u306a\u3044\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8"};
1086 +if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in e={},xxCaSubjectAttributes)e[xxCaSubjectAttributes[v].shortName]=xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,e,v);null==v?messagebox("\u8a3c\u660e\u66f8\u3092\u767a\u884c","\u8a3c\u660e\u66f8\u306b\u7f72\u540d\u3067\u304d\u307e\u305b\u3093\u3002"):
1087 (v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,v.length-25),GenerateKeyPairResponse4))}}function GenerateKeyPairResponse4(b,c,a,d){200!=d?messagebox("\u8a3c\u660e\u66f8\u3092\u767a\u884c","\u9375\u30da\u30a2\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u72b6\u614b\uff1a"+d):PullCertificates()}
1088 function certificateAdded(b,c,a,d){200!=d||0!=a.Body.ReturnValue?messagebox("\u8a3c\u660e\u66f8\u3092\u8ffd\u52a0","\u8a3c\u660e\u66f8\u3092\u8ffd\u52a0\u3067\u304d\u307e\u305b\u3093\u3001\u30a8\u30e9\u30fc"+(200!=d?d:a.Body.ReturnValueStr)):PullCertificates()}function certificateRemoved(b,c,a,d){200!=d?messagebox("\u8a3c\u660e\u66f8\u3092\u524a\u9664","\u8a3c\u660e\u66f8\u3092\u524a\u9664\u3067\u304d\u307e\u305b\u3093\u3001\u30a8\u30e9\u30fc"+d):PullCertificates()}
1089 function getInputElement(b){var c=document.getElementsByTagName("input");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}function getSelectElement(b){var c=document.getElementsByTagName("select");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}
1089 -function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>\u8a3c\u660e\u66f8\u306a\u3057\u3001TLS\u7121\u52b9</option>";for(var c in xxCertificates)0!=xxCertificates[c].TrustedRootCertficate||!xxCertificates[c].XPrivateKey||null!=xxTlsCurrentCert&&xxTlsCurrentCert!=c||(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>\u8a3c\u66f8</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1090 +function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>\u8a3c\u660e\u66f8\u306a\u3057\u3001TLS\u7121\u52b9</option>";for(var c in xxCertificates)0==xxCertificates[c].TrustedRootCertficate&&xxCertificates[c].XPrivateKey&&(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>\u8a3c\u66f8</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1091 b+="<option value=2>Mutual-auth TLS only</option><option value=3>Mutual-auth, non-TLS allowed</option>";b+='</select><div style=padding-top:4px>Security</div></div><div style=height:26px id=d11rcn title="\u30ea\u30e2\u30fc\u30c8\u3067\u306e\u63a5\u7d9a\u304c\u8a31\u53ef\u3055\u308c\u308b\u8a3c\u660e\u66f8\u306e\u5171\u901a\u540d\u306e\u30ab\u30f3\u30de\u533a\u5207\u308a\u30ea\u30b9\u30c8\u3002"><input id=d11_rcn style=float:right;width:260px onkeyup=showSetTlsSecurityDlgUpdate() placeholder="name1\u3001name2"><div style=padding-top:4px>\u30ea\u30e2\u30fc\u30c8CN</div></div>';
1092 setDialogMode(11,"TLS\u8a2d\u5b9a",3,showSetTlsSecurityDlgOk,b);if(0==xxTLSCredentialContext.length||0==xxTlsSettings[0].Enabled||0==xxTlsSettings[1].Enabled)getSelectElement("tlscert").value=-1;else for(c in b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value,xxCertificates)xxCertificates[c].InstanceID==b&&(getSelectElement("tlscert").value=c);c=1-("Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1);getSelectElement("tlsremote").value=(1==xxTlsSettings[c].MutualAuthentication?
1092 -2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c54",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1093 +2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c106",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1094 function showSetTlsSecurityDlgOk(){var b=getSelectElement("tlscert").value,c=getSelectElement("tlsremote").value,a=Clone(xxTlsSettings);setTlsSecurityPendingCalls=0;setTlsSecurityDeleteCredentialContext=null;if(-1!=b){if(0<xxTLSCredentialContext.length){var d=Clone(xxTLSCredentialContext[0]);d.ElementInContext.ReferenceParameters.SelectorSet.Selector.Value=xxCertificates[b].InstanceID;amtstack.Put("AMT_TLSCredentialContext",d,setTlsSecurityResponse,0,1)}else amtstack.Create("AMT_TLSCredentialContext",
1095 {ElementInContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[b].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",ElementProvidingContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_TLSProtocolEndpointCollection")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters>'},
1095 -setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,g=1-d;a[g].Enabled=-1!=b;a[g].MutualAuthentication=2<=c;a[g].AcceptNonSecureConnections=1==c%2;a[g].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1096 +setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,e=1-d;a[e].Enabled=-1!=b;a[e].MutualAuthentication=2<=c;a[e].AcceptNonSecureConnections=1==c%2;a[e].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1097 b,c,d){200!=d?messagebox("","\u6642\u9593\u306e\u8a2d\u5b9a\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3001\u30b9\u30c6\u30fc\u30bf\u30b9="+d):0!=c.Body.ReturnValue?messagebox("","\u6642\u9593\u306e\u8a2d\u5b9a\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3001\u30a8\u30e9\u30fc\uff1a"+c.Body.ReturnValueStr):(a=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(c.Body.Ta0,a,a,function(){setTlsSecurityResponse()}))}));setTlsSecurityPendingCalls+=2;amtstack.Put("AMT_TLSSettingData",
1098 a[0],setTlsSecurityResponse,0,1,a[0]);amtstack.Put("AMT_TLSSettingData",a[1],setTlsSecurityResponse,0,1,a[1]);statusbox("TLS\u8a2d\u5b9a","\u65b0\u3057\u3044\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8a2d\u5b9a\u3092\u9069\u7528\u3057\u3066\u3044\u307e\u3059...")}function splitDomains(b){b=b.split(",");if(0!=b.length){for(var c in b)if(b[c]=b[c].trim(),0<=b[c].indexOf(" ")||0==b[c].length)return;if(!(4<b.length))return b}}
1099 function setTlsSecurityResponse(b,c,a,d){if(b){if(200!=d){messagebox("","TLS\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u8a2d\u5b9a\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3001\u30b9\u30c6\u30fc\u30bf\u30b9="+d);return}if(a.Body.ReturnValueStr&&!methodcheck(a))return}0==--setTlsSecurityPendingCalls&&amtstack.AMT_SetupAndConfigurationService_CommitChanges(null,setTlsSecurityResponse2)}
1100 function setTlsSecurityResponse2(b,c,a,d){200!=d?messagebox("","TLS\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u8a2d\u5b9a\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3001\u30b9\u30c6\u30fc\u30bf\u30b9="+d):0!=a.Body.ReturnValue?messagebox("","TLS\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u8a2d\u5b9a\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3001\u30a8\u30e9\u30fc\uff1a"+a.Body.ReturnValueStr):setTimeout(setTlsSecurityResponse3,2E3)}
1101 function setTlsSecurityResponse3(){null!=setTlsSecurityDeleteCredentialContext&&amtstack.Delete("AMT_TLSCredentialContext",setTlsSecurityDeleteCredentialContext,function(){});PullCertificates();setDialogMode();amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}var xxWatchdog=null;
1102 function PullWatchdog(){amtstack.BatchEnum(null,["*AMT_AgentPresenceCapabilities","AMT_AgentPresenceWatchdog","AMT_AgentPresenceWatchdogAction","AMT_StateTransitionCondition","CIM_ConcreteDependency"],PullWatchdogResponse)}
1102 -function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var g in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[g],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1103 +function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var e in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[e],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1104 "@Name","PolicyConditionName").Value,d=getItem(xxWatchdog.AMT_AgentPresenceWatchdog.responses,"DeviceID",d),a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,"PolicyConditionName",a),d.transitions||(d.transitions=[]),d.transitions.push(a)),c&&"AMT_StateTransitionCondition"==c.Value&&(a=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyConditionName").Value,b=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyActionName").Value,a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,
1105 "PolicyConditionName",a),b=getItem(xxWatchdog.AMT_AgentPresenceWatchdogAction.responses,"PolicyActionName",b),a.actions||(a.actions=[]),a.actions.push(b));updateWatchdog();QV("go19",!0)}}
1106 var watchdogEnabledStates="\u308f\u304b\u3089\u306a\u3044 \u305d\u306e\u4ed6\u306e \u6709\u52b9 \u7121\u52b9 \u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3 \u9069\u7528\u3067\u304d\u307e\u305b\u3093 \u6709\u52b9\u3060\u304c\u30aa\u30d5\u30e9\u30a4\u30f3 \u30c6\u30b9\u30c8\u4e2d \u636e\u3048\u7f6e\u304d \u4f11\u6b62 \u8d77\u52d5".split(" "),watchdogMonitoredEntity="\u308f\u304b\u3089\u306a\u3044 \u305d\u306e\u4ed6\u306e \u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30fb\u30b7\u30b9\u30c6\u30e0 \u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306e\u8d77\u52d5\u30d7\u30ed\u30bb\u30b9 \u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306e\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u30d7\u30ed\u30bb\u30b9 \u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u306e\u8d77\u52d5\u30d7\u30ed\u30bb\u30b9 BIOS\u30d6\u30fc\u30c8\u30d7\u30ed\u30bb\u30b9 \u5fdc\u7528 \u30b5\u30fc\u30d3\u30b9\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc".split(" ");
1106 -function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("\u6700\u5927\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" \u30a6\u30a9\u30c3\u30c1\u30fb\u30c9\u30c3\u30b0\u30b9");b+=TableEntry("\u6700\u5927\u5408\u8a08\u30a2\u30af\u30b7\u30e7\u30f3",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" \u884c\u52d5");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\u30a4\u30f3\u30c6\u30eb&reg;AMT\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30b9\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";
1107 +function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("\u6700\u5927\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" \u30a6\u30a9\u30c3\u30c1\u30fb\u30c9\u30c3\u30b0\u30b9");b+=TableEntry("\u6700\u5927\u5408\u8a08\u30a2\u30af\u30b7\u30e7\u30f3",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" \u30a2\u30af\u30b7\u30e7\u30f3");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\u30a4\u30f3\u30c6\u30eb&reg;AMT\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30b9\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";
1108 if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30b9\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&
1109 ""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u524a\u9664..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+
1109 -"</div>";var d="",g;for(g in a.transitions){var v=a.transitions[g];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" \uff1a\u30ed\u30b0\u306b\u8a18\u9332\u3059\u308b\u30a4\u30d9\u30f3\u30c8")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u3092\u8ffd\u52a0...","AddWatchdog()"));
1110 -b+="<br>";QH(54,b)}}function getWatchdogTransitionStr(b){if(31==b)return"\u3059\u3079\u3066\u306e\u5dde";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1110 +"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" \uff1a\u30ed\u30b0\u306b\u8a18\u9332\u3059\u308b\u30a4\u30d9\u30f3\u30c8")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u3092\u8ffd\u52a0...","AddWatchdog()"));
1111 +b+="<br>";QH(55,b)}}function getWatchdogTransitionStr(b){if(31==b)return"\u3059\u3079\u3066\u306e\u5dde";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1112 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("\u8aac\u660e",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("\u76e3\u8996\u5bfe\u8c61\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("\u73fe\u5728\u306e\u72b6\u614b",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("\u6709\u52b9\u306a\u72b6\u614b",
1113 watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("\u8d77\u52d5\u9593\u9694",b.StartupInterval+" \u79d2");c+=addHtmlValue("\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u9593\u9694",b.TimeoutInterval+" \u79d2");setDialogMode(11,format("\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0{0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
1114 function AddWatchdog(){var b;b="<div style=height:26px;margin-top:4px><input id=wgname style=float:right;width:240px maxlength=16 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>\u540d\u524d</div></div>"+('<div style=height:26px;margin-top:4px><input id=wgguid style=float:right;width:240px maxlength=36 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px title="\u30e9\u30f3\u30c0\u30e0\u306aDeviceID\u3092\u751f\u6210\u3059\u308b">'+addLink("\u30c7\u30d0\u30a4\u30b9ID","GenerateWatchdogGuid()")+
1115 "</div></div>");b+="<div style=height:26px;margin-top:4px><input id=wgstart style=float:right;width:240px maxlength=8 placeholder=3600 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>\u8d77\u52d5\uff08\u79d2\uff09</div></div>";b+="<div style=height:26px;margin-top:4px><input id=wgtimeout style=float:right;width:240px maxlength=8 placeholder=60 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\uff08\u79d2\uff09</div></div>";setDialogMode(11,"\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u3092\u8ffd\u52a0",
1116 3,AddWatchdogOk,b);AddWatchdogUpdate()}function GenerateWatchdogGuid(){var b,c="";for(b=0;16>b;b++)c+=String.fromCharCode(random(255));Q("wgguid").value=guidToStr(rstr2hex(c));AddWatchdogUpdate()}
1116 -function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var g=a.charCodeAt(d);45!=g&&(48<=g&&57>=g||97<=g&&102>=g?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1117 +function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var e=a.charCodeAt(d);45!=e&&(48<=e&&57>=e||97<=e&&102>=e?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1118 function AddWatchdogOk(){var b=Q("wgtimeout").value,c=Q("wgstart").value;""==b&&(b=60);""==c&&(c=3600);b={CreationClassName:0,DeviceID:btoa(hex2rstr(guidToStr(Q("wgguid").value.replace(/-/g,"")).replace(/-/g,""))),StartupInterval:c,SystemCreationClassName:0,SystemName:0,TimeoutInterval:b,MonitoredEntityDescription:Q("wgname").value};amtstack.Create("AMT_AgentPresenceWatchdog",b,AddWatchdogOk2)}
1119 function AddWatchdogOk2(b,c,a,d){200!=d?messagebox("\u756a\u72ac","\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u3092\u8ffd\u52a0\u3067\u304d\u307e\u305b\u3093\u3001\u30a8\u30e9\u30fc\uff03"+d):PullWatchdog()}
1120 function addWatchdogAction(b,c){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d;d="<table><td style=width:180px>\u304b\u3089<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsa"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";d+="<td>\u306b<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsb"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";setDialogMode(11,"\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0",
1121 3,addWatchdogActionOk,d+"</table><br>\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3059\u308b<br><input id=wgsevent type=checkbox checked onclick=addWatchdogActionUpdate()>\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0\u306b\u66f8\u304d\u8fbc\u3080<br />",a);addWatchdogActionUpdate();haltEvent(b)}
1122 function addWatchdogActionUpdate(){var b=0,c=0,a;for(a in amtstack.WatchdogCurrentStates)1==Q("wgsa"+a).checked&&(b+=parseInt(a)),1==Q("wgsb"+a).checked&&(c+=parseInt(a));QE("dlgOkButton",0<b&&0<c&&1==Q("wgsevent").checked)}
1122 -function addWatchdogActionOk(b,c){var a=0,d=0,g;for(g in amtstack.WatchdogCurrentStates)1==Q("wgsa"+g).checked&&(a+=parseInt(g)),1==Q("wgsb"+g).checked&&(d+=parseInt(g));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
1123 +function addWatchdogActionOk(b,c){var a=0,d=0,e;for(e in amtstack.WatchdogCurrentStates)1==Q("wgsa"+e).checked&&(a+=parseInt(e)),1==Q("wgsb"+e).checked&&(d+=parseInt(e));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
1124 function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u30a2\u30af\u30b7\u30e7\u30f3","\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3067\u304d\u307e\u305b\u3093\u3002\u30a8\u30e9\u30fc\uff03"+d):PullWatchdog()}
1125 function deleteWatchdogActions(b,c){setDialogMode(11,"\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u524a\u9664",3,deleteWatchdogActionsOk,"\u3053\u306e\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u306e\u3059\u3079\u3066\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u524a\u9664\u3057\u307e\u3059\u304b\uff1f",xxWatchdog.AMT_AgentPresenceWatchdog.responses[c]);haltEvent(b)}
1126 function deleteWatchdogActionsOk(b,c){amtstack.AMT_AgentPresenceWatchdog_DeleteAllActions(deleteWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}function deleteWatchdogActionResponse(b,c,a,d){200!=d?messagebox("\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u30a2\u30af\u30b7\u30e7\u30f3","\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u524a\u9664\u3067\u304d\u307e\u305b\u3093\u3001\u30a8\u30e9\u30fc\uff03"+d):PullWatchdog()}
@@ -1127,17 +1128,17 @@ var xxSystemDefense=null,xxSystemDefenceLinkedPolicy={},xxUpdatingDefenseStats=!
1128 2:"\u30ec\u30fc\u30c8\u5236\u9650",3:"\u8a31\u53ef\u3059\u308b",4:"\u843d\u3068\u3059"},xxSystemDefenceFilters={HdrProtocolID:1,HdrDestAddress:2,HdrDestMask:2,HdrSrcAddress:2,HdrSrcMask:2,HdrSrcPortStart:1,HdrSrcPortEnd:1,HdrDestPortStart:1,HdrDestPortEnd:1,HdrSrcAddressEndOfRange:2,"HdrDestAddressEndOfRange ":2,TCPFlagsOn:3,TCPFlagsOff:3};
1129 function PullSystemDefense(){amtFirstPull|=4;amtstack.BatchEnum(null,["AMT_SystemDefensePolicy","AMT_NetworkPortSystemDefensePolicy","AMT_Hdr8021Filter","AMT_IPHeadersFilter","AMT_NetworkFilter"],PullSystemDefenseResponse)}function PullSystemDefenseResponse(b,c,a,d){200==d&&(xxSystemDefense=a,updateSystemDefense(),QV("go18",!0),urlvars.norefresh&&UpdateDefenseStats())}
1130 function updateSystemDefense(){if(null!=xxSystemDefense){var b="";xxSystemDefenceLinkedPolicy={};for(var c in xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses){var a=xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses[c],d=+getItem(a.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value.substring(27),a=getItem(xxSystemDefense.AMT_SystemDefensePolicy.responses,"InstanceID",a.Dependent.ReferenceParameters.SelectorSet.Selector.Value);xxSystemDefenceLinkedPolicy[d]=
1130 -a}b+=TableStart();c="<i>\u7121\u3057</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u6709\u7dda\u30dd\u30ea\u30b7\u30fc",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],g;for(g in a)d=a[g],d+=" \u30d1\u30b1\u30c3\u30c8",b+=TableEntry((0==c?"\u6709\u7dda":"\u7121\u7dda")+g,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>\u30a4\u30f3\u30c6\u30eb&reg;AMT\u30b7\u30b9\u30c6\u30e0\u9632\u5fa1\u30dd\u30ea\u30b7\u30fc\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";
1131 +a}b+=TableStart();c="<i>\u7121\u3057</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u6709\u7dda\u30dd\u30ea\u30b7\u30fc",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],e;for(e in a)d=a[e],d+=" \u30d1\u30b1\u30c3\u30c8",b+=TableEntry((0==c?"\u6709\u7dda":"\u7121\u7dda")+e,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>\u30a4\u30f3\u30c6\u30eb&reg;AMT\u30b7\u30b9\u30c6\u30e0\u9632\u5fa1\u30dd\u30ea\u30b7\u30fc\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";
1132 if(0==xxSystemDefense.AMT_SystemDefensePolicy.responses.length)b+="<div style=padding-left:15px><i>\u30b7\u30b9\u30c6\u30e0\u9632\u5fa1\u30dd\u30ea\u30b7\u30fc\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002</i></div><br>";else for(c in xxSystemDefense.AMT_SystemDefensePolicy.responses)a=xxSystemDefense.AMT_SystemDefensePolicy.responses[c],d="",a.FilterCreationHandles&&(a.FilterCreationHandles=MakeToArray(a.FilterCreationHandles),d=a.FilterCreationHandles.length,d=", "+d+" filter"+
1133 (1<d?"s":"")),b+="<div class=itemBar onclick=showPolicyDetails("+c+")><div style=padding-top:3px><b>"+EscapeHtml(a.PolicyName)+"</b>"+d+"</div></div>";b+="<tr><td class=r1 style=padding-left:15px><br>\u30a4\u30f3\u30c6\u30eb&reg;AMT\u30b7\u30b9\u30c6\u30e0\u9632\u5fa1\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";if(0==xxSystemDefense.AMT_Hdr8021Filter.responses.length&&0==xxSystemDefense.AMT_IPHeadersFilter.responses.length)b+="<div style=padding-left:15px><i>\u30b7\u30b9\u30c6\u30e0\u9632\u5fa1\u30d5\u30a3\u30eb\u30bf\u30fc\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002</i></div><br>";
1134 else{for(c in xxSystemDefense.AMT_Hdr8021Filter.responses)a=xxSystemDefense.AMT_Hdr8021Filter.responses[c],(d=xxSystemDefenceFilterEthernetTypes[a.HdrProtocolID8021])||(d="\u3059\u3079\u3066\u306e\u30a4\u30fc\u30b5\u30cd\u30c3\u30c8\u30d7\u30ed\u30c8\u30b3\u30eb"+a.HdrProtocolID8021),d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile],2==a.FilterProfile&&(d+=" \u3067"+a.FilterProfileData+" \u30d1\u30b1\u30c3\u30c8/\u79d2"),1==a.ActionEventOnMatch&&(d+="\u3001\u8a66\u5408\u306e\u30a4\u30d9\u30f3\u30c8"),
1135 b+="<div class=itemBar onclick=showFilterDetails(0,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>";for(c in xxSystemDefense.AMT_IPHeadersFilter.responses){a=xxSystemDefense.AMT_IPHeadersFilter.responses[c];(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="\u3059\u3079\u3066\u306e\u30a4\u30fc\u30b5\u30cd\u30c3\u30c8\u30d7\u30ed\u30c8\u30b3\u30eb"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==
1135 -a.FilterProfile&&(d+=" \u3067"+a.FilterProfileData+" \u30d1\u30b1\u30c3\u30c8/\u79d2");1==a.ActionEventOnMatch&&(d+="\u3001\u8a66\u5408\u306e\u30a4\u30d9\u30f3\u30c8");var v=0;for(g in xxSystemDefenceFilters)a[g]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+
1136 -AddButton("\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u8ffd\u52a0...","AddDefenseFilter()")+AddButton("\u30dd\u30ea\u30b7\u30fc\u3092\u8ffd\u52a0...","AddDefensePolicy()"));QH(53,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}
1136 +a.FilterProfile&&(d+=" \u3067"+a.FilterProfileData+" \u30d1\u30b1\u30c3\u30c8/\u79d2");1==a.ActionEventOnMatch&&(d+="\u3001\u8a66\u5408\u306e\u30a4\u30d9\u30f3\u30c8");var v=0;for(e in xxSystemDefenceFilters)a[e]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+
1137 +AddButton("\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u8ffd\u52a0...","AddDefenseFilter()")+AddButton("\u30dd\u30ea\u30b7\u30fc\u3092\u8ffd\u52a0...","AddDefensePolicy()"));QH(54,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}
1138 function StopDefenseStatsTimer(){null!=xxFilterStatisticsTimer&&(clearInterval(xxFilterStatisticsTimer),xxFilterStatisticsTimer=null);xxFilterStatisticsTimerActive=!1}
1139 function UpdateDefenseStats(b){if(b||1!=xxFilterStatisticsTimerActive)xxFilterStatisticsTimerActive=!0,b=b?b:0,xxSystemDefenceLinkedPolicy[b]?amtstack.AMT_SystemDefensePolicy_UpdateStatistics('<a:Address></a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+b+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",!1,UpdateDefenseStats2,b,0,{InstanceID:xxSystemDefenceLinkedPolicy[b].InstanceID}):
1139 -(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,g){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,g):StopDefenseStatsTimer()}
1140 -function UpdateDefenseStats3(b,c,a,d,g){b=0;if(200==d){xxFilterStatistics[g]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[g][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1140 +(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,e){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,e):StopDefenseStatsTimer()}
1141 +function UpdateDefenseStats3(b,c,a,d,e){b=0;if(200==d){xxFilterStatistics[e]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[e][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1142 function changeDefaultPolicy(b){if(!xxdialogMode){var c;c="<div style=height:26px;margin-top:4px><select id=policySelection style=float:right;width:266px><option value=-1>\u7121\u3057";for(var a in xxSystemDefense.AMT_SystemDefensePolicy.responses)c+="<option value="+a+(xxSystemDefenceLinkedPolicy[b]&&xxSystemDefense.AMT_SystemDefensePolicy.responses[a].InstanceID==xxSystemDefenceLinkedPolicy[b].InstanceID?" selected":"")+">"+xxSystemDefense.AMT_SystemDefensePolicy.responses[a].PolicyName;setDialogMode(11,
1143 "\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30b7\u30b9\u30c6\u30e0\u9632\u5fa1\u30dd\u30ea\u30b7\u30fc",3,changeDefaultPolicyOk,c+"</select><div style=padding-top:4px>\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30dd\u30ea\u30b7\u30fc</div></div>",b)}}
1144 function changeDefaultPolicyOk(b,c){var a=Q("policySelection").value,d=xxSystemDefenceLinkedPolicy[c];d&&amtstack.Delete("AMT_NetworkPortSystemDefensePolicy",'<w:SelectorSet><w:Selector Name="Antecedent"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">CIM_EthernetPort</w:Selector><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+c+
@@ -1150,128 +1151,147 @@ function AddDefenseFilter(){if(!xxdialogMode){var b;b="<div style=height:26px;ma
1151 b+="<div style=height:26px;margin-top:4px><select id=filterprofile style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=0>\u8a31\u53ef\u3001\u30ab\u30a6\u30f3\u30c8<option value=1>\u30c9\u30ed\u30c3\u30d7\u3001\u30ab\u30a6\u30f3\u30c8<option value=2>\u30ec\u30fc\u30c8\u5236\u9650<option value=3>\u8a31\u53ef\u3059\u308b<option value=4>\u843d\u3068\u3059</select><div style=padding-top:4px>\u30a2\u30af\u30b7\u30e7\u30f3</div></div>";b+="<div style=height:26px;margin-top:4px id=filterdatadiv><input id=filterdata style=float:right;width:260px maxlength=8 onkeyup=AddDefenseFilterUpdate()><div style=padding-top:4px>\u30d1\u30b1\u30c3\u30c8/\u79d2</div></div>";
1152 b+="<div style=height:26px;margin-top:4px><select id=filteraction style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=false>\u4f55\u3082\u3057\u306a\u3044<option value=1>\u8a66\u5408\u306e\u30a4\u30d9\u30f3\u30c8</select><div style=padding-top:4px>\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0</div></div>";setDialogMode(11,"\u30b7\u30b9\u30c6\u30e0\u9632\u5fa1\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u8ffd\u52a0",3,AddDefenseFilterOk,b);AddDefenseFilterUpdate()}}
1153 function AddDefenseFilterOk(){if(1>=Q("filtertype").value){var b=0==Q("filtertype").value?2048:2054,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrProtocolID8021:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value};2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_Hdr8021Filter",c,AddDefenseFilterOk2)}else{var b=2==Q("filtertype").value?
1153 -4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var g=a[d].indexOf("="),v=a[d].substring(0,g),g=a[d].substring(g+1),n=xxSystemDefenceFilters[v];n||(v="HDR"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(g=g.split("."),4==g.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(g[0]),
1154 -parseInt(g[1]),parseInt(g[2]),parseInt(g[3]))))):c[v]=g)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c54",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1154 +4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var e=a[d].indexOf("="),v=a[d].substring(0,e),e=a[d].substring(e+1),n=xxSystemDefenceFilters[v];n||(v="HDR"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(e=e.split("."),4==e.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(e[0]),
1155 +parseInt(e[1]),parseInt(e[2]),parseInt(e[3]))))):c[v]=e)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c106",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1156 function AddDefenseFilterOk2(b,c,a,d){200!=d?messagebox("\u30b7\u30b9\u30c6\u30e0\u9632\u5fa1\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u8ffd\u52a0","\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u8ffd\u52a0\u3067\u304d\u307e\u305b\u3093\u3001\u30a8\u30e9\u30fc\uff03"+d):PullSystemDefense()}
1156 -function showFilterDetails(b,c){if(!xxdialogMode){var a,d,g,v;0==b?(v="AMT_Hdr8021Filter",g="\u30a4\u30fc\u30b5\u30cd\u30c3\u30c8\u30c8\u30e9\u30d5\u30a3\u30c3\u30af",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="\u3059\u3079\u3066\u306e\u30a4\u30fc\u30b5\u30cd\u30c3\u30c8\u30d7\u30ed\u30c8\u30b3\u30eb"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",g="IP\u30c8\u30e9\u30d5\u30a3\u30c3\u30af",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||
1157 -(a="\u3059\u3079\u3066\u306eIP\u30d7\u30ed\u30c8\u30b3\u30eb"+d.HdrIPVersion));var n;n=""+addHtmlValue("\u540d\u524d",EscapeHtml(d.Name));n+=addHtmlValue("\u30bf\u30a4\u30d7",g);n+=addHtmlValue("\u4e00\u81f4\u3059\u308b\u30c8\u30e9\u30d5\u30a3\u30c3\u30af",a);n+=addHtmlValue("\u65b9\u5411",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,g=d[l],b=xxSystemDefenceFilters[l],2==b&&4==g.length&&(g=hex2rstr(g),g=g.charCodeAt(0)+"."+
1158 -g.charCodeAt(1)+"."+g.charCodeAt(2)+"."+g.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("\u30d5\u30a3\u30eb\u30bf"+a,g));n+=addHtmlValue("\u8a66\u5408\u306e\u30a4\u30d9\u30f3\u30c8",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,"\u30a4\u30fc\u30b5\u30cd\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\uff03"+d.InstanceID,5,showFilterDetailsOk,n,[v,d])}}function showFilterDetailsOk(b,c){2==b&&amtstack.Delete(c[0],c[1],deleteDefenseFilter)}
1157 +function showFilterDetails(b,c){if(!xxdialogMode){var a,d,e,v;0==b?(v="AMT_Hdr8021Filter",e="\u30a4\u30fc\u30b5\u30cd\u30c3\u30c8\u30c8\u30e9\u30d5\u30a3\u30c3\u30af",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="\u3059\u3079\u3066\u306e\u30a4\u30fc\u30b5\u30cd\u30c3\u30c8\u30d7\u30ed\u30c8\u30b3\u30eb"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",e="IP\u30c8\u30e9\u30d5\u30a3\u30c3\u30af",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||
1158 +(a="\u3059\u3079\u3066\u306eIP\u30d7\u30ed\u30c8\u30b3\u30eb"+d.HdrIPVersion));var n;n=""+addHtmlValue("\u540d\u524d",EscapeHtml(d.Name));n+=addHtmlValue("\u30bf\u30a4\u30d7",e);n+=addHtmlValue("\u4e00\u81f4\u3059\u308b\u30c8\u30e9\u30d5\u30a3\u30c3\u30af",a);n+=addHtmlValue("\u65b9\u5411",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,e=d[l],b=xxSystemDefenceFilters[l],2==b&&4==e.length&&(e=hex2rstr(e),e=e.charCodeAt(0)+"."+
1159 +e.charCodeAt(1)+"."+e.charCodeAt(2)+"."+e.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("\u30d5\u30a3\u30eb\u30bf"+a,e));n+=addHtmlValue("\u8a66\u5408\u306e\u30a4\u30d9\u30f3\u30c8",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,"\u30a4\u30fc\u30b5\u30cd\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\uff03"+d.InstanceID,5,showFilterDetailsOk,n,[v,d])}}function showFilterDetailsOk(b,c){2==b&&amtstack.Delete(c[0],c[1],deleteDefenseFilter)}
1160 function deleteDefenseFilter(b,c,a,d){200!=d?messagebox("\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u524a\u9664","\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u524a\u9664\u3067\u304d\u307e\u305b\u3093\u3002\u4f7f\u7528\u3055\u308c\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002"):PullSystemDefense()}var xxAddDefensePolicyFilters;
1161 function AddDefensePolicy(){if(!xxdialogMode){xxAddDefensePolicyFilters=[];var b;b='<div style=height:26px;margin-top:4px><input id=policyname title="<policy name>:<policy precedence number>" style=float:right;width:260px maxlength=16 onkeyup=AddDefensePolicyUpdate()><div style=padding-top:4px>\u540d\u524d</div></div><div style=height:26px;margin-top:4px><select id=policytx title="\u9001\u4fe1\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306b\u5bfe\u3057\u3066\u5b9f\u884c\u3059\u308b\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30a2\u30af\u30b7\u30e7\u30f3" style=float:right;width:133px><option value=0>Allow<option value=1>\u843d\u3068\u3059<option value=2>\u8a31\u53ef\u3001\u30ab\u30a6\u30f3\u30c8<option value=3>\u30c9\u30ed\u30c3\u30d7\u3001\u30ab\u30a6\u30f3\u30c8<option value=4>\u8a31\u53ef\u3001\u30ab\u30a6\u30f3\u30c8\u3001\u30a4\u30d9\u30f3\u30c8<option value=5>\u30c9\u30ed\u30c3\u30d7\u3001\u30ab\u30a6\u30f3\u30c8\u3001\u30a4\u30d9\u30f3\u30c8</select><select id=policyrx style=float:right;width:133px title="\u7740\u4fe1\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306b\u5bfe\u3057\u3066\u5b9f\u884c\u3059\u308b\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30a2\u30af\u30b7\u30e7\u30f3"><option value=0>\u8a31\u53ef\u3059\u308b<option value=1>\u843d\u3068\u3059<option value=2>\u8a31\u53ef\u3001\u30ab\u30a6\u30f3\u30c8<option value=3>\u30c9\u30ed\u30c3\u30d7\u3001\u30ab\u30a6\u30f3\u30c8<option value=4>\u8a31\u53ef\u3001\u30ab\u30a6\u30f3\u30c8\u3001\u30a4\u30d9\u30f3\u30c8<option value=5>\u30c9\u30ed\u30c3\u30d7\u3001\u30ab\u30a6\u30f3\u30c8\u3001\u30a4\u30d9\u30f3\u30c8</select><div style=padding-top:4px>\u30c7\u30d5\u30a9\u30eb\u30c8\u306eTX / RX</div></div>';b+=
1162 "<div id=policyFilters></div>";if(0<xxSystemDefense.AMT_Hdr8021Filter.responses.length||0<xxSystemDefense.AMT_IPHeadersFilter.responses.length){b+="<div style=height:26px;margin-top:4px><div style=float:right><select id=xfilter style=width:186px>";for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];b+="<option value="+a.InstanceID+">"+a.Name}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],
1163 b+="<option value="+a.InstanceID+">"+a.Name;b+="</select><input id=addFilterButton type=button value=Add style=width:80px onclick=addFilterButton()></div><div style=padding-top:4px>\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u8ffd\u52a0</div></div>"}setDialogMode(11,"\u30b7\u30b9\u30c6\u30e0\u9632\u5fa1\u30dd\u30ea\u30b7\u30fc\u3092\u8ffd\u52a0\u3059\u308b",3,AddDefensePolicyOk,b);AddDefensePolicyUpdate()}}
1164 function addFilterButton(){0<=xxAddDefensePolicyFilters.indexOf(Q("xfilter").value)||(xxAddDefensePolicyFilters.push(Q("xfilter").value),AddDefensePolicyUpdate())}function removeFilterButton(b){xxAddDefensePolicyFilters.splice(b,1);AddDefensePolicyUpdate()}
1164 -function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c54",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>\u3053\u306e\u30dd\u30ea\u30b7\u30fc\u306b\u306f\u30d5\u30a3\u30eb\u30bf\u30fc\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3002</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("\u524a\u9664\u3059\u308b","removeFilterButton("+
1165 +function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c106",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>\u3053\u306e\u30dd\u30ea\u30b7\u30fc\u306b\u306f\u30d5\u30a3\u30eb\u30bf\u30fc\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3002</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("\u524a\u9664\u3059\u308b","removeFilterButton("+
1166 c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+GetFilterById(xxAddDefensePolicyFilters[c]).Name+"</b></div></div>";QH("policyFilters",b)}}function GetFilterById(b){for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];if(a.InstanceID==b)return a}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)if(a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],a.InstanceID==b)return a}
1167 function AddDefensePolicyOk(){var b=Q("policytx").value,c=Q("policyrx").value,a=0,d=Q("policyname").value.split(":");2==d.length&&(a=parseInt(d[1]));b={"InstanceID ":0,PolicyName:d[0],PolicyPrecedence:a,TxDefaultCount:1<b,TxDefaultDrop:1==b%2,TxDefaultMatchEvent:3<b,RxDefaultCount:1<c,RxDefaultDrop:1==c%2,RxDefaultMatchEvent:3<c};0<xxAddDefensePolicyFilters.length&&(b.FilterCreationHandles=xxAddDefensePolicyFilters);amtstack.Create("AMT_SystemDefensePolicy",b,AddDefensePolicyOk2)}
1168 function AddDefensePolicyOk2(b,c,a,d){200!=d?messagebox("\u30b7\u30b9\u30c6\u30e0\u9632\u5fa1\u30dd\u30ea\u30b7\u30fc\u3092\u8ffd\u52a0\u3059\u308b","\u30dd\u30ea\u30b7\u30fc\u3092\u8ffd\u52a0\u3067\u304d\u307e\u305b\u3093\u3002\u30a8\u30e9\u30fc\uff03"+d):PullSystemDefense()}
1169 function showPolicyDetails(b){if(!xxdialogMode){var c=xxSystemDefense.AMT_SystemDefensePolicy.responses[b],a;a=""+addHtmlValue("\u540d\u524d",EscapeHtml(c.PolicyName));0!=c.PolicyPrecedence&&(a+=addHtmlValue("\u512a\u5148",c.PolicyPrecedence));var d=1==c.TxDefaultDrop?"\u843d\u3068\u3059":"\u8a31\u53ef\u3059\u308b";1==c.TxDefaultCount&&(d+="\u3001 \u30ab\u30a6\u30f3\u30c8");1==c.TxDefaultMatchEvent&&(d+="\u3001\u30a4\u30d9\u30f3\u30c8");a+=addHtmlValue("\u30c7\u30d5\u30a9\u30eb\u30c8\u306eTX\u30a2\u30af\u30b7\u30e7\u30f3",
1170 d);d=1==c.RxDefaultDrop?"Drop":"Allow";1==c.RxDefaultCount&&(d+=", Count");1==c.RxDefaultMatchEvent&&(d+=", Event");a+=addHtmlValue("\u30c7\u30d5\u30a9\u30eb\u30c8\u306eRX\u30a2\u30af\u30b7\u30e7\u30f3",d);if(c.FilterCreationHandles)for(b in c.FilterCreationHandles)a+=addHtmlValue("\u30d5\u30a3\u30eb\u30bf\u30fc\uff03"+(+b+1),GetFilterById(c.FilterCreationHandles[b]).Name);setDialogMode(11,format("\u30dd\u30ea\u30b7\u30fc\uff03",c.InstanceID.substring(20)),5,showPolicyDetailsOk,a,c)}}
1171 function showPolicyDetailsOk(b,c){2==b&&amtstack.Delete("AMT_SystemDefensePolicy",c,deleteDefensePolicy)}function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("\u30dd\u30ea\u30b7\u30fc\u3092\u524a\u9664","\u30dd\u30ea\u30b7\u30fc\u3092\u524a\u9664\u3067\u304d\u307e\u305b\u3093\u3002\u4f7f\u7528\u3055\u308c\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002"):PullSystemDefense()}var xxWireless;
1171 -function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService *AMT_BootCapabilities".split(" "),processWireless)}function wifiRefresh(){xxdialogMode||PullWireless()}
1172 -var xxWifiState={3:"\u7121\u52b9",32768:"S0\u3067\u6709\u52b9",32769:"S0\u3001Sx / AC\u3067\u6709\u52b9"},xxRadioState={2:"\u30aa\u30f3\u3001\u63a5\u7d9a\u6e08\u307f",3:"\u30aa\u30d5",6:"\u30aa\u30f3\u3001\u5207\u65ad"},xxWifiAuthenticationMethod={1:"\u305d\u306e\u4ed6\u306e",2:"\u958b\u3044\u305f",3:"\u5171\u6709\u30ad\u30fc",4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE"},xxWifiEncryptionMethod={1:"\u305d\u306e\u4ed6\u306e",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"\u7121\u3057"};
1173 -function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1174 -function showWirelessInfo(){if(xxWireless){var b,c,a="",d,g;if(xxWireless.CIM_WiFiPortCapabilities.response){g="<br><h2>\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb</h2>"+TableStart2();g+="<tr><td class=r2 style=padding-left:15px><br>\u30a4\u30f3\u30c6\u30eb&reg;AMT\u304c\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u63a5\u7d9a\u306b\u4f7f\u7528\u3059\u308b\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3002<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)d=
1175 -xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b&&(g+="<div class=itemBar onclick=showWifiDetails("+c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+" &nbsp; ",xxAccountAdminName&&(g+=AddButton2("\u524a\u9664\u3059\u308b",'wifiRemoveButton("'+c+'")')),g+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>",a++);0==a&&(g+="<i>\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308a\u307e\u305b\u3093</i><br>");
1176 -g+="<br><td class=r2>";g=xxAccountAdminName?g+TableEnd(AddButton("\u65b0\u3057\u3044\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb","showWifiNewProfile()")):g+TableEnd("");QH(20,g+"<br>")}}}
1172 +function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService CIM_IEEE8021xSettings".split(" "),processWireless)}function wifiRefresh(){xxdialogMode||PullWireless()}
1173 +var xxWifiState={3:"\u7121\u52b9",32768:"S0\u3067\u6709\u52b9",32769:"S0\u3001Sx / AC\u3067\u6709\u52b9"},xxRadioState={2:"\u30aa\u30f3\u3001\u63a5\u7d9a\u6e08\u307f",3:"\u30aa\u30d5",6:"\u30aa\u30f3\u3001\u5207\u65ad"},xxWifiAuthenticationMethod={1:"\u305d\u306e\u4ed6\u306e",2:"\u958b\u3044\u305f",3:"\u5171\u6709\u30ad\u30fc",4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE IEEE 802.1x",32769:"WPA3 OWE IEEE 802.1x"},xxWifiEncryptionMethod={1:"\u305d\u306e\u4ed6\u306e",
1174 +2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"\u7121\u3057"};function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1175 +function showWirelessInfo(){if(xxWireless){var b,c,a="",d,e;if(xxWireless.CIM_WiFiPortCapabilities.response){e="<br><h2>\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb</h2>"+TableStart2();e+="<tr><td class=r2 style=padding-left:15px><br>\u30a4\u30f3\u30c6\u30eb&reg;AMT\u304c\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u63a5\u7d9a\u306b\u4f7f\u7528\u3059\u308b\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3002<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)if(d=
1176 +xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b){var v="",n=null,l="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");if(xxWireless.CIM_IEEE8021xSettings.responses)for(var p in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[p].ElementName==d.ElementName&&(n=xxWireless.CIM_IEEE8021xSettings.responses[p]);n&&(v=", "+l[n.AuthenticationProtocol]);
1177 +e+="<div class=itemBar onclick=showWifiDetails("+c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+v+" &nbsp; ";xxAccountAdminName&&(e+=AddButton2("\u524a\u9664\u3059\u308b",'wifiRemoveButton("'+c+'")'));e+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>";a++}0==a&&(e+="<i>\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308a\u307e\u305b\u3093</i><br>");
1178 +e+="<br><td class=r2>";e=xxAccountAdminName?e+TableEnd(AddButton("\u65b0\u3057\u3044\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb","showWifiNewProfile()")):e+TableEnd("");QH(20,e+"<br>")}}}
1179 function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"\u30ef\u30a4\u30e4\u30ec\u30b9\u72b6\u614b",3,wifiStateDlg,b)}}
1180 function wifiStateDlg(){amtstack.CIM_WiFiPort_RequestStateChange(document.querySelector("input[name=d11]:checked").value,null,function(){amtstack.Get("CIM_WiFiPort",function(b,c,a,d){200==d&&(xxWireless.CIM_WiFiPort.response=a.Body,showWirelessInfo())})})}
1181 function showWifiSyncDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d11 id=wl0 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">\u7121\u52b9</label><br>");b+="<label><input type=radio name=d11 id=wl0 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">\u6709\u52b9</label><br>";setDialogMode(11,"Local Profile Sync",3,showWifiSyncDlgEx,b)}}
1180 -function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,g){200==g&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1182 +function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,e){200==e&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1183 function showUefiWifiCoExDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d12 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Disabled</label><br>");b+="<label><input type=radio name=d12 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Enabled</label><br>";setDialogMode(11,"UEFI Wifi CoEx Profile Sharing",3,UefiWifiCoExDlg,b)}}
1182 -function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,g){200==g&&PullWireless()})}
1183 -function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u540d",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",b.SSID);c+=addHtmlValue("\u8a8d\u8a3c",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("\u6697\u53f7\u5316",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("\u512a\u5148",b.Priority);messagebox("\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb",
1184 -c+"</div>")}}function wifiRemoveButton(b){xxdialogMode||(QH(60,format("\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u300c{0}\u300d\u3092\u524a\u9664\u3057\u307e\u3059\u304b\uff1f",xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb",3,function(){removeWifiButtonEx(b)}))}
1185 -function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}function removeWifiEntryResponse(b,c,a,d,g){methodcheck(a)||amtstack.Enum("CIM_WiFiEndpointSettings",function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c,showWirelessInfo())})}
1186 -function showWifiNewProfile(){if(!xxdialogMode){var b="";for(i=1;256>i;i++){var c=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==i&&(c=0);c&&(b+="<option value="+i+">"+i)}QH("c24",b);QV("c26",13<amtversion);c25.value=6;c27.value=4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u8ffd\u52a0",
1187 -3,function(){addWifiProfile()});updateWifiDialog()}}
1188 -function addWifiProfile(){amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},{__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c27.value,SSID:c23.value,Priority:c24.value,
1189 -PSKPassPhrase:c28.value},null,null,null,removeWifiEntryResponse)}
1190 -function updateWifiDialog(){var b=!0,c=c25.value,a=c27.value;QV(66,4>c);QV(65,3<c);QV(64,3<c);QV(67,4>c);4>c&&(3==a||4==a)&&(c27.value=2);3<c&&(2==a||5==a)&&(c27.value=3);32768==c&&(c27.value=4);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);QE("c54",1==b&&0<c22.value.length&&0<c23.value.length&&7<c28.value.length&&
1191 -c28.value==c29.value)}function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1184 +function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,e){200==e&&PullWireless()})}
1185 +function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u540d",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",EscapeHtml(b.SSID));c+=addHtmlValue("\u8a8d\u8a3c",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("\u6697\u53f7\u5316",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("\u512a\u5148",b.Priority);var a=null,d="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");
1186 +if(xxWireless.CIM_IEEE8021xSettings.responses)for(var e in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[e].ElementName==b.ElementName&&(a=xxWireless.CIM_IEEE8021xSettings.responses[e]);a&&(c=c+'<div style="width:100%;border-bottom:1px solid #000;margin-bottom:5px;margin-top:5px">802.11x</div>'+addHtmlValue("\u8a8d\u8a3c",d[a.AuthenticationProtocol]),a.Domain&&(c+=addHtmlValue("Domain",EscapeHtml(a.Domain))),a.Username&&(c+=addHtmlValue("\u30e6\u30fc\u30b6\u30fc\u540d",
1187 +EscapeHtml(a.Username))));c+="</div>";messagebox("\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb",c)}}
1188 +function wifiRemoveButton(b){xxdialogMode||(QH(61,format("\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u300c{0}\u300d\u3092\u524a\u9664\u3057\u307e\u3059\u304b\uff1f",xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb",3,function(){removeWifiButtonEx(b)}))}
1189 +function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1190 +function removeWifiEntryResponse(b,c,a,d,e){methodcheck(a)||amtstack.BatchEnum("",["CIM_WiFiEndpointSettings","CIM_IEEE8021xSettings"],function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c.CIM_WiFiEndpointSettings.responses,xxWireless.CIM_IEEE8021xSettings.responses=c.CIM_IEEE8021xSettings.responses,showWirelessInfo())})}
1191 +function showWifiNewProfile(){if(!xxdialogMode){for(var b="",c=1;256>c;c++){var a=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==c&&(a=0);a&&(b+="<option value="+c+">"+c)}QH("c24",b);var b="<option value=-1>"+EscapeHtml("\u7121\u3057")+"</option>",a="<option value=-1>"+EscapeHtml("\u7121\u3057")+"</option>",c;for(c in xxCertificates)xxCertificates[c].TrustedRootCertficate?a+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+
1192 +"</option>":xxCertificates[c].XPrivateKey&&(b+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+"</option>");QH("c50",b);QH("c52",a);c="<option value=32769>WPA3 OWE IEEE 802.1x</option><option value=32768>WPA3 SAE IEEE 802.1x</option>";c+="<option value=7>WPA2 IEEE 802.1x</option>";c+="<option value=5>WPA IEEE 802.1x</option>";c+="<option value=6>WPA2 PSK</option>";c+="<option value=4>WPA PSK</option>";QH("c25",c);c25.value=6;c26.value=
1193 +4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u8ffd\u52a0",3,function(){addWifiProfile()});updateWifiDialog()}}
1194 +function addWifiProfile(){var b,c,a,d={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c26.value,SSID:c23.value,Priority:c24.value};if(4==c25.value||6==c25.value)d.PSKPassPhrase=c28.value;if(5==c25.value||7==c25.value||32768==c25.value||
1195 +32769==c25.value)b={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_IEEE8021xSettings"),ElementName:"8021x-"+c22.value,InstanceID:"8021x-"+c22.value,ActiveInS0:1==Q("c54").value,AuthenticationProtocol:Q("c32").value},""!=Q("c44").value&&(b.RoamingIdentity=Q("c44").value),""!=Q("c34").value&&(b.ServerCertificateName=Q("c34").value,b.ServerCertificateNameComparison=Q("c36").value),
1196 +""!=Q("c40").value&&(b.Username=Q("c40").value),""!=Q("c42").value&&(b.Password=Q("c42").value),""!=Q("c38").value&&(b.Domain=Q("c38").value),3<Q("c32").value&&(b.ProtectedAccessCredential=Q("c46").value,b.PACPassword=Q("c48").value),0<=parseInt(Q("c50").value)&&(c='<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">'+
1197 +xxCertificates[parseInt(Q("c50").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>"),0<=parseInt(Q("c52").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">'+
1198 +xxCertificates[parseInt(Q("c52").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>");console.log("wifiepsettinginput",JSON.stringify(d,null,2));console.log("netAuthProfile",JSON.stringify(b,null,2));console.log("netAuthSettingsClientCert",c);console.log("netAuthSettingsServerCaCert",a);amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},d,b,c,a,removeWifiEntryResponse)}
1199 +function updateWifiDialog(){var b=!0,c=c25.value,a=c26.value;4>c&&(3==a||4==a)&&(c26.value=2);3<c&&(2==a||5==a)&&(c26.value=3);if(32768==c||32769==c)c26.value=4;QV("c27",4==c||6==c);QV("c30",5==c||7==c||32768==c||32769==c);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);0==c22.value.length&&0==c23.value.length&&(b=!1);4!=c&&6!=c||
1200 +!(8>c28.value.length||63<c28.value.length||c28.value!=c29.value)||(b=!1);QE("c106",b);updateNetAuthDialog()}function updateNetAuth2Dialog(){QV("c35",""!=Q("c33").value);QV("c45",3<Q("c32").value);QV("c47",3<Q("c32").value)}
1201 +function editNetAuthProfile(){if(!xxdialogMode){var b="<option value=-1>"+EscapeHtml("\u7121\u3057")+"</option>",c="<option value=-1>"+EscapeHtml("\u7121\u3057")+"</option>",a;for(a in xxCertificates)xxCertificates[a].TrustedRootCertficate?c+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>":xxCertificates[a].XPrivateKey&&(b+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>");QH("c98",b);QH("c100",c);b=amtsysstate.AMT_8021XProfile.responses.Body;
1202 +Q("c78").value=b.Enabled?1:0;Q("c102").value=b.ActiveInS0?1:0;Q("c104").value=b.PxeTimeout;if(b.Enabled){Q("c80").value=b.AuthenticationProtocol;Q("c92").value=b.RoamingIdentity?b.RoamingIdentity:"";Q("c82").value=b.ServerCertificateName?b.ServerCertificateName:"";Q("c84").value=b.ServerCertificateNameComparison?b.ServerCertificateNameComparison:0;Q("c88").value=b.Username?b.Username:
1203 +"";Q("c90").value=b.Password?b.Password:"";Q("c86").value=b.Domain?b.Domain:"";Q("c94").value=b.ProtectedAccessCredential?b.ProtectedAccessCredential:"";Q("c96").value=b.PACPassword?b.PACPassword:"";var d=c=-1;b.ServerCertificateIssuer&&(c=b.ServerCertificateIssuer.ReferenceParameters.SelectorSet.Selector.Value);b.ClientCertificate&&(d=b.ClientCertificate.ReferenceParameters.SelectorSet.Selector.Value);for(a in xxCertificates)xxCertificates[a].InstanceID==
1204 +c&&(Q("c100").value=a),xxCertificates[a].InstanceID==d&&(Q("c98").value=a)}setDialogMode(27,"802.1x Profile",3,function(){setNetAuthProfile()});updateNetAuthDialog()}}
1205 +function updateNetAuthDialog(){QV("c79",1==Q("c78").value);QV("c81",1==Q("c78").value);QV("c83",1==Q("c78").value&&""!=Q("c82").value);QV("c85",1==Q("c78").value);QV("c87",1==Q("c78").value);QV("c89",1==Q("c78").value);QV("c91",1==Q("c78").value);QV("c93",1==Q("c78").value&&
1206 +3<Q("c80").value);QV("c95",1==Q("c78").value&&3<Q("c80").value);QV("c97",1==Q("c78").value);QV("c99",1==Q("c78").value);QV("c101",1==Q("c78").value);QV("c103",1==Q("c78").value)}
1207 +function setNetAuthProfile(){var b=Clone(amtsysstate.AMT_8021XProfile.responses.Body);b.Enabled=1==Q("c78").value;b.Enabled&&(b.ActiveInS0=1==Q("c102").value,b.AuthenticationProtocol=Q("c80").value,""!=Q("c92").value?b.RoamingIdentity=Q("c92").value:delete b.RoamingIdentity,""!=Q("c82").value?(b.ServerCertificateName=Q("c82").value,b.ServerCertificateNameComparison=Q("c84").value):
1208 +(delete b.ServerCertificateName,delete b.ServerCertificateNameComparison),""!=Q("c88").value?b.Username=Q("c88").value:delete b.Username,""!=Q("c90").value?b.Password=Q("c90").value:delete b.Password,""!=Q("c86").value?b.Domain=Q("c86").value:delete b.Domain,3<Q("c80").value?(b.ProtectedAccessCredential=Q("c94").value,b.PACPassword=Q("c96").value):(delete b.ProtectedAccessCredential,delete b.PACPassword),
1209 +0<=parseInt(Q("c98").value)?b.ClientCertificate="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c98").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ClientCertificate,0<=parseInt(Q("c100").value)?b.ServerCertificateIssuer="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+
1210 +amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c100").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ServerCertificateIssuer,b.PxeTimeout=Q("c104").value);amtstack.Put("AMT_8021XProfile",b,setNetAuthProfileEx)}
1211 +function setNetAuthProfileEx(b,c,a,d){200==d?(amtsysstate.AMT_8021XProfile.responses.Body=amtsysstate.AMT_8021XProfile.response=a.Body,updateSystemStatus()):a.Header.WsmanError?messagebox("802.1x Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("802.1x Error","Error, Status = "+d)}
1212 +function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1213 var DMTFCPUStatus="\u308f\u304b\u3089\u306a\u3044 \u6709\u52b9 \u30e6\u30fc\u30b6\u30fc\u306b\u3088\u3063\u3066\u7121\u52b9\u306b\u3055\u308c\u3066\u3044\u307e\u3059 BIOS\u306b\u3088\u3063\u3066\u7121\u52b9\u5316\uff08POST\u30a8\u30e9\u30fc\uff09 \u30a2\u30a4\u30c9\u30eb \u305d\u306e\u4ed6\u306e".split(" "),DMTFMemType="\u308f\u304b\u3089\u306a\u3044 \u305d\u306e\u4ed6\u306e DRAM \u540c\u671fDRAM \u30ad\u30e3\u30c3\u30b7\u30e5DRAM \u6c5f\u6238 \u30a8\u30c9\u30e9\u30e0 VRAM SRAM \u7f8a ROM \u9583\u5149 EEPROM FEPROM EPROM CDRAM 3DRAM SDRAM SGRAM RDRAM DDR DDR-2 BRAM FB-DIMM DDR3 FBD2 DDR4 LPDDR LPDDR2 LPDDR3 LPDDR4".split(" "),
1214 DMTFMemFormFactor=" \u305d\u306e\u4ed6\u306e \u308f\u304b\u3089\u306a\u3044 SIMM SIP \u30c1\u30c3\u30d7 \u6d78\u6f2c ZIP \u5c02\u6709\u30ab\u30fc\u30c9 DIMM TSOP \u30c1\u30c3\u30d7\u306e\u5217 RIMM SODIMM \u30b9\u30ea\u30df\u30f3\u30b0 FB-DIM".split(" "),DMTFProcFamilly={191:"\u30a4\u30f3\u30c6\u30eb&reg;Core&trade;2 Duo\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc",192:"\u30a4\u30f3\u30c6\u30eb&reg;Core&trade;2 Solo\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc",193:"\u30a4\u30f3\u30c6\u30eb&reg;Core&trade;2 Extreme\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc",
1215 194:"\u30a4\u30f3\u30c6\u30eb&reg;Core&trade;2 Quad\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc",195:"\u30a4\u30f3\u30c6\u30eb&reg;Core&trade;2 Extreme\u30e2\u30d0\u30a4\u30eb\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc",196:"\u30a4\u30f3\u30c6\u30eb&reg;Core&trade;2 Duo\u30e2\u30d0\u30a4\u30eb\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc",197:"\u30a4\u30f3\u30c6\u30eb&reg;Core&trade;2 Solo\u30e2\u30d0\u30a4\u30eb\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc",198:"\u30a4\u30f3\u30c6\u30eb&reg;Core&trade;i7\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc",
1216 199:"\u30c7\u30e5\u30a2\u30eb\u30b3\u30a2\u30a4\u30f3\u30c6\u30eb&reg;Celeron&reg;\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc"},HardwareInventory;
1196 -function processHardware(b,c,a,d){if(200==d){var g;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("\u30bb\u30fc\u30d6...","SaveHardwareLog()")+" \u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u60c5\u5831\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u30d6\u30fc\u30c8\u6642\u306b\u53ce\u96c6\u3055\u308c\u307e\u3059\u3002");c=a.CIM_Chassis.response;d=a.CIM_Card.response;
1197 -var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>\u30d7\u30e9\u30c3\u30c8\u30db\u30fc\u30e0</h2>"+FullTable({"\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30e2\u30c7\u30eb":c.Model,"\u30e1\u30fc\u30ab\u30fc":c.Manufacturer,"\u30d0\u30fc\u30b8\u30e7\u30f3":c.Version,"\u30b7\u30ea\u30a2\u30eb\u30ca\u30f3\u30d0\u30fc":c.SerialNumber,"\u30b7\u30b9\u30c6\u30e0ID":guidToStr(a.CIM_SystemPackaging.responses[0].PlatformGUID).toLowerCase()},"");b+="<br><h2>\u30d9\u30fc\u30b9\u30dc\u30fc\u30c9</h2>";
1198 -b+=FullTable({"\u30e1\u30fc\u30ab\u30fc":d.Manufacturer,"\u5546\u54c1\u540d":d.Model,"\u30d0\u30fc\u30b8\u30e7\u30f3":d.Version,"\u30b7\u30ea\u30a2\u30eb\u30ca\u30f3\u30d0\u30fc":d.SerialNumber,"\u30a2\u30bb\u30c3\u30c8\u30bf\u30b0":d.Tag,"\u4ea4\u63db\u53ef\u80fd\u3067\u3059\u304b\uff1f":1==d.CanBeFRUed?"Yes":"No"},"");b+="<br><h2>BIOS</h2>";b+=FullTable({"\u30d9\u30f3\u30c0\u30fc":a.CIM_BIOSElement.response.Manufacturer,"\u30d0\u30fc\u30b8\u30e7\u30f3":v,"\u767a\u58f2\u65e5":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",
1199 -{timeZone:"UTC"})},"");b+="<br>";for(g in a.CIM_Processor.responses)c=a.CIM_Processor.responses[g],d=a.CIM_Chip.responses[g],b+="<h2>\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc "+(parseInt(g)+1)+"</h2>",b+=FullTable({"\u30e1\u30fc\u30ab\u30fc":trademarks(d.Manufacturer),"\u5bb6\u65cf":DMTFProcFamilly[c.Family],"\u30d0\u30fc\u30b8\u30e7\u30f3":trademarks(d.Version),"\u6700\u5927\u30bd\u30b1\u30c3\u30c8\u901f\u5ea6":c.MaxClockSpeed+" MHz","\u72b6\u614b":DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(g in a.CIM_PhysicalMemory.responses)c=
1200 -a.CIM_PhysicalMemory.responses[g],b+="<h2>\u30e1\u30e2\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb "+(+g+1)+"</h2>",b+=FullTable({"\u9280\u884c\u30e9\u30d9\u30eb":c.BankLabel,"\u30e1\u30fc\u30ab\u30fc":c.Manufacturer,"\u30b7\u30ea\u30a2\u30eb\u30ca\u30f3\u30d0\u30fc":c.SerialNumber,"\u30b5\u30a4\u30ba":parseInt(c.Capacity/1048576)+" MB","\u30d5\u30a9\u30fc\u30e0\u30d5\u30a1\u30af\u30bf":DMTFMemFormFactor[c.FormFactor],"\u30bf\u30a4\u30d7":DMTFMemType[c.MemoryType],"\u30a2\u30bb\u30c3\u30c8\u30bf\u30b0":c.Tag,
1201 -"\u54c1\u756a":c.PartNumber},"");b+="<br>";for(g in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[g],d=a.CIM_PhysicalPackage.responses[+g+1],b+="<h2>\u8a18\u61b6\u5a92\u4f53 "+(parseInt(g)+1)+"</h2>",b+=FullTable({"\u578b\u756a":d.Model,"\u30b7\u30ea\u30a2\u30eb\u30ca\u30f3\u30d0\u30fc":""==d.SerialNumber?"Unknown":d.SerialNumber,"\u30b5\u30a4\u30ba":parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" MB"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(g in a.CIM_PhysicalPackage.responses)11==
1202 -a.CIM_PhysicalPackage.responses[g].PackageType&&(c=a.CIM_PhysicalPackage.responses[g]);null!=c&&(b+="<h2>Battery</h2>",g=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,"\u30e1\u30fc\u30ab\u30fc":c.Manufacturer,"Manufacture date":g,"\u30b7\u30ea\u30a2\u30eb\u30ca\u30f3\u30d0\u30fc":c.SerialNumber,"\u30bf\u30a4\u30d7":"\u305d\u306e\u4ed6\u306e;\u308f\u304b\u3089\u306a\u3044;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],
1217 +function processHardware(b,c,a,d){if(200==d){var e;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("\u30bb\u30fc\u30d6...","SaveHardwareLog()")+" \u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u60c5\u5831\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u8d77\u52d5\u6642\u306b\u53ce\u96c6\u3055\u308c\u307e\u3059\u3002");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=
1218 +a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>\u30d7\u30e9\u30c3\u30c8\u30db\u30fc\u30e0</h2>"+FullTable({"\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30e2\u30c7\u30eb":c.Model,"\u30e1\u30fc\u30ab\u30fc":c.Manufacturer,"\u30d0\u30fc\u30b8\u30e7\u30f3":c.Version,"\u30b7\u30ea\u30a2\u30eb\u30ca\u30f3\u30d0\u30fc":c.SerialNumber,"\u30b7\u30b9\u30c6\u30e0ID":guidToStr(a.CIM_SystemPackaging.responses[0].PlatformGUID).toLowerCase()},"");b+="<br><h2>\u30d9\u30fc\u30b9\u30dc\u30fc\u30c9</h2>";b+=FullTable({"\u30e1\u30fc\u30ab\u30fc":d.Manufacturer,
1219 +"\u5546\u54c1\u540d":d.Model,"\u30d0\u30fc\u30b8\u30e7\u30f3":d.Version,"\u30b7\u30ea\u30a2\u30eb\u30ca\u30f3\u30d0\u30fc":d.SerialNumber,"\u30a2\u30bb\u30c3\u30c8\u30bf\u30b0":d.Tag,"\u4ea4\u63db\u53ef\u80fd\u3067\u3059\u304b\uff1f":1==d.CanBeFRUed?"Yes":"No"},"");b+="<br><h2>BIOS</h2>";b+=FullTable({"\u30d9\u30f3\u30c0\u30fc":a.CIM_BIOSElement.response.Manufacturer,"\u30d0\u30fc\u30b8\u30e7\u30f3":v,"\u767a\u58f2\u65e5":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",
1220 +{timeZone:"UTC"})},"");b+="<br>";for(e in a.CIM_Processor.responses)c=a.CIM_Processor.responses[e],d=a.CIM_Chip.responses[e],b+="<h2>\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc "+(parseInt(e)+1)+"</h2>",b+=FullTable({"\u30e1\u30fc\u30ab\u30fc":trademarks(d.Manufacturer),"\u5bb6\u65cf":DMTFProcFamilly[c.Family],"\u30d0\u30fc\u30b8\u30e7\u30f3":trademarks(d.Version),"\u6700\u5927\u30bd\u30b1\u30c3\u30c8\u901f\u5ea6":c.MaxClockSpeed+" MHz","\u72b6\u614b":DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(e in a.CIM_PhysicalMemory.responses)c=
1221 +a.CIM_PhysicalMemory.responses[e],b+="<h2>\u30e1\u30e2\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb "+(+e+1)+"</h2>",b+=FullTable({"\u9280\u884c\u30e9\u30d9\u30eb":c.BankLabel,"\u30e1\u30fc\u30ab\u30fc":c.Manufacturer,"\u30b7\u30ea\u30a2\u30eb\u30ca\u30f3\u30d0\u30fc":c.SerialNumber,"\u30b5\u30a4\u30ba":parseInt(c.Capacity/1048576)+" MB","\u30d5\u30a9\u30fc\u30e0\u30d5\u30a1\u30af\u30bf":DMTFMemFormFactor[c.FormFactor],"\u30bf\u30a4\u30d7":DMTFMemType[c.MemoryType],"\u30a2\u30bb\u30c3\u30c8\u30bf\u30b0":c.Tag,
1222 +"\u54c1\u756a":c.PartNumber},"");b+="<br>";for(e in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[e],d=a.CIM_PhysicalPackage.responses[+e+1],b+="<h2>\u8a18\u61b6\u5a92\u4f53 "+(parseInt(e)+1)+"</h2>",b+=FullTable({"\u578b\u756a":d.Model,"\u30b7\u30ea\u30a2\u30eb\u30ca\u30f3\u30d0\u30fc":""==d.SerialNumber?"Unknown":d.SerialNumber,"\u30b5\u30a4\u30ba":parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" MB"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(e in a.CIM_PhysicalPackage.responses)11==
1223 +a.CIM_PhysicalPackage.responses[e].PackageType&&(c=a.CIM_PhysicalPackage.responses[e]);null!=c&&(b+="<h2>Battery</h2>",e=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,"\u30e1\u30fc\u30ab\u30fc":c.Manufacturer,"Manufacture date":e,"\u30b7\u30ea\u30a2\u30eb\u30ca\u30f3\u30d0\u30fc":c.SerialNumber,"\u30bf\u30a4\u30d7":"\u305d\u306e\u4ed6\u306e;\u308f\u304b\u3089\u306a\u3044;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],
1224 "Design capacity":a.CIM_Battery.response.DesignCapacity+" mWatt-hours","Design voltage":a.CIM_Battery.response.DesignVoltage+" mVolts"},c.OtherIdentifyingInfo&&(a["Other Info"]=c.OtherIdentifyingInfo),b+=FullTable(a,""))}b+="<br>";QH(16,b);updateSystemStatus()}}function SaveHardwareLog(){!xxdialogMode&&HardwareInventory&&SaveJsonFile("IntelAmtHardware","hardware","Intel AMT\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u60c5\u5831",HardwareInventory)}var AmtSystemPowerSchemes=null;
1225 function PullPowerPolicy(){amtstack.Enum("AMT_SystemPowerScheme",powerPolicyResponse)}function powerPolicyResponse(b,c,a,d){AmtSystemPowerSchemes=a;updateSystemStatus()}
1226 function showPowerPolicyDlg(b){if(!xxdialogMode){for(var c="",a=0;a<AmtSystemPowerSchemes.length;a++)c+='<input type=radio name=powerpolicy value="'+AmtSystemPowerSchemes[a].InstanceID+'" '+(AmtSystemPowerSchemes[a].SchemeGUID==b?" checked":"")+">"+AmtSystemPowerSchemes[a].Description+"<br>";setDialogMode(11,"\u30a4\u30f3\u30c6\u30eb&reg;AMT\u96fb\u6e90\u30dd\u30ea\u30b7\u30fc",3,showPowerPolicyDlgOk,c)}}
1227 function showPowerPolicyDlgOk(){for(var b=null,c=0,a=document.getElementsByTagName("input");c<a.length;c++)"powerpolicy"==a[c].name&&a[c].checked&&(b=a[c].value);amtstack.AMT_SystemPowerScheme_SetPowerScheme(showPowerPolicyDlgOkDone,b)}function showPowerPolicyDlgOkDone(b,c,a,d){200==d&&PullSystemStatus()}var xxAccountAdminName,xxAccountRealmInfo,xxAccountEnabledInfo={},xxAccountFetch,showHiddenAccounts=!1;
1228 function PullUserInfo(){xxAccountFetch=1;delete xxAccountAdminName;xxAccountRealmInfo={};amtstack.AMT_AuthorizationService_GetAdminAclEntry(getAdminAclEntryResponse);amtstack.AMT_AuthorizationService_EnumerateUserAclEntries(1,enumerateUserAclEntriesResponse)}function getAdminAclEntryResponse(b,c,a,d){200==d&&(xxAccountRealmInfo[-1]={AccessPermission:999,DigestUsername:a.Body.Username,Realms:null},xxAccountAdminName=a.Body.Username,updateAccounts())}
1208 -function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var g in a.Body.Handles)b=a.Body.Handles[g],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1209 -function getUserAclEntryExResponse(b,c,a,d,g){xxAccountFetch--;200==d&&(a.Body.Handle=g,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[g]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,g){200==d&&(xxAccountEnabledInfo[g]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,g){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(g,getAclEnabledStateResponse,g))}
1210 -function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>\u3053\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306e\u30a4\u30f3\u30c6\u30eb&reg;AMT\u30e6\u30fc\u30b6\u30fc\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,g=!1,v=0;a.DigestUsername?(d=a.DigestUsername,g="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&
1211 -"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!g){var n="";if(999!=a.AccessPermission){2==v&&(n+="\u7121\u52b9\u3001");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a["\u30ec\u30eb\u30e0"][c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="\u76e3\u67fb\u5f79");n=0<=a.Realms.indexOf(3)?n+"\u7ba1\u7406\u8005":1==l?n+"1\u30ec\u30eb\u30e0":n+(l+" \u9818\u57df")}else n+="\u7ba1\u7406\u8005",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";
1212 -0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!g&&xxAccountAdminName&&(b+=" "+AddButton2("\u7de8\u96c6...","changeAccountButton(event,"+a.Handle+")"));b+='</div><div style=padding-top:3px;width:330px;float:left;overflow-x:hidden title="'+d+'"><b>'+d+"</b></div><div style=padding-top:3px>"+n+"</div></div>"}}c='<div style=float:right;margin-right:8px><a title="\u975e\u8868\u793a\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u5207\u308a\u66ff\u3048" style=color:gray;cursor:pointer onclick=toggleAccountButton()>'+
1213 -(showHiddenAccounts?"&#x25B2;":"&#x25BC;")+"</a></div><div>&nbsp;"+AddRefreshButton("xxAccountFetch=999;PullUserInfo()");xxAccountAdminName&&(c+=AddButton("\u65b0\u3057\u3044\u30a2\u30ab\u30a6\u30f3\u30c8","newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}
1229 +function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var e in a.Body.Handles)b=a.Body.Handles[e],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1230 +function getUserAclEntryExResponse(b,c,a,d,e){xxAccountFetch--;200==d&&(a.Body.Handle=e,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[e]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,e){200==d&&(xxAccountEnabledInfo[e]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,e){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(e,getAclEnabledStateResponse,e))}
1231 +function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>\u3053\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306e\u30a4\u30f3\u30c6\u30eb&reg;AMT\u30e6\u30fc\u30b6\u30fc\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,e=!1,v=0;a.DigestUsername?(d=a.DigestUsername,e="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&
1232 +"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!e){var n="";if(999!=a.AccessPermission){2==v&&(n+="\u7121\u52b9\u3001");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a["\u30ec\u30eb\u30e0"][c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="\u76e3\u67fb\u5f79");n=0<=a.Realms.indexOf(3)?n+"\u7ba1\u7406\u8005":1==l?n+"1\u30ec\u30eb\u30e0":n+(l+" \u9818\u57df")}else n+="\u7ba1\u7406\u8005",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";
1233 +0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!e&&xxAccountAdminName&&(b+=" "+AddButton2("\u7de8\u96c6...","changeAccountButton(event,"+a.Handle+")"));b+='</div><div style=padding-top:3px;width:330px;float:left;overflow-x:hidden title="'+d+'"><b>'+d+"</b></div><div style=padding-top:3px>"+n+"</div></div>"}}c='<div style=float:right;margin-right:8px><a title="\u975e\u8868\u793a\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u5207\u308a\u66ff\u3048" style=color:gray;cursor:pointer onclick=toggleAccountButton()>'+
1234 +(showHiddenAccounts?"&#x25B2;":"&#x25BC;")+"</a></div><div>&nbsp;"+AddRefreshButton("xxAccountFetch=999;PullUserInfo()");xxAccountAdminName&&(c+=AddButton("\u65b0\u3057\u3044\u30a2\u30ab\u30a6\u30f3\u30c8","newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(22,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1235 function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1236 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u7de8\u96c6",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1237 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"\u65b0\u3057\u3044\u30a2\u30ab\u30a6\u30f3\u30c8",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1217 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,g=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("\u30a2\u30ab\u30a6\u30f3\u30c8\u30a8\u30e9\u30fc","\u7121\u52b9\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||
1218 -3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,l,n,g,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,g,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}
1219 -function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">\u7ba1\u7406\u8005</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1220 -function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["\u30ed\u30fc\u30ab\u30eb\u306e\u307f","\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u307f","\u3059\u3079\u3066\uff08\u30ed\u30fc\u30ab\u30eb\u304a\u3088\u3073\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\uff09"];
1221 -function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,g=c.DigestUsername;g||(g=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("\u540d\u524d",g);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("\u72b6\u614b",1==xxAccountEnabledInfo[b].Enabled?"\u6709\u52b9":"\u7121\u52b9"));if(g==xxAccountAdminName)a+=addHtmlValue("\u8a31\u53ef","\u7ba1\u7406\u8005");else{var a=a+addHtmlValue("\u8a31\u53ef",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v=
1222 -"\u7ba1\u7406\u8005",0<=c.Realms.indexOf(20)&&(v+="\u3001\u76e3\u67fb\u5f79");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+="\u3001"),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="\u7121\u3057");a+=addHtmlValue("\u30ec\u30eb\u30e0","")+"<b>"+v+"</b>"}messagebox("\u30a2\u30ab\u30a6\u30f3\u30c8"+g,a+"</div>")}}
1223 -function wsmanQuery(){QH(24,"");var b=getSelectedOptions(Q(22)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(23,!1),c&&0<c.length&&amtstack.BatchEnum("\u30d6\u30e9\u30a6\u30b6",c,browserResponse,null,!0))}
1224 -function browserResponse(b,c,a,d){QE(23,!0);b="";for(var g in a)c=a[g],b+="<h2>"+g+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>\uff08\u7a7a\u306e\uff09":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>\u30a8\u30e9\u30fc\uff03"+c.status+"</div>"),b+="</div><br>";QH(24,b)}
1238 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("\u30a2\u30ab\u30a6\u30f3\u30c8\u30a8\u30e9\u30fc","\u7121\u52b9\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||
1239 +3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1240 +function updateRealms(b){QV(62,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">\u7ba1\u7406\u8005</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(63,c)}}
1241 +function updateAccountDialog(){var b=!0;if("none"!=Q(62).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c106",b)}var xxUserPermissions=["\u30ed\u30fc\u30ab\u30eb\u306e\u307f","\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u307f","\u3059\u3079\u3066\uff08\u30ed\u30fc\u30ab\u30eb\u304a\u3088\u3073\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\uff09"];
1242 +function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,e=c.DigestUsername;e||(e=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("\u540d\u524d",e);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("\u72b6\u614b",1==xxAccountEnabledInfo[b].Enabled?"\u6709\u52b9":"\u7121\u52b9"));if(e==xxAccountAdminName)a+=addHtmlValue("\u8a31\u53ef","\u7ba1\u7406\u8005");else{var a=a+addHtmlValue("\u8a31\u53ef",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v=
1243 +"\u7ba1\u7406\u8005",0<=c.Realms.indexOf(20)&&(v+="\u3001\u76e3\u67fb\u5f79");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+="\u3001"),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="\u7121\u3057");a+=addHtmlValue("\u30ec\u30eb\u30e0","")+"<b>"+v+"</b>"}messagebox("\u30a2\u30ab\u30a6\u30f3\u30c8"+e,a+"</div>")}}
1244 +function wsmanQuery(){QH(25,"");var b=getSelectedOptions(Q(23)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(24,!1),c&&0<c.length&&amtstack.BatchEnum("\u30d6\u30e9\u30a6\u30b6",c,browserResponse,null,!0))}
1245 +function browserResponse(b,c,a,d){QE(24,!0);b="";for(var e in a)c=a[e],b+="<h2>"+e+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>\uff08\u7a7a\u306e\uff09":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>\u30a8\u30e9\u30fc\uff03"+c.status+"</div>"),b+="</div><br>";QH(25,b)}
1246 function wsmanFilter(){var b=c0.value.toLowerCase(),c;for(c in AllWsman)QV("WSB-"+AllWsman[c],""==b||0<=AllWsman[c].toLowerCase().indexOf(b))}function connectTerminal(){terminal&&(0==terminal.State?(terminal.tlsv1only=amtstack.wsman.comm.tlsv1only,terminal.Start(currentMeshNode._id,16994,"*","*",0)):terminal.Stop())}
1226 -function onTerminalStateChange(b,c){c4.value=0==c?"\u63a5\u7d9a\u3059\u308b":"\u5207\u65ad\u3059\u308b";Q(29).textContent=StatusStrs[c];QE(34,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection of not supported.");
1227 -break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(31).value="100x30",terminal.m.Init(100,30)):(Q(31).value="80x25",terminal.m.Init(80,25))}
1228 -var terminalEmulations=["UTF8\u30bf\u30fc\u30df\u30ca\u30eb","\u62e1\u5f35ASCII","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(33).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(32).value=["\u30a4\u30f3\u30c6\u30eb\uff08F10 = ESC + [OM\uff09","\u4ee3\u66ff\uff08F10 = ESC + 0\uff09","VT100 +\uff08F10 = ESC + [OY\uff09"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1229 -function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(30).value="LF",terminal.m.lineFeed="\n"):(Q(30).value="CR + LF",terminal.m.lineFeed="\r\n")}
1247 +function onTerminalStateChange(b,c){c4.value=0==c?"\u63a5\u7d9a\u3059\u308b":"\u5207\u65ad\u3059\u308b";Q(30).textContent=StatusStrs[c];QE(35,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection is not supported.");
1248 +break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(32).value="100x30",terminal.m.Init(100,30)):(Q(32).value="80x25",terminal.m.Init(80,25))}
1249 +var terminalEmulations=["UTF8\u30bf\u30fc\u30df\u30ca\u30eb","\u62e1\u5f35ASCII","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(34).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(33).value=["\u30a4\u30f3\u30c6\u30eb\uff08F10 = ESC + [OM\uff09","\u4ee3\u66ff\uff08F10 = ESC + 0\uff09","VT100 +\uff08F10 = ESC + [OY\uff09"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1250 +function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(31).value="LF",terminal.m.lineFeed="\n"):(Q(31).value="CR + LF",terminal.m.lineFeed="\r\n")}
1251 function terminalCaptureToggle(b){if(!xxdialogMode)if(void 0==terminal.m.capture)terminal.m.capture="",c3.value="\u30ad\u30e3\u30d7\u30c1\u30e3\u3092\u505c\u6b62";else{if(0<terminal.m.capture.length){b="TerminalCapture";var c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);saveAs(data2blob(terminal.m.capture),
1252 b+".txt")}delete terminal.m.capture;c3.value="\u30ad\u30e3\u30d7\u30c1\u30e3\u3092\u958b\u59cb"}}function terminal_FileSelectHandler(b){haltEvent(b);if(3==terminal.State&&null!=b.dataTransfer&&1==b.dataTransfer.files.length){var c=new FileReader;c.onload=terminal_onSetupBinRead;c.readAsText(b.dataTransfer.files[0])}}function terminal_onSetupBinRead(b){d3pastetextarea.value=b.target.result;setDialogMode(3,"\u30da\u30fc\u30b9\u30c8",3,termPaste)}
1253 var desktopScreenInfo=null,desktopPollTimer=null,webRtcDesktop=null;
1254 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1255 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1235 -function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1236 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1256 +function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&(null==amtsysstate||null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&null!=amtsysstate.IPS_OptInService.response&&0!=amtsysstate.IPS_OptInService.response.OptInRequired)?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&
1257 +null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1258 0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1259 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1260 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1261 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
1262 "\r\n"},webRtcDesktop.webrtc.oniceconnectionstatechange=function(){null==webRtcDesktop||null==webRtcDesktop.webrtc||"disconnected"!=webRtcDesktop.webrtc.iceConnectionState&&"failed"!=webRtcDesktop.webrtc.iceConnectionState||webRtcDesktopReset()},webRtcDesktop.webrtc.createOffer(function(a){webRtcDesktop.webrtcoffer=a;webRtcDesktop.webrtc.setLocalDescription(a,function(){},webRtcDesktopReset)},webRtcDesktopReset,{mandatory:{OfferToReceiveAudio:!1,OfferToReceiveVideo:!1}})):"answer"==a.action&&null!=
1242 -webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=
1243 -setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(42).innerHTML="")}
1263 +webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.m.ReverseMouseWheel=desktopsettings.reverseMouseWheel,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),
1264 +PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(43).innerHTML="")}
1265 function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(desktopScreenInfo=a.IPS_ScreenSettingData.responses.Body,desktopScreenInfo.KVMRSD=a.IPS_KVMRedirectionSettingData.responses.Body,UpdateDesktopDisplayInfo())}
1245 -function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1266 +function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(43).innerHTML=b+"&nbsp;":Q(43).innerHTML=""}
1267 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1247 -function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"\u63a5\u7d9a\u3059\u308b":"\u5207\u65ad\u3059\u308b";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7",
1248 -"The device indicated that this type of connection of not supported."):5E4==b.disconnectCode?messagebox("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7",
1249 -"KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1250 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b="\u3001Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}
1268 +function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"\u63a5\u7d9a\u3059\u308b":"\u5207\u65ad\u3059\u308b";var d=3==c&&!urlvars.kvmviewonly;QE(44,d);QE("deskkeys",d);QE("DeskWD",d);QE(45,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7",
1269 +"The device indicated that this type of connection is not supported."):5E4==b.disconnectCode?messagebox("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?a=null!=b.connectTime&&b.connectTime+5E3<Date.now():50002==b.disconnectCode&&messagebox("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
1270 +break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1271 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b="\u3001Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(41).textContent=StatusStrs[desktop.State]+b}
1272 function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u8a2d\u5b9a",3,showDesktopSettingsChanged))}
1252 -function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1253 -1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1254 -function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1255 -15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1273 +function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.reverseMouseWheel=d7kvmrmw.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();
1274 +desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1275 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;d7kvmrmw.checked=desktopsettings.reverseMouseWheel;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",
1276 +12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1277 c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1257 -QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1258 -function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1259 -"8px"),center()))}
1260 -function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"\u30ea\u30e2\u30fc\u30c8\u30ad\u30fc\u30dc\u30fc\u30c9\u5165\u529b",3,showDeskTypeEx,'<div>\u30c6\u30ad\u30b9\u30c8\u3092\u5165\u529b\u3057\u3066[OK]\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001US\u82f1\u8a9e\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u3066\u30ea\u30e2\u30fc\u30c8\u3067\u5165\u529b\u3057\u307e\u3059\u3002\u7d9a\u884c\u3059\u308b\u524d\u306b\u3001\u30ea\u30e2\u30fc\u30c8\u30ab\u30fc\u30bd\u30eb\u3092\u6b63\u3057\u3044\u4f4d\u7f6e\u306b\u7f6e\u3044\u3066\u304f\u3060\u3055\u3044\u3002<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1261 -var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
1262 -function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(48).checked||desktop.m.sendcad()}
1278 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(44,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1279 +function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1!=urlvars.kvmonly&&disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(36,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding="8px"),center()))}
1280 +function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(45).blur(),setDialogMode(11,"\u30ea\u30e2\u30fc\u30c8\u30ad\u30fc\u30dc\u30fc\u30c9\u5165\u529b",3,showDeskTypeEx,'<div>\u30c6\u30ad\u30b9\u30c8\u3092\u5165\u529b\u3057\u3066[OK]\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001US\u82f1\u8a9e\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u3066\u30ea\u30e2\u30fc\u30c8\u3067\u5165\u529b\u3057\u307e\u3059\u3002\u7d9a\u884c\u3059\u308b\u524d\u306b\u3001\u30ea\u30e2\u30fc\u30c8\u30ab\u30fc\u30bd\u30eb\u3092\u6b63\u3057\u3044\u4f4d\u7f6e\u306b\u7f6e\u3044\u3066\u304f\u3060\u3055\u3044\u3002<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),
1281 +Q("d2typeText").focus())}var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
1282 +function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(49).checked||desktop.m.sendcad()}
1283 var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511,0]],2:[[65511,1],[65362,1],[65362,0],[65511,0]],3:[[65511,1],[108,1],[108,0],[65511,0]],4:[[65511,1],[109,1],[109,0],[65511,0]],5:[[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]],6:[[65470,1],[65470,0]],7:[[65471,1],[65471,0]],8:[[65472,1],[65472,0]],9:[[65473,1],[65473,0]],10:[[65474,1],[65474,0]],11:[[65475,1],[65475,0]],12:[[65476,1],[65476,0]],13:[[65477,1],[65477,0]],14:[[65478,1],[65478,0]],15:[[65479,
1264 -1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]]};
1265 -function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1284 +1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]],25:[[65293,1],[65293,0]]};
1285 +function deskSendKeys(){if(!Q(49).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1286 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1267 -function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1268 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1287 +function dmousedown(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1288 +function dmousemove(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1289 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1290 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1291 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1272 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\u30eb\u30fc\u30c8</a>",g=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in g)""!=g[v]&&p24filetreelocation.push(g[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var g=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+
1273 -'">'+EscapeHtml(p.substring(0,70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),e="";null!=l.d&&(e=new Date(l.d),e=e.getMonth()+1+"/"+e.getDate()+"/"+e.getFullYear()+" "+e.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1274 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(g+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+e+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1292 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\u30eb\u30fc\u30c8</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,r;r=70<p.length?'<span title="'+EscapeHtml(p)+
1293 +'">'+EscapeHtml(p.substring(0,70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1294 +encodeURIComponent(l.nx)+'")>'+r+"</a></span></div>":(w=r,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+r+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1295 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1296 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1297 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1281,8 +1301,8 @@ function p24setActions(){if(null==p24filetree)QE("p24DeleteFileButton",!1),QE("p
1301 function p24createfolder(){setDialogMode(11,"\u65b0\u3057\u3044\u30d5\u30a9\u30eb\u30c0",3,p24createfolderEx,"<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% />");focusTextBox("p24renameinput");p24fileNameCheck()}function p24createfolderEx(){p24files.sendCtrlMsg(JSON.stringify({action:"mkdir",reqid:1,path:p24filetreelocation.join("/")+"/"+Q("p24renameinput").value}));p24folderup(999)}
1302 function p24deletefile(){var b=p24getFileSelCount();setDialogMode(11,"\u524a\u9664\u3059\u308b",3,p24deletefileEx,1<b?"Delete "+b+" selected items?":"Delete selected item?")}function p24deletefileEx(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);p24files.sendCtrlMsg(JSON.stringify({action:"rm",reqid:1,path:p24filetreelocation.join("/"),delfiles:b}));p24folderup(999)}
1303 function p24renamefile(){for(var b,c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&(b=p24filetree.dir[c[a].value].n);setDialogMode(11,"\u30ea\u30cd\u30fc\u30e0",3,p24renamefileEx,'<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% value="'+b+'" />',{action:"rename",path:p24filetreelocation.join("/"),oldname:b});focusTextBox("p24renameinput");p24fileNameCheck()}
1284 -function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c54",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1285 -function p24uploadFile(){setDialogMode(11,"\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c54",""!=Q(b).value)}
1304 +function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c106",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1305 +function p24uploadFile(){setDialogMode(11,"\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c106",""!=Q(b).value)}
1306 var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;function p24copyFile(b){var c=document.getElementsByName("fd");p24clipboard=[];p24clipboardCut=b;p24clipboardFolder=p24targetpath;for(b=0;b<c.length;b++)c[b].checked&&"3"==c[b].attributes.file.value&&p24clipboard.push(p24filetree.dir[c[b].value].n);p24updateClipview()}
1307 function p24pasteFile(){var b="";null!=p24clipboard&&0<p24clipboard.length&&(b="Confim "+(0==p24clipboardCut?"copy":"move")+" of "+p24clipboard.length+" entrie"+(1<p24clipboard.length?"s":"")+" to this location?");setDialogMode(11,"\u30da\u30fc\u30b9\u30c8",3,p24pasteFileEx,b)}
1308 function p24pasteFileEx(){p24files.sendCtrlMsg(JSON.stringify({action:0==p24clipboardCut?"copy":"move",reqid:1,scpath:p24clipboardFolder,dspath:p24targetpath,names:p24clipboard}));p24folderup(999);1==p24clipboardCut&&(p24clipboardFolder=p24clipboard=null,p24clipboardCut=0,p24updateClipview())}
@@ -1307,38 +1327,38 @@ function iderStart2(){if(1!=Q("floppyImageInput").files.length&&1!=Q("cdromImage
1327 Q("iderStartType").value)}}function iderStart3(b,c,a){iderStop();ider=CreateAmtRedirect(CreateAmtRemoteIder());ider.onStateChanged=onIderStateChange;ider.m.floppy=b;ider.m.cdrom=c;ider.m.iderStart=a;ider.m.sectorStats=iderSectorStats;ider.tlsv1only=amtstack.wsman.comm.tlsv1only;ider.Start(currentMeshNode._id,16994,"*","*",0);QV("IDERDiskMapButton",!0)}
1328 function iderStop(){ider&&(ider.m.Stop(),ider.onStateChanged=null,ider.m.onDialogPrompt=null,delete ider);iderTimer&&(clearInterval(iderTimer),delete iderTimer);iderToggleDiskMap(!1)}function onIderStateChange(b,c){QE("c2",3!=c);QE("c8",3!=c);QE("c1",3!=c);QE("c7",3!=c);QV(9,3==c);center();3==c?(urlvars.norefresh||(iderTimer=setInterval(onIderTimer,500)),onIderTimer()):iderTimer&&(clearInterval(iderTimer),delete iderTimer)}
1329 function onIderTimer(){ider.m.Update&&ider.m.Update();-1==ider.m.bytesFromAmt?iderStop():QH(10,"<b>"+(ider.m.server?"\u30b5\u30fc\u30d0":"")+"IDE-R\u30bb\u30c3\u30b7\u30e7\u30f3</ b>\u3001\u63a5\u7d9a\u6e08\u307f\u3001"+ider.m.bytesFromAmt+" \u306b\u3001"+ider.m.bytesToAmt+" \u30a2\u30a6\u30c8\u3002")}var heatMapWidth=600,heatMapDividor={};
1310 -function iderSectorStats(b,c,a,d,g){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </ b>\u3001\u30d6\u30ed\u30c3\u30af\u306f{0}\u30d0\u30a4\u30c8\u3067\u3059\u3002",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b>\u30d5\u30ed\u30c3\u30d4\u30fc</ b>\u3001\u30d6\u30ed\u30c3\u30af\u306f{0}\u30d0\u30a4\u30c8\u3067\u3059\u3002",
1311 -512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;g/=c;if(0==b)v.height=6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+g;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1330 +function iderSectorStats(b,c,a,d,e){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </ b>\u3001\u30d6\u30ed\u30c3\u30af\u306f{0}\u30d0\u30a4\u30c8\u3067\u3059\u3002",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b>\u30d5\u30ed\u30c3\u30d4\u30fc</ b>\u3001\u30d6\u30ed\u30c3\u30af\u306f{0}\u30d0\u30a4\u30c8\u3067\u3059\u3002",
1331 +512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;e/=c;if(0==b)v.height=6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+e;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1332 function iderToggleDiskMap(b){var c="none"!=QS("iderHeatmap").display;null==b&&(b=!c);xxdialogMode&&(b=!1);QS("iderHeatmap").display=b?"":"none"}function onIderDialogPrompt(b,c,a){iderCodeBlock&&(document.body.removeChild(iderCodeBlock),delete iderCodeBlock);c.js&&(b=document.createElement("script"),b.text=c.js,iderCodeBlock=document.body.appendChild(b));setDialogMode(11,"\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u30ea\u30c0\u30a4\u30ec\u30af\u30c8",a?a:3,onIderDialogPromptOk,c.html)}
1333 function onIderDialogPromptOk(b){1==b?window.iderServerCall?ider.m.dialogPrompt(window.iderServerCall()):ider.m.dialogPrompt():iderStop()}function iderServerStart(){xxdialogMode||(iderStop(),ider=CreateAmtRemoteServerIder(),null!=ider&&(ider.onStateChanged=onIderStateChange,ider.m.sectorStats=iderSectorStats,ider.m.onDialogPrompt=onIderDialogPrompt,ider.tlsv1only=amtstack.wsman.comm.tlsv1only,ider.Start(currentMeshNode._id,16994,"*","*",0)))}
1334 var xxRemoteAccess=null,xxEnvironementDetection=null,xxCiraServers=null,xxUserInitiatedCira=null,xxUserInitiatedEnabledState={32768:"\u7121\u52b9",32769:"BIOS\u5bfe\u5fdc",32770:"OS\u6709\u52b9",32771:"BIOS\u304a\u3088\u3073OS\u5bfe\u5fdc"},xxRemoteAccessCredentiaLinks=null,xxMPSUserPass=null,xxPolicies=null;
1335 function PullRemoteAccess(){var b="*AMT_EnvironmentDetectionSettingData AMT_ManagementPresenceRemoteSAP AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule *AMT_UserInitiatedConnectionService AMT_MPSUsernamePassword".split(" ");11<amtversion&&b.push("*IPS_HTTPProxyService","IPS_HTTPProxyAccessPoint");amtstack.BatchEnum(null,b,processRemote1)}
1316 -function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var g in a)200!=a[g].status&&(d=a[g].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1317 -MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(g in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[g],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1336 +function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var e in a)200!=a[e].status&&(d=a[e].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1337 +MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(e in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[e],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1338 "@Name","Name").Value)),b.MpsType=c.MpsType,c=getItem(c.PolicySet.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyRuleName").Value.split(" ")[0],xxPolicies[c].push(b);updateRemoteAccess()}}
1339 function updateRemoteAccess(){if(null!=xxEnvironementDetection){var b,c="\u7121\u52b9",a=xxRemoteAccess.IPS_HTTPProxyService&&xxRemoteAccess.IPS_HTTPProxyAccessPoint;xxEnvironementDetection.DetectionStrings&&0<xxEnvironementDetection.DetectionStrings.length&&(c="\u6709\u52b9\u3001"+xxEnvironementDetection.DetectionStrings.length+" "+(1<xxEnvironementDetection.DetectionStrings.length?"domains":"domain"));b=""+TableStart();b+=TableEntry("\u74b0\u5883\u691c\u51fa",addLink(c,"editEnvironmentDetection()"));
1340 b+=TableEntry("\u30e6\u30fc\u30b6\u30fc\u958b\u59cb\u30aa\u30d7\u30b7\u30e7\u30f3",addLinkConditional(xxUserInitiatedEnabledState[xxUserInitiatedCira.EnabledState],"editUserInitiatedCira()",xxAccountAdminName));c="<i>\u7121\u3057</i>";if(0<xxPolicies.User.length){var c="",d;for(d in xxPolicies.User)0<c.length&&(c+=", "),c+=xxPolicies.User[d].AccessInfo,1==xxPolicies.User[d].MpsType&&(c+=" (CILA)")}b+=TableEntry("\u30e6\u30fc\u30b6\u30fc\u304c\u958b\u59cb\u3057\u305f\u63a5\u7d9a",addLinkConditional(c,
1341 'editMpsPolicy("User")',xxAccountAdminName));c="<i>\u7121\u3057</i>";if(0<xxPolicies.Alert.length)for(d in c="",xxPolicies.Alert)0<c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("\u30a2\u30e9\u30fc\u30c8\u306b\u3088\u3063\u3066\u958b\u59cb\u3055\u308c\u305f\u63a5\u7d9a",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>\u7121\u3057</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&
1322 -(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var g=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName","\u5b9a\u671f\u7684");if(g){var v=atob(g.ExtendedData);0==ReadInt(v,0)&&(c+=format("\u3001{0}\u79d2\u3054\u3068",ReadInt(v,4)));1==ReadInt(v,0)&&(g=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+g+":"+v+" daily")}b+=TableEntry("\u5b9a\u671f\u7684\u306a\u63a5\u7d9a",addLinkConditional(c,'editMpsPolicy("Periodic")',
1342 +(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var e=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName","\u5b9a\u671f\u7684");if(e){var v=atob(e.ExtendedData);0==ReadInt(v,0)&&(c+=format("\u3001{0}\u79d2\u3054\u3068",ReadInt(v,4)));1==ReadInt(v,0)&&(e=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+e+":"+v+" daily")}b+=TableEntry("\u5b9a\u671f\u7684\u306a\u63a5\u7d9a",addLinkConditional(c,'editMpsPolicy("Periodic")',
1343 xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\u30a4\u30f3\u30c6\u30eb&reg;AMT\u30ea\u30e2\u30fc\u30c8\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";if(0==xxCiraServers.length)b+="<div style=padding-left:15px><br><i>\u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u30fc\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002</i></div><br>";else for(d in xxCiraServers)c=":"+xxCiraServers[d].Port,xxCiraServers[d].CN&&
1344 (c+=", "+xxCiraServers[d].CN),b+="<div class=itemBar onclick=showServerDetails("+d+")><div style=padding-top:3px><b>"+xxCiraServers[d].AccessInfo+"</b>"+EscapeHtml(c)+"</div></div>";if(a)if(b+="<br>\u7ba1\u7406\u63a5\u7d9a\u306b\u4f7f\u7528\u3055\u308c\u308bHTTP\u30d7\u30ed\u30ad\u30b7\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>",c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses,0==c.length)b+="<div style=padding-left:15px><br><i>\u30d7\u30ed\u30ad\u30b7\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002</i></div><br>";
1325 -else for(d in c)b+="<div class=itemBar onclick=showProxyDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(c[d].AccessInfo)+":"+c[d].Port+"</b> / "+EscapeHtml(c[d].NetworkDnsSuffix)+"</div></div>";d="";xxAccountAdminName&&(d=AddButton("\u30b5\u30fc\u30d0\u30fc\u3092\u8ffd\u52a0...","AddRemoteAccessServer()"),a&&(d+=AddButton("\u30d7\u30ed\u30ad\u30b7\u3092\u8ffd\u52a0...","AddRemoteAccessProxy()")));b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+d);QH(52,
1345 +else for(d in c)b+="<div class=itemBar onclick=showProxyDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(c[d].AccessInfo)+":"+c[d].Port+"</b> / "+EscapeHtml(c[d].NetworkDnsSuffix)+"</div></div>";d="";xxAccountAdminName&&(d=AddButton("\u30b5\u30fc\u30d0\u30fc\u3092\u8ffd\u52a0...","AddRemoteAccessServer()"),a&&(d+=AddButton("\u30d7\u30ed\u30ad\u30b7\u3092\u8ffd\u52a0...","AddRemoteAccessProxy()")));b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+d);QH(53,
1346 b)}}var xxEditMpsPolicyType;
1327 -function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="\u30e6\u30fc\u30b6\u30fc\u958b\u59cb");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>\uff08\u7121\u3057\uff09",g;for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[g].Name?
1328 -" selected":"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>\u30d7\u30e9\u30a4\u30de\u30ea\u30b5\u30fc\u30d0\u30fc</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA-\u5916\u90e8<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA-\u5185\u90e8</select><div>\u30d7\u30e9\u30a4\u30de\u30eaMPS\u30bf\u30a4\u30d7</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";
1329 -c+="<option value=-1>\uff08\u7121\u3057\uff09";for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[g].Name?" selected":"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>\u30bb\u30ab\u30f3\u30c0\u30ea\u30b5\u30fc\u30d0\u30fc</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA-\u5916\u90e8<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?
1330 -" selected":"")+">CILA-\u5185\u90e8</select><div>\u30bb\u30ab\u30f3\u30c0\u30eaMPS\u30bf\u30a4\u30d7</div></div>")}g=0;d&&(g=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+g+">";c+="<div>\u30c8\u30f3\u30cd\u30eb\u30e9\u30a4\u30d5\u30bf\u30a4\u30e0\uff08\u79d2\uff09</div></div>";"Periodic"==b&&(a=0,g=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),g=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),g+=":"+d)),c+=
1331 -"<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">\u5b9a\u671f\u7684\u3001\u6642\u9593\u9593\u9694<option value=1"+(1==a?" selected":"")+">\u6642\u523b\u30011\u65e51\u56de",c+="</select><div>\u30c8\u30ea\u30ac\u30fc\u30bf\u30a4\u30d7</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+g+"><div id=ttypelabel></div></div>");setDialogMode(11,
1347 +function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="\u30e6\u30fc\u30b6\u30fc\u958b\u59cb");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>\uff08\u7121\u3057\uff09",e;for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[e].Name?
1348 +" selected":"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>\u30d7\u30e9\u30a4\u30de\u30ea\u30b5\u30fc\u30d0\u30fc</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA-\u5916\u90e8<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA-\u5185\u90e8</select><div>\u30d7\u30e9\u30a4\u30de\u30eaMPS\u30bf\u30a4\u30d7</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";
1349 +c+="<option value=-1>\uff08\u7121\u3057\uff09";for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[e].Name?" selected":"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>\u30bb\u30ab\u30f3\u30c0\u30ea\u30b5\u30fc\u30d0\u30fc</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA-\u5916\u90e8<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?
1350 +" selected":"")+">CILA-\u5185\u90e8</select><div>\u30bb\u30ab\u30f3\u30c0\u30eaMPS\u30bf\u30a4\u30d7</div></div>")}e=0;d&&(e=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+e+">";c+="<div>\u30c8\u30f3\u30cd\u30eb\u30e9\u30a4\u30d5\u30bf\u30a4\u30e0\uff08\u79d2\uff09</div></div>";"Periodic"==b&&(a=0,e=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),e=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),e+=":"+d)),c+=
1351 +"<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">\u5b9a\u671f\u7684\u3001\u6642\u9593\u9593\u9694<option value=1"+(1==a?" selected":"")+">\u6642\u523b\u30011\u65e51\u56de",c+="</select><div>\u30c8\u30ea\u30ac\u30fc\u30bf\u30a4\u30d7</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+e+"><div id=ttypelabel></div></div>");setDialogMode(11,
1352 format("{0}\u63a5\u7d9a",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1333 -function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c54",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1353 +function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c106",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1354 -1!=Q("d2server1").value),QH("ttypelabel",0==Q("d2ttype").value?"\u30c8\u30ea\u30ac\u30fc\u9593\u9694\uff08\u79d2\uff09":"\u6642\u523b\uff08HH\uff1aMM\uff09"),QE("d2ttype",-1!=Q("d2server1").value));QE("d2lifetime",-1!=Q("d2server1").value);b&&(QE("d2server1cira",-1<Q("d2server1").value),1<xxCiraServers.length&&QE("d2server2cira",-1<Q("d2server1").value&&-1<Q("d2server2").value))}
1355 function editMpsPolicyOk(){var b=xxEditMpsPolicyType;"User"==b&&(b="User Initiated");getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",b)?amtstack.Delete("AMT_RemoteAccessPolicyRule",{PolicyRuleName:b},editMpsPolicyOk2):editMpsPolicyOk2()}
1336 -function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var g,v;0<=Q("d2server1").value&&(g='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1356 +function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var e,v;0<=Q("d2server1").value&&(e='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1357 xxCiraServers[Q("d2server1").value].Name+"</Selector></SelectorSet></ReferenceParameters>");0<=Q("d2server1").value&&1<xxCiraServers.length&&0<=Q("d2server2").value&&(v='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1338 -xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?g&&(0==Q("d2server1cira").value?d.push(g):n.push(g),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):g&&(d.push(g),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1358 +xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?e&&(0==Q("d2server1cira").value?d.push(e):n.push(e),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):e&&(d.push(e),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1359 function editEnvironmentDetection(b){1!=b&&(editEnvironmentDetectionTmp=xxEnvironementDetection.DetectionStrings?Clone(xxEnvironementDetection.DetectionStrings):[]);var c="";xxAccountAdminName&&(c+="\u6700\u59275\u3064\u306e\u30a4\u30f3\u30c8\u30e9\u30cd\u30c3\u30c8\u30c9\u30e1\u30a4\u30f3\u30b5\u30d5\u30a3\u30c3\u30af\u30b9\u3092\u5165\u529b\u3057\u307e\u3059\u3002\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u304c\u3053\u308c\u3089\u306e\u30c9\u30e1\u30a4\u30f3\u306e\u5916\u306b\u3042\u308b\u5834\u5408\u3001\u30a4\u30f3\u30c6\u30eb&reg;AMT\u30ed\u30fc\u30ab\u30eb\u30dd\u30fc\u30c8\u306f\u9589\u3058\u3089\u308c\u3001\u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u30fc\u63a5\u7d9a\u304c\u30a2\u30af\u30c6\u30a3\u30d6\u306b\u306a\u308a\u307e\u3059\u3002<br><br>");
1360 0==editEnvironmentDetectionTmp.length&&(c+="<i>\u30a4\u30f3\u30c8\u30e9\u30cd\u30c3\u30c8\u30c9\u30e1\u30a4\u30f3\u306a\u3057\u3001\u74b0\u5883\u691c\u51fa\u304c\u7121\u52b9\u3002</i><br>");for(var a in editEnvironmentDetectionTmp)c+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("\u524a\u9664\u3059\u308b","editEnvironmentDetectionRemove("+a+")")+'</div><div style=padding-top:3px;max-width:260px;overflow:hidden title="'+editEnvironmentDetectionTmp[a]+'"><b>'+editEnvironmentDetectionTmp[a]+
1341 -"</b></div></div>";xxAccountAdminName&&5>editEnvironmentDetectionTmp.length&&(c+="<br><input id=edInput placeholder=intranet.org style=width:276px onkeyup=edInputChg() maxlength=63><input type=button id=edAdd value=Add style=width:80px;margin-left:5px onclick=editEnvironmentDetectionAdd()>");1==b?QH(63,c):setDialogMode(11,"\u74b0\u5883\u691c\u51fa",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}
1361 +"</b></div></div>";xxAccountAdminName&&5>editEnvironmentDetectionTmp.length&&(c+="<br><input id=edInput placeholder=intranet.org style=width:276px onkeyup=edInputChg() maxlength=63><input type=button id=edAdd value=Add style=width:80px;margin-left:5px onclick=editEnvironmentDetectionAdd()>");1==b?QH(64,c):setDialogMode(11,"\u74b0\u5883\u691c\u51fa",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}
1362 function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1363 function editEnvironmentDetectionDlg2(b,c,a,d){200!=d?messagebox("\u74b0\u5883\u691c\u51fa",format("\u30b5\u30fc\u30d0\u30fc\u306e\u8ffd\u52a0\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3001\u30b9\u30c6\u30fc\u30bf\u30b9{0}",d)):a.Body.ReturnValue&&0!=a.Body.ReturnValue?messagebox("\u74b0\u5883\u691c\u51fa",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}function edInputChg(){5>editEnvironmentDetectionTmp.length&&QE("edAdd",0<Q("edInput").value.length)}
1364 function editEnvironmentDetectionAdd(){editEnvironmentDetectionTmp.push(Q("edInput").value);editEnvironmentDetection(1)}function editEnvironmentDetectionRemove(b){editEnvironmentDetectionTmp.splice(b,1);editEnvironmentDetection(1)}
@@ -1353,7 +1373,7 @@ function showProxyDetails(b){var c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.respo
1373 function showProxyDetailsOk(b,c){var a=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses[c];2==b&&amtstack.Delete("IPS_HTTPProxyAccessPoint",{Name:a.Name},showProxyDetailsOk2)}function showProxyDetailsOk2(b,c,a,d){408==d?messagebox("HTTP\u30d7\u30ed\u30ad\u30b7\u306e\u524a\u9664","HTTP\u30d7\u30ed\u30ad\u30b7\u3092\u524a\u9664\u3067\u304d\u307e\u305b\u3093\u3002\u30a2\u30af\u30bb\u30b9\u304c\u62d2\u5426\u3055\u308c\u307e\u3057\u305f\u3002"):PullRemoteAccess()}
1374 function AddRemoteAccessProxy(){var b;b='<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessProxyUpdate()><option value=2>\u30db\u30b9\u30c8\u540dFQDN<option value=3>IPv4\u30a2\u30c9\u30ec\u30b9<option value=4>IPv6\u30a2\u30c9\u30ec\u30b9</select><div>\u63a5\u7d9a\u30bf\u30a4\u30d7</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>\u30dd\u30fc\u30c8</div></div>';
1375 b+="<div style=height:26px><input id=d2domain style=float:right;width:200px maxlength=191 onkeyup=AddRemoteAccessProxyUpdate()><div>DNS\u30b5\u30d5\u30a3\u30c3\u30af\u30b9</div></div>";setDialogMode(11,"HTTP\u30d7\u30ed\u30ad\u30b7\u3092\u8ffd\u52a0",3,AddRemoteAccessProxyOk,b);AddRemoteAccessProxyUpdate()}
1356 -function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c54",b);QH("d2typespan",["","","FQDN /\u30db\u30b9\u30c8\u540d","IPv4\u30a2\u30c9\u30ec\u30b9","IPv6\u30a2\u30c9\u30ec\u30b9"][Q("d2type").value])}
1376 +function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c106",b);QH("d2typespan",["","","FQDN /\u30db\u30b9\u30c8\u540d","IPv4\u30a2\u30c9\u30ec\u30b9","IPv6\u30a2\u30c9\u30ec\u30b9"][Q("d2type").value])}
1377 function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
1378 function AddRemoteAccessProxyOk2(b,c,a,d){200!=d?messagebox("\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u30fc\u3092\u8ffd\u52a0","\u30d7\u30ed\u30ad\u30b7\u3001\u30b9\u30c6\u30fc\u30bf\u30b9\u306e\u8ffd\u52a0\u306b\u5931\u6557\u3057\u307e\u3057\u305f"+d):0!=a.Body.ReturnValue?messagebox("\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u30fc\u3092\u8ffd\u52a0",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1379 function AddRemoteAccessServer(){var b=[],c;for(c in xxCertificates)xxCertificates[c].XPrivateKey&&b.push(xxCertificates[c]);var a;a="<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()><option value=201>\u30db\u30b9\u30c8\u540dFQDN<option value=3>IPv4\u30a2\u30c9\u30ec\u30b9</select><div>\u63a5\u7d9a\u30bf\u30a4\u30d7</div></div><div style=height:26px><input id=d2name style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div id=d2lname></div></div>";
@@ -1364,94 +1384,96 @@ function AddRemoteAccessServerOk(){var b,c,a,d;1==Q("d2auth").value?b='<Address
1384 Q("d2cert").value+"</Selector></SelectorSet></ReferenceParameters>":(c=Q("d2user").value,a=Q("d2pass").value);0<Q("d2cn").value.length&&(d=Q("d2cn").value);amtstack.AMT_RemoteAccessService_AddMpServer(Q("d2name").value,Q("d2type").value,Q("d2port").value,Q("d2auth").value,b,c,a,d,AddRemoteAccessServerOk2)}
1385 function AddRemoteAccessServerOk2(b,c,a,d){200!=d?messagebox("\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30b5\u30fc\u30d0\u30fc\u3092\u8ffd\u52a0",format("\u30b5\u30fc\u30d0\u30fc\u306e\u8ffd\u52a0\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3001\u30b9\u30c6\u30fc\u30bf\u30b9{0}",d)):0!=a.Body.ReturnValue?messagebox("\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30b5\u30fc\u30d0\u30fc\u3092\u8ffd\u52a0",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1386 function AddRemoteAccessServerUpdate(){var b=0!=Q("d2name").value.length;3==Q("d2type").value&&1==b&&(b=0!=Q("d2cn").value.length);2==Q("d2auth").value&&1==b&&(b=0!=Q("d2user").value.length&&passwordcheck(Q("d2pass").value));if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;if(-1!=Q("d2name").value.indexOf(":")||3==Q("d2type").value&&-1!=Q("d2cn").value.indexOf(":"))b=!1;QH("d2lname",201==Q("d2type").value?"\u30db\u30b9\u30c8\u540d":"IPv4\u30a2\u30c9\u30ec\u30b9");QV("d2utype",
1367 -2==Q("d2auth").value);QV("d2ucn",3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c54",b)}
1387 +2==Q("d2auth").value);QV("d2ucn",3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c106",b)}
1388 function showEditNameDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_GeneralSettings.response.HostName,a=amtsysstate.AMT_GeneralSettings.response.DomainName;null!=a&&0<a.length&&(c+="."+a);c='<br><div style=height:26px><input id=d11name value="'+c+'" style=float:right;width:200px><div>\u540d\u524d\u3068\u30c9\u30e1\u30a4\u30f3</div></div>';1==b&&(b=1==amtsysstate.AMT_GeneralSettings.response.SharedFQDN,c+="<div style=height:26px><select id=d11fqdn style=float:right;width:200px><option value=true "+
1389 (b?"selected":"")+'>\u5171\u6709\u3001OS\u3068\u540c\u3058<option value="false" '+(b?"":"selected")+">OS\u3068\u306f\u7570\u306a\u308b\u5c02\u7528</select><div>\u540d\u524d\u306e\u5171\u6709</div></div>");setDialogMode(11,"\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30cd\u30fc\u30e0",3,editNameDlgOk,c)}}
1390 function editNameDlgOk(){var b=Q("d11name").value,c=b.indexOf("."),a="";0<=c&&(a=b.substring(c+1),b=b.substring(0,c));c=Clone(amtsysstate.AMT_GeneralSettings.response);c.HostName=b;c.DomainName=a;Q("d11fqdn")&&(c.SharedFQDN=d11fqdn.value);amtstack.Put("AMT_GeneralSettings",c,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}function computerNameGet(b,c,a,d){200==d&&(amtsysstate.AMT_GeneralSettings.response=a.Body,updateSystemStatus())}
1371 -function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c36.value=c;c37.value=b.DDNSPeriodicUpdateInterval;c38.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"\u52d5\u7684DNS\u30af\u30e9\u30a4\u30a2\u30f3\u30c8",3,showEditDnsDlgOk)}}
1372 -function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c36.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c36.value?!0:!1;2==c36.value&&(b.DDNSPeriodicUpdateInterval=c37.value,b.DDNSTTL=c38.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1373 -function showEditDnsDlgChange(){QE("c37",2==c36.value);QE("c38",2==c36.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"\u30a4\u30f3\u30c6\u30eb&reg;AMT\u306e\u6a5f\u80fd",3,featuresDlgOk))}
1374 -function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,g){200!=g?messagebox("\u30a8\u30e9\u30fc","RedirectionService\u3001RequestStateChange\u30a8\u30e9\u30fc"+g):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,g){200!=g?messagebox("\u30a8\u30e9\u30fc",
1375 -"KVMRedirectionSAP\u3001RequestStateChange\u30a8\u30e9\u30fc"+g):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("\u30a8\u30e9\u30fc","RedirectionService PUT\u30a8\u30e9\u30fc"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}
1391 +function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c61.value=c;c62.value=b.DDNSPeriodicUpdateInterval;c63.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"\u52d5\u7684DNS\u30af\u30e9\u30a4\u30a2\u30f3\u30c8",3,showEditDnsDlgOk)}}
1392 +function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c61.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c61.value?!0:!1;2==c61.value&&(b.DDNSPeriodicUpdateInterval=c62.value,b.DDNSTTL=c63.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1393 +function showEditDnsDlgChange(){QE("c62",2==c61.value);QE("c63",2==c61.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"\u30a4\u30f3\u30c6\u30eb&reg;AMT\u306e\u6a5f\u80fd",3,featuresDlgOk))}
1394 +function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,e){200!=e?messagebox("\u30a8\u30e9\u30fc","RedirectionService\u3001RequestStateChange\u30a8\u30e9\u30fc"+e):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,e){200!=e?messagebox("\u30a8\u30e9\u30fc",
1395 +"KVMRedirectionSAP\u3001RequestStateChange\u30a8\u30e9\u30fc"+e):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("\u30a8\u30e9\u30fc","RedirectionService PUT\u30a8\u30e9\u30fc"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}
1396 function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1377 -function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c49.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c50.checked=!c49.checked),c51.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c52.checked=!c51.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1397 +function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c74.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c75.checked=!c74.checked),c76.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c77.checked=!c76.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1398 function showEnableBootServiceDlgOk(){var b=32768+parseInt(document.querySelector("input[name=d26a]:checked").value);15<amtversion&&(b+=parseInt(document.querySelector("input[name=d26b]:checked").value));amtstack.CIM_BootService_RequestStateChange(b,null,showEnableBootServiceDlgResponse,b)}
1379 -function showEnableBootServiceDlgResponse(b,c,a,d,g){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,g),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1380 -function showEnableBootServiceDlgResponse2(b,c,a,d,g){200==d&&a.Body.EnabledState!=g&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f",3,consentDlgOk)}}
1399 +function showEnableBootServiceDlgResponse(b,c,a,d,e){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,e),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1400 +function showEnableBootServiceDlgResponse2(b,c,a,d,e){200==d&&a.Body.EnabledState!=e&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f",3,consentDlgOk)}}
1401 function consentDlgOk(){amtsysstate.IPS_OptInService.response.OptInRequired=document.querySelector("input[name=d10]:checked").value;amtstack.Put("IPS_OptInService",amtsysstate.IPS_OptInService.response,function(){amtstack.Get("IPS_OptInService",consentGet,0,1)},0,1)}function consentGet(b,c,a,d){200==d&&PullSystemStatus()}var ipv6addrtype="\u30ed\u30fc\u30ab\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u30ea\u30f3\u30af \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30ed\u30fc\u30ab\u30eb\u30a2\u30c9\u30ec\u30b9 \u30b0\u30ed\u30fc\u30d0\u30eb\u30a2\u30c9\u30ec\u30b9 \u30e6\u30fc\u30b6\u30fc\u69cb\u6210 \u7981\u3058\u3089\u308c\u3066\u3044\u308b DAD\u304c\u9032\u884c\u4e2d \u6709\u52b9 \u975e\u63a8\u5968 \u63a8\u5968/\u975e\u63a8\u5968 \u671f\u9650\u5207\u308c \u885d\u7a81 \u7981\u3058\u3089\u308c\u3066\u3044\u308b".split(" ");
1402 function showIPv6AddrDlg(b,c){if(!xxdialogMode){var a=TableStart();t=c.split(",");for(var d=0;d<t.length;d+=3)a+=TableEntry("<b>"+t[d]+"</b><br><span style=font-size:10px>"+ipv6addrtype[t[d+1]]+"\u3001"+ipv6addrtype[+t[d+2]+5]+"</span>","");setDialogMode(11,0==b?"\u6709\u7dda\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306eIPv6\u30a2\u30c9\u30ec\u30b9":"\u30ef\u30a4\u30e4\u30ec\u30b9\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u306eIPv6\u30a2\u30c9\u30ec\u30b9",1,null,a+TableEnd())}}
1383 -function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(69,0==b);QV(70,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6\u304c\u7121\u52b9");QH("d21l1","IPv6\u5bfe\u5fdc\u3001\u81ea\u52d5");QH("d21l2","IPv6\u5bfe\u5fdc\u3001\u81ea\u52d5+\u624b\u52d5\u30a2\u30c9\u30ec\u30b9");d21o0.checked=
1384 -!c;d21o1.checked=c&&!ipv6manual;d21o2.checked=c&&ipv6manual;c31.value=isIpAddress(a.IPv6Address,"");c33.value=isIpAddress(a.DefaultRouter,"");c34.value=isIpAddress(a.PrimaryDNS,"");c35.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"\u6709\u7dda\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306eIPv6\u30b5\u30dd\u30fc\u30c8":"\u30ef\u30a4\u30e4\u30ec\u30b9\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u306eIPv6\u30b5\u30dd\u30fc\u30c8",3,function(){showIPv6StateDlgOk(b)});
1403 +function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(68,0==b);QV(69,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6\u304c\u7121\u52b9");QH("d21l1","IPv6\u5bfe\u5fdc\u3001\u81ea\u52d5");QH("d21l2","IPv6\u5bfe\u5fdc\u3001\u81ea\u52d5+\u624b\u52d5\u30a2\u30c9\u30ec\u30b9");d21o0.checked=
1404 +!c;d21o1.checked=c&&!ipv6manual;d21o2.checked=c&&ipv6manual;c56.value=isIpAddress(a.IPv6Address,"");c58.value=isIpAddress(a.DefaultRouter,"");c59.value=isIpAddress(a.PrimaryDNS,"");c60.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"\u6709\u7dda\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306eIPv6\u30b5\u30dd\u30fc\u30c8":"\u30ef\u30a4\u30e4\u30ec\u30b9\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u306eIPv6\u30b5\u30dd\u30fc\u30c8",3,function(){showIPv6StateDlgOk(b)});
1405 updateIPSetupDlg()}}
1386 -function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c31.value?"::":c31.value.toLocaleLowerCase(),a.DefaultRouter=""==c33.value?"::":c33.value.toLocaleLowerCase(),
1387 -a.PrimaryDNS=""==c34.value?"::":c34.value.toLocaleLowerCase(),a.SecondaryDNS=""==c35.value?"::":c35.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1388 -"CreationClassName").Value,g=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1389 -d+'</w:Selector><w:Selector Name="DeviceID">'+g+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1390 -b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",g=Clone(c[a]);g.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",g,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv6\u30b5\u30dd\u30fc\u30c8",format("IPv6\u72b6\u614b\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002\u30a8\u30e9\u30fc{0}",d))}
1406 +function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c56.value?"::":c56.value.toLocaleLowerCase(),a.DefaultRouter=""==c58.value?"::":c58.value.toLocaleLowerCase(),
1407 +a.PrimaryDNS=""==c59.value?"::":c59.value.toLocaleLowerCase(),a.SecondaryDNS=""==c60.value?"::":c60.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1408 +"CreationClassName").Value,e=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1409 +d+'</w:Selector><w:Selector Name="DeviceID">'+e+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1410 +b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",e=Clone(c[a]);e.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",e,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv6\u30b5\u30dd\u30fc\u30c8",format("IPv6\u72b6\u614b\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002\u30a8\u30e9\u30fc{0}",d))}
1411 function showPingActionDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,b=(1==b.PingResponseEnabled)+((1==b.RmcpPingResponseEnabled)<<1);d20a.checked=0==b;d20b.checked=1==b;d20c.checked=2==b;d20d.checked=3==b;setDialogMode(20,"\u30a4\u30f3\u30c6\u30eb&reg;AMT Ping\u5fdc\u7b54",3,showPingActionDlgOk)}}
1412 function showPingActionDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response),c=document.querySelector("input[name=d20]:checked").value;b.PingResponseEnabled=0!=(c&1);b.RmcpPingResponseEnabled=0!=(c&2);amtstack.Put("AMT_GeneralSettings",b,PullSystemStatus,0,1)}
1393 -function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(68,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(69,!0);QV(70,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","DHCP\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u7528\u3057\u305f\u81ea\u52d5\u69cb\u6210");QH("d21l2","\u4ee5\u4e0b\u306eIPv4\u8a2d\u5b9a\u3092\u4f7f\u7528\u3057\u305f\u9759\u7684\u69cb\u6210");d21o1.checked=
1394 -1==b.DHCPEnabled;d21o2.checked=!d21o1.checked;c31.value=isIpAddress(b.IPAddress,"");c32.value=isIpAddress(b.SubnetMask,"");c33.value=isIpAddress(b.DefaultGateway,"");c34.value=isIpAddress(b.PrimaryDNS,"");c35.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"IPv4\u8a2d\u5b9a",3,showIPSetupDlgOk)}}
1395 -function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6\u5bfe\u5fdc\u3001\u81ea\u52d5+\u624b\u52d5\u30a2\u30c9\u30ec\u30b9"==Q("d21l2").innerHTML&&2>c31.value.split(":").length&&(b=!1);QE("c54",b);c31.disabled=c32.disabled=c33.disabled=c34.disabled=c35.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1396 -function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c31.value,b.SubnetMask=c32.value,b.DefaultGateway=c33.value,""!=c34.value&&(b.PrimaryDNS=c34.value),""!=c35.value&&
1397 -(b.SecondaryDNS=c35.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv4\u8a2d\u5b9a",format("\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002\u30a8\u30e9\u30fc{0}",d))}amtPowerBootCapabilities=null;
1413 +function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(67,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(68,!0);QV(69,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","DHCP\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u7528\u3057\u305f\u81ea\u52d5\u69cb\u6210");QH("d21l2","\u4ee5\u4e0b\u306eIPv4\u8a2d\u5b9a\u3092\u4f7f\u7528\u3057\u305f\u9759\u7684\u69cb\u6210");d21o1.checked=
1414 +1==b.DHCPEnabled;d21o2.checked=!d21o1.checked;c56.value=isIpAddress(b.IPAddress,"");c57.value=isIpAddress(b.SubnetMask,"");c58.value=isIpAddress(b.DefaultGateway,"");c59.value=isIpAddress(b.PrimaryDNS,"");c60.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"IPv4\u8a2d\u5b9a",3,showIPSetupDlgOk)}}
1415 +function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6\u5bfe\u5fdc\u3001\u81ea\u52d5+\u624b\u52d5\u30a2\u30c9\u30ec\u30b9"==Q("d21l2").innerHTML&&2>c56.value.split(":").length&&(b=!1);QE("c106",b);c56.disabled=c57.disabled=c58.disabled=c59.disabled=c60.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1416 +function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c56.value,b.SubnetMask=c57.value,b.DefaultGateway=c58.value,""!=c59.value&&(b.PrimaryDNS=c59.value),""!=c60.value&&
1417 +(b.SecondaryDNS=c60.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv4\u8a2d\u5b9a",format("\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002\u30a8\u30e9\u30fc{0}",d))}amtPowerBootCapabilities=null;
1418 function showPowerActionDlg(){xxdialogMode||(statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u6a5f\u80fd\u3092\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059..."),amtstack.Get("AMT_BootCapabilities",powerActionResponse00,0,1))}
1399 -function powerActionResponse00(b,c,a,d){if(200==d){b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(g){}amtPowerBootCapabilities=a.Body;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","\u30d1\u30ef\u30fc\u30a2\u30c3\u30d7",2);b&1&&(addOption("d5actionSelect","\u30ea\u30bb\u30c3\u30c8",10),addOption("d5actionSelect","\u30d1\u30ef\u30fc\u30b5\u30a4\u30af\u30eb",5),addOption("d5actionSelect","\u30d1\u30ef\u30fc\u30c0\u30a6\u30f3",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&
1400 -(b&2&&addOption("d5actionSelect","\u8a3a\u65ad\u306e\u96fb\u6e90\u3092\u5165\u308c\u307e\u3059",300),b&1&&addOption("d5actionSelect","\u8a3a\u65ad\u306b\u30ea\u30bb\u30c3\u30c8",301));9<amtversion&&b&1&&(addOption("d5actionSelect","\u30b9\u30bf\u30f3\u30d0\u30a4\u304b\u3089\u306eOS\u30a6\u30a7\u30a4\u30af",500),addOption("d5actionSelect","OS\u306e\u7701\u96fb\u529b",501),addOption("d5actionSelect","\u30bd\u30d5\u30c8\u30aa\u30d5",12),addOption("d5actionSelect","\u30bd\u30d5\u30c8\u30ea\u30bb\u30c3\u30c8",
1401 -14),addOption("d5actionSelect","\u7761\u7720",4),addOption("d5actionSelect","\u30cf\u30a4\u30d0\u30cd\u30fc\u30c8",7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&addOption("d5actionSelect","BIOS\u306b\u96fb\u6e90\u6295\u5165",100),b&1&&addOption("d5actionSelect","BIOS\u306b\u30ea\u30bb\u30c3\u30c8",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","\u5b89\u5168\u306a\u6d88\u53bb\u306e\u305f\u3081\u306e\u96fb\u6e90\u6295\u5165",104),b&1&&addOption("d5actionSelect","\u5b89\u5168\u306a\u6d88\u53bb\u306b\u30ea\u30bb\u30c3\u30c8",
1402 -105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",106),b&1&&addOption("d5actionSelect","Reset to Platform Erase",107));b&1&&addOption("d5actionSelect","IDE-R\u30d5\u30ed\u30c3\u30d4\u30fc\u306b\u30ea\u30bb\u30c3\u30c8",200);b&2&&addOption("d5actionSelect","IDE-R\u30d5\u30ed\u30c3\u30d4\u30fc\u306e\u96fb\u6e90\u3092\u5165\u308c\u307e\u3059",
1403 -201);b&1&&addOption("d5actionSelect","IDE-R CDROM\u306b\u30ea\u30bb\u30c3\u30c8",202);b&2&&addOption("d5actionSelect","IDE-R CDROM\u306e\u96fb\u6e90\u3092\u5165\u308c\u307e\u3059",203);b&1&&addOption("d5actionSelect","PXE\u306b\u30ea\u30bb\u30c3\u30c8",400);b&2&&addOption("d5actionSelect","PXE\u306e\u96fb\u6e90\u3092\u5165\u308c\u307e\u3059",401);addOption("d5actionSelect","\u30ab\u30b9\u30bf\u30e0\u30a2\u30af\u30b7\u30e7\u30f3...",999);5<amtversion&&addOption("d5actionSelect","\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f...",
1404 -998);setDialogMode(5,"\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",3,powerActionDlgCheck)}else messagebox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",format("\u30b7\u30b9\u30c6\u30e0\u6a5f\u80fd\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3002\u30a8\u30e9\u30fc{0}",d))}
1405 -function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"\u96fb\u6e90\u64cd\u4f5c\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002"):QH(60,format("\u96fb\u6e90\u64cd\u4f5c\u30a8\u30e9\u30fc\uff03{0}\u3002",g));setDialogMode(1,"\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?
1419 +function showPowerActionDlg(){if(!xxdialogMode){var b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(c){}amtPowerBootCapabilities=amtsysstate.AMT_BootCapabilities.response;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","\u30d1\u30ef\u30fc\u30a2\u30c3\u30d7",2);b&1&&(addOption("d5actionSelect","\u30ea\u30bb\u30c3\u30c8",10),addOption("d5actionSelect","\u30d1\u30ef\u30fc\u30b5\u30a4\u30af\u30eb",5),addOption("d5actionSelect","\u30d1\u30ef\u30fc\u30c0\u30a6\u30f3",
1420 +8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect","\u8a3a\u65ad\u306e\u96fb\u6e90\u3092\u5165\u308c\u307e\u3059",300),b&1&&addOption("d5actionSelect","\u8a3a\u65ad\u306b\u30ea\u30bb\u30c3\u30c8",301));9<amtversion&&b&1&&(addOption("d5actionSelect","\u30b9\u30bf\u30f3\u30d0\u30a4\u304b\u3089\u306eOS\u30a6\u30a7\u30a4\u30af",500),addOption("d5actionSelect","OS\u306e\u7701\u96fb\u529b",501),addOption("d5actionSelect","\u30bd\u30d5\u30c8\u30aa\u30d5",12),addOption("d5actionSelect",
1421 +"\u30bd\u30d5\u30c8\u30ea\u30bb\u30c3\u30c8",14),addOption("d5actionSelect","\u7761\u7720",4),addOption("d5actionSelect","\u30cf\u30a4\u30d0\u30cd\u30fc\u30c8",7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&addOption("d5actionSelect","BIOS\u306b\u96fb\u6e90\u6295\u5165",100),b&1&&addOption("d5actionSelect","BIOS\u306b\u30ea\u30bb\u30c3\u30c8",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","\u5b89\u5168\u306a\u6d88\u53bb\u306e\u305f\u3081\u306e\u96fb\u6e90\u6295\u5165",
1422 +104),b&1&&addOption("d5actionSelect","\u5b89\u5168\u306a\u6d88\u53bb\u306b\u30ea\u30bb\u30c3\u30c8",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",106),b&1&&addOption("d5actionSelect","Reset to Platform Erase",107));b&1&&addOption("d5actionSelect","IDE-R\u30d5\u30ed\u30c3\u30d4\u30fc\u306b\u30ea\u30bb\u30c3\u30c8",
1423 +200);b&2&&addOption("d5actionSelect","IDE-R\u30d5\u30ed\u30c3\u30d4\u30fc\u306e\u96fb\u6e90\u3092\u5165\u308c\u307e\u3059",201);b&1&&addOption("d5actionSelect","IDE-R CDROM\u306b\u30ea\u30bb\u30c3\u30c8",202);b&2&&addOption("d5actionSelect","IDE-R CDROM\u306e\u96fb\u6e90\u3092\u5165\u308c\u307e\u3059",203);b&1&&addOption("d5actionSelect","PXE\u306b\u30ea\u30bb\u30c3\u30c8",400);b&2&&addOption("d5actionSelect","PXE\u306e\u96fb\u6e90\u3092\u5165\u308c\u307e\u3059",401);addOption("d5actionSelect","\u30ab\u30b9\u30bf\u30e0\u30a2\u30af\u30b7\u30e7\u30f3...",
1424 +999);5<amtversion&&addOption("d5actionSelect","\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f...",998);setDialogMode(5,"\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",3,powerActionDlgCheck)}}
1425 +function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"\u96fb\u6e90\u64cd\u4f5c\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002"):QH(61,format("\u96fb\u6e90\u64cd\u4f5c\u30a8\u30e9\u30fc\uff03{0}\u3002",e));setDialogMode(1,"\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?
1426 (b="Intel&reg; Remote Secure Erase\u306e\u5b9f\u884c\u3092\u78ba\u8a8d\u3057\u307e\u3059\u304b\uff1f<br>\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001Secure Erase\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u307e\u3059\u3002<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>\u30d1\u30b9\u30ef\u30fc\u30c9</div></div><br><div style=color:red><b>\u8b66\u544a\uff1a</ b>\u3053\u308c\u306b\u3088\u308a\u3001\u30ea\u30e2\u30fc\u30c8\u30b7\u30b9\u30c6\u30e0\u306e\u30c7\u30fc\u30bf\u304c\u30ef\u30a4\u30d7\u3055\u308c\u307e\u3059\u3002</div>",
1427 rsepass=1,setDialogMode(11,"\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1408 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b>\u8b66\u544a\uff1a</ b>\u3053\u308c\u306b\u3088\u308a\u3001\u30ea\u30e2\u30fc\u30c8\u30b7\u30b9\u30c6\u30e0\u306e\u30c7\u30fc\u30bf\u304c\u30ef\u30a4\u30d7\u3055\u308c\u307e\u3059\u3002</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");
1409 -d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",
1410 -a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}
1411 -function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1412 -function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,g=[1,2,6,25,26,31],v;for(v in g)d&1<<g[v]&&Q("rpef"+g[v]).checked&&(a+=1<<g[v]);d=makeUefiBootParam(1,a,4);g=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),g++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),g++);platfromEraseTLV={tlv:btoa(d),tlvlen:g};c?(statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u72b6\u614b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059..."),amtstack.Get("IPS_OptInService",
1413 -powerActionResponse0,0,1)):powerActionDlg()}
1428 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b>\u8b66\u544a\uff1a</ b>\u3053\u308c\u306b\u3088\u308a\u3001\u30ea\u30e2\u30fc\u30c8\u30b7\u30b9\u30c6\u30e0\u306e\u30c7\u30fc\u30bf\u304c\u30ef\u30a4\u30d7\u3055\u308c\u307e\u3059\u3002</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");
1429 +d&8&&a.push("<label><input id=rpef3 type=checkbox onchange=powerActionDlgRPEValidate()>Verify Storage Erase</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&65536&&a.push("<label><input id=rpef16 type=checkbox onchange=powerActionDlgRPEValidate()>OEM Custom Action</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");
1430 +d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");0<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+
1431 +addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpeeomdata style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("OEM Data (HEX)","<input id=rpeoemdatax style=width:210px maxlength=256 type=input>")+"</div>";setDialogMode(11,"\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",3,powerActionDlgRPEEx,c,b);QE("c106",!1)}
1432 +function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,3,6,16,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QV("rpeeomdata",b&65536);QE("c106",b)}var platfromEraseTLV=null;
1433 +function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,3,6,16,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);a&65536&&""!=Q("rpeoemdatax").value&&(d+=makeUefiBootParam(20,hex2rstr(Q("rpeoemdatax").value),null,11),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",
1434 +"\u72b6\u614b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1435 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u72b6\u614b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);
1436 var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=!1);13!=currentView&&10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
1416 -function showAdvPowerDlg(){try{Q("c39").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1437 +function showAdvPowerDlg(){try{Q("c64").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1438 QV("ForceHDBootOption",1==amtPowerBootCapabilities.ForceHardDriveBoot);QV("ForcePXEBootOption",1==amtPowerBootCapabilities.ForcePXEBoot);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);QV("d24dSerialOverLan",1==amtPowerBootCapabilities.SOL);
1439 QV("d24dSecureErase",1==amtPowerBootCapabilities.SecureErase);QV("d24dPlatformErase",null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&0!=(amtsysstate.CIM_BootService.response.EnabledState&2));QV("d24dFirmwareReset",1==amtPowerBootCapabilities.ConfigurationDataReset);QV("d24dLockSleepButton",1==amtPowerBootCapabilities.SleepButtonLock);QV("d24dUserPasswordBypass",1==amtPowerBootCapabilities.UserPasswordBypass);
1419 -QV("c46",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c47",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c48",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);setDialogMode(24,"\u30ab\u30b9\u30bf\u30e0\u96fb\u6e90\u30a2\u30af\u30b7\u30e7\u30f3",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}
1420 -function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c39").value&&600>Q("c39").value;QE("c41",!b);QE("c43",!b);QE("idd_d24IDERBootDevice",!b);QE("c45",!b);QE("idd_d24RSEPass",!b);QE("c54",!0)}
1421 -function showAdvPowerDlgOk(){var b=Q("c39").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"\u96fb\u6e90\u64cd\u4f5c\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002"):QH(60,format("\u96fb\u6e90\u64cd\u4f5c\u30a8\u30e9\u30fc\uff03{0}\u3002",g));setDialogMode(1,"\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c39").value,
1422 -AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=Q("d24BiosSecureBoot").checked,AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c43").value,AvdPowerDlg.FirmwareVerbosity=Q("c45").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c44").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,
1440 +QV("c71",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c72",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c73",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);QH("c66",'<option value=0>None</option><option id="ForceDVDBootOption" value=1>Force CD/DVD Boot</option><option id="ForcePXEBootOption" value=2>Force PXE Boot</option><option id="ForceHDBootOption" value=3>Force Hard Disk Boot</option><option id="ForceDiagBootOption" value=4>Force Diagnostic Boot</option>');
1441 +setDialogMode(24,"\u30ab\u30b9\u30bf\u30e0\u96fb\u6e90\u30a2\u30af\u30b7\u30e7\u30f3",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}
1442 +function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c64").value&&600>Q("c64").value;QE("c66",!b);QE("c68",!b);QE("idd_d24IDERBootDevice",!b);QE("c70",!b);QE("idd_d24RSEPass",!b);QE("c106",!0)}
1443 +function showAdvPowerDlgOk(){var b=Q("c64").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"\u96fb\u6e90\u64cd\u4f5c\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002"):QH(61,format("\u96fb\u6e90\u64cd\u4f5c\u30a8\u30e9\u30fc\uff03{0}\u3002",e));setDialogMode(1,"\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c64").value,
1444 +AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=Q("d24BiosSecureBoot").checked,AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c68").value,AvdPowerDlg.FirmwareVerbosity=Q("c70").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c69").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,
1445 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,AvdPowerDlg.PlatformErase=Q("d24PlatformErase").checked,AvdPowerDlg.FirmwareReset=
1446 Q("d24FirmwareReset").checked,!0===AvdPowerDlg.SecureErase&&0<Q("d24rsepass").value.length&&(AvdPowerDlg.RSEPassword=Q("d24rsepass").value),!0===AvdPowerDlg.PlatformErase?powerActionDlgRPE(!0):(statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u72b6\u614b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)))}
1425 -function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",format("\u30a8\u30e9\u30fc\uff03{0}",d)):4294967295==a.Body.OptInRequired&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(d6ConsentText.value="",setDialogMode(6,"\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",
1426 -"\u30aa\u30d7\u30c8\u30a4\u30f3\u3092\u958b\u59cb\u3057\u3066\u3044\u307e\u3059..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f","\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002"):(statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u30d6\u30fc\u30c8\u8a2d\u5b9a\u3092\u53d6\u5f97\u3057\u3066\u3044\u307e\u3059..."),
1427 -amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1447 +function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",format("\u30a8\u30e9\u30fc\uff03{0}",d)):(4294967295==a.Body.OptInRequired||connectDesktopConsent&&0!=a.Body.OptInRequired)&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(amtstack.IPS_OptInService_CancelOptIn(null),d6ConsentText.value="",setDialogMode(6,"\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f",11,powerActionSendConsent),checkConsentDisplay(),
1448 +consentChanged()):(statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u30aa\u30d7\u30c8\u30a4\u30f3\u3092\u958b\u59cb\u3057\u3066\u3044\u307e\u3059..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f","\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002"):(statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",
1449 +"\u30d6\u30fc\u30c8\u8a2d\u5b9a\u3092\u53d6\u5f97\u3057\u3066\u3044\u307e\u3059..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1450 function powerActionResponseC1(b,c,a,d){200!=d?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",format("\u30a8\u30e9\u30fc\uff03",d)):0!=a.Body.ReturnValue?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("\u30e6\u30fc\u30b6\u30fc\u540c\u610f\u30a8\u30e9\u30fc",a.Body.ReturnValueStr.replace(/_/g," ")):(d6ConsentText.value="",setDialogMode(6,"\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f",11,powerActionSendConsent),
1451 checkConsentDisplay(),consentChanged(),amtstack.Enum("CIM_ServiceAvailableToElement",function(a,b,c,d){errcheck(d,a)||(amtsysstate.CIM_ServiceAvailableToElement.responses=c,updateSystemStatus(),null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState&&amtstack.RequestPowerStateChange(2,function(a,b,c,d){}))}))}
1430 -function powerActionSendConsent(b){0==b?amtstack.IPS_OptInService_CancelOptIn(function(){}):(statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f\u3092\u9001\u4fe1\u3057\u3066\u3044\u307e\u3059..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1452 +function powerActionSendConsent(b){console.log("powerActionSendConsent",b);0==b?(amtstack.IPS_OptInService_CancelOptIn(function(){}),connectDesktopConsent=!1,desktop.Stop()):(statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f\u3092\u9001\u4fe1\u3057\u3066\u3044\u307e\u3059..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1453 function powerActionResponseC2(b,c,a,d){200!=d?messagebox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",format("\u30a8\u30e9\u30fc\uff03{0}",d)):0!=a.Body.ReturnValue?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f","\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f\u304c\u6210\u529f\u3057\u307e\u3057\u305f\u3002"):(statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",
1454 "\u72b6\u614b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1433 -function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",format("\u30a8\u30e9\u30fc\uff03{0}",d));else{b=d5actionSelect.value;var g=a.Body;g.ConfigurationDataReset=!1;delete g.WinREBootEnabled;delete g.UEFILocalPBABootEnabled;delete g.UEFIHTTPSBootEnabled;delete g.SecureBootControlEnabled;delete g.BootguardStatus;delete g.OptionsCleared;delete g.BIOSLastStatus;delete g.UefiBootParametersArray;delete g.RPEEnabled;999==b?(g.BIOSPause=AvdPowerDlg.BIOSPause,
1434 -g.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,g.BIOSSetup=AvdPowerDlg.BIOSSetup,g.BootMediaIndex=AvdPowerDlg.BootMediaIndex,g.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,g.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,g.IDERBootDevice=AvdPowerDlg.IDERBootDevice,g.LockKeyboard=AvdPowerDlg.LockKeyboard,g.LockPowerButton=AvdPowerDlg.LockPowerButton,g.LockResetButton=AvdPowerDlg.LockResetButton,g.LockSleepButton=AvdPowerDlg.LockSleepButton,g.ReflashBIOS=AvdPowerDlg.ReflashBIOS,g.UseIDER=
1435 -AvdPowerDlg.UseIDER,g.UseSOL=AvdPowerDlg.UseSOL,g.UseSafeMode=AvdPowerDlg.UseSafeMode,g.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=g.SecureErase&&(g.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==g.SecureErase&&AvdPowerDlg.RSEPassword&&(g.RSEPassword=AvdPowerDlg.RSEPassword)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&
1436 -null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(g.BIOSPause=!1,g.EnforceSecureBoot=!1,g.BIOSSetup=99<b&&104>b,g.BootMediaIndex=0,g.FirmwareVerbosity=0,g.ForcedProgressEvents=!1,g.IDERBootDevice=202==b||203==b?1:0,g.LockKeyboard=!1,g.LockPowerButton=!1,
1437 -g.LockResetButton=!1,g.LockSleepButton=!1,g.ReflashBIOS=!1,g.UseIDER=199<b&&300>b,g.UseSOL=13==currentView&&8!=b&&300>b,g.UseSafeMode=!1,g.UserPasswordBypass=!1,null!=g.SecureErase&&(g.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===g.SecureErase&&0<rsepass.length&&(g.RSEPassword=rsepass)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==
1438 -b)&&null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=!1),rsepass=null);console.log("\u8d77\u52d5\u30a2\u30af\u30b7\u30e7\u30f3\uff1a"+b);console.log("\u30d6\u30fc\u30c8\u8a2d\u5b9a\u306e\u8a2d\u5b9a\uff1a"+ObjectToString2(g));statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",
1439 -"\u30d6\u30fc\u30c8\u8a2d\u5b9a\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,b,c,d){200!=d?messagebox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",g,powerActionResponse2,
1440 -0,1)},0,1)}}function powerActionResponse2(b,c,a,d,g){200!=d?messagebox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",format("PUT AMT_BootSettingData\u3001\u30a8\u30e9\u30fc\uff03{0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u6b21\u306e\u8d77\u52d5\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1441 -function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c41.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c41.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c41").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1455 +function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",format("\u30a8\u30e9\u30fc\uff03{0}",d));else{b=d5actionSelect.value;var e=a.Body;e.ConfigurationDataReset=!1;delete e.WinREBootEnabled;delete e.UEFILocalPBABootEnabled;delete e.UEFIHTTPSBootEnabled;delete e.SecureBootControlEnabled;delete e.BootguardStatus;delete e.OptionsCleared;delete e.BIOSLastStatus;delete e.UefiBootParametersArray;delete e.RPEEnabled;999==b?(e.BIOSPause=AvdPowerDlg.BIOSPause,
1456 +e.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,e.BIOSSetup=AvdPowerDlg.BIOSSetup,e.BootMediaIndex=AvdPowerDlg.BootMediaIndex,e.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,e.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,e.IDERBootDevice=AvdPowerDlg.IDERBootDevice,e.LockKeyboard=AvdPowerDlg.LockKeyboard,e.LockPowerButton=AvdPowerDlg.LockPowerButton,e.LockResetButton=AvdPowerDlg.LockResetButton,e.LockSleepButton=AvdPowerDlg.LockSleepButton,e.ReflashBIOS=AvdPowerDlg.ReflashBIOS,e.UseIDER=
1457 +AvdPowerDlg.UseIDER,e.UseSOL=AvdPowerDlg.UseSOL,e.UseSafeMode=AvdPowerDlg.UseSafeMode,e.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=e.SecureErase&&(e.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==e.SecureErase&&AvdPowerDlg.RSEPassword&&(e.RSEPassword=AvdPowerDlg.RSEPassword)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&
1458 +null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(e.BIOSPause=!1,e.EnforceSecureBoot=!1,e.BIOSSetup=99<b&&104>b,e.BootMediaIndex=0,e.FirmwareVerbosity=0,e.ForcedProgressEvents=!1,e.IDERBootDevice=202==b||203==b?1:0,e.LockKeyboard=!1,e.LockPowerButton=
1459 +!1,e.LockResetButton=!1,e.LockSleepButton=!1,e.ReflashBIOS=!1,e.UseIDER=199<b&&300>b,e.UseSOL=13==currentView&&8!=b&&300>b,e.UseSafeMode=!1,e.UserPasswordBypass=!1,null!=e.SecureErase&&(e.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===e.SecureErase&&0<rsepass.length&&(e.RSEPassword=rsepass)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==
1460 +b)&&null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=!1),rsepass=null);console.log("\u8d77\u52d5\u30a2\u30af\u30b7\u30e7\u30f3\uff1a"+b);console.log("\u30d6\u30fc\u30c8\u8a2d\u5b9a\u306e\u8a2d\u5b9a\uff1a"+ObjectToString2(e));statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",
1461 +"\u30d6\u30fc\u30c8\u8a2d\u5b9a\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,b,c,d){200!=d?messagebox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",e,powerActionResponse2,
1462 +0,1)},0,1)}}function powerActionResponse2(b,c,a,d,e){200!=d?messagebox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",format("PUT AMT_BootSettingData\u3001\u30a8\u30e9\u30fc\uff03{0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u6b21\u306e\u8d77\u52d5\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1463 +function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c66.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c66.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c66").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1464 c+"</Selector></SelectorSet></ReferenceParameters>",powerActionResponse3)}var targetPowerAction=0;
1443 -function powerActionResponse3(b,c,a,d){console.log("powerActionResponse3("+c+","+a+","+d+")");if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u96fb\u6e90\u64cd\u4f5c\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;
1444 -104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==b&&(b=AvdPowerDlg.Action);targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u6b21\u306e\u8d77\u52d5\u30a2\u30af\u30b7\u30e7\u30f3\u30bb\u30c3\u30c8\u3002")}}
1445 -function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"\u96fb\u6e90\u64cd\u4f5c\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002"),setDialogMode(1,"\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c54",6==d6ConsentText.value.length)}
1465 +function powerActionResponse3(b,c,a,d){if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u96fb\u6e90\u64cd\u4f5c\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);
1466 +999==b&&(b=AvdPowerDlg.Action);targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u6b21\u306e\u8d77\u52d5\u30a2\u30af\u30b7\u30e7\u30f3\u30bb\u30c3\u30c8\u3002")}}
1467 +function powerActionResponse4(b,c,a,d){200==d&&(QH(61,"\u96fb\u6e90\u64cd\u4f5c\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002"),setDialogMode(1,"\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c106",6==d6ConsentText.value.length)}
1468 function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1469 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1470 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1449 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var g=b[c].app?b[c].app:"";a[d][g]||(a[d][g]={});b[c].name&&(a[d][g][b[c].name]=b[c])}xxStorage.content=
1450 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u3053\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306e\u30a4\u30f3\u30c6\u30eb&reg;AMT\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";var v,n,g="";for(c in b){var l=0,p;for(p in b[c]){l++;
1451 -var q=0,e;for(e in b[c][p]){q++;if(c!=v||p!=n)""!=g&&(a+=g,g="<br>"),v=c,n=p,g=""!=c?g+EscapeHtml(c+" / "+p):g+"\u30eb\u30fc\u30c8";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+e+'"',g=g+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+e+'",'+C+")><div style=float:right>"),g=g+(" "+AddButton2("\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9","DownloadFromStorage("+C+',"'+e+'",event)')),g=g+("</div><div style=padding-top:3px><b>"+EscapeHtml(e)+"</b>, <i>"+b[c][p][e].size+" \u30d0\u30a4\u30c8</i></div></div>");
1452 -d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==q&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=g&&(a+=g);0==d&&(a+="<div style=padding-left:15px><br><i>\u30d5\u30a1\u30a4\u30eb\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002</i></div><br>");
1453 -v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9...","UploadToStorage()"):""));QH(55,a)}else QH(55,"\u30b9\u30c8\u30ec\u30fc\u30b8\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093...<br/>"+AddButton("\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5","PullStorage()"))}
1454 -function showStorageDetails(b,c,a,d){if(!xxdialogMode){var g="",v=xxStorage.content[b][c][a];""!=b&&(g+=addHtmlValue("\u30d9\u30f3\u30c0\u30fc",b));""!=c&&(g+=addHtmlValue("\u5fdc\u7528",c));g+=addHtmlValue("\u540d\u524d",a);g+=addHtmlValue("\u30b5\u30a4\u30ba",v.size+" bytes");v.link&&(g+=addHtmlValue("\u30ea\u30f3\u30af",v.link));setDialogMode(11,"\u30b9\u30c8\u30ec\u30fc\u30b8\u30a2\u30a4\u30c6\u30e0",5,showStorageDetailsEx,g,d)}}
1471 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1472 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u3053\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306e\u30a4\u30f3\u30c6\u30eb&reg;AMT\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;
1473 +var r=0,g;for(g in b[c][p]){r++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+" / "+p):e+"\u30eb\u30fc\u30c8";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+g+'",'+C+")><div style=float:right>"),e=e+(" "+AddButton2("\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9","DownloadFromStorage("+C+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][p][g].size+" \u30d0\u30a4\u30c8</i></div></div>");
1474 +d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==r&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>\u30d5\u30a1\u30a4\u30eb\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002</i></div><br>");
1475 +v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9...","UploadToStorage()"):""));QH(56,a)}else QH(56,"\u30b9\u30c8\u30ec\u30fc\u30b8\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093...<br/>"+AddButton("\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5","PullStorage()"))}
1476 +function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("\u30d9\u30f3\u30c0\u30fc",b));""!=c&&(e+=addHtmlValue("\u5fdc\u7528",c));e+=addHtmlValue("\u540d\u524d",a);e+=addHtmlValue("\u30b5\u30a4\u30ba",v.size+" bytes");v.link&&(e+=addHtmlValue("\u30ea\u30f3\u30af",v.link));setDialogMode(11,"\u30b9\u30c8\u30ec\u30fc\u30b8\u30a2\u30a4\u30c6\u30e0",5,showStorageDetailsEx,e,d)}}
1477 function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}
1478 function storageDeleteResponse(b,c){200!=c?messagebox("\u30b9\u30c8\u30ec\u30fc\u30b8",format("\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3067\u304d\u307e\u305b\u3093\uff08ERR {0}\uff09\u3002\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306e\u96fb\u6e90\u304c\u30aa\u30f3\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",c)):PullStorage()}
1479 function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}function DownloadFromStorageEx(b,c,a){200!=c||null==b?console.log(c,"Data = null"):saveAs(data2blob(b),a)}function OpenFromStorage(b,c){if(!xxdialogMode){haltEvent(c);var a=window.open("http://"+wsstack.comm.host+":"+wsstack.comm.port+"/amt-storage/"+b,"_blank","noopener,noreferrer");a.opener=null;a.focus()}}
@@ -1464,40 +1486,40 @@ a+="<datalist id=mstoragevendorlist>";for(var d in xxStorageVendors)a+='<option
1486 3,UploadToStorageEx,a,b);b&&SetStorageName(c)}}function UploadToStorageEx(b,c){if(c)d=new FileReader,d.onload=UploadToStorageEx2,d.filename=Q("mstoragefile").value,d.readAsBinaryString(c);else{var a=Q("mstoragefile");if(1==a.files.length){var d=new FileReader;d.onload=UploadToStorageEx2;d.filename=a.files[0].name;d.readAsBinaryString(a.files[0])}}}
1487 function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0].name:"");b=b.split(" ").join("");var c=b.split("-");3==c.length&&12>c[0].length&&12>c[1].length&&(Q("mstoragevendor").value=c[0],Q("mstorageapplication").value=c[1],b=c[2]);b=b.split("-").join("");b.endsWith(".gz")&&(b=b.substring(0,b.length-3));b.endsWith(".htm")||b.endsWith(".html")?Q("mstoragetype").value="text/html":b.endsWith(".txt")&&(Q("mstoragetype").value="text/plain");11<b.length&&(b=b.substring(0,11));Q("mstoragefilename").value=
1488 b}
1467 -function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var g=Q("mstoragetype").value;""==g&&(g="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1468 -"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+g+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1469 -function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," \u65e5\u3005").replace("H"," \u6642\u9593").replace("M"," \u5206");b=b.replace(" 1\u65e5"," 1\u65e5").replace(" 1\u6642\u9593"," 1\u6642\u9593").replace(" 1\u5206 "," 1\u5206 ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1470 -function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u30a6\u30a7\u30a4\u30af\u30a2\u30e9\u30fc\u30e0\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,g){if(200==g){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, \u76ee\u899a\u3081\u308b "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," \u3067"),void 0!=d[c].Interval&&(a+=" \u305d\u3057\u3066\u305d\u308c\u305e\u308c"+
1489 +function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1490 +"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1491 +function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," \u65e5").replace("H"," \u6642\u9593").replace("M"," \u5206");b=b.replace(" 1\u65e5"," 1\u65e5").replace(" 1\u6642\u9593"," 1\u6642\u9593").replace(" 1\u5206 "," 1\u5206 ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1492 +function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u30a6\u30a7\u30a4\u30af\u30a2\u30e9\u30fc\u30e0\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, \u76ee\u899a\u3081\u308b "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," \u3067"),void 0!=d[c].Interval&&(a+=" \u305d\u3057\u3066\u305d\u308c\u305e\u308c"+
1493 _fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+="\u3001\u5b8c\u4e86\u3057\u305f\u3089\u524a\u9664"),b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("\u7de8\u96c6...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>\u30a6\u30a7\u30a4\u30af\u30a2\u30e9\u30fc\u30e0\u306f\u767b\u9332\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002</i></div><br>";
1472 -d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("\u3059\u3079\u3066\u306e\u30a2\u30e9\u30fc\u30e0\u3092\u524a\u9664","RemoveAllAlarms()")+AddButton("\u8ffd\u52a0","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
1473 -function prepareAlarmOccurenceTemplate(b,c,a,d,g){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1474 -g+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"\u3059\u3079\u3066\u306e\u30a6\u30a7\u30a4\u30af\u30a2\u30e9\u30fc\u30e0\u3092\u524a\u9664\u3059\u308b",3,RemoveAllAlarmsEx,"\u3059\u3079\u3066\u306e\u30a6\u30a7\u30a4\u30af\u30a2\u30e9\u30fc\u30e0\u306e\u524a\u9664\u3092\u78ba\u8a8d\u3057\u307e\u3059\u304b\uff1f")}
1475 -function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,g,v){0==--b&&PullAlarms()})}
1494 +d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton2("\u3059\u3079\u3066\u306e\u30a2\u30e9\u30fc\u30e0\u3092\u524a\u9664","RemoveAllAlarms()",xxAlarms?"":"disabled")+AddButton("\u8ffd\u52a0","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(58,b)}},null,!0)}
1495 +function prepareAlarmOccurenceTemplate(b,c,a,d,e){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1496 +e+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"\u3059\u3079\u3066\u306e\u30a6\u30a7\u30a4\u30af\u30a2\u30e9\u30fc\u30e0\u3092\u524a\u9664\u3059\u308b",3,RemoveAllAlarmsEx,"\u3059\u3079\u3066\u306e\u30a6\u30a7\u30a4\u30af\u30a2\u30e9\u30fc\u30e0\u306e\u524a\u9664\u3092\u78ba\u8a8d\u3057\u307e\u3059\u304b\uff1f")}
1497 +function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,e,v){0==--b&&PullAlarms()})}
1498 function showAddAlarm(b){if(!xxdialogMode){QE("d25alarm_name",!b);if(void 0!=b){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime);Q("d25alarm_name").value=c.ElementName;Q("d25alarm_sdate").value=a.getFullYear()+"-"+_fmttimepad(a.getMonth()+1)+"-"+_fmttimepad(a.getDate());Q("d25alarm_stime").value=a.getHours()+":"+_fmttimepad(a.getMinutes())+":"+_fmttimepad(a.getSeconds());if(c.Interval){var a=c.Interval.Interval.replace("P","").replace("T","").replace("D","D,").replace("H","H,").replace("M","M,").split(","),
1477 -d=[0,0,0],g;for(g in a){var v=a[g].length-1;"D"==a[g][v]&&(d[0]=parseInt(a[g].substring(0,v)));"H"==a[g][v]&&(d[1]=parseInt(a[g].substring(0,v)));"M"==a[g][v]&&(d[2]=parseInt(a[g].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1499 +d=[0,0,0],e;for(e in a){var v=a[e].length-1;"D"==a[e][v]&&(d[0]=parseInt(a[e].substring(0,v)));"H"==a[e][v]&&(d[1]=parseInt(a[e].substring(0,v)));"M"==a[e][v]&&(d[2]=parseInt(a[e].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1500 Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"\u65b0\u3057\u3044\u30a2\u30e9\u30fc\u30e0\u3092\u8ffd\u52a0",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}
1479 -function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c54",b)}
1480 -function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),g=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],g[0],g[1],g[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",g=Q("d25alarm_interval").value.split("-");3!=g.length&&(g=[0,0,0]);var g=
1481 -"P"+g[0]+"DT"+g[1]+"H"+g[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,g,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("\u30a2\u30e9\u30fc\u30e0\u3092\u8ffd\u52a0",format("\u30a2\u30e9\u30fc\u30e0\u3092\u8ffd\u52a0\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u30b9\u30c6\u30fc\u30bf\u30b9\uff1a{0}\u3002<br/>\u30a2\u30e9\u30fc\u30e0\u304c\u5c06\u6765\u306e\u4e88\u5b9a\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002",
1501 +function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c106",b)}
1502 +function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),e=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],e[0],e[1],e[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",e=Q("d25alarm_interval").value.split("-");3!=e.length&&(e=[0,0,0]);var e=
1503 +"P"+e[0]+"DT"+e[1]+"H"+e[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,e,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("\u30a2\u30e9\u30fc\u30e0\u3092\u8ffd\u52a0",format("\u30a2\u30e9\u30fc\u30e0\u3092\u8ffd\u52a0\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u30b9\u30c6\u30fc\u30bf\u30b9\uff1a{0}\u3002<br/>\u30a2\u30e9\u30fc\u30e0\u304c\u5c06\u6765\u306e\u4e88\u5b9a\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002",
1504 d)):0!=c.Body.ReturnValue?messagebox("\u30a2\u30e9\u30fc\u30e0\u3092\u8ffd\u52a0",format("\u30a2\u30e9\u30fc\u30e0{0}\u3092\u8ffd\u52a0\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br/>\u30a2\u30e9\u30fc\u30e0\u304c\u5c06\u6765\u306e\u4e88\u5b9a\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",
1483 -a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+g+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("\u30a2\u30e9\u30fc\u30e0\u3092\u7de8\u96c6",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1505 +a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+e+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("\u30a2\u30e9\u30fc\u30e0\u3092\u7de8\u96c6",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1506 function showAlertDetails(b){if(!xxdialogMode){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime),a="<div style=text-align:left>"+addHtmlValue("\u540d\u524d",c.ElementName)+addHtmlValue("\u30a6\u30a7\u30a4\u30af\u30bf\u30a4\u30e0",a.toLocaleString().replace(", "," at "));void 0!=c.Interval&&(a+=addHtmlValue("\u5185\u90e8",_fmtinterval(c.Interval.Interval)));a+=addHtmlValue("\u8d77\u304d\u305f\u5f8c",1==c.DeleteOnCompletion?"\u30a2\u30e9\u30fc\u30e0\u3092\u524a\u9664":"\u30a2\u30e9\u30fc\u30e0\u3092\u4fdd\u6301")+
1507 "</div>";messagebox(format("\u30a2\u30e9\u30fc\u30e0{0}",c.ElementName),a);setDialogMode(11,"\u8b66\u5831"+c.ElementName,5,showAlertDetailsDelete,a,b)}}function showAlertDetailsDelete(b,c){2==b&&amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,b,c,v){PullAlarms()})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag;
1486 -function setDialogMode(b,c,a,d,g,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c54",!0);QV("c54",a&1);QV("c53",a&2);QV(58,a&2);QV("c55",a&4);c&&QH(59,c);for(c=1;27>c;c++)QV("dialog"+c,c==b);QV("dialog",b);g&&(11==b?QH(63,g):QH(60,g));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1508 +function setDialogMode(b,c,a,d,e,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c106",!0);QV("c106",a&1);QV("c105",a&2);QV(59,a&2);QV("c107",a&4);c&&QH(60,c);for(c=1;28>c;c++)QV("dialog"+c,c==b);QV("dialog",b);e&&(11==b?QH(64,e):QH(61,e));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1509 function dialogclose(b){var c=xxdialogFunc,a=xxdialogButtons,d=xxdialogTag;setDialogMode();(a&8||b)&&c&&c(b,d)}
1488 -function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(41).offsetWidth&&(QS("Desk")["max-width"]=Q(41).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1489 -"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(60,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(60,c);setDialogMode(1,b)}
1490 -function SaveJsonFile(b,c,a,d){var g="",v={},n=new Date;amtsysstate&&(g="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));g+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1491 -n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+g+".json")}
1510 +function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(42).offsetWidth&&(QS("Desk")["max-width"]=Q(42).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1511 +"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(61,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(61,c);setDialogMode(1,b)}
1512 +function SaveJsonFile(b,c,a,d){var e="",v={},n=new Date;amtsysstate&&(e="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));e+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1513 +n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+e+".json")}
1514 var httpErrorTable={200:"OK",401:"\u8a8d\u8a3c\u30a8\u30e9\u30fc",408:"\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u30a8\u30e9\u30fc",601:"WSMAN\u89e3\u6790\u30a8\u30e9\u30fc",602:"HTTP\u5fdc\u7b54\u30d8\u30c3\u30c0\u30fc\u3092\u89e3\u6790\u3067\u304d\u307e\u305b\u3093",603:"\u4e88\u671f\u3057\u306a\u3044HTTP\u5217\u6319\u5fdc\u7b54",604:"\u4e88\u671f\u3057\u306a\u3044HTTP\u30d7\u30eb\u5fdc\u7b54",997:"\u7121\u52b9\u306a\u30c0\u30a4\u30b8\u30a7\u30b9\u30c8\u30ec\u30eb\u30e0"};
1515 function errcheck(b,c){if(null==wsstack||amtstack!=c)return!0;200!=b&&9!=b&&(setDialogMode(),wsstack.comm.FailAllError=999,amtstack.CancelAllQueries(999),QH(5,httpErrorTable[b]?httpErrorTable[b]:format("\u30a8\u30e9\u30fc\uff03{0}",b)),401==b&&QH(5,'\u8a8d\u8a3c\u30a8\u30e9\u30fc<br /><br /><input type=button value="Set new credentials" onclick=meshcentral2credCallback(true)></input>'),go(100),QS(3).width=0);return 200!=b}
1516 function goiFrame(b,c,a){if(!xxdialogMode){go(c);if(1==b.shiftKey||0==Q(13).src.endsWith(a))Q(13).src=a;QV(14,!1);QV(12,!0)}}function go(b,c){if(!xxdialogMode||1==c){QV(12,!1);QV(14,!0);QV(4,100==b);QV(6,100>b);for(var a=0;80>a;a++){QV("p"+a,a==b);var d=QS("go"+a);d&&(d["background-color"]=a==b?"#abcae1":"");d&&(d["background-color"]=a==b?"gray":"")}currentView=b;center()}}
1495 -function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,g=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:g};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(g=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:g}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(g=parseInt(a[2]));return{host:a[0],http:d,redir:g}}
1517 +function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,e=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:e};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(e=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:e}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(e=parseInt(a[2]));return{host:a[0],http:d,redir:e}}
1518 function addLink(b,c){return"<a style=cursor:pointer;color:blue onclick='"+c+"'>&diams; "+b+"</a>"}function addLinkConditional(b,c,a){return a?addLink(b,c):b}function haltEvent(b){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1}function addOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;Q(b).add(d)}function addDisabledOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;d.disabled=1;Q(b).add(d)}
1497 -function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,g=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:g=1}return 4==c+a+d+g}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("\u901a\u8a71\u30a8\u30e9\u30fc",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}
1519 +function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,e=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:e=1}return 4==c+a+d+e}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("\u901a\u8a71\u30a8\u30e9\u30fc",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}
1520 function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}function TableStart2(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><p><td>"}function TableEntry(b,c){return"<tr><td class=r1><p>"+b+"<td class=r1>"+c}function FullTable(b,c){var a=TableStart();for(i in b)i&&b[i]&&(a+=TableEntry(i,b[i]));return a+TableEnd(c)}
1521 function TableEnd(b){return"<tr><td colspan=2><p>"+(b?b:"")+"</table>"}function AddButton(b,c){return"<input type=button value='"+b+"' onclick='"+c+"' style=margin:4px>"}function AddButton2(b,c,a){return"<input type=button value='"+b+"' onclick='"+c+"' "+a+">"}function AddRefreshButton(b){return'<input type=button name=refreshbtn value="\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5" onclick=\'refreshButtons(false);'+b+"' style=margin:4px "+(0==refreshButtonsState?"disabled":"")+">"}
1500 -function MoreStart(){return'<a style=cursor:pointer;color:blue id=morexxx1 onclick=QV("morexxx1",false);QV("morexxx2",true)>&#x25BC; More</a><div id=morexxx2 style=display:none><br><hr>'}function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,g=b.options.length;d<g;d++)a=b.options[d],a.selected&&c.push(a.value);return c}
1522 +function MoreStart(){return'<a style=cursor:pointer;color:blue id=morexxx1 onclick=QV("morexxx1",false);QV("morexxx2",true)>&#x25BC; More</a><div id=morexxx2 style=display:none><br><hr>'}function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,e=b.options.length;d<e;d++)a=b.options[d],a.selected&&c.push(a.value);return c}
1523 function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}function guidToStr(b){return b.substring(6,8)+b.substring(4,6)+b.substring(2,4)+b.substring(0,2)+"-"+b.substring(10,12)+b.substring(8,10)+"-"+b.substring(14,16)+b.substring(12,14)+"-"+b.substring(16,20)+"-"+b.substring(20)}
1524 function getUrlVars(){for(var b,c=[],a=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),d=0;d<a.length;d++)b=a[d].indexOf("="),0<b&&(c[a[d].substring(0,b)]=a[d].substring(b+1,a[d].length));return c}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}
1525 function getDocHeight(){return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight&&0!=document.documentElement.clientHeight?document.documentElement.clientHeight:document.getElementsByTagName("body")[0].clientHeight}function addHtmlValue(b,c){return'<div style=height:20px><div style=float:right;width:220px;overflow:hidden><b title="'+c+'">'+c+"</b></div><div>"+b+"</div></div>"}
public/commander-ko.htm
+922 -901
@@ -1,8 +1,8 @@
1 -<!DOCTYPE html><html lang="ko" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=잇다 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>연결 해제</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>시스템 상태</a><p id=go14 class=nav1 onclick=go(14)><a>원격 데스크탑</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>파일</a><p id=go13 class=nav1 onclick=go(13)><a>시리얼 오버 LAN</a><p id=go2 class=nav1 onclick=go(2)><a>하드웨어 정보</a><p id=go6 class=nav1 onclick=go(6)><a>이벤트 로그</a><p id=go15 class=nav1 onclick=go(15)><a>감사 로그</a><p id=go21 class=nav1 onclick=go(21)><a>저장</a><p id=go8 class=nav1 onclick=go(8)><a>네트워크 설정</a><p id=go17 class=nav1 onclick=go(17)><a>인터넷 설정</a><p id=go16 class=nav1 onclick=go(16)><a>보안 설정</a><p id=go19 class=nav1 onclick=go(19)><a>에이전트 존재</a><p id=go18 class=nav1 onclick=go(18)><a>시스템 방어</a><p id=go11 class=nav1 onclick=go(11)><a>사용자 계정</a><p id=go22 class=nav1 onclick=go(22)><a>구독</a><p id=go23 class=nav1 onclick=go(23)><a>웨이크 경보</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN 브라우저</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="디스크 맵" onclick=iderToggleDiskMap()><input type=button value="IDE-R 세션 중지" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>플로피, 블록은 512 바이트입니다.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, 블록은 2048 바이트입니다.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>이 컴퓨터의 펌웨어는 업데이트되어야합니다.&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>여기를 확인하십시오</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>불러오는 중 ...</h1></div><div id=p1 style=display:none><h1>시스템 상태</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>하드웨어 정보</h1><span id=16></span></div><div id=p6 style=display:none><h1>이벤트 로그</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>네트워크 설정</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>사용자 계정</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMAN 브라우저</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><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=질문 style=margin:4px onclick=wsmanQuery()><input type=button value=명확한 style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=필터 style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Serial-over-LAN 터미널</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>인텔 ® AMT 리디렉션 포트 또는 Serial-over-LAN 기능이 비활성화되었습니다<span id=26>사용하려면 여기를 클릭하십시오.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>원격 컴퓨터의 전원이 켜져 있지 않으면 여기를 클릭하여 전원 명령을 실행하십시오.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="전원 동작 ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="원격 디스크 마운트 작업 시작" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="캡처 시작" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=잇다 onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>연결이 끊어졌습니다.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="리턴 키가 보낼 것을 토글" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="터미널 크기 전환" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="인텔 (F10 = ESC + [OM)" title="F1 ~ F10 키 에뮬레이션 유형 전환" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="확장 된 아스키" title="터미널 에뮬레이션 유형 전환" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>역행 키이<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=보내다 onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=풀 disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>원격 데스크탑</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>인텔 ® AMT 리디렉션 포트 또는 KVM 기능이 비활성화되었습니다<span id=37>사용하려면 여기를 클릭하십시오.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>원격 컴퓨터의 전원이 켜져 있지 않으면 여기를 클릭하여 전원 명령을 실행하십시오.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="왼쪽으로 회전" onclick=drotate(-1)>↺</div><div class=rb title="오른쪽으로 회전" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="전체 화면 모드 전환" onkeypress="return false" onkeydown="return false" value=완전한 onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="원격 데스크톱의 스크린 샷 저장" onkeypress="return false" onkeydown="return false" value=저장... onclick=deskSaveImage() style=margin-right:3px><input type=button value="설정 ..." title="원격 데스크톱 설정 편집" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="원격 디스크 마운트 작업 시작" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="원격 시스템의 전원 상태 변경" onkeypress="return false" onkeydown="return false" value="전원 동작 ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=잇다 onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>연결이 끊어졌습니다.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>승리<option value=1>승 + 다운<option value=2>승 +<option value=3>승 + L<option value=4>승 + M<option value=20>승 + R<option value=23>승 + 왼쪽<option value=24>승리 + 오른쪽<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=보내다 onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=유형 onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>빈 화면&nbsp;</span><span id=47><input id=48 type=checkbox>보기 만&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>감사 로그</h1><span id=50></span></div><div id=p16 style=display:none><h1>보안 설정</h1><span id=51></span></div><div id=p17 style=display:none><h1>인터넷 설정</h1><span id=52></span></div><div id=p18 style=display:none><h1>시스템 방어</h1><span id=53></span></div><div id=p19 style=display:none><h1>에이전트 존재</h1><span id=54></span></div><div id=p21 style=display:none><h1>저장</h1><span id=55></span></div><div id=p22 style=display:none><h1>이벤트 구독</h1><span id=56></span></div><div id=p23 style=display:none><h1>웨이크 경보</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>파일</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=쪽으로>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="모두 선택" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value="이름 바꾸기" onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=지우다 onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="새 폴더" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=업로드 onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=절단 onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=부 onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=풀 onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value="새롭게 하다" onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">이름으로 분류하다<option value=2>크기별로 정렬<option value=3>날짜순으로 정렬<option value=4>이름으로 내림차순<option value=5>크기로 내림차순<option value=6>날짜별로 내림차순</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 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=60 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>사용자 이름</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>암호*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>비밀번호 확인</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>현지<option value=1>회로망<option value=2>어떤</select><div>허가</div></div><div>부여 된 권한</div><ul id=62 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>* 대문자, 소문자, 0-9 및! @ # $ % ^ &amp; * () +-중 하나를 포함하는 최소 8 자</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>파워 액션</div></div><div><span style=color:red>경고:</span>일부 전원 작업으로 인해 데이터가 손실 될 수 있으며 데스크톱, 터미널 또는 디스크 리디렉션 세션의 연결이 끊어 질 수 있습니다.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>동의 코드</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>기본 디스플레이<option value=1>보조 디스플레이<option id=d6ThirdDisplay value=2 style=display:none>세번째 디스플레이</select><div>동의 표시</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>이미지 인코딩</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>비활성화<option value=2>Automatic<option value=3>가능</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>로컬 마우스 커서 표시</label><br><label><input type=checkbox id=d7showcad>Ctrl-Alt-Del 표시</label><br><label><input type=checkbox id=d7limitFrameRate>프레임 속도 제한</label><br><label><input type=checkbox id=d7noMouseRotate>마우스를 돌리지 마십시오</label><br></div><div>다른 설정</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">소프트웨어 KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50 %<option value=40>40 %<option selected="selected" value=30>30 %<option value=20>20 %<option value=10>10 %<option value=5>5 %<option value=1>1%</select><div style=height:20px>품질</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100 %<option value=896>87.5 %<option value=768>75 %<option value=640>62.5 %<option value=512>50 %<option value=384>37.5 %<option value=256>25 %<option value=128>12.5 %</select><div style=height:20px>스케일링</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=관리자 style=float:right;width:220px><div style=height:20px>사용자 이름</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>암호</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>리디렉션 포트</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM 원격 데스크톱</label><label style=display:block><input type=checkbox id=c17>IDE 리디렉션<br></label><label style=display:block><input type=checkbox id=c18>시리얼 오버 LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>불필요<br></label><label><input type=radio name=d10 id=c20 value=1>KVM에만 필요<br></label><label><input type=radio name=d10 id=c21 value=4294967295>항상 필수<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="최대 32 자"><div title="최대 32 자">프로필 이름</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="최대 32 자"><div title="최대 32 자">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>우선 순위</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>입증</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>없음</select><div>암호화</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8 자에서 63 자 사이의 길이"><div title="8 자에서 63 자 사이의 길이">암호*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8 자에서 63 자 사이의 길이"><div title="8 자에서 63 자 사이의 길이">비밀번호 확인</div></div></div><div id=dialog19 style=margin:auto;margin:3px>이 시스템에 대한 인텔 ® AMT의 전체 상태가 파일로 저장됩니다. 비밀번호는 저장되지 않지만 일부 민감한 데이터가 포함될 수 있습니다.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>비활성화<br><input type=radio name=d20 id=d20b value=1>ICMP 응답<br><input type=radio name=d20 id=d20c value=2>RMCP 응답<br><input type=radio name=d20 id=d20d value=3>ICMP 및 RMCP 응답<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>운영 체제 IP 주소 동기화</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP 주소</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>서브넷 마크</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>게이트웨이</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>기본 DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>대체 DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>비활성화<option value=1>비활성화, DHCP 업데이트<option value=2>가능</select><div>동적 DNS 클라이언트</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>업데이트 간격 (분)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (초)</div></div><div style=font-size:10px><br>기본 간격은 1440 분이고 기본 TTL은 900 초입니다.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>파워 업<option value=10>초기화<option value=5>전원 사이클<option value=8>전력 다운<option id=d24p500 value=500>대기 모드에서 OS 웨이크<option id=d24p501 value=501>OS 절전<option value=999>부팅 옵션 설정</select><div>원격 명령</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS 일시 정지</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>보안 부팅 시행</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS 설정</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>강제 진행 이벤트</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>전원 잠금 버튼</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>잠금 재설정 버튼</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>잠자기 버튼</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>키보드 잠금</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS 비밀번호 우회</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS를 다시 플래시</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>안전 모드</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>IDER 사용</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>시리얼 오버 LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>인텔 ® 원격 보안 지우기</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>부팅 설정</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>없음<option id=ForceDVDBootOption value=1>CD / DVD 부팅 강제<option id=ForcePXEBootOption value=2>PXE 부팅 강제<option id=ForceHDBootOption value=3>강제 하드 디스크 부팅<option id=ForceDiagBootOption value=4>강제 진단 부팅</select><div>부팅 소스</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>없음<option value=1>색인 1<option value=2>인덱스 2<option value=3>색인 3<option value=3>색인 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>플로피로 부팅<option value=1>CDROM으로 부팅</select><div>IDER 부팅 장치</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>시스템 기본값<option id=c46 value=1>조용한<option id=c47 value=2>말 수가 많은<option id=c48 value=3>빈 화면</select><div>어휘</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 비밀번호</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>알람 이름</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>웨이크 날짜 (년-월-일)</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>웨이크 시간 (시 : 분 : 초)</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>간격 (일-시간-분)</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>알람 유지<option value=1>완료시 삭제</select></div><div style=padding-top:4px>깨어 난 후</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>가능<br></label><label><input type=radio name=d26b id=c50 value=0>비활성화<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>가능<br></label><label><input type=radio name=d26a id=c52 value=0>비활성화<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=취소 style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=확인 style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=지우다 style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="ko" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=잇다 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>연결 해제</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>시스템 상태</a><p id=go14 class=nav1 onclick=go(14)><a>원격 데스크탑</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>파일</a><p id=go13 class=nav1 onclick=go(13)><a>시리얼 오버 LAN</a><p id=go2 class=nav1 onclick=go(2)><a>하드웨어 정보</a><p id=go6 class=nav1 onclick=go(6)><a>이벤트 로그</a><p id=go15 class=nav1 onclick=go(15)><a>감사 로그</a><p id=go21 class=nav1 onclick=go(21)><a>저장</a><p id=go8 class=nav1 onclick=go(8)><a>네트워크 설정</a><p id=go17 class=nav1 onclick=go(17)><a>인터넷 설정</a><p id=go16 class=nav1 onclick=go(16)><a>보안 설정</a><p id=go19 class=nav1 onclick=go(19)><a>에이전트 존재</a><p id=go18 class=nav1 onclick=go(18)><a>시스템 방어</a><p id=go11 class=nav1 onclick=go(11)><a>사용자 계정</a><p id=go22 class=nav1 onclick=go(22)><a>구독</a><p id=go23 class=nav1 onclick=go(23)><a>웨이크 경보</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN 브라우저</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="디스크 맵" onclick=iderToggleDiskMap()><input type=button value="IDE-R 세션 중지" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>플로피, 블록은 512 바이트입니다.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, 블록은 2048 바이트입니다.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>이 컴퓨터의 펌웨어는 업데이트되어야합니다.&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>여기를 확인하십시오</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>불러오는 중 ...</h1></div><div id=p1 style=display:none><h1>시스템 상태</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>하드웨어 정보</h1><span id=16></span></div><div id=p6 style=display:none><h1>이벤트 로그</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>네트워크 설정</h1><span id=19></span><span id=20></span><span id=21></span></div><div id=p11 style=display:none><h1>사용자 계정</h1><span id=22></span></div><div id=p12 style=display:none><h1>WSMAN 브라우저</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=23 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=24 type=button value=질문 style=margin:4px onclick=wsmanQuery()><input type=button value=명확한 style=margin:4px onclick="QH(25, '')"><input id=c0 placeholder=필터 style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=25></div></div><div id=p13 style=display:none;min-width:780px><h1>Serial-over-LAN 터미널</h1><br><div id=26 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>인텔 ® AMT 리디렉션 포트 또는 Serial-over-LAN 기능이 비활성화되었습니다<span id=27>사용하려면 여기를 클릭하십시오.</span></div></div><div id=28 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>원격 컴퓨터의 전원이 켜져 있지 않으면 여기를 클릭하여 전원 명령을 실행하십시오.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=29></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="전원 동작 ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="원격 디스크 마운트 작업 시작" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="캡처 시작" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=잇다 onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=30>연결이 끊어졌습니다.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="리턴 키가 보낼 것을 토글" onclick="termToggleCr();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="터미널 크기 전환" onclick="termToggleSize();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="인텔 (F10 = ESC + [OM)" title="F1 ~ F10 키 에뮬레이션 유형 전환" onclick="termToggleFx();Q(33).blur()"><input id=34 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="확장 된 아스키" title="터미널 에뮬레이션 유형 전환" onclick="termToggleType();Q(34).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>역행 키이<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=보내다 onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=35 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=풀 disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=36><h1>원격 데스크탑</h1><br></div><div id=37 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>인텔 ® AMT 리디렉션 포트 또는 KVM 기능이 비활성화되었습니다<span id=38>사용하려면 여기를 클릭하십시오.</span></div></div><div id=39 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>원격 컴퓨터의 전원이 켜져 있지 않으면 여기를 클릭하여 전원 명령을 실행하십시오.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=40></span>&nbsp;<div class=rb title="왼쪽으로 회전" onclick=drotate(-1)>↺</div><div class=rb title="오른쪽으로 회전" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="전체 화면 모드 전환" onkeypress="return false" onkeydown="return false" value=완전한 onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="원격 데스크톱의 스크린 샷 저장" onkeypress="return false" onkeydown="return false" value=저장... onclick=deskSaveImage() style=margin-right:3px><input type=button value="설정 ..." title="원격 데스크톱 설정 편집" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="원격 디스크 마운트 작업 시작" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="원격 시스템의 전원 상태 변경" onkeypress="return false" onkeydown="return false" value="전원 동작 ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=잇다 onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=41>연결이 끊어졌습니다.</span></div><tr><td id=42 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onwheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=43 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>승리<option value=1>승 + 다운<option value=2>승 +<option value=3>승 + L<option value=4>승 + M<option value=20>승 + R<option value=23>승 + 왼쪽<option value=24>승리 + 오른쪽<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12<option value=25>Enter</select><input id=DeskWD type=button value=보내다 onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=44 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=45 type=button value=유형 onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=46><input id=47 type=checkbox>빈 화면&nbsp;</span><span id=48><input id=49 type=checkbox>보기 만&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=50></span><h1>감사 로그</h1><span id=51></span></div><div id=p16 style=display:none><h1>보안 설정</h1><span id=52></span></div><div id=p17 style=display:none><h1>인터넷 설정</h1><span id=53></span></div><div id=p18 style=display:none><h1>시스템 방어</h1><span id=54></span></div><div id=p19 style=display:none><h1>에이전트 존재</h1><span id=55></span></div><div id=p21 style=display:none><h1>저장</h1><span id=56></span></div><div id=p22 style=display:none><h1>이벤트 구독</h1><span id=57></span></div><div id=p23 style=display:none><h1>웨이크 경보</h1><span id=58></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>파일</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=쪽으로>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="모두 선택" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value="이름 바꾸기" onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=지우다 onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="새 폴더" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=업로드 onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=절단 onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=부 onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=풀 onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value="새롭게 하다" onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">이름으로 분류하다<option value=2>크기별로 정렬<option value=3>날짜순으로 정렬<option value=4>이름으로 내림차순<option value=5>크기로 내림차순<option value=6>날짜별로 내림차순</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=59 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=60 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=61 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>사용자 이름</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>암호*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>비밀번호 확인</div></div><div id=62><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>현지<option value=1>회로망<option value=2>어떤</select><div>허가</div></div><div>부여 된 권한</div><ul id=63 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>* 대문자, 소문자, 0-9 및! @ # $ % ^ &amp; * () +-중 하나를 포함하는 최소 8 자</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>파워 액션</div></div><div><span style=color:red>경고:</span>일부 전원 작업으로 인해 데이터가 손실 될 수 있으며 데스크톱, 터미널 또는 디스크 리디렉션 세션의 연결이 끊어 질 수 있습니다.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>동의 코드</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>기본 디스플레이<option value=1>보조 디스플레이<option id=d6ThirdDisplay value=2 style=display:none>세번째 디스플레이</select><div>동의 표시</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>이미지 인코딩</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>비활성화<option value=2>Automatic<option value=3>가능</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>로컬 마우스 커서 표시</label><br><label><input type=checkbox id=d7showcad>Ctrl-Alt-Del 표시</label><br><label><input type=checkbox id=d7limitFrameRate>프레임 속도 제한</label><br><label><input type=checkbox id=d7noMouseRotate>마우스를 돌리지 마십시오</label><br><label><input type=checkbox id=d7kvmrmw>Reverse Mouse Wheel</label><br></div><div>다른 설정</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">소프트웨어 KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50 %<option value=40>40 %<option selected="selected" value=30>30 %<option value=20>20 %<option value=10>10 %<option value=5>5 %<option value=1>1%</select><div style=height:20px>품질</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100 %<option value=896>87.5 %<option value=768>75 %<option value=640>62.5 %<option value=512>50 %<option value=384>37.5 %<option value=256>25 %<option value=128>12.5 %</select><div style=height:20px>스케일링</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=관리자 style=float:right;width:220px><div style=height:20px>사용자 이름</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>암호</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>리디렉션 포트</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM 원격 데스크톱</label><label style=display:block><input type=checkbox id=c17>IDE 리디렉션<br></label><label style=display:block><input type=checkbox id=c18>시리얼 오버 LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>불필요<br></label><label><input type=radio name=d10 id=c20 value=1>KVM에만 필요<br></label><label><input type=radio name=d10 id=c21 value=4294967295>항상 필수<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=64></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="최대 32 자"><div title="최대 32 자">프로필 이름</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="최대 32 자"><div title="최대 32 자">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>우선 순위</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()></select><div>입증</div></div><div style=height:26px><select id=c26 style=float:right;width:200px onclick=updateWifiDialog()><option id=65 value=4>CCMP-AES<option id=66 value=3>TKIP-RC4</select><div>암호화</div></div><div id=c27><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8 자에서 63 자 사이의 길이"><div title="8 자에서 63 자 사이의 길이">암호*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8 자에서 63 자 사이의 길이"><div title="8 자에서 63 자 사이의 길이">비밀번호 확인</div></div></div><div id=c30 style=display:none><div id=c31 style=height:26px><select id=c32 style=float:right;width:200px onchange=updateNetAuth2Dialog(event)><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>실험 계획안</div></div><div id=c33 style=height:26px><input id=c34 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="최대 32 자"><div title="최대 32 자">Server Name</div></div><div id=c35 style=height:26px><select id=c36 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c37 style=height:26px><input id=c38 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c39 style=height:26px><input id=c40 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">사용자 이름</div></div><div id=c41 style=height:26px><input id=c42 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuth2Dialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">암호</div></div><div id=c43 style=height:26px><input id=c44 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuth2Dialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c45 style=height:26px><input id=c46 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c47 style=height:26px><input id=c48 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c49 style=height:26px><select id=c50 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Client Certificate</div></div><div id=c51 style=height:26px><select id=c52 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Server Issuer Cert</div></div><div id=c53 style=height:26px><select id=c54 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=1>가능<option value=0>비활성화</select><div>Active in S0</div></div></div></div><div id=dialog19 style=margin:auto;margin:3px>이 시스템에 대한 인텔 ® AMT의 전체 상태가 파일로 저장됩니다. 비밀번호는 저장되지 않지만 일부 민감한 데이터가 포함될 수 있습니다.<br><br><input id=c55 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>비활성화<br><input type=radio name=d20 id=d20b value=1>ICMP 응답<br><input type=radio name=d20 id=d20c value=2>RMCP 응답<br><input type=radio name=d20 id=d20d value=3>ICMP 및 RMCP 응답<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=67><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>운영 체제 IP 주소 동기화</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=68><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c56 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP 주소</div></div><div style=height:26px id=69><input id=c57 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>서브넷 마크</div></div><div style=height:26px><input id=c58 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>게이트웨이</div></div><div style=height:26px><input id=c59 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>기본 DNS</div></div><div style=height:26px><input id=c60 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>대체 DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c61 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>비활성화<option value=1>비활성화, DHCP 업데이트<option value=2>가능</select><div>동적 DNS 클라이언트</div></div><div style=height:26px><input id=c62 style=float:right;width:200px><div>업데이트 간격 (분)</div></div><div style=height:26px><input id=c63 style=float:right;width:200px><div>TTL (초)</div></div><div style=font-size:10px><br>기본 간격은 1440 분이고 기본 TTL은 900 초입니다.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c64 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>파워 업<option value=10>초기화<option value=5>전원 사이클<option value=8>전력 다운<option id=d24p500 value=500>대기 모드에서 OS 웨이크<option id=d24p501 value=501>OS 절전<option value=999>부팅 옵션 설정</select><div>원격 명령</div></div><div style=height:80px><div id=c65 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS 일시 정지</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>보안 부팅 시행</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS 설정</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>강제 진행 이벤트</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>전원 잠금 버튼</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>잠금 재설정 버튼</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>잠자기 버튼</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>키보드 잠금</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS 비밀번호 우회</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS를 다시 플래시</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>안전 모드</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>IDER 사용</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>시리얼 오버 LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>인텔 ® 원격 보안 지우기</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>부팅 설정</div></div><div style=height:26px><select id=c66 style=float:right;width:200px onchange=showAdvPowerDlgChange()></select><div>부팅 소스</div></div><div id=c67 style=height:26px><select id=c68 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>없음<option value=1>색인 1<option value=2>인덱스 2<option value=3>색인 3<option value=3>색인 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c69 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>플로피로 부팅<option value=1>CDROM으로 부팅</select><div>IDER 부팅 장치</div></div><div style=height:26px><select id=c70 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>시스템 기본값<option id=c71 value=1>조용한<option id=c72 value=2>말 수가 많은<option id=c73 value=3>빈 화면</select><div>어휘</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 비밀번호</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>알람 이름</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>웨이크 날짜 (년-월-일)</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>웨이크 시간 (시 : 분 : 초)</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>간격 (일-시간-분)</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>알람 유지<option value=1>완료시 삭제</select></div><div style=padding-top:4px>깨어 난 후</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c74 value=2>가능<br></label><label><input type=radio name=d26b id=c75 value=0>비활성화<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c76 value=1>가능<br></label><label><input type=radio name=d26a id=c77 value=0>비활성화<br></label></div><div id=dialog27 style=margin:auto;margin:3px><br><div style=height:26px><select id=c78 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>비활성화<option value=1>가능</select><div>가능</div></div><div id=c79 style=height:26px><select id=c80 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>실험 계획안</div></div><div id=c81 style=height:26px><input id=c82 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="최대 32 자"><div title="최대 32 자">Server Name</div></div><div id=c83 style=height:26px><select id=c84 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c85 style=height:26px><input id=c86 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c87 style=height:26px><input id=c88 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">사용자 이름</div></div><div id=c89 style=height:26px><input id=c90 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuthDialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">암호</div></div><div id=c91 style=height:26px><input id=c92 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c93 style=height:26px><input id=c94 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c95 style=height:26px><input id=c96 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c97 style=height:26px><select id=c98 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Client Certificate</div></div><div id=c99 style=height:26px><select id=c100 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Server Issuer Cert</div></div><div id=c101 style=height:26px><select id=c102 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>가능<option value=1>비활성화</select><div>Active in S0</div></div><div id=c103 style=height:26px><input id=c104 style=float:right;width:200px onkeyup=updateNetAuthDialog()><div>PXE Timeout</div></div></div></div><div style=padding:10px;margin-bottom:4px><input id=c105 type=button value=취소 style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c106 type=button value=확인 style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c107 type=button value=지우다 style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
5 -$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var g=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==g&&$jscomp.global.Object.defineProperty(b,d,g)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
5 +$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var e=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==e&&$jscomp.global.Object.defineProperty(b,d,e)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
6 String.prototype.endsWith||(String.prototype.endsWith=function(b){return-1!==this.indexOf(b,this.length-b.length)});function Q(b){return document.getElementById(b)}function QS(b){try{return Q(b).style}catch(c){}}function QE(b,c){try{Q(b).disabled=!c}catch(a){}}function QV(b,c){try{QS(b).display=c?"":"none"}catch(a){}}function QA(b,c){Q(b).innerHTML+=c}function QH(b,c){Q(b).innerHTML=c}function inputBoxFocus(b){Q(b).focus();var c=Q(b).value;Q(b).value="";Q(b).value=c}
7 function ReadShort(b,c){return(b.charCodeAt(c)<<8)+b.charCodeAt(c+1)}function ReadShortX(b,c){return(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}function ReadInt(b,c){return 16777216*b.charCodeAt(c)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadSInt(b,c){return(b.charCodeAt(c)<<24)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadIntX(b,c){return 16777216*b.charCodeAt(c+3)+(b.charCodeAt(c+2)<<16)+(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}
8 function ShortToStr(b){return String.fromCharCode(b>>8&255,b&255)}function ShortToStrX(b){return String.fromCharCode(b&255,b>>8&255)}function IntToStr(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}function IntToStrX(b){return String.fromCharCode(b&255,b>>8&255,b>>16&255,b>>24&255)}function MakeToArray(b){return b&&null!=b&&"object"!=typeof b?[b]:b}function SplitArray(b){return b.split(",")}function Clone(b){return JSON.parse(JSON.stringify(b))}
@@ -12,155 +12,155 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a,d){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(d?d:32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,u,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.floppyReady)return g.floppyReady=!0,g.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.cdromReady)return g.cdromReady=!0,g.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}g.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,u);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),g.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 -d=0;switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}g.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),u&1);return}g.SendCommandEndResponse(1,5,c,36,0);break;case 27:g.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==g.floppy||176==c&&null==g.cdrom)return g.SendCommandEndResponse(1,
18 -2,c,58,0),-1;g.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}g.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),u&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.floppy&&(d=(g.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.cdrom&&(d=(g.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);g.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),u&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,F,d);a(c,F,d,u);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);g.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return g.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?g.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -u&1):0==N&&(H?g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),u&1):g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),u&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=r;if(16==v||N&&16>v)H+=K;if(30==
22 -v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=A;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));g.SendDataToHost(c,!0,H,u&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");g.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=g.floppy?d=2:176==c&&null!=g.cdrom&&(d=2);g.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),u&1);break;case 76:g.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),g.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),g.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;F=0;160==c?null!=g.floppy&&(F=g.floppy.size>>9):null!=g.cdrom&&(F=g.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?y:R:z;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?q:l:D;break;case 26:176==c&&(H=e);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?g.SendCommandEndResponse(0,5,c,32,0):g.SendDataToHost(c,!0,H,u&1);break;case 81:g.SendDataToHost(c,!0,E,u&1);break;case 172:g.SendDataToHost(c,!0,O,u&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),g.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 -b,x,e){var c=null,y=0;160==a&&(c=g.floppy,null!=g.floppy&&(y=g.floppy.size>>9));176==a&&(c=g.cdrom,null!=g.cdrom&&(y=g.cdrom.size>>11));if(0>x||b+x>y)return g.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return g.SendCommandEndResponse(1,0,a,0,0),0;null!=c&&(g.sectorStats&&g.sectorStats(1,160==a?0:1,y,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==u?H.push({media:c,dev:a,lba:b,len:x,fr:e}):(u=c,T=a,P=b,F=x,d(e)))}function d(a){var b=F,x=P;F>g.iderinfo.readbfr&&(b=g.iderinfo.readbfr);F-=b;P+=b;var e=
26 -new FileReader;e.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));g.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(u=null,N?(g.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),u=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};e.readAsBinaryString?e.readAsBinaryString(u.slice(x,x+b)):e.readAsArrayBuffer(u.slice(x,x+b))}var g={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,q,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,q);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),q&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),q&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);e.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),q&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,F,d);a(c,F,d,q);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);e.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +q&1):0==N&&(H?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),q&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),q&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=u;if(16==v||N&&16>v)H+=K;if(30==
22 +v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=z;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));e.SendDataToHost(c,!0,H,q&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),q&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;F=0;160==c?null!=e.floppy&&(F=e.floppy.size>>9):null!=e.cdrom&&(F=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?A:R:y;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?r:l:D;break;case 26:176==c&&(H=g);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,H,q&1);break;case 81:e.SendDataToHost(c,!0,E,q&1);break;case 172:e.SendDataToHost(c,!0,O,q&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 +b,x,c){var g=null,p=0;160==a&&(g=e.floppy,null!=e.floppy&&(p=e.floppy.size>>9));176==a&&(g=e.cdrom,null!=e.cdrom&&(p=e.cdrom.size>>11));if(0>x||b+x>p)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,p,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==q?H.push({media:g,dev:a,lba:b,len:x,fr:c}):(q=g,T=a,P=b,F=x,d(c)))}function d(a){var b=F,x=P;F>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);F-=b;P+=b;var c=
26 +new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));e.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(q=null,N?(e.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),q=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(q.slice(x,x+b)):c.readAsArrayBuffer(q.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
27 iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,
28 -0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),e=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 -18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),r=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 -0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),A=String.fromCharCode(1,5,3,0),y=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),z=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);g.xxStateChange=function(a){b("IDER-StateChange",a);
31 -0==a&&g.Stop();3==a&&g.Start()};g.Start=function(){b("IDER-Start");b(g.floppy,g.cdrom);g.bytesToAmt=0;g.bytesFromAmt=0;g.inSequence=0;g.outSequence=0;H=[];g.SendCommand(64,ShortToStrX(g.rx_timeout)+ShortToStrX(g.tx_timeout)+ShortToStrX(g.heartbeat)+IntToStrX(g.version));g.sectorStats&&(g.sectorStats(0,0,g.floppy?g.floppy.size>>9:0),g.sectorStats(0,1,g.cdrom?g.cdrom.size>>11:0))};g.Stop=function(){b("IDER-Stop");g.parent.Stop()};g.ProcessData=function(a){g.bytesFromAmt+=a.length;g.acc+=a;null!=v&&
32 -v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",g.acc.length,rstr2hex(g.acc));;){a=g.ProcessDataEx();if(0==a)break;if(g.inSequence!=ReadIntX(g.acc,4)){b("ERROR: Out of sequence",g.inSequence,ReadIntX(g.acc,4));g.Stop();break}g.inSequence++;g.acc=g.acc.substring(a)}};g.SendCommand=function(a,x,e,c){null==x&&(x="");e=50<a&&1==e?2:0;c&&(e+=1);x=String.fromCharCode(a,0,0,e)+IntToStrX(g.outSequence++)+x;g.parent.xxSend(x);g.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 -"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};g.SendCommandEndResponse=function(a,b,x,e,c){a?g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,e,c),!0)};g.SendDataToHost=function(a,b,x,e){var c=e?0:x.length;1==b?g.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,e):g.SendCommand(84,
34 -String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,e)};g.SendGetDataFromHost=function(a,b){g.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};g.SendDisableEnableFeatures=function(a,b){null==b&&(b="");g.SendCommand(72,String.fromCharCode(a)+b)};g.ProcessDataEx=function(){if(8>g.acc.length)return 0;switch(g.acc.charCodeAt(0)){case 65:if(30>g.acc.length)break;var a=g.acc.charCodeAt(29);
35 -if(g.acc.length<30+a)break;g.iderinfo={};g.iderinfo.major=g.acc.charCodeAt(8);g.iderinfo.minor=g.acc.charCodeAt(9);g.iderinfo.fwmajor=g.acc.charCodeAt(10);g.iderinfo.fwminor=g.acc.charCodeAt(11);g.iderinfo.readbfr=ReadShortX(g.acc,16);g.iderinfo.writebfr=ReadShortX(g.acc,18);g.iderinfo.proto=g.acc.charCodeAt(21);g.iderinfo.iana=ReadIntX(g.acc,25);b(g.iderinfo);0!=g.iderinfo.proto&&(b("Unknown proto",g.iderinfo.proto),g.Stop());8192<g.iderinfo.readbfr&&(b("Illegal read buffer size",g.iderinfo.readbfr),
36 -g.Stop());8192<g.iderinfo.writebfr&&(b("Illegal write buffer size",g.iderinfo.writebfr),g.Stop());0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),g.Stop(),8;case 68:return g.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>g.acc.length)break;a=g.acc.charCodeAt(8);null===u?(g.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 -a));return 9;case 73:if(13>g.acc.length)break;var a=g.acc.charCodeAt(8),x=ReadIntX(g.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:g.enabled=x&2?!0:!1;b("IDER Status: "+g.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>g.acc.length)break;b("IDER: ABORT",g.acc.charCodeAt(8));
38 -return 11;case 75:return 8;case 80:if(28>g.acc.length)break;var a=g.acc.charCodeAt(14)&16?176:160,x=g.acc.charCodeAt(14),e=g.acc.substring(16,28),y=g.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(e),y,x);c(a,e,y,x);return 28;case 83:if(14>g.acc.length)break;a=ReadShortX(g.acc,9);if(g.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",g.acc[0]),g.Stop()}return 0};
39 -var H=[],N=!1,u=null,T,P,F;return g},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 -a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,g,v,n){b("SIDER-Start",a,d,g,v,n);c.host=a;c.port=d;c.user=g;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==g?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+g:"")+"&tls1only="+
41 -c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(g){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
28 +0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),r=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 +18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 +0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);
31 +0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;H=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&
32 +v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 +"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,
34 +String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);
35 +if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),
36 +e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===q?(e.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 +a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));
38 +return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),p=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),p,x);c(a,g,p,x);return 28;case 83:if(14>e.acc.length)break;a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};
39 +var H=[],N=!1,q=null,T,P,F;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 +a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+
41 +c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
42 b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);break;
43 -default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,g){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){e.socketState=2;e.socketParseState=0;e.socketAccumulator="";e.socketHeader=null;e.socketData="";
44 -for(i in e.pendingAjaxCall)e.sendRequest(e.pendingAjaxCall[i][0],e.pendingAjaxCall[i][3],e.pendingAjaxCall[i][4])}function p(a){var b=e.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(e.socketAccumulator=b+a;;){if(0==e.socketParseState){b=e.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;e.socketHeader=e.socketAccumulator.substring(0,b).split("\r\n");if(null==e.amtVersion)for(var c in e.socketHeader)0==e.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 -(e.amtVersion=e.socketHeader[c].substring(46));e.socketAccumulator=e.socketAccumulator.substring(b+4);e.socketParseState=1;e.socketData="";e.socketXHeader={Directive:e.socketHeader[0].split(" ")};for(c in e.socketHeader)0!=c&&(b=e.socketHeader[c].indexOf(":"),e.socketXHeader[e.socketHeader[c].substring(0,b).toLowerCase()]=e.socketHeader[c].substring(b+2))}if(1==e.socketParseState){b=-1;if(void 0==e.socketXHeader.connection||"close"!=e.socketXHeader.connection.toLowerCase()||void 0!=e.socketXHeader["transfer-encoding"]&&
46 -"chunked"==e.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=e.socketXHeader["content-length"]){b=parseInt(e.socketXHeader["content-length"]);if(e.socketAccumulator.length<b)break;a=e.socketAccumulator.substring(0,b);e.socketAccumulator=e.socketAccumulator.substring(b);e.socketData=a;b=0}else{var p=e.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(e.socketAccumulator.substring(0,p),16);if(isNaN(b)){e.websocket&&e.websocket.close();break}if(e.socketAccumulator.length<p+2+b+2)break;
47 -a=e.socketAccumulator.substring(p+2,p+2+b);e.socketAccumulator=e.socketAccumulator.substring(p+2+b+2);e.socketData+=a}else b=0;if(0==b){p=e.socketXHeader;b=e.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++e.authcounter){if(e.challengeParams=e.parseDigest(p["www-authenticate"]),null!=e.challengeParams.qop){b=e.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 -e.challengeParams.qop="auth-int":e.challengeParams.qop="auth"}}else p=e.pendingAjaxCall.shift(),e.authcounter=0,e.ActiveAjaxCount--,e.gotNextMessages(b,"success",{status:a},p),e.PerformNextAjax();e.socketParseState=0;e.socketHeader=null}}}}function q(a){0==e.inDataCount&&(e.tlsv1only=1-e.tlsv1only);e.socketState=0;null!=e.socket&&(e.socket.close(),e.socket=null);if(0<e.pendingAjaxCall.length){a=e.pendingAjaxCall.shift();var b=a[5];e.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var e={PendingAjax:[],
49 -ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};e.host=b;e.port=c;e.user=a;e.pass=d;e.tls=g;e.tlsv1only=0;e.inDataCount=0;e.amtVersion=null;e.digestRealmMatch=null;e.digestRealm=null;e.PerformAjax=function(a,b,c,p,d,h){e.ActiveAjaxCount<e.MaxActiveAjaxCount&&0==e.PendingAjax.length?e.PerformAjaxEx(a,b,c,d,h):1==p?e.PendingAjax.unshift([a,b,c,d,h]):e.PendingAjax.push([a,b,c,d,h])};e.PerformNextAjax=function(){if(!(e.ActiveAjaxCount>=
50 -e.MaxActiveAjaxCount||0==e.PendingAjax.length)){var a=e.PendingAjax.shift();e.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);e.PerformNextAjax()}};e.PerformAjaxEx=function(a,b,c,p,d){if(0!=e.FailAllError)e.gotNextMessagesError({status:e.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),e.ActiveAjaxCount++,e.PerformAjaxExNodeJS(a,b,c,p,d)};e.pendingAjaxCall=[];e.PerformAjaxExNodeJS=function(a,b,c,p,d){e.PerformAjaxExNodeJS2(a,
51 -b,c,p,d,5)};e.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=e.FailAllError?(e.ActiveAjaxCount--,999!=e.FailAllError&&e.gotNextMessages(null,"error",{status:0==e.FailAllError?408:e.FailAllError},[a,b,c,p,d]),e.PerformNextAjax()):(e.pendingAjaxCall.push([a,b,c,p,d,h]),0==e.socketState?e.xxConnectHttpSocket():2==e.socketState&&e.sendRequest(a,p,d))};e.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=e.challengeParams){e.digestRealm=e.challengeParams.realm;
52 -if(e.digestRealmMatch&&e.digestRealm!=e.digestRealmMatch){e.FailAllError=997;e.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(e.user+":"+e.challengeParams.realm+":"+e.pass)+":"+e.challengeParams.nonce+":"+n(e.noncecounter)+":"+d+":"+e.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==e.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+e.renderDigest({username:e.user,realm:e.challengeParams.realm,nonce:e.challengeParams.nonce,uri:b,qop:e.challengeParams.qop,
53 -response:c,nc:n(e.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+e.host+":"+e.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==e.socketState&&null!=e.socket&&e.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{e.socket.send(b.buffer)}catch(h){}}};e.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var e=b.trim().split("=");a[e[0]]=e[1].replace(RegExp('"',"g"),"");return a},{})};e.renderDigest=function(a){var b=
54 -[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,e){return b+","+("nc"==e||"qop"==e?e+"="+a[e]:e+'="'+a[e]+'"')},"").substring(1)};e.xxConnectHttpSocket=function(){e.inDataCount=0;e.socketState=1;e.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+e.host+"&port="+e.port+"&tls="+e.tls+"&tls1only="+e.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 -typeof d?"&serverauth=1&user="+a:""));e.socket.binaryType="arraybuffer";e.socket.onopen=l;e.socket.onmessage=p;e.socket.onclose=q};e.gotNextMessages=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](a,c.status,p[2])};e.gotNextMessagesError=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](e,null,{Header:{HttpError:a.status}},a.status,p[2])};e.CancelAllQueries=function(a){for(;0<e.PendingAjax.length;){var b=
56 -e.PendingAjax.shift();b[1](null,a,b[2])}null!=e.websocket&&(e.websocket.close(),e.websocket=null,e.socketState=0)};return e},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
43 +default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){g.socketState=2;g.socketParseState=0;g.socketAccumulator="";g.socketHeader=null;g.socketData="";
44 +for(i in g.pendingAjaxCall)g.sendRequest(g.pendingAjaxCall[i][0],g.pendingAjaxCall[i][3],g.pendingAjaxCall[i][4])}function p(a){var b=g.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(g.socketAccumulator=b+a;;){if(0==g.socketParseState){b=g.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;g.socketHeader=g.socketAccumulator.substring(0,b).split("\r\n");if(null==g.amtVersion)for(var c in g.socketHeader)0==g.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 +(g.amtVersion=g.socketHeader[c].substring(46));g.socketAccumulator=g.socketAccumulator.substring(b+4);g.socketParseState=1;g.socketData="";g.socketXHeader={Directive:g.socketHeader[0].split(" ")};for(c in g.socketHeader)0!=c&&(b=g.socketHeader[c].indexOf(":"),g.socketXHeader[g.socketHeader[c].substring(0,b).toLowerCase()]=g.socketHeader[c].substring(b+2))}if(1==g.socketParseState){b=-1;if(void 0==g.socketXHeader.connection||"close"!=g.socketXHeader.connection.toLowerCase()||void 0!=g.socketXHeader["transfer-encoding"]&&
46 +"chunked"==g.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=g.socketXHeader["content-length"]){b=parseInt(g.socketXHeader["content-length"]);if(g.socketAccumulator.length<b)break;a=g.socketAccumulator.substring(0,b);g.socketAccumulator=g.socketAccumulator.substring(b);g.socketData=a;b=0}else{var p=g.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(g.socketAccumulator.substring(0,p),16);if(isNaN(b)){g.websocket&&g.websocket.close();break}if(g.socketAccumulator.length<p+2+b+2)break;
47 +a=g.socketAccumulator.substring(p+2,p+2+b);g.socketAccumulator=g.socketAccumulator.substring(p+2+b+2);g.socketData+=a}else b=0;if(0==b){p=g.socketXHeader;b=g.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++g.authcounter){if(g.challengeParams=g.parseDigest(p["www-authenticate"]),null!=g.challengeParams.qop){b=g.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 +g.challengeParams.qop="auth-int":g.challengeParams.qop="auth"}}else p=g.pendingAjaxCall.shift(),g.authcounter=0,g.ActiveAjaxCount--,g.gotNextMessages(b,"success",{status:a},p),g.PerformNextAjax();g.socketParseState=0;g.socketHeader=null}}}}function r(a){0==g.inDataCount&&(g.tlsv1only=1-g.tlsv1only);g.socketState=0;null!=g.socket&&(g.socket.close(),g.socket=null);if(0<g.pendingAjaxCall.length){a=g.pendingAjaxCall.shift();var b=a[5];g.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var g={PendingAjax:[],
49 +ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};g.host=b;g.port=c;g.user=a;g.pass=d;g.tls=e;g.tlsv1only=0;g.inDataCount=0;g.amtVersion=null;g.digestRealmMatch=null;g.digestRealm=null;g.PerformAjax=function(a,b,c,p,d,h){g.ActiveAjaxCount<g.MaxActiveAjaxCount&&0==g.PendingAjax.length?g.PerformAjaxEx(a,b,c,d,h):1==p?g.PendingAjax.unshift([a,b,c,d,h]):g.PendingAjax.push([a,b,c,d,h])};g.PerformNextAjax=function(){if(!(g.ActiveAjaxCount>=
50 +g.MaxActiveAjaxCount||0==g.PendingAjax.length)){var a=g.PendingAjax.shift();g.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);g.PerformNextAjax()}};g.PerformAjaxEx=function(a,b,c,p,d){if(0!=g.FailAllError)g.gotNextMessagesError({status:g.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),g.ActiveAjaxCount++,g.PerformAjaxExNodeJS(a,b,c,p,d)};g.pendingAjaxCall=[];g.PerformAjaxExNodeJS=function(a,b,c,p,d){g.PerformAjaxExNodeJS2(a,
51 +b,c,p,d,5)};g.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=g.FailAllError?(g.ActiveAjaxCount--,999!=g.FailAllError&&g.gotNextMessages(null,"error",{status:0==g.FailAllError?408:g.FailAllError},[a,b,c,p,d]),g.PerformNextAjax()):(g.pendingAjaxCall.push([a,b,c,p,d,h]),0==g.socketState?g.xxConnectHttpSocket():2==g.socketState&&g.sendRequest(a,p,d))};g.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=g.challengeParams){g.digestRealm=g.challengeParams.realm;
52 +if(g.digestRealmMatch&&g.digestRealm!=g.digestRealmMatch){g.FailAllError=997;g.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(g.user+":"+g.challengeParams.realm+":"+g.pass)+":"+g.challengeParams.nonce+":"+n(g.noncecounter)+":"+d+":"+g.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==g.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+g.renderDigest({username:g.user,realm:g.challengeParams.realm,nonce:g.challengeParams.nonce,uri:b,qop:g.challengeParams.qop,
53 +response:c,nc:n(g.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+g.host+":"+g.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==g.socketState&&null!=g.socket&&g.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{g.socket.send(b.buffer)}catch(h){}}};g.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};g.renderDigest=function(a){var b=
54 +[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+","+("nc"==c||"qop"==c?c+"="+a[c]:c+'="'+a[c]+'"')},"").substring(1)};g.xxConnectHttpSocket=function(){g.inDataCount=0;g.socketState=1;g.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+g.host+"&port="+g.port+"&tls="+g.tls+"&tls1only="+g.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 +typeof d?"&serverauth=1&user="+a:""));g.socket.binaryType="arraybuffer";g.socket.onopen=l;g.socket.onmessage=p;g.socket.onclose=r};g.gotNextMessages=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](a,c.status,p[2])};g.gotNextMessagesError=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](g,null,{Header:{HttpError:a.status}},a.status,p[2])};g.CancelAllQueries=function(a){for(;0<g.PendingAjax.length;){var b=
56 +g.PendingAjax.shift();b[1](null,a,b[2])}null!=g.websocket&&(g.websocket.close(),g.websocket=null,g.socketState=0)};return g},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
57 function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;
58 d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?
59 d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,
60 0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):d.Stop(2);
61 -else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),e=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),q=q+(e+
62 -1),e=0,e=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(e=n[q],e=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),w="00000002:"+C+":"+e+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(q+=e.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 -p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(e.length)+e);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
61 +else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var r=0,p=n[r],l=a(new Uint8Array(n.buffer.slice(r+1,r+1+p))),r=r+(p+1),g=n[r],p=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),r=r+(g+
62 +1),g=0,g=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[r],g=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),w="00000002:"+C+":"+g+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));r=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(r+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(r)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 +p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
64 break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;
65 break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&
66 1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+
67 "/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=
68 --1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,g,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
68 +-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
69 b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b="",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";
70 var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";
71 -b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,g,v);q.PerformAjax=function(a,b,c,p,d){null==d&&(d="");q.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" '+
72 -d+"><Header><a:Action>"+a,function(a,c,e){var p=q.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(q,p.Header.ResourceURI,p,c,e)}else b(q,null,{Header:{HttpError:c}},601,e)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,h,g,l,B){var x="",A="";
73 -g="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 -B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",A='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=g&&(g="<a:ReferenceParameters><m:arg>"+g+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+
75 -"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+g+"</e:NotifyTo>"+A+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=
76 -function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 -q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=q.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var g in b)if(b.hasOwnProperty(g)&&0!==g.indexOf("__")&&0!==g.indexOf("@")&&null!=b[g]&&"function"!==typeof b[g])if("object"===typeof b[g]&&
78 -b[g].ReferenceParameters){a+="<r:"+g+"><a:Address>"+b[g].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[g].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[g].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+g+">"}else if(Array.isArray(b[g]))for(B=0;B<b[g].length;B++)a+=
79 -"<r:"+g+">"+b[g][B].toString()+"</r:"+g+">";else a+="<r:"+g+">"+b[g].toString()+"</r:"+g+">";b=a+("</r:"+h+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var h=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
80 -p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var g in b)a+="<g:"+g+">"+b[g]+"</g:"+g+">";q.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
81 -p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>",b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,
82 -h){var g="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])g+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else g+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,g,p,d,k,h)};q.ExecMethodXml=function(a,b,c,d,m,k,h){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
83 -p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>',
84 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var g=a.getElementsByTagName("Body")[0];g||(g=a.getElementsByTagName("a:Body")[0]);
86 -if(!g)return null;if(0<g.childNodes.length){k=g.childNodes[0].localName;var q=k.indexOf("_OUTPUT");-1!=q&&q==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(g.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",g,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
87 -function AmtStackCreateService(b){function c(){var a=e.GetPendingActions();C<a&&(C=a);null!=e.onProcessChanged&&w!=a&&(w=a,e.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,z,h,k){200!=z?(c(e,a,null,z,h),g(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?e.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,e,p,z){d(a,p,c,e,[],z,h,k)}):(c(e,a,null,603,h),g(1))}function d(a,b,p,h,z,E,k,m){if(200!=E)p(e,a,null,E,k),g(1);else if(null==b||"PullResponse"!=b.Header.Method)p(e,
88 -a,null,604,k),g(1);else{for(var r in b.Body.Items)if(b.Body.Items[r]instanceof Array)for(var q in b.Body.Items[r])"function"!=typeof b.Body.Items[r][q]&&z.push(b.Body.Items[r][q]);else"function"!=typeof b.Body.Items[r]&&z.push(b.Body.Items[r]);b.Body.EnumerationContext?e.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,e,A){d(a,e,p,c,z,A,k,1)}):(g(1),p(e,a,z,E,k),c())}}function g(a){e.ActiveEnumsCount-=a;e.ActiveEnumsCount>=e.MaxActiveEnumsCount||0==e.PendingEnums.length?c():(a=e.PendingEnums.shift(),
89 -e.Enum(a[0],a[1],a[2]),g(0))}function v(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]),function(b,c,p,d){null==p||200!=d?a.callback(e,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](e,null,d[2]);else e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,z){if(200!=d||"0"!=c.Body.ReturnValue)z[0](e,
90 -null,z[2]);else{var h,m,g;b=z[2];d=new Date;var r=c.Body.RecordArray;"string"===typeof r&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in r){a=null;try{a=window.atob(r[h])}catch(q){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){g={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),
91 -EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)g.EventData.push(a.charCodeAt(m));g.EntityStr=k[g.Entity];g.Desc=p(g.EventSensorType,g.EventOffset,g.EventData,g.Entity);g.EntityStr||(g.EntityStr="Unknown");b.push(g)}}if(1!=c.Body.NoMoreRecords)e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[z[0],b,z[2]]);else z[0](e,b,z[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \ub370\uc774\ud130";if(0==b)return D[c[1]];
92 -if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",r[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",
71 +b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var r={NextMessageId:1,Address:"/wsman"};r.comm=CreateWsmanComm(b,c,a,d,e,v);r.PerformAjax=function(a,b,c,p,d){null==d&&(d="");r.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" '+
72 +d+"><Header><a:Action>"+a,function(a,c,g){var p=r.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(r,p.Header.ResourceURI,p,c,g)}else b(r,null,{Header:{HttpError:c}},601,g)},c,p)};r.CancelAllQueries=function(a){r.comm.CancelAllQueries(a)};r.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};r.ExecSubscribe=function(a,b,c,d,m,k,h,e,l,B){var x="",z="";
73 +e="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 +B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=e&&(e="<a:ReferenceParameters><m:arg>"+e+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+r.Address+
75 +"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+e+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";r.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};r.ExecUnSubscribe=
76 +function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";r.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};r.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 +r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=r.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var e in b)if(b.hasOwnProperty(e)&&0!==e.indexOf("__")&&0!==e.indexOf("@")&&null!=b[e]&&"function"!==typeof b[e])if("object"===typeof b[e]&&
78 +b[e].ReferenceParameters){a+="<r:"+e+"><a:Address>"+b[e].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[e].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[e].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+e+">"}else if(Array.isArray(b[e]))for(B=0;B<b[e].length;B++)a+=
79 +"<r:"+e+">"+b[e][B].toString()+"</r:"+e+">";else a+="<r:"+e+">"+b[e].toString()+"</r:"+e+">";b=a+("</r:"+h+">")}else b="";r.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};r.ExecCreate=function(a,b,c,d,m,k){var h=r.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
80 +p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";r.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};r.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
81 +p(b)+"</Header><Body /></Envelope>";r.PerformAjax(a,c,d,m)};r.ExecGet=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>",b,c,p)};r.ExecMethod=function(a,b,c,p,d,k,
82 +h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])e+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";r.ExecMethodXml(a,b,e,p,d,k,h)};r.ExecMethodXml=function(a,b,c,d,m,k,h){r.PerformAjax(a+"/"+b+"</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
83 +p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};r.ExecEnum=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>',
84 +b,c,p)};r.ExecPull=function(a,b,c,p,d){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 +c,p,d)};r.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var e=a.getElementsByTagName("Body")[0];e||(e=a.getElementsByTagName("a:Body")[0]);
86 +if(!e)return null;if(0<e.childNodes.length){k=e.childNodes[0].localName;var r=k.indexOf("_OUTPUT");-1!=r&&r==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(e.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",e,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return r};
87 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();C<a&&(C=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,g,p,y){d(a,p,c,g,[],y,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,p,h,y,E,k,m){if(200!=E)p(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(g,
88 +a,null,604,k),e(1);else{for(var u in b.Body.Items)if(b.Body.Items[u]instanceof Array)for(var r in b.Body.Items[u])"function"!=typeof b.Body.Items[u][r]&&y.push(b.Body.Items[u][r]);else"function"!=typeof b.Body.Items[u]&&y.push(b.Body.Items[u]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,p,c,y,z,k,1)}):(e(1),p(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
89 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
90 +null,y[2]);else{var h,m,e;b=y[2];d=new Date;var u=c.Body.RecordArray;"string"===typeof u&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in u){a=null;try{a=window.atob(u[h])}catch(r){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){e={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),
91 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)e.EventData.push(a.charCodeAt(m));e.EntityStr=k[e.Entity];e.Desc=p(e.EventSensorType,e.EventOffset,e.EventData,e.Entity);e.EntityStr||(e.EntityStr="Unknown");b.push(e)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \ub370\uc774\ud130";if(0==b)return D[c[1]];
92 +if(3==b){if(170==c[0]&&48==c[1])return format("One Click Recovery: {0}",u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("One Click Recovery: {0}",h[c[2]]):format("One Click Recovery: Unknown progress event {0}",
93 c[2]);if(170==c[0]&&64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";
94 -if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==a&&170==c[0])return"\uc6cc\uce58 \ub3c5 \uc694\uc6d0"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... \ub85c \ubcc0\uacbd"+e.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"\ucf00\uc774\uc2a4 \uce68\uc785";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"\uc6d0\uaca9 LAN\uc744 \ud1b5\ud55c \uc9c1\ub82c \uc5f0\uacb0 \uc138\uc158\uc774 \uc124\uc815\ub418\uc5c8\uc2b5\ub2c8\ub2e4.";
94 +if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==a&&170==c[0])return"\uc6cc\uce58 \ub3c5 \uc694\uc6d0"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... \ub85c \ubcc0\uacbd"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"\ucf00\uc774\uc2a4 \uce68\uc785";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"\uc6d0\uaca9 LAN\uc744 \ud1b5\ud55c \uc9c1\ub82c \uc5f0\uacb0 \uc138\uc158\uc774 \uc124\uc815\ub418\uc5c8\uc2b5\ub2c8\ub2e4.";
95 if(1==c[2])return"LAN\uc744 \ud1b5\ud55c \uc6d0\uaca9 \uc9c1\ub82c \uc138\uc158\uc774 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc0ac\uc6a9\uc790 \ucee8\ud2b8\ub864\uc774 \ubcf5\uc6d0\ub418\uc5c8\uc2b5\ub2c8\ub2e4.";if(2==c[2])return"\uc6d0\uaca9 IDE \ub9ac\ub514\ub809\uc158 \uc138\uc158\uc774 \uc124\uc815\ub418\uc5c8\uc2b5\ub2c8\ub2e4.";if(3==c[2])return"\uc6d0\uaca9 IDE \ub9ac\ub514\ub809\uc158 \uc138\uc158\uc774 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc0ac\uc6a9\uc790 \ucee8\ud2b8\ub864\uc774 \ubcf5\uc6d0\ub418\uc5c8\uc2b5\ub2c8\ub2e4."}if(36==
96 a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="\uc5f4\uad11\ud55c"),4294967293==a?"\ubaa8\ub4e0 \uc218\uc2e0 \ud328\ud0b7 \ud544\ud130\uac00 \uc77c\uce58\ud588\uc2b5\ub2c8\ub2e4."+b+" \uc0c1\ud638 \uc791\uc6a9.":4294967292==a?"\ubaa8\ub4e0 \ubc1c\uc2e0 \ud328\ud0b7 \ud544\ud130\uac00 \uc77c\uce58\ud588\uc2b5\ub2c8\ub2e4."+b+" \uc0c1\ud638 \uc791\uc6a9.":4294967290==a?"\uc2a4\ud478\ud551 \ub41c \ud328\ud0b7 \ud544\ud130\uac00 \uc77c\uce58\ud588\uc2b5\ub2c8\ub2e4."+b+" \uc0c1\ud638 \uc791\uc6a9.":
97 "\ud544\ud130"+a+" \uc5d0 \uc77c\uce58\ud588\ub2e4"+b+" \uc0c1\ud638 \uc791\uc6a9.";if(192==a)return 0==c[2]?"\ubcf4\uc548 \uc815\ucc45\uc774 \ud638\ucd9c\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc77c\ubd80 \ub610\ub294 \ubaa8\ub4e0 \ub124\ud2b8\uc6cc\ud06c \ud2b8\ub798\ud53d (TX)\uc774 \uc911\uc9c0\ub418\uc5c8\uc2b5\ub2c8\ub2e4.":2==c[2]?"\ubcf4\uc548 \uc815\ucc45\uc774 \ud638\ucd9c\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc77c\ubd80 \ub610\ub294 \ubaa8\ub4e0 \ub124\ud2b8\uc6cc\ud06c \ud2b8\ub798\ud53d (RX)\uc774 \uc911\uc9c0\ub418\uc5c8\uc2b5\ub2c8\ub2e4.":
98 "\ubcf4\uc548 \uc815\ucc45\uc774 \ud638\ucd9c\ub418\uc5c8\uc2b5\ub2c8\ub2e4.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"\uc6d0\uaca9 \uc5f0\uacb0\uc5d0 \ub300\ud55c \uc0ac\uc6a9\uc790 \uc694\uccad.";if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"EAC \uc624\ub958 : Intel AMT\uc758 NAC\uac00 \ube44\ud65c\uc131\ud654\ub418\uc5b4\uc788\ub294 \ub3d9\uc548 \uc790\uc138\ub97c \uc5bb\uc73c\uc2ed\uc2dc\uc624.";if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"HWA \uc624\ub958 : \uc77c\ubc18 \uc624\ub958"}return 6==
99 a?"\uc778\uc99d \uc2e4\ud328"+(c[1]+(c[2]<<8))+" \ud0c0\uc784\uc2a4. \uc2dc\uc2a4\ud15c\uc774 \uacf5\uaca9\uc744 \ubc1b\uace0\uc788\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4.":30==a?"\ubd80\ud305 \uac00\ub2a5\ud55c \ubbf8\ub514\uc5b4\uac00 \uc5c6\uc2b5\ub2c8\ub2e4":32==a?"\uc6b4\uc601 \uccb4\uc81c \uc7a0\uae08 \ub610\ub294 \uc804\uc6d0 \uc911\ub2e8":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"\uc2dc\uc2a4\ud15c \ubd80\ud305 \uc2e4\ud328":37==a?"\uc2dc\uc2a4\ud15c \ud38c\uc6e8\uc5b4\uac00 \uc2dc\uc791\ub418\uc5c8\uc2b5\ub2c8\ub2e4 (\uc801\uc5b4\ub3c4 \ud558\ub098 \uc774\uc0c1\uc758 CPU\uac00 \uc62c\ubc14\ub974\uac8c \uc2e4\ud589 \uc911\uc784).":
100 -"\uc54c \uc218\uc5c6\ub294 \uc13c\uc11c \uc720\ud615 #"+a}function q(a,b,c,p,d){if(200!=p)d[0](e,[],p);else{var h,k,m=d[1],g=new Date,r;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||
101 -(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>\ud604\uc9c0</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM \uae30\ubcf8 \ud3ec\ud2b8</i>",h=5);r=ReadInt(a,h);b.Time=new Date(1E3*(r+60*g.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);r=a.charCodeAt(h++);b.NetAddress=
102 -a.substring(h,h+r);h+=r;r=a.charCodeAt(h++);b.Ex=a.substring(h,h+r);b.ExStr=e.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)e.AMT_AuditLog_ReadRecords(m.length+1,q,[d[0],m]);else d[0](e,m,p)}}var e={};e.wsman=b;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=
103 -1;e.onProcessChanged=null;var C=0,w=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,b,p,d,z,h,k,m,g,r){e.wsman.ExecSubscribe(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,y,A,z)},0,h,k,m,g,r);c()};e.UnSubscribe=function(a,b,p,d,z){e.wsman.ExecUnSubscribe(e.CompleteName(a),function(d,z,h,k){c();b(e,a,h,k,p)},0,d,z);c()};e.Get=function(a,b,p,d){e.wsman.ExecGet(e.CompleteName(a),
104 -function(d,h,k,m){c();b(e,a,k,m,p)},0,d);c()};e.Put=function(a,b,p,d,z,h){e.wsman.ExecPut(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z,h);c()};e.Create=function(a,b,p,d,z){e.wsman.ExecCreate(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Delete=function(a,b,p,d,z){e.wsman.ExecDelete(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Exec=function(a,b,p,d,z,h,k){e.wsman.ExecMethod(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),
105 -A,z)},0,h,k);c()};e.ExecWithXml=function(a,b,p,d,z,h,k){e.wsman.ExecMethodXml(e.CompleteName(a),b,execArgumentsToXml(p),function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.Enum=function(b,p,d,h){e.ActiveEnumsCount<e.MaxActiveEnumsCount?(e.ActiveEnumsCount++,e.wsman.ExecEnum(e.CompleteName(b),function(e,d,y,h,k){c();a(b,y,p,d,h,k)},d,h)):e.PendingEnums.push([b,p,d,h]);c()};e.BatchEnum=function(a,b,p,d,z,h){z={_pending:b.length};e.PendingBatchOperations+=b.length;for(var k in b){var m=
106 -b[k],g=e.Enum;"*"==m[0]&&(g=e.Get,m=m.substring(1));g(m,function(b,z,A,h,k){e.PendingBatchOperations--;c();k[2][z]={response:null==A?null:A.Body,responses:A,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(e,e,a,k[2],h,d))},[a,b,z,g==e.Get?"Get":"Enum"],h)}};e.BatchGet=function(a,b,p,e,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:e,pri:d});c()};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==a.indexOf("IPS_"))return e.pfx[2]+
107 -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,b){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>',
108 -null,null,b)};e.RequestOSPowerStateChange=function(a,b){e.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
109 -null,null,b)};e.SetBootConfigRole=function(a,b){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>',
110 -a,b)};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,b){e.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
111 -k,m,g){e.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,g)};e.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){e.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};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=
112 -function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){e.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};e.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA",
113 -"DeleteAllActions",{_method_dummy:a},b)};e.AMT_AuditLog_ClearLog=function(a){e.Exec("AMT_AuditLog","ClearLog",{},a)};e.AMT_AuditLog_RequestStateChange=function(a,b,c){e.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_AuditLog_ReadRecords=function(a,b,c){e.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};e.AMT_AuditLog_SetAuditLock=function(a,b,c,p){e.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};e.AMT_AuditLog_ExportAuditLogSignature=
114 -function(a,b){e.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};e.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){e.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule",
115 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){e.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};e.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){e.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};e.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService",
116 -"GetUserAclEntryEx",{Handle:a},b,c)};e.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){e.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};e.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){e.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};e.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
117 -{Username:a,DigestPassword:b},c)};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,b,c,p){e.Exec("AMT_AuthorizationService",
118 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};e.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){e.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};e.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_EndpointAccessControlService_GetPosture=function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};e.AMT_EndpointAccessControlService_GetPostureHash=
119 -function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};e.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){e.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};e.AMT_EndpointAccessControlService_GetEacOptions=function(a){e.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};e.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
120 -PostureHashAlgorithm:b},c)};e.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};e.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};e.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){e.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};e.AMT_GeneralSettings_AMTAuthenticate=
121 -function(a,b){e.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};e.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){e.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};e.AMT_KerberosSettingData_GetCredentialCacheState=function(a){e.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};e.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){e.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
122 -b)};e.AMT_MessageLog_CancelIteration=function(a,b){e.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};e.AMT_MessageLog_RequestStateChange=function(a,b,c){e.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_MessageLog_ClearLog=function(a){e.Exec("AMT_MessageLog","ClearLog",{},a)};e.AMT_MessageLog_GetRecords=function(a,b,c,p){e.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};e.AMT_MessageLog_GetRecord=function(a,
123 -b,c){e.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};e.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){e.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};e.AMT_MessageLog_PositionToFirstRecord=function(a,b){e.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};e.AMT_MessageLog_FreezeLog=function(a,b){e.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};e.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){e.Exec("AMT_PublicKeyManagementService",
124 -"AddCRL",{Url:a,SerialNumbers:b},c)};e.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){e.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};e.AMT_PublicKeyManagementService_AddCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddKey=
125 -function(a,b){e.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};e.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};e.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};e.AMT_PublicKeyManagementService_GenerateKeyPair=
126 -function(a,b,c){e.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};e.AMT_RedirectionService_RequestStateChange=function(a,b){e.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};e.AMT_RedirectionService_TerminateSession=function(a,b){e.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};e.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,g){e.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
127 -Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},g)};e.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){e.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};e.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){e.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){e.Exec("AMT_SetupAndConfigurationService",
128 -"CommitChanges",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_Unprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};e.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
129 -e.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};e.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){e.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};e.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){e.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){e.Exec("AMT_SetupAndConfigurationService",
130 -"GetProvisioningAuditRecord",{},a)};e.AMT_SetupAndConfigurationService_GetUuid=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};e.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){e.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};e.AMT_SystemDefensePolicy_GetTimeout=
131 -function(a){e.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};e.AMT_SystemDefensePolicy_SetTimeout=function(a,b){e.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};e.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){e.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};e.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){e.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};e.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
132 -function(a,b){e.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};e.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){e.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};e.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){e.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WebUIService_RequestStateChange=function(a,b,c){e.Exec("AMT_WebUIService",
133 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
134 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};e.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};e.CIM_Account_RequestStateChange=function(a,b,c){e.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
135 -c)};e.CIM_AccountManagementService_CreateAccount=function(a,b,c){e.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};e.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){e.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};e.CIM_BootService_SetBootConfigRole=function(a,b,c){e.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};e.CIM_BootService_RequestStateChange=function(a,b,c,p){e.Exec("CIM_BootService","RequestStateChange",
136 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};e.CIM_Card_ConnectorPower=function(a,b,c){e.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};e.CIM_Card_IsCompatible=function(a,b){e.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};e.CIM_Chassis_IsCompatible=function(a,b){e.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};e.CIM_Fan_SetSpeed=function(a,b){e.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};e.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){e.Exec("CIM_KVMRedirectionSAP",
137 -"RequestStateChange",{RequestedState:a},c)};e.CIM_MediaAccessDevice_LockMedia=function(a,b){e.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};e.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){e.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_MediaAccessDevice_Reset=function(a){e.Exec("CIM_MediaAccessDevice","Reset",{},a)};e.CIM_MediaAccessDevice_EnableDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};e.CIM_MediaAccessDevice_OnlineDevice=
138 -function(a,b){e.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};e.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};e.CIM_MediaAccessDevice_SaveProperties=function(a){e.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};e.CIM_MediaAccessDevice_RestoreProperties=function(a){e.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};e.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){e.Exec("CIM_MediaAccessDevice","RequestStateChange",
139 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_PhysicalFrame_IsCompatible=function(a,b){e.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};e.CIM_PhysicalPackage_IsCompatible=function(a,b){e.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};e.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){e.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.CIM_PowerSupply_SetPowerState=function(a,
140 -b,c){e.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_PowerSupply_Reset=function(a){e.Exec("CIM_PowerSupply","Reset",{},a)};e.CIM_PowerSupply_EnableDevice=function(a,b){e.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};e.CIM_PowerSupply_OnlineDevice=function(a,b){e.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};e.CIM_PowerSupply_QuiesceDevice=function(a,b){e.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};e.CIM_PowerSupply_SaveProperties=function(a){e.Exec("CIM_PowerSupply",
141 -"SaveProperties",{},a)};e.CIM_PowerSupply_RestoreProperties=function(a){e.Exec("CIM_PowerSupply","RestoreProperties",{},a)};e.CIM_PowerSupply_RequestStateChange=function(a,b,c){e.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Processor_SetPowerState=function(a,b,c){e.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Processor_Reset=function(a){e.Exec("CIM_Processor","Reset",{},a)};e.CIM_Processor_EnableDevice=function(a,b){e.Exec("CIM_Processor",
142 -"EnableDevice",{Enabled:a},b)};e.CIM_Processor_OnlineDevice=function(a,b){e.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};e.CIM_Processor_QuiesceDevice=function(a,b){e.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Processor_SaveProperties=function(a){e.Exec("CIM_Processor","SaveProperties",{},a)};e.CIM_Processor_RestoreProperties=function(a){e.Exec("CIM_Processor","RestoreProperties",{},a)};e.CIM_Processor_RequestStateChange=function(a,b,c){e.Exec("CIM_Processor","RequestStateChange",
143 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RecordLog_ClearLog=function(a){e.Exec("CIM_RecordLog","ClearLog",{},a)};e.CIM_RecordLog_RequestStateChange=function(a,b,c){e.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RedirectionService_RequestStateChange=function(a,b,c){e.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Sensor_SetPowerState=function(a,b,c){e.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
144 -c)};e.CIM_Sensor_Reset=function(a){e.Exec("CIM_Sensor","Reset",{},a)};e.CIM_Sensor_EnableDevice=function(a,b){e.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};e.CIM_Sensor_OnlineDevice=function(a,b){e.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};e.CIM_Sensor_QuiesceDevice=function(a,b){e.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Sensor_SaveProperties=function(a){e.Exec("CIM_Sensor","SaveProperties",{},a)};e.CIM_Sensor_RestoreProperties=function(a){e.Exec("CIM_Sensor","RestoreProperties",
145 -{},a)};e.CIM_Sensor_RequestStateChange=function(a,b,c){e.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_StatisticalData_ResetSelectedStats=function(a,b){e.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};e.CIM_Watchdog_KeepAlive=function(a){e.Exec("CIM_Watchdog","KeepAlive",{},a)};e.CIM_Watchdog_SetPowerState=function(a,b,c){e.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Watchdog_Reset=function(a){e.Exec("CIM_Watchdog",
146 -"Reset",{},a)};e.CIM_Watchdog_EnableDevice=function(a,b){e.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};e.CIM_Watchdog_OnlineDevice=function(a,b){e.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};e.CIM_Watchdog_QuiesceDevice=function(a,b){e.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};e.CIM_Watchdog_SaveProperties=function(a){e.Exec("CIM_Watchdog","SaveProperties",{},a)};e.CIM_Watchdog_RestoreProperties=function(a){e.Exec("CIM_Watchdog","RestoreProperties",{},a)};e.CIM_Watchdog_RequestStateChange=
147 -function(a,b,c){e.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_WiFiPort_SetPowerState=function(a,b,c){e.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_WiFiPort_Reset=function(a){e.Exec("CIM_WiFiPort","Reset",{},a)};e.CIM_WiFiPort_EnableDevice=function(a,b){e.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};e.CIM_WiFiPort_OnlineDevice=function(a,b){e.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};e.CIM_WiFiPort_QuiesceDevice=function(a,
148 -b){e.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};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,b,c){e.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){e.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
149 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};e.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};e.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){e.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},h)};e.IPS_HostBasedSetupService_UpgradeClientToAdmin=
150 -function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};e.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){e.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};e.IPS_KVMRedirectionSettingData_TerminateSession=function(a){e.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){e.Exec("IPS_KVMRedirectionSettingData",
151 -"DataChannelRead",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){e.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};e.IPS_OptInService_StartOptIn=function(a){e.Exec("IPS_OptInService","StartOptIn",{},a)};e.IPS_OptInService_CancelOptIn=function(a){e.Exec("IPS_OptInService","CancelOptIn",{},a)};e.IPS_OptInService_SendOptInCode=function(a,b){e.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};e.IPS_OptInService_StartService=function(a){e.Exec("IPS_OptInService",
152 -"StartService",{},a)};e.IPS_OptInService_StopService=function(a){e.Exec("IPS_OptInService","StopService",{},a)};e.IPS_OptInService_RequestStateChange=function(a,b,c){e.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){e.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.IPS_ProvisioningRecordLog_RequestStateChange=
153 -function(a,b,c){e.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_ProvisioningRecordLog_ClearLog=function(a,b){e.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};e.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){e.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};e.IPS_SecIOService_RequestStateChange=function(a,b,c){e.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
154 -TimeoutPeriod:b},c)};e.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){e.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};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",
155 -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",
156 -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",
157 -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",
158 -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,b){e.AMT_MessageLog_PositionToFirstRecord(n,
159 -[a,b,[]])};var D="\uc9c0\uc815\ub418\uc9c0 \uc54a\uc74c. ; \uc2dc\uc2a4\ud15c\uc5d0 \uc2dc\uc2a4\ud15c \uba54\ubaa8\ub9ac\uac00 \uc2e4\uc81c\ub85c \uc124\uce58\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. ; \uc0ac\uc6a9 \uac00\ub2a5\ud55c \uc2dc\uc2a4\ud15c \uba54\ubaa8\ub9ac\uac00\uc5c6\uace0 \uc124\uce58\ub41c \ubaa8\ub4e0 \uba54\ubaa8\ub9ac\uc5d0 \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ud558\ub4dc \ub514\uc2a4\ud06c / ATAPI / IDE \uc7a5\uce58 \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \uc2dc\uc2a4\ud15c \ubcf4\ub4dc \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ub514\uc2a4\ucf13 \ud558\uc704 \uc2dc\uc2a4\ud15c \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ud558\ub4dc \ub514\uc2a4\ud06c \ucee8\ud2b8\ub864\ub7ec \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 PS / 2 \ub610\ub294 USB \ud0a4\ubcf4\ub4dc \uc624\ub958. ; \uc774\ub3d9\uc2dd \ubd80\ud305 \ubbf8\ub514\uc5b4\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ube44\ub514\uc624 \ucee8\ud2b8\ub864\ub7ec \uc624\ub958. ; \ube44\ub514\uc624 \uc7a5\uce58\uac00 \uac10\uc9c0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. ; \ud38c\uc6e8\uc5b4 (BIOS) ROM \uc190\uc0c1\uc774 \uac10\uc9c0\ub418\uc5c8\uc2b5\ub2c8\ub2e4. ; CPU \uc804\uc555 \ubd88\uc77c\uce58 (\ub3d9\uc77c\ud55c \uc804\uc6d0\uc744 \uacf5\uc720\ud558\ub294 \ud504\ub85c\uc138\uc11c\uc758 \uc804\uc555 \uc694\uad6c \uc0ac\ud56d\uc774 \uc77c\uce58\ud558\uc9c0 \uc54a\uc74c) ; CPU \uc18d\ub3c4 \uc77c\uce58 \uc2e4\ud328".split(";"),
100 +"\uc54c \uc218\uc5c6\ub294 \uc13c\uc11c \uc720\ud615 #"+a}function r(a,b,c,p,d){if(200!=p)d[0](g,[],p);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||
101 +(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>\ud604\uc9c0</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM \uae30\ubcf8 \ud3ec\ud2b8</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=
102 +a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,r,[d[0],m]);else d[0](g,m,p)}}var g={};g.wsman=b;g.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/"];g.PendingEnums=[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=
103 +1;g.onProcessChanged=null;var C=0,w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,p,d,y,h,k,m,e,u){g.wsman.ExecSubscribe(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,A,z,y)},0,h,k,m,e,u);c()};g.UnSubscribe=function(a,b,p,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,p)},0,d,y);c()};g.Get=function(a,b,p,d){g.wsman.ExecGet(g.CompleteName(a),
104 +function(d,h,k,m){c();b(g,a,k,m,p)},0,d);c()};g.Put=function(a,b,p,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,p,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,p,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,p,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),
105 +z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,p,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,p,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(g,d,A,h,k){c();a(b,A,p,d,h,k)},d,h)):g.PendingEnums.push([b,p,d,h]);c()};g.BatchEnum=function(a,b,p,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=
106 +b[k],e=g.Enum;"*"==m[0]&&(e=g.Get,m=m.substring(1));e(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(g,g,a,k[2],h,d))},[a,b,y,e==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,p,g,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:g,pri:d});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+
107 +a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.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>',
108 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
109 +null,null,b)};g.SetBootConfigRole=function(a,b){g.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>',
110 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
111 +k,m,e){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,e)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
112 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
113 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,p){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};g.AMT_AuditLog_ExportAuditLogSignature=
114 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule",
115 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
116 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
117 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){g.Exec("AMT_AuthorizationService",
118 +"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
119 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
120 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
121 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
122 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,p){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};g.AMT_MessageLog_GetRecord=function(a,
123 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
124 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
125 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
126 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,e){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
127 +Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},e)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
128 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
129 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
130 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
131 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
132 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
133 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){console.log(JSON.stringify({WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},null,2));g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=
134 +function(a,b,c,p,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},
135 +b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,
136 +Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,p){g.Exec("CIM_BootService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c,p,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan",
137 +"SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=
138 +function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",
139 +{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",
140 +{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply",
141 +"QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply","SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor",
142 +"Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor","EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=
143 +function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,
144 +b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=
145 +function(a){g.Exec("CIM_Sensor","RestoreProperties",{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},
146 +c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog","Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog",
147 +"RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",
148 +{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){g.Exec("IPS_HostBasedSetupService",
149 +"Setup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,
150 +DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=
151 +function(a){g.Exec("IPS_KVMRedirectionSettingData","DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};
152 +g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService","StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,
153 +Time:c,TimeoutPeriod:p},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=
154 +function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",
155 +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",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",
156 +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",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",
157 +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",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",
158 +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",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",
159 +4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,[a,b,[]])};var D="\uc9c0\uc815\ub418\uc9c0 \uc54a\uc74c. ; \uc2dc\uc2a4\ud15c\uc5d0 \uc2dc\uc2a4\ud15c \uba54\ubaa8\ub9ac\uac00 \uc2e4\uc81c\ub85c \uc124\uce58\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. ; \uc0ac\uc6a9 \uac00\ub2a5\ud55c \uc2dc\uc2a4\ud15c \uba54\ubaa8\ub9ac\uac00\uc5c6\uace0 \uc124\uce58\ub41c \ubaa8\ub4e0 \uba54\ubaa8\ub9ac\uc5d0 \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ud558\ub4dc \ub514\uc2a4\ud06c / ATAPI / IDE \uc7a5\uce58 \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \uc2dc\uc2a4\ud15c \ubcf4\ub4dc \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ub514\uc2a4\ucf13 \ud558\uc704 \uc2dc\uc2a4\ud15c \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ud558\ub4dc \ub514\uc2a4\ud06c \ucee8\ud2b8\ub864\ub7ec \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 PS / 2 \ub610\ub294 USB \ud0a4\ubcf4\ub4dc \uc624\ub958. ; \uc774\ub3d9\uc2dd \ubd80\ud305 \ubbf8\ub514\uc5b4\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ube44\ub514\uc624 \ucee8\ud2b8\ub864\ub7ec \uc624\ub958. ; \ube44\ub514\uc624 \uc7a5\uce58\uac00 \uac10\uc9c0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. ; \ud38c\uc6e8\uc5b4 (BIOS) ROM \uc190\uc0c1\uc774 \uac10\uc9c0\ub418\uc5c8\uc2b5\ub2c8\ub2e4. ; CPU \uc804\uc555 \ubd88\uc77c\uce58 (\ub3d9\uc77c\ud55c \uc804\uc6d0\uc744 \uacf5\uc720\ud558\ub294 \ud504\ub85c\uc138\uc11c\uc758 \uc804\uc555 \uc694\uad6c \uc0ac\ud56d\uc774 \uc77c\uce58\ud558\uc9c0 \uc54a\uc74c) ; CPU \uc18d\ub3c4 \uc77c\uce58 \uc2e4\ud328".split(";"),
160 m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS 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(";"),
161 k="\uc9c0\uc815\ub418\uc9c0 \uc54a\uc74c ; \uae30\ud0c0 ; \uc54c \uc218 \uc5c6\uc74c ; \ud504\ub85c\uc138\uc11c ; \ub514\uc2a4\ud06c ; \uc8fc\ubcc0 \uc7a5\uce58 ; \uc2dc\uc2a4\ud15c \uad00\ub9ac \ubaa8\ub4c8 ; \uc2dc\uc2a4\ud15c \ubcf4\ub4dc ; \uba54\ubaa8\ub9ac \ubaa8\ub4c8 ; \ud504\ub85c\uc138\uc11c \ubaa8\ub4c8 ; \uc804\uc6d0 \uacf5\uae09 \uc7a5\uce58 ; \uce74\ub4dc\uc5d0 \ucd94\uac00 ; \uc804\uba74 \ud328\ub110 \ubcf4\ub4dc ; \ud6c4\uba74 \ud328\ub110 \ubcf4\ub4dc ; \uc804\uc6d0 \uc2dc\uc2a4\ud15c \ubcf4\ub4dc ; \ub4dc\ub77c\uc774\ube0c \ud6c4\uba74 \ud310 ; \uc2dc\uc2a4\ud15c \ub0b4\ubd80 \ud655\uc7a5 \ubcf4\ub4dc ; \ub2e4\ub978 \uc2dc\uc2a4\ud15c \ubcf4\ub4dc ; \ud504\ub85c\uc138\uc11c \ubcf4\ub4dc ; \uc804\uc6d0 \uc7a5\uce58 ; \uc804\uc6d0 \ubaa8\ub4c8 ; \uc804\uc6d0 \uad00\ub9ac \ubcf4\ub4dc ; \uc100\uc2dc \ud6c4\uba74 \ud328\ub110 \ubcf4\ub4dc ; \uc2dc\uc2a4\ud15c \uc100\uc2dc ; \uc11c\ube0c \uc100\uc2dc ; \uae30\ud0c0 \uc100\uc2dc \ubcf4\ub4dc ; \ub514\uc2a4\ud06c \ub4dc\ub77c\uc774\ube0c \ubca0\uc774 ; \uc8fc\ubcc0 \ubca0\uc774 ; \ub514\ubc14\uc774\uc2a4 \ubca0\uc774 ; \ud32c \ub0c9\uac01 ; \ub0c9\uac01 \uc7a5\uce58 ; \ucf00\uc774\ube14 \uc778\ud130\ucee4\ub125\ud2b8 ; \uba54\ubaa8\ub9ac \uc7a5\uce58 ; \uc2dc\uc2a4\ud15c \uad00\ub9ac \uc18c\ud504\ud2b8\uc6e8\uc5b4 ; BIOS ; \uc778\ud154 (r) ME ; \uc2dc\uc2a4\ud15c \ubc84\uc2a4 ; \uadf8\ub8f9 ; \uc778\ud154 (r) ME ; \uc678\ubd80 \ud658\uacbd ; \ubc30\ud130\ub9ac ; \ud504\ub85c\uc138\uc2f1 \ube14\ub808\uc774\ub4dc ; \uc5f0\uacb0 \uc2a4\uc704\uce58 ; \ud504\ub85c\uc138\uc11c / \uba54\ubaa8\ub9ac \ubaa8\ub4c8 ; I / O \ubaa8\ub4c8 ; \ud504\ub85c\uc138\uc11c I / O \ubaa8\ub4c8 ; \uad00\ub9ac \ucee8\ud2b8\ub864\ub7ec \ud38c\uc6e8\uc5b4 ; IPMI \ucc44\ub110 ; PCI \ubc84\uc2a4 ; PCI \uace0\uc18d \ubc84\uc2a4 ; SCSI \ubc84\uc2a4 ; SATA / SAS \ubc84\uc2a4 ; \ud504\ub85c\uc138\uc11c \uc804\uba74 \ubc84\uc2a4".split(";");
162 -e.RealmNames=";; \ub9ac\ub514\ub809\uc158 ;; \ud558\ub4dc\uc6e8\uc5b4 \uc790\uc0b0 ; \uc6d0\uaca9 \uc81c\uc5b4 ; \uc2a4\ud1a0\ub9ac\uc9c0 ; \uc774\ubca4\ud2b8 \uad00\ub9ac\uc790 ; \uc2a4\ud1a0\ub9ac\uc9c0 \uad00\ub9ac\uc790 ; \uc5d0\uc774\uc804\ud2b8 \ud504\ub808\uc98c\uc2a4 \ub85c\uceec ; \uc5d0\uc774\uc804\ud2b8 \ud504\ub808\uc98c\uc2a4 \uc6d0\uaca9 ; \ud68c\ub85c \ucc28\ub2e8\uae30 ; \ub124\ud2b8\uc6cc\ud06c \uc2dc\uac04 ; \uc77c\ubc18 \uc815\ubcf4 ; \ud38c\uc6e8\uc5b4 \uc5c5\ub370\uc774\ud2b8 ; EIT ; LocalUN ; \uc5d4\ub4dc \ud3ec\uc778\ud2b8 \uc561\uc138\uc2a4 \uc81c\uc5b4 ; \uc5d4\ub4dc \ud3ec\uc778\ud2b8 \uc561\uc138\uc2a4 \uc81c\uc5b4 \uad00\ub9ac\uc790 ; \uc774\ubca4\ud2b8 \ub85c\uadf8 \ub9ac\ub354 ; \uac10\uc0ac \ub85c\uadf8 ; ACL \uc601\uc5ed ;;; \ub85c\uceec \uc2dc\uc2a4\ud15c".split(";");
163 -e.WatchdogCurrentStates={1:"\uc2dc\uc791\ub418\uc9c0 \uc54a\uc74c",2:"\uc911\uc9c0",4:"\ub2ec\ub9ac\ub294",8:"\ub9cc\ub8cc",16:"\ub9e4\ub2ec\ub9b0"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),r=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
162 +g.RealmNames=";; \ub9ac\ub514\ub809\uc158 ;; \ud558\ub4dc\uc6e8\uc5b4 \uc790\uc0b0 ; \uc6d0\uaca9 \uc81c\uc5b4 ; \uc2a4\ud1a0\ub9ac\uc9c0 ; \uc774\ubca4\ud2b8 \uad00\ub9ac\uc790 ; \uc2a4\ud1a0\ub9ac\uc9c0 \uad00\ub9ac\uc790 ; \uc5d0\uc774\uc804\ud2b8 \ud504\ub808\uc98c\uc2a4 \ub85c\uceec ; \uc5d0\uc774\uc804\ud2b8 \ud504\ub808\uc98c\uc2a4 \uc6d0\uaca9 ; \ud68c\ub85c \ucc28\ub2e8\uae30 ; \ub124\ud2b8\uc6cc\ud06c \uc2dc\uac04 ; \uc77c\ubc18 \uc815\ubcf4 ; \ud38c\uc6e8\uc5b4 \uc5c5\ub370\uc774\ud2b8 ; EIT ; LocalUN ; \uc5d4\ub4dc \ud3ec\uc778\ud2b8 \uc561\uc138\uc2a4 \uc81c\uc5b4 ; \uc5d4\ub4dc \ud3ec\uc778\ud2b8 \uc561\uc138\uc2a4 \uc81c\uc5b4 \uad00\ub9ac\uc790 ; \uc774\ubca4\ud2b8 \ub85c\uadf8 \ub9ac\ub354 ; \uac10\uc0ac \ub85c\uadf8 ; ACL \uc601\uc5ed ;;; \ub85c\uceec \uc2dc\uc2a4\ud15c".split(";");
163 +g.WatchdogCurrentStates={1:"\uc2dc\uc791\ub418\uc9c0 \uc54a\uc74c",2:"\uc911\uc9c0",4:"\ub2ec\ub9ac\ub294",8:"\ub9cc\ub8cc",16:"\ub9e4\ub2ec\ub9b0"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
164 K={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},B={16:"\ubcf4\uc548 \uad00\ub9ac\uc790",17:"RCO",18:"\ub9ac\ub514\ub809\uc158 \uad00\ub9ac\uc790",19:"\ud38c\uc6e8\uc5b4 \uc5c5\ub370\uc774\ud2b8 \uad00\ub9ac\uc790",20:"\ubcf4\uc548 \uac10\uc0ac \ub85c\uadf8",21:"\ub124\ud2b8\uc6cc\ud06c \uc2dc\uac04",22:"\ub124\ud2b8\uc6cc\ud06c \uad00\ub9ac",23:"\uc2a4\ud1a0\ub9ac\uc9c0 \uad00\ub9ac",24:"\uc774\ubca4\ud2b8 \uad00\ub9ac\uc790",25:"\ud68c\ub85c \ucc28\ub2e8\uae30 \uad00\ub9ac\uc790",26:"\uc0c1\ub2f4\uc6d0 \ud604\uc7ac \uc0c1\ud0dc \uad00\ub9ac\uc790",
165 27:"\ubb34\uc120 \uad6c\uc131",28:"EAC",29:"KVM",30:"\uc0ac\uc6a9\uc790 \uc635\ud2b8 \uc778 \uc774\ubca4\ud2b8",32:"\uc2a4\ud06c\ub9b0 \ube14\ub7ad\ud0b9",33:"\uc6cc\uce58 \ub3c5 \uc774\ubca4\ud2b8",1600:"\ud504\ub85c\ube44\uc800\ub2dd \uc2dc\uc791",1601:"\ud504\ub85c\ube44\uc800\ub2dd \uc644\ub8cc",1602:"ACL \ud56d\ubaa9 \ucd94\uac00",1603:"ACL \ud56d\ubaa9 \uc218\uc815",1604:"ACL \ud56d\ubaa9 \uc81c\uac70",1605:"\uc2e0\uc784 \uc815\ubcf4\uac00 \uc62c\ubc14\ub974\uc9c0 \uc54a\uc740 ACL \uc561\uc138\uc2a4",
166 1606:"ACL \ud56d\ubaa9 \uc0c1\ud0dc",1607:"TLS \uc0c1\ud0dc \ubcc0\uacbd",1608:"TLS \uc11c\ubc84 \uc778\uc99d\uc11c \uc138\ud2b8",1609:"TLS \uc11c\ubc84 \uc778\uc99d\uc11c \uc81c\uac70",1610:"TLS \uc2e0\ub8b0\ud560 \uc218\uc788\ub294 \ub8e8\ud2b8 \uc778\uc99d\uc11c \ucd94\uac00",1611:"TLS \uc2e0\ub8b0\ud560 \uc218\uc788\ub294 \ub8e8\ud2b8 \uc778\uc99d\uc11c \uc81c\uac70",1612:"TLS \uc0ac\uc804 \uacf5\uc720 \ud0a4 \uc138\ud2b8",1613:"Kerberos \uc124\uc815 \uc218\uc815",1614:"Kerberos \uae30\ubcf8 \ud0a4 \uc218\uc815",
@@ -172,109 +172,109 @@ K={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},B={16:"\ubcf4\uc548 \uad00\ub9ac\uc79
172 2502:"CB \uc815\ucc45 \ucd94\uac00",2503:"CB \uc815\ucc45 \uc81c\uac70",2504:"CB \uae30\ubcf8 \uc815\ucc45 \uc138\ud2b8",2505:"CB \ud734\ub9ac\uc2a4\ud2f1 \uc635\uc158 \uc138\ud2b8",2506:"CB \ud734\ub9ac\uc2a4\ud2f1 \uc0c1\ud0dc \uc9c0\uc6b0\uae30",2600:"\uc5d0\uc774\uc804\ud2b8 \uac10\uc2dc\uc790 \ucd94\uac00",2601:"\uc5d0\uc774\uc804\ud2b8 \uac10\uc2dc\uc790 \uc81c\uac70",2602:"\uc5d0\uc774\uc804\ud2b8 \uc6cc\uce58 \ub3c5 \uc870\uce58 \uc138\ud2b8",2700:"\ubb34\uc120 \ud504\ub85c\ud30c\uc77c \ucd94\uac00",
173 2701:"\ubb34\uc120 \ud504\ub85c\ud30c\uc77c \uc81c\uac70",2702:"\ubb34\uc120 \ud504\ub85c\ud30c\uc77c \uc5c5\ub370\uc774\ud2b8",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",2800:"EAC \uc790\uc138 \uc11c\uba85\uc790 SET",2801:"EAC \ud65c\uc131\ud654",2802:"EAC \ube44\ud65c\uc131\ud654",2803:"EAC \uc790\uc138 \uc0c1\ud0dc",2804:"EAC \uc124\uc815 \uc635\uc158",2900:"KVM \uc635\ud2b8 \uc778 \ud65c\uc131\ud654",
174 2901:"KVM \uc635\ud2b8 \uc778 \ube44\ud65c\uc131\ud654",2902:"KVM \ube44\ubc00\ubc88\ud638 \ubcc0\uacbd",2903:"KVM \ub3d9\uc758 \uc131\uacf5",2904:"KVM \ub3d9\uc758 \uc2e4\ud328",3E3:"\uc635\ud2b8 \uc778 \uc815\ucc45 \ubcc0\uacbd",3001:"\ub3d9\uc758 \ucf54\ub4dc \uc774\ubca4\ud2b8 \ubcf4\ub0b4\uae30",3002:"\uc218\uc2e0 \uac70\ubd80 \uc774\ubca4\ud2b8 \uc2dc\uc791",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};
175 -e.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["\uc798\ubabb\ub41c ME \uc561\uc138\uc2a4","\uc798\ubabb\ub41c MEBx \uc561\uc138\uc2a4"][b.charCodeAt(0)];if(1606==a){var c=["\ube44\ud65c\uc131\ud654","\uac00\ub2a5"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"\uba3c"+["NoAuth","ServerAuth","\uc0c1\ud638 \uc778\uc99d"][b.charCodeAt(0)]+
176 -", \ud604\uc9c0"+["NoAuth","ServerAuth","\uc0c1\ud638 \uc778\uc99d"][b.charCodeAt(1)]:1617==a?e.RealmNames[ReadInt(b,0)]+","+["NoAuth","\uc778\uc99d","\ube44\ud65c\uc131\ud654"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","\ud604\uc9c0 MEI","\ub85c\uceec WSMAN","\uc6d0\uaca9 WSAMN"][b.charCodeAt(0)]:1900==a?"\uc5d0\uc11c"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \uc5d0"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*
177 -ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"\uc5d0\uc11c"+["\uc5c6\uc74c","KVM","\ubaa8\ub450"][b.charCodeAt(0)]+" \uc5d0"+["\uc5c6\uc74c","KVM","\ubaa8\ub450"][b.charCodeAt(1)]:3001==a?["\uc131\uacf5","3 \ud68c \uc2e4\ud328"][b.charCodeAt(0)]:null};e.GetAuditLog=function(a){e.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return e}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
175 +g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["\uc798\ubabb\ub41c ME \uc561\uc138\uc2a4","\uc798\ubabb\ub41c MEBx \uc561\uc138\uc2a4"][b.charCodeAt(0)];if(1606==a){var c=["\ube44\ud65c\uc131\ud654","\uac00\ub2a5"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"\uba3c"+["NoAuth","ServerAuth","\uc0c1\ud638 \uc778\uc99d"][b.charCodeAt(0)]+
176 +", \ud604\uc9c0"+["NoAuth","ServerAuth","\uc0c1\ud638 \uc778\uc99d"][b.charCodeAt(1)]:1617==a?g.RealmNames[ReadInt(b,0)]+","+["NoAuth","\uc778\uc99d","\ube44\ud65c\uc131\ud654"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","\ud604\uc9c0 MEI","\ub85c\uceec WSMAN","\uc6d0\uaca9 WSAMN"][b.charCodeAt(0)]:1900==a?"\uc5d0\uc11c"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \uc5d0"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*
177 +ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"\uc5d0\uc11c"+["\uc5c6\uc74c","KVM","\ubaa8\ub450"][b.charCodeAt(0)]+" \uc5d0"+["\uc5c6\uc74c","KVM","\ubaa8\ub450"][b.charCodeAt(1)]:3001==a?["\uc131\uacf5","3 \ud68c \uc2e4\ud328"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,r,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
178 function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
179 -function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",g=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+g+v+">"));return a+("</r:"+b+">")}
179 +function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">";if("string"==typeof c)a+=c;else for(var v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
180 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
181 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
182 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
183 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function g(a,b){var c,p,e,d,x,h,k,m,g,q=b&&b.split("/"),w=r.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){q=q.slice(0,q.length-1);a=a.split("/");x=a.length-1;r.nodeIdCompat&&A.test(a[x])&&(a[x]=a[x].replace(A,""));a=q.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
184 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((q||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(q)for(g=q.length;0<g;--g)if(e=w[q.slice(0,g).join("/")])if(e=e[p]){d=e;h=x;break}if(d)break;!k&&l&&l[p]&&(k=l[p],m=x)}!d&&k&&(d=k,h=m);d&&(c.splice(0,h,d),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return g(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
185 -a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function e(a){return function(){return r&&r.config&&r.config[a]||{}}}var C,w,D,m,k={},h={},r={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,A=/\.js$/;D=function(a,b){var c,e=q(a),d=e[0];a=e[1];d&&(d=g(d,b),c=p(d));d?a=c&&c.normalize?c.normalize(a,n(b)):g(a,b):(a=g(a,b),e=q(a),
186 -d=e[0],a=e[1],d&&(c=p(d)));return{f:d?d+"!"+a:a,n:a,pr:d,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:e(a)}}};C=function(a,b,c,e){var x,g,A,r,q=[];g=typeof c;var w;e=e||a;if("undefined"===g||"function"===g){b=!b.length&&c.length?["require","exports","module"]:b;for(r=0;r<b.length;r+=1)if(A=D(b[r],e),g=A.f,"require"===g)q[r]=m.require(a);else if("exports"===g)q[r]=m.exports(a),
187 -w=!0;else if("module"===g)x=q[r]=m.module(a);else if(B.call(k,g)||B.call(h,g)||B.call(K,g))q[r]=p(g);else if(A.p)A.p.load(A.n,v(e,!0),l(g),{}),q[r]=k[g];else throw Error(a+" missing "+g);b=c?c.apply(k[a],q):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,e,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){r=a;r.deps&&w(r.deps,r.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
188 -typeof c&&(c=e,e=x);e?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(e.isArrayBuffer(a)||e.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
189 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var e=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)e.nextTick=process.nextTick,e.setImmediate="function"===typeof setImmediate?setImmediate:e.nextTick;else if("function"===typeof setImmediate)e.setImmediate=setImmediate,e.nextTick=function(a){return setImmediate(a)};
190 -else{e.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];e.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
191 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var d=e.setImmediate;e.setImmediate=function(e){15<Date.now()-b?(b=Date.now(),d(e)):(a.push(e),1===a.length&&p.setAttribute("a",c=!c))}}e.nextTick=e.setImmediate}})();e.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};e.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};e.isArrayBufferView=function(a){return a&&
192 -e.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};e.ByteBuffer=c;e.ByteStringBuffer=c;e.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};e.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};e.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};e.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
193 -e.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};e.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};e.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(e.encodeUtf8(a))};e.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
194 -255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
195 -8&255))};e.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};e.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};e.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
196 -e.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};e.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};e.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
197 -16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};e.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24Le=
198 -function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};e.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};e.ByteStringBuffer.prototype.getSignedInt=
199 -function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};e.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
200 -a)};e.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};e.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};e.ByteStringBuffer.prototype.copy=function(){var a=e.createBuffer(this.data);a.read=this.read;return a};e.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};e.ByteStringBuffer.prototype.clear=
201 -function(){this.data="";this.read=0;return this};e.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};e.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.ByteStringBuffer.prototype.toString=function(){return e.decodeUtf8(this.bytes())};e.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
202 -0;this.growSize=b.growSize||1024;var c=e.isArrayBuffer(a),p=e.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};e.DataBuffer.prototype.length=function(){return this.write-this.read};e.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
203 -e.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),p=new Uint8Array(this.length()+b);p.set(c);this.data=new DataView(p.buffer);return this};e.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};e.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
204 -return this};e.DataBuffer.prototype.putBytes=function(a,b){if(e.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var d=new Uint8Array(this.data.buffer,this.write);d.set(c);this.write+=p;return this}if(e.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),d=new Uint8Array(this.data.buffer),d.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof e.DataBuffer||"object"===typeof a&&"number"===
205 -typeof a.read&&"number"===typeof a.write&&e.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),d=new Uint8Array(a.data.byteLength,this.write),d.set(c),this.write+=c.byteLength,this;a instanceof e.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.hex.decode(a,c,this.write),this;if("base64"===
206 -b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=e.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=e.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
207 -b);}throw Error("Invalid parameter: "+a);};e.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};e.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};e.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};e.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
208 -e.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};e.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};e.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};e.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
209 -a,!0);this.write+=4;return this};e.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};e.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};e.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};e.DataBuffer.prototype.getInt24=
210 -function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};e.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};e.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};e.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};e.DataBuffer.prototype.getInt32Le=function(){var a=
211 -this.data.getInt32(this.read,!0);this.read+=4;return a};e.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};e.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
212 -e.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};e.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};e.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};e.DataBuffer.prototype.copy=function(){return new e.DataBuffer(this)};e.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
213 -new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};e.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};e.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};e.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
214 -this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return e.binary.raw.encode(b);if("hex"===a)return e.binary.hex.encode(b);if("base64"===a)return e.binary.base64.encode(b);if("utf8"===a)return e.text.utf8.decode(b);if("utf16"===a)return e.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};e.createBuffer=function(a,b){void 0!==a&&"utf8"===
215 -(b||"raw")&&(a=e.encodeUtf8(a));return new e.ByteBuffer(a)};e.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};e.xorBytes=function(a,b,c){for(var p="",d="",e="",h=0,k=0;0<c;--c,++h)d=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(p+=e,e="",k=0),e+=String.fromCharCode(d),++k;return p+e};e.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};e.bytesToHex=
216 -function(a){return e.createBuffer(a).toHex()};e.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var d=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];e.encode64=function(a,b){for(var c="",p="",d,e,h,k=0;k<a.length;)d=
217 -a.charCodeAt(k++),e=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&3)<<4|e>>4),isNaN(e)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,b)+"\r\n",c=c.substr(b));return p+
218 -c};e.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,p,e,h,k=0;k<a.length;)c=d[a.charCodeAt(k++)-43],p=d[a.charCodeAt(k++)-43],e=d[a.charCodeAt(k++)-43],h=d[a.charCodeAt(k++)-43],b+=String.fromCharCode(c<<2|p>>4),64!==e&&(b+=String.fromCharCode((p&15)<<4|e>>2),64!==h&&(b+=String.fromCharCode((e&3)<<6|h)));return b};e.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};e.decodeUtf8=function(a){return decodeURIComponent(escape(a))};e.binary={raw:{},hex:{},base64:{}};
219 -e.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};e.binary.raw.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(a.length));for(var e=c=c||0,d=0;d<a.length;++d)p[e++]=a.charCodeAt(d);return b?e-c:p};e.binary.hex.encode=e.bytesToHex;e.binary.hex.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var e=0,d=c;a.length&1&&(e=1,p[d++]=parseInt(a[0],16));for(;e<a.length;e+=2)p[d++]=parseInt(a.substr(e,2),16);return b?d-c:p};e.binary.base64.encode=
220 -function(a,b){for(var c="",p="",e,d,h,k=0;k<a.byteLength;)e=a[k++],d=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,
221 -b)+"\r\n",c=c.substr(b));return p+c};e.binary.base64.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var e,h,k,m,g=0,r=c;g<a.length;)e=d[a.charCodeAt(g++)-43],h=d[a.charCodeAt(g++)-43],k=d[a.charCodeAt(g++)-43],m=d[a.charCodeAt(g++)-43],p[r++]=e<<2|h>>4,64!==k&&(p[r++]=(h&15)<<4|k>>2,64!==m&&(p[r++]=(k&3)<<6|m));return b?r-c:p.subarray(0,r)};e.text={utf8:{},utf16:{}};e.text.utf8.encode=function(a,b,c){a=e.encodeUtf8(a);
222 -var p=b;p||(p=new Uint8Array(a.length));for(var d=c=c||0,h=0;h<a.length;++h)p[d++]=a.charCodeAt(h);return b?d-c:p};e.text.utf8.decode=function(a){return e.decodeUtf8(String.fromCharCode.apply(null,a))};e.text.utf16.encode=function(a,b,c){var p=b;p||(p=new Uint8Array(2*a.length));for(var e=new Uint16Array(p.buffer),d=c=c||0,h=c,k=0;k<a.length;++k)e[h++]=a.charCodeAt(k),d+=2;return b?d-c:p};e.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};e.deflate=function(a,
223 -b,c){b=e.decode64(a.deflate(e.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};e.inflate=function(a,b,c){a=a.inflate(e.encode64(b)).rval;return null===a?null:e.decode64(a)};var g=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=e.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
224 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(e.decode64(c)));return c},m=function(a,b,c,p){var e=l(a,b);null===e&&(e={});e[c]=p;g(a,b,e)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var p=l(a,b);if(null!==p&&c in p){delete p[c];c=!0;for(var e in p){c=!1;break}c&&(p=null);g(a,b,p)}},r=function(a,b){g(a,b,null)},K=function(a,b,
225 -c){var p=null;"undefined"===typeof c&&(c=["web","flash"]);var e,d=!1,h=null,k;for(k in c){e=c[k];try{if("flash"===e||"both"===e){if(null===b[0])throw Error("Flash local storage not available.");p=a.apply(this,b);d="flash"===e}if("web"===e||"both"===e)b[0]=localStorage,p=a.apply(this,b),d=!0}catch(m){h=m}if(d)break}if(!d)throw h;return p};e.setItem=function(a,b,c,p,e){K(m,arguments,e)};e.getItem=function(a,b,c,p){return K(k,arguments,p)};e.removeItem=function(a,b,c,p){K(h,arguments,p)};e.clearItems=
226 -function(a,b,c){K(r,arguments,c)};e.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;e.getQueryVariables=function(a){var b=function(a){var b=
227 -{};a=a.split("&");for(var c=0;c<a.length;c++){var p=a[c].indexOf("="),e;0<p?(e=a[c].substring(0,p),p=a[c].substring(p+1)):(e=a[c],p=null);e in b||(b[e]=[]);e in Object.prototype||null===p||b[e].push(unescape(p))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};e.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
228 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:e.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};e.makeRequest=function(a){var b=e.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var p;"undefined"===typeof a?p=b.query:(p=b.query[a])&&"undefined"!==typeof c&&(p=p[c]);return p},getQueryLast:function(a,b){var p=c.getQuery(a);return p?p[p.length-1]:b}};return c};e.makeLink=function(a,
229 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};e.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var p=0,e=b.length;p<e;){var d=b[p++];if(p==e)a[d]=c;else{var h=d in a;if(!h||h&&"object"!==typeof a[d]||h&&null===a[d])a[d]={};a=a[d]}}};e.getPath=function(a,b,c){for(var p=0,e=b.length,d=!0;d&&p<e&&"object"===typeof a&&null!==a;){var h=b[p++];(d=h in a)&&(a=a[h])}return d?a:c};e.deletePath=function(a,b){if("object"===
230 -typeof a&&null!==a)for(var c=0,p=b.length;c<p;){var e=b[c++];if(c==p)delete a[e];else{if(!(e in a)||"object"!==typeof a[e]||null===a[e])break;a=a[e]}}};e.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};e.format=function(a){var b=/%./g,c,p,e=0,d=[];for(p=0;c=b.exec(a);)switch(p=a.substring(p,b.lastIndex-2),0<p.length&&d.push(p),p=b.lastIndex,c=c[0][1],c){case "s":case "o":e<arguments.length?d.push(arguments[e++ +1]):d.push("<?>");break;case "%":d.push("%");break;default:d.push("<#"+
231 -c+"?>")}d.push(a.substring(p));return d.join("")};e.formatNumber=function(a,b,c,p){var e=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;p=void 0===p?".":p;c=0>a?"-":"";var d=parseInt(a=Math.abs(+a||0).toFixed(e),10)+"",h=3<d.length?d.length%3:0;return c+(h?d.substr(0,h)+p:"")+d.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+p)+(e?b+Math.abs(a-d).toFixed(e).slice(2):"")};e.formatSize=function(a){return a=1073741824<=a?e.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?e.formatNumber(a/1048576,2,".","")+
232 -" MiB":1024<=a?e.formatNumber(a/1024,0)+" KiB":e.formatNumber(a,0)+" bytes"};e.bytesFromIP=function(a){return-1!==a.indexOf(".")?e.bytesFromIPv4(a):-1!==a.indexOf(":")?e.bytesFromIPv6(a):null};e.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=e.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};e.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
233 -2*(8-a.length+b),p=e.createBuffer(),d=0;8>d;++d)if(a[d]&&0!==a[d].length){var h=e.hexToBytes(a[d]);2>h.length&&p.putByte(0);p.putBytes(h)}else p.fillWithByte(0,c),c=0;return p.getBytes()};e.bytesToIP=function(a){return 4===a.length?e.bytesToIPv4(a):16===a.length?e.bytesToIPv6(a):null};e.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};e.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,d=0;d<a.length;d+=
234 -2){for(var h=e.bytesToHex(a[d]+a[d+1]);"0"===h[0]&&"0"!==h;)h=h.substr(1);if("0"===h){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(h)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};e.estimateCores=function(a,b){function c(a,k,m){if(0===k){var g=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);e.cores=
235 -Math.max(1,g);URL.revokeObjectURL(h);return b(null,e.cores)}p(m,function(b,p){a.push(d(m,p));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],e=0;e<a;++e){var z=new Worker(h);z.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(z)}for(e=0;e<a;++e)c[e].postMessage(e)}function d(a,b){for(var c=[],p=0;p<a;++p)for(var e=b[p],h=c[p]=[],z=0;z<a;++z)if(p!==z){var k=b[z];(e.st>k.st&&e.st<k.et||k.st>e.st&&k.st<e.et)&&h.push(z)}return c.reduce(function(a,
236 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in e&&!a.update)return b(null,e.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return e.cores=navigator.hardwareConcurrency,b(null,e.cores);if("undefined"===typeof Worker)return e.cores=1,b(null,e.cores);if("undefined"===typeof Blob)return e.cores=2,b(null,e.cores);var h=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
237 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var q=0;q<g.length;++q)g[q](c);
238 -return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
183 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,g,x,h,k,m,e,r=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){r=r.slice(0,r.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=r.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
184 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((r||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(r)for(e=r.length;0<e;--e)if(d=w[r.slice(0,e).join("/")])if(d=d[p]){g=d;h=x;break}if(g)break;!k&&l&&l[p]&&(k=l[p],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
185 +a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function r(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var C,w,D,m,k={},h={},u={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=r(a),g=d[0];a=d[1];g&&(g=e(g,b),c=p(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=r(a),
186 +g=d[0],a=d[1],g&&(c=p(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};C=function(a,b,c,g){var x,e,z,u,r=[];e=typeof c;var w;g=g||a;if("undefined"===e||"function"===e){b=!b.length&&c.length?["require","exports","module"]:b;for(u=0;u<b.length;u+=1)if(z=D(b[u],g),e=z.f,"require"===e)r[u]=m.require(a);else if("exports"===e)r[u]=m.exports(a),
187 +w=!0;else if("module"===e)x=r[u]=m.module(a);else if(B.call(k,e)||B.call(h,e)||B.call(K,e))r[u]=p(e);else if(z.p)z.p.load(z.n,v(g,!0),l(e),{}),r[u]=k[e];else throw Error(a+" missing "+e);b=c?c.apply(k[a],r):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
188 +typeof c&&(c=g,g=x);g?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(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(b){for(var p=
189 +0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.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)};
190 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
191 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}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&&
192 +d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
193 +d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
194 +255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
195 +8&255))};d.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};d.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};d.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
196 +d.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};d.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};d.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
197 +16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};d.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24Le=
198 +function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};d.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};d.ByteStringBuffer.prototype.getSignedInt=
199 +function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
200 +a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
201 +function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
202 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
203 +d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
204 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
205 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
206 +b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
207 +b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
208 +d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
209 +a,!0);this.write+=4;return this};d.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};d.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};d.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};d.DataBuffer.prototype.getInt24=
210 +function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};d.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};d.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};d.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};d.DataBuffer.prototype.getInt32Le=function(){var a=
211 +this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};d.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
212 +d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
213 +new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
214 +this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
215 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
216 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
217 +a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
218 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
219 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
220 +function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
221 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,u=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[u++]=p<<2|g>>4,64!==h&&(d[u++]=(g&15)<<4|h>>2,64!==k&&(d[u++]=(h&3)<<6|k));return b?u-c:d.subarray(0,u)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
222 +var p=b;p||(p=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)p[y++]=a.charCodeAt(h);return b?y-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
223 +b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
224 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},K=function(a,b,
225 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){K(m,arguments,p)};d.getItem=function(a,b,c,d){return K(k,arguments,d)};d.removeItem=function(a,b,c,d){K(h,arguments,d)};d.clearItems=
226 +function(a,b,c){K(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;d.getQueryVariables=function(a){var b=function(a){var b=
227 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
228 +0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
229 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
230 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
231 +c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
232 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
233 +2*(8-a.length+b),p=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&p.putByte(0);p.putBytes(k)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,h=0;h<a.length;h+=
234 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],e=b.length;m&&e===m.end+1?(m.end=e,m.end-m.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:e,end:e})}b.push(k)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,e){if(0===m){var u=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
235 +Math.max(1,u);URL.revokeObjectURL(k);return b(null,d.cores)}p(e,function(b,d){a.push(h(e,d));c(a,m-1,e)})}function p(a,b){for(var c=[],d=[],g=0;g<a;++g){var h=new Worker(k);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(g=0;g<a;++g)c[g].postMessage(g)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],g=c[d]=[],y=0;y<a;++y)if(d!==y){var k=b[y];(p.st>k.st&&p.st<k.et||k.st>p.st&&k.st<p.et)&&g.push(y)}return c.reduce(function(a,
236 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
237 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var r=0;r<e.length;++r)e[r](c);
238 +return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
239 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
240 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
241 this.mode.start(c)};c.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()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
242 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
243 -c.defined.cipher=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
244 -4<b.length){var d=b;b=a.util.createBuffer();for(var e=0;e<d.length;++e)b.putByte(d[e])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function g(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
242 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
243 +c.defined.cipher=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
244 +4<b.length){var d=b;b=a.util.createBuffer();for(var g=0;g<d.length;++g)b.putByte(d[g])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
245 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
246 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.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);
247 this._outBlock=Array(this._ints)};w.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=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
248 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
249 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
250 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32()^this._outBlock[d],b.putInt32(this._inBlock[d]);else{var e=(this.blockSize-p)%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]);
251 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
252 -p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32(),b.putInt32(this._inBlock[d]^this._outBlock[d]);else{var e=(this.blockSize-p)%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);
253 -if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
254 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)b.putInt32(a.getInt32()^this._outBlock[d]),this._inBlock[d]=this._outBlock[d];else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(d=0;d<this._ints;++d)this._partialOutput.putInt32(a.getInt32()^
255 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
256 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var g=0;g<
257 -this._ints;++g)b.putInt32(a.getInt32()^this._outBlock[g]);else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);0<q&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
250 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
251 +if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
252 +d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
253 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
254 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
255 +this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
256 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var e=0;e<
257 +this._ints;++e)b.putInt32(a.getInt32()^this._outBlock[e]);else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);0<r&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<r&&!c)return b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
258 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
259 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.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,
260 -this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(g(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=g(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
261 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var g=0;g<this._ints;++g)b.putInt32(this._outBlock[g]^=a.getInt32());this._cipherLength+=this.blockSize}else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();
262 -for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);if(0===q||c){c?(g=p%this.blockSize,this._cipherLength+=g,this._partialOutput.truncate(this.blockSize-g)):this._cipherLength+=this.blockSize;for(g=0;g<this._ints;++g)this._outBlock[g]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),
263 -this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
264 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var e=this._aDataLength.concat(g(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,e);e=[];this.cipher.encrypt(this._j0,e);for(var q=0;q<
265 -this._ints;++q)this.tag.putInt32(this._s[q]^e[q]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],p=b.slice(0),d=0;128>d;++d)a[d/32|0]&1<<31-d%32&&(c[0]^=p[0],c[1]^=p[1],c[2]^=p[2],c[3]^=p[3]),this.pow(p,p);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,p=3;0<p;--p)b[p]=a[p]>>>1|(a[p-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
266 -[0,0,0,0],c=0;32>c;++c){var p=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=p[0];b[1]^=p[1];b[2]^=p[2];b[3]^=p[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,p=4*c,c=16*c,d=Array(c),e=0;e<c;++e){var g=[0,0,0,0];g[e/p|0]=1<<b-1<<(p-1-e%p)*b;d[e]=this.generateSubHashTable(this.multiply(g,a),b)}return d};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
267 -p=c>>>1,d=Array(c);d[p]=a.slice(0);for(var e=p>>>1;0<e;)this.pow(d[2*e],d[e]=[]),e>>=1;for(e=2;e<p;){for(var g=1;g<e;++g){var q=d[e],w=d[g];d[e+g]=[q[0]^w[0],q[1]^w[1],q[2]^w[2],q[3]^w[3]]}e*=2}d[0]=[0,0,0,0];for(e=p+1;e<c;++e)g=d[e^p],d[e]=[a[0]^g[0],a[1]^g[1],a[2]^g[2],a[3]^g[3]];return d}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=
268 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
269 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);r=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,e,g,k,q,u,b=0;256>b;++b){q=p^p<<1^p<<2^p<<3^p<<4;q=q>>8^q&255^99;h[c]=q;r[q]=c;u=a[q];e=a[c];g=a[e];k=a[g];u^=u<<24^q<<16^q<<8^q;g=(e^g^k)<<24^(c^
270 -k)<<16^(c^g^k)<<8^c^e^k;for(var w=0;4>w;++w)B[w][c]=u,x[w][q]=g,u=u<<24|u>>>8,g=g<<24|g>>>8;0===c?c=p=1:(c=e^a[a[a[e^k]]],p^=a[a[p]])}}function g(a,b){for(var c=a.slice(0),p,d=1,e=c.length,m=k*(e+6+1),q=e;q<m;++q)p=c[q-1],0===q%e?(p=h[p>>>16&255]<<24^h[p>>>8&255]<<16^h[p&255]<<8^h[p>>>24]^K[d]<<24,d++):6<e&&4===q%e&&(p=h[p>>>24]<<24^h[p>>>16&255]<<16^h[p>>>8&255]<<8^h[p&255]),c[q]=c[q-e]^p;if(b){for(var d=x[0],e=x[1],r=x[2],w=x[3],l=c.slice(0),m=c.length,q=0,F=m-k;q<m;q+=k,F-=k)if(0===q||q===m-k)l[q]=
271 -c[F],l[q+1]=c[F+3],l[q+2]=c[F+2],l[q+3]=c[F+1];else for(var B=0;B<k;++B)p=c[F+B],l[q+(3&-B)]=d[h[p>>>24]]^e[h[p>>>16&255]]^r[h[p>>>8&255]]^w[h[p&255]];c=l}return c}function w(a,b,c,p){var d=a.length/4-1,e,g,k,m,q;p?(e=x[0],g=x[1],k=x[2],m=x[3],q=r):(e=B[0],g=B[1],k=B[2],m=B[3],q=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[p?3:1]^a[1];C=b[2]^a[2];b=b[p?1:3]^a[3];for(var n=3,v=1;v<d;++v)L=e[w>>>24]^g[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=e[l>>>24]^g[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=e[C>>>24]^
272 -g[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=e[b>>>24]^g[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=q[w>>>24]<<24^q[l>>>16&255]<<16^q[C>>>8&255]<<8^q[b&255]^a[++n];c[p?3:1]=q[l>>>24]<<24^q[C>>>16&255]<<16^q[b>>>8&255]<<8^q[w&255]^a[++n];c[2]=q[C>>>24]<<24^q[b>>>16&255]<<16^q[w>>>8&255]<<8^q[l&255]^a[++n];c[p?1:3]=q[b>>>24]<<24^q[w>>>16&255]<<16^q[l>>>8&255]<<8^q[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
273 -a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;e.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!1,mode:p});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!0,mode:p});a.start(b);return a};a.aes.createDecryptionCipher=
260 +this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
261 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var e=0;e<this._ints;++e)b.putInt32(this._outBlock[e]^=a.getInt32());this._cipherLength+=this.blockSize}else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();
262 +for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(0===r||c){c?(e=p%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<r&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),
263 +this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
264 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var u=0;u<
265 +this._ints;++u)this.tag.putInt32(this._s[u]^g[u]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
266 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),g=0;g<c;++g){var e=[0,0,0,0];e[g/d|0]=1<<b-1<<(d-1-g%d)*b;p[g]=this.generateSubHashTable(this.multiply(e,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
267 +d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(p[2*g],p[g]=[]),g>>=1;for(g=2;g<d;){for(var e=1;e<g;++e){var r=p[g],w=p[e];p[g+e]=[r[0]^w[0],r[1]^w[1],r[2]^w[2],r[3]^w[3]]}g*=2}p[0]=[0,0,0,0];for(g=d+1;g<c;++g)e=p[g^d],p[g]=[a[0]^e[0],a[1]^e[1],a[2]^e[2],a[3]^e[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=
268 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
269 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,g,e,k,r,q,b=0;256>b;++b){r=p^p<<1^p<<2^p<<3^p<<4;r=r>>8^r&255^99;h[c]=r;u[r]=c;q=a[r];g=a[c];e=a[g];k=a[e];q^=q<<24^r<<16^r<<8^r;e=(g^e^k)<<24^(c^
270 +k)<<16^(c^e^k)<<8^c^g^k;for(var w=0;4>w;++w)B[w][c]=q,x[w][r]=e,q=q<<24|q>>>8,e=e<<24|e>>>8;0===c?c=p=1:(c=g^a[a[a[g^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,g=c.length,m=k*(g+6+1),r=g;r<m;++r)d=c[r-1],0===r%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^K[p]<<24,p++):6<g&&4===r%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[r]=c[r-g]^d;if(b){for(var p=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),m=c.length,r=0,F=m-k;r<m;r+=k,F-=k)if(0===r||r===m-k)l[r]=
271 +c[F],l[r+1]=c[F+3],l[r+2]=c[F+2],l[r+3]=c[F+1];else for(var B=0;B<k;++B)d=c[F+B],l[r+(3&-B)]=p[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,g,e,k,m,r;d?(g=x[0],e=x[1],k=x[2],m=x[3],r=u):(g=B[0],e=B[1],k=B[2],m=B[3],r=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[d?3:1]^a[1];C=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)L=g[w>>>24]^e[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^e[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=g[C>>>24]^
272 +e[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^e[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=r[w>>>24]<<24^r[l>>>16&255]<<16^r[C>>>8&255]<<8^r[b&255]^a[++n];c[d?3:1]=r[l>>>24]<<24^r[C>>>16&255]<<16^r[b>>>8&255]<<8^r[w&255]^a[++n];c[2]=r[C>>>24]<<24^r[b>>>16&255]<<16^r[w>>>8&255]<<8^r[l&255]^a[++n];c[d?1:3]=r[b>>>24]<<24^r[w>>>16&255]<<16^r[l>>>8&255]<<8^r[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
273 +a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;g.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
274 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
275 -c;for(var c=a.util.createBuffer(),e=0;e<d.length;++e)c.putByte(d[e])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,e=0;e<h;++e)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=g(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return g(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
276 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,r,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
277 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
275 +c;for(var c=a.util.createBuffer(),g=0;g<d.length;++g)c.putByte(d[g])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,g=0;g<h;++g)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
276 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
277 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
278 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
279 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
280 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -288,336 +288,336 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
288 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
289 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
290 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
291 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var q=0;q<g.length;++q)g[q](c);return c.oids}},
292 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
293 -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};c.create=function(b,c,d,e){if(a.util.isArray(e)){for(var h=[],g=0;g<e.length;++g)void 0!==e[g]&&h.push(e[g]);e=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(e),value:e}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,g){void 0===g&&(g=!0);
294 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,r=d(b);if(b.length()<r){if(g)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+r,m;r=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<r){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===r-(b.read-
295 -x))++x,--r}catch(A){}b.read=x}if(l)if(l=[],void 0===r)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,g))}else for(x=b.length();0<r;)l.push(c.fromDer(b,g)),r-=x-b.length(),x=b.length();else{if(void 0===r){if(g)throw Error("Non-constructed ASN.1 object of indefinite length.");r=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<r;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(r)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
296 -e=b.tagClass|b.type,g=a.util.createBuffer();if(b.composed){b.constructed?e|=32:g.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&g.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)g.putInt16(b.value.charCodeAt(h));else g.putBytes(b.value);d.putByte(e);if(127>=g.length())d.putByte(g.length()&127);else{h=g.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(g);
297 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,e,h,g,q=2;q<b.length;++q){d=!0;e=[];h=parseInt(b[q],10);do g=h&127,h>>>=7,d||(g|=128),e.push(g),d=!1;while(0<h);for(d=e.length-1;0<=d;--d)c.putByte(e[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var e=0;0<b.length();)d=b.getByte(),e<<=7,d&128?e+=d&127:(c+="."+(e+d),e=0);
298 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,e=parseInt(a.substr(4,2),10),p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,e);b.setUTCHours(p,g,q,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
299 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,e=parseInt(a.substr(6,2),10),p=parseInt(a.substr(8,2),10),g=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),x=0,l=0,y=!1;"Z"===a.charAt(a.length-1)&&(y=!0);var R=a.length-5,z=a.charAt(R);if("+"===z||"-"===z)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===z&&(l*=-1),y=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
300 -10));y?(b.setUTCFullYear(c,d,e),b.setUTCHours(p,g,q,x),b.setTime(+b+l)):(b.setFullYear(c,d,e),b.setHours(p,g,q,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
291 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var r=0;r<e.length;++r)e[r](c);return c.oids}},
292 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
293 +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};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
294 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
295 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
296 +g=b.tagClass|b.type,e=a.util.createBuffer();if(b.composed){b.constructed?g|=32:e.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&e.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)e.putInt16(b.value.charCodeAt(h));else e.putBytes(b.value);d.putByte(g);if(127>=e.length())d.putByte(e.length()&127);else{h=e.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(e);
297 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,r=2;r<b.length;++r){d=!0;g=[];h=parseInt(b[r],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
298 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),r=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(r=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(g,e,r,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
299 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),r=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
300 +10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(g,e,r,x),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(g,e,r,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
301 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
302 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,e,g){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)g&&(b.tagClass!==d.tagClass&&g.push("["+d.name+'] Expected tag class "'+d.tagClass+
303 -'", got "'+b.tagClass+'"'),b.type!==d.type&&g.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var r=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[r]&&((h=c.validate(b.value[r],d.value[l],e,g))?++r:d.value[l].optional&&(h=!0)),!h&&g&&g.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
304 -b.value.length+'"');h&&e&&(d.capture&&(e[d.capture]=b.value),d.captureAsn1&&(e[d.captureAsn1]=b))}else g&&g.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var g=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,e){var k="";d=d||0;e=e||2;0<d&&(k+="\n");for(var h="",r=0;r<d*e;++r)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
302 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
303 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
304 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
305 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
306 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
307 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",r=0;r<b.value.length;++r)void 0!==b.value[r]&&(l+=1,B+=c.prettyPrint(b.value[r],d+1,e),r+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
308 -c.Type.OCTETSTRING?(g.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:g.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
309 -c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<g.length;++q)g[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
307 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,B+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
308 +c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
309 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var r=0;r<e.length;++r)e[r](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
310 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[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];m=[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];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
311 -Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var e,p,h,g,z,E,q,l=c.length();64<=l;){p=a.h0;h=a.h1;g=a.h2;z=a.h3;for(q=0;16>q;++q)b[q]=c.getInt32Le(),e=z^h&(g^z),e=p+e+k[q]+b[q],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;32>q;++q)e=g^z&(h^g),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;48>q;++q)e=h^g^z,e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;64>q;++q)e=g^(h|~z),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;a.h0=a.h0+p|0;a.h1=a.h1+h|0;a.h2=a.h2+g|0;a.h3=
312 -a.h3+z|0;l-=64}}var g=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=g;g.create=function(){h||c();var b=null,g=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);g=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
313 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],z=m.fullMessageLength.length-1;0<=z;--z)m.fullMessageLength[z]+=q[1],q[1]=q[0]+(m.fullMessageLength[z]/4294967296>>>0),m.fullMessageLength[z]>>>=0,q[0]=q[1]/4294967296>>>0;g.putBytes(c);d(b,k,g);(2048<g.read||0===g.length())&&g.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(g.bytes());c.putBytes(l.substr(0,
314 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,q=0,z=m.fullMessageLength.length-1;0<=z;--z)h=8*m.fullMessageLength[z]+q,q=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=
315 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
316 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,A,y,w,z=d.length();64<=z;){p=a.h0;g=a.h1;q=a.h2;l=a.h3;A=a.h4;for(w=0;16>w;++w)e=d.getInt32(),b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;20>w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;32>
317 -w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;40>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;60>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g&q|l&(g^q),e=(p<<5|p>>>27)+y+A+2400959708+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;80>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>
318 -27)+y+A+3395469782+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;a.h0=a.h0+p|0;a.h1=a.h1+g|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+A|0;z-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),e=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
319 -0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,e=0;e<c;++e)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var w=g.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
320 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],A=0;A<h.fullMessageLength.length;++A)w=8*h.fullMessageLength[A+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
321 -h4:b.h4};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var g=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
322 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,y,w,z,E,O,H,C,u,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
323 -for(;64>l;++l)e=b[l-2],e=(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10,p=b[l-15],p=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,b[l]=e+b[l-7]+p+b[l-16]|0;y=a.h0;w=a.h1;z=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;u=a.h7;for(l=0;64>l;++l)e=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),g=C^O&(H^C),p=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),q=y&w|z&(y^w),e=u+e+g+n[l]+b[l],p+=q,u=C,C=H,H=O,O=E+e|0,E=z,z=w,w=y,y=e+p|0;a.h0=a.h0+y|0;a.h1=a.h1+w|0;a.h2=a.h2+z|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+u|0;v-=
324 -64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.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,
325 -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],l=!0);var b=null,d=a.util.createBuffer(),e=Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,
326 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){r.messageLength=0;r.fullMessageLength=r.messageLength64=[];for(var c=r.messageLengthSize/4,e=0;e<c;++e)r.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return r}};r.start();r.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var x=g.length;r.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=r.fullMessageLength.length-
327 -1;0<=w;--w)r.fullMessageLength[w]+=x[1],x[1]=x[0]+(r.fullMessageLength[w]/4294967296>>>0),r.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return r};r.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,r.blockLength-(r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize&r.blockLength-1)));a.util.createBuffer();for(var w,x,A=8*r.fullMessageLength[0],y=0;y<r.fullMessageLength.length;++y)w=
328 -8*r.fullMessageLength[y+1],x=w/4294967296>>>0,A+=x,l.putInt32(A>>>0),A=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return r};var g=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
329 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
330 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,k,q,z,E,l,w,C,u,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)q=b[S-2],w=q[0],q=q[1],e=((w>>>19|q<<13)^(q>>>29|w<<3)^w>>>6)>>>0,p=((w<<13|q>>>19)^(q<<3|w>>>29)^(w<<26|q>>>6))>>>0,q=b[S-15],w=q[0],q=q[1],g=((w>>>1|q<<31)^(w>>>8|q<<24)^w>>>7)>>>0,k=((w<<31|q>>>1)^(w<<24|q>>>8)^(w<<25|q>>>7))>>>0,w=b[S-7],C=b[S-
331 -16],q=p+w[1]+k+C[1],b[S][0]=e+w[0]+g+C[0]+(q/4294967296>>>0)>>>0,b[S][1]=q>>>0;w=a[0][0];C=a[0][1];u=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)e=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,q=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,p=(ba^D&(J^ba))>>>0,z=(W^V&(aa^W))>>>0,g=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
332 -E=(w&u|v&(w^u))>>>0,l=(C&n|F&(C^n))>>>0,q=G+q+z+m[S][1]+b[S][1],e=I+e+p+m[S][0]+b[S][0]+(q/4294967296>>>0)>>>0,p=q>>>0,q=k+l,g=g+E+(q/4294967296>>>0)>>>0,k=q>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,q=L+p,D=Y+e+(q/4294967296>>>0)>>>0,V=q>>>0,Y=v,L=F,v=u,F=n,u=w,n=C,q=p+k,w=e+g+(q/4294967296>>>0)>>>0,C=q>>>0;q=a[0][1]+C;a[0][0]=a[0][0]+w+(q/4294967296>>>0)>>>0;a[0][1]=q>>>0;q=a[1][1]+n;a[1][0]=a[1][0]+u+(q/4294967296>>>0)>>>0;a[1][1]=q>>>0;q=a[2][1]+F;a[2][0]=a[2][0]+v+(q/4294967296>>>0)>>>0;a[2][1]=q>>>0;
333 -q=a[3][1]+L;a[3][0]=a[3][0]+Y+(q/4294967296>>>0)>>>0;a[3][1]=q>>>0;q=a[4][1]+V;a[4][0]=a[4][0]+D+(q/4294967296>>>0)>>>0;a[4][1]=q>>>0;q=a[5][1]+aa;a[5][0]=a[5][0]+J+(q/4294967296>>>0)>>>0;a[5][1]=q>>>0;q=a[6][1]+W;a[6][0]=a[6][0]+ba+(q/4294967296>>>0)>>>0;a[6][1]=q>>>0;q=a[7][1]+G;a[7][0]=a[7][0]+I+(q/4294967296>>>0)>>>0;a[7][1]=q>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var g=a.sha384=a.sha512.sha384=a.sha512.sha384||
334 -{};g.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=g;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
311 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var p,g,h,e,y,E,r,l=c.length();64<=l;){g=a.h0;h=a.h1;e=a.h2;y=a.h3;for(r=0;16>r;++r)b[r]=c.getInt32Le(),p=y^h&(e^y),p=g+p+k[r]+b[r],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;32>r;++r)p=e^y&(h^e),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;48>r;++r)p=h^e^y,p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;64>r;++r)p=e^(h|~y),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;a.h0=a.h0+g|0;a.h1=a.h1+h|0;a.h2=a.h2+e|0;a.h3=
312 +a.h3+y|0;l-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
313 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var r=c.length;m.messageLength+=r;for(var r=[r/4294967296>>>0,r>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=r[1],r[1]=r[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,r[0]=r[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
314 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,r=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+r,r=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
315 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
316 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;r=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;32>
317 +w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&r|l&(e^r),p=(g<<5|g>>>27)+A+z+2400959708+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>
318 +27)+A+z+3395469782+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+r|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
319 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
320 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
321 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
322 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,A,w,y,E,O,H,C,q,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
323 +for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=p+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;q=a.h7;for(l=0;64>l;++l)p=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),e=C^O&(H^C),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),r=A&w|y&(A^w),p=q+p+e+n[l]+b[l],g+=r,q=C,C=H,H=O,O=E+p|0,E=y,y=w,w=A,A=p+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+q|0;v-=
324 +64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.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,
325 +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],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
326 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
327 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
328 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
329 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
330 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,k,r,y,E,l,w,C,q,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)r=b[S-2],w=r[0],r=r[1],p=((w>>>19|r<<13)^(r>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|r>>>19)^(r<<3|w>>>29)^(w<<26|r>>>6))>>>0,r=b[S-15],w=r[0],r=r[1],e=((w>>>1|r<<31)^(w>>>8|r<<24)^w>>>7)>>>0,k=((w<<31|r>>>1)^(w<<24|r>>>8)^(w<<25|r>>>7))>>>0,w=b[S-7],C=b[S-
331 +16],r=g+w[1]+k+C[1],b[S][0]=p+w[0]+e+C[0]+(r/4294967296>>>0)>>>0,b[S][1]=r>>>0;w=a[0][0];C=a[0][1];q=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)p=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,r=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(J^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
332 +E=(w&q|v&(w^q))>>>0,l=(C&n|F&(C^n))>>>0,r=G+r+y+m[S][1]+b[S][1],p=I+p+g+m[S][0]+b[S][0]+(r/4294967296>>>0)>>>0,g=r>>>0,r=k+l,e=e+E+(r/4294967296>>>0)>>>0,k=r>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,r=L+g,D=Y+p+(r/4294967296>>>0)>>>0,V=r>>>0,Y=v,L=F,v=q,F=n,q=w,n=C,r=g+k,w=p+e+(r/4294967296>>>0)>>>0,C=r>>>0;r=a[0][1]+C;a[0][0]=a[0][0]+w+(r/4294967296>>>0)>>>0;a[0][1]=r>>>0;r=a[1][1]+n;a[1][0]=a[1][0]+q+(r/4294967296>>>0)>>>0;a[1][1]=r>>>0;r=a[2][1]+F;a[2][0]=a[2][0]+v+(r/4294967296>>>0)>>>0;a[2][1]=r>>>0;
333 +r=a[3][1]+L;a[3][0]=a[3][0]+Y+(r/4294967296>>>0)>>>0;a[3][1]=r>>>0;r=a[4][1]+V;a[4][0]=a[4][0]+D+(r/4294967296>>>0)>>>0;a[4][1]=r>>>0;r=a[5][1]+aa;a[5][0]=a[5][0]+J+(r/4294967296>>>0)>>>0;a[5][1]=r>>>0;r=a[6][1]+W;a[6][0]=a[6][0]+ba+(r/4294967296>>>0)>>>0;a[6][1]=r>>>0;r=a[7][1]+G;a[7][0]=a[7][0]+I+(r/4294967296>>>0)>>>0;a[7][1]=r>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
334 +{};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
335 3609767458],[1899447441,602891725],[3049323471,3964484399],[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],
336 [1555081692,3175218132],[1996064986,2198950837],[2554220882,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,
337 106217008],[3516065817,3606008344],[3600352804,1432725776],[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],
338 [3515267271,566280711],[3940187606,3454069534],[4118630271,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]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
339 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,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,
340 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],e=null,g=a.util.createBuffer(),x=Array(80),A=0;80>A;++A)x[A]=Array(2);var y={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){y.messageLength=
341 -0;y.fullMessageLength=y.messageLength128=[];for(var b=y.messageLengthSize/4,c=0;c<b;++c)y.fullMessageLength.push(0);g=a.util.createBuffer();e=Array(d.length);for(c=0;c<d.length;++c)e[c]=d[c].slice(0);return y}};y.start();y.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;y.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=y.fullMessageLength.length-1;0<=k;--k)y.fullMessageLength[k]+=h[1],h[1]=h[0]+(y.fullMessageLength[k]/4294967296>>>0),y.fullMessageLength[k]>>>=0,h[0]=
342 -h[1]/4294967296>>>0;g.putBytes(b);c(e,x,g);(2048<g.read||0===g.length())&&g.compact();return y};y.digest=function(){var d=a.util.createBuffer();d.putBytes(g.bytes());d.putBytes(l.substr(0,y.blockLength-(y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize&y.blockLength-1)));a.util.createBuffer();for(var z,k,m=8*y.fullMessageLength[0],r=0;r<y.fullMessageLength.length;++r)z=8*y.fullMessageLength[r+1],k=z/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=z;z=Array(e.length);for(r=0;r<e.length;++r)z[r]=
343 -e[r].slice(0);c(z,x,d);d=a.util.createBuffer();k="SHA-512"===b?z.length:"SHA-384"===b?z.length-2:z.length-4;for(r=0;r<k;++r)d.putInt32(z[r][0]),r===k-1&&"SHA-512/224"===b||d.putInt32(z[r][1]);return d};return y};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
344 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
345 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md}},l=a;a=function(b,
346 -c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,g={start:function(g,m){if(null!==g)if("string"===typeof g)if(g=g.toLowerCase(),g in a.md.algorithms)b=
347 -a.md.algorithms[g].create();else throw Error('Unknown hash algorithm "'+g+'"');else b=g;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
348 -d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};g.digest=g.getMac;return g}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
349 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<g.length;++q)g[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],e=function(a,
350 -b){return" "+b},p=0;p<a.values.length;++p)d.push(a.values[p].replace(/^(\S+\r\n)/,e));b+=d.join(",")+"\r\n";d=0;a=-1;for(p=0;p<b.length;++p,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=p-a-1,a=-1,++p;else if(" "===b[p]||"\t"===b[p]||","===b[p])a=p;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var e="-----BEGIN "+b.type+"-----\r\n",g;b.procType&&(g={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
351 -e+=c(g));b.contentDomain&&(g={name:"Content-Domain",values:[b.contentDomain]},e+=c(g));b.dekInfo&&(g={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&g.values.push(b.dekInfo.parameters),e+=c(g));if(b.headers)for(g=0;g<b.headers.length;++g)e+=c(b.headers[g]);b.procType&&(e+="\r\n");e+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return e+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
352 -e=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,g=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var q={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(q);if(h[2]){for(var l=h[2].split(g),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var A=l[x];if(!/\s/.test(A[0]))break;h+=A;B=x}if(h=h.match(e)){for(var x={name:h[1],values:[]},A=h[2].split(","),y=0;y<A.length;++y)x.values.push(A[y].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
353 -"Content-Domain"!==x.name)if(q.dekInfo||"DEK-Info"!==x.name)q.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:A[0],parameters:A[1]||null}}else q.contentDomain=A[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
354 -q.procType={version:A[0],type:A[1]}}}++B}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
355 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
356 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,e){var p=32===a.length?3:9;e=3===p?e?[30,-2,-2]:[0,32,2]:e?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=b[0],q=b[1];b=(g>>>4^q)&252645135;q^=b;g^=b<<4;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(g>>>1^q)&1431655765;for(var q=q^b,g=g^b<<1,g=g<<1|g>>>31,q=q<<1|q>>>31,H=0;H<p;H+=3){for(var C=e[H+1],u=e[H+2],T=e[H];T!=C;T+=u){var P=q^a[T],F=(q>>>4|q<<28)^a[T+1];b=g;
357 -g=q;q=b^(n[P>>>24&63]|k[P>>>16&63]|r[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=g;g=q;q=b}g=g>>>1|g<<31;q=q>>>1|q<<31;b=(g>>>1^q)&1431655765;q^=b;g^=b<<1;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(g>>>4^q)&252645135;c[0]=g^b<<4;c[1]=q^b}function g(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var g=
358 -null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;e.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return g({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return g({key:a,
340 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
341 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
342 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
343 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
344 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
345 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md}},l=a;a=function(b,
346 +c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
347 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
348 +d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
349 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var r=0;r<e.length;++r)e[r](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
350 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
351 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
352 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var r={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(r);if(h[2]){for(var l=h[2].split(e),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;B=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(r.procType)if(r.contentDomain||
353 +"Content-Domain"!==x.name)if(r.dekInfo||"DEK-Info"!==x.name)r.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');r.dekInfo={algorithm:z[0],parameters:z[1]||null}}else r.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
354 +r.procType={version:z[0],type:z[1]}}}++B}if("ENCRYPTED"===r.procType&&!r.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
355 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
356 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,g){var p=32===a.length?3:9;g=3===p?g?[30,-2,-2]:[0,32,2]:g?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],r=b[1];b=(e>>>4^r)&252645135;r^=b;e^=b<<4;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(e>>>1^r)&1431655765;for(var r=r^b,e=e^b<<1,e=e<<1|e>>>31,r=r<<1|r>>>31,H=0;H<p;H+=3){for(var C=g[H+1],q=g[H+2],T=g[H];T!=C;T+=q){var P=r^a[T],F=(r>>>4|r<<28)^a[T+1];b=e;
357 +e=r;r=b^(n[P>>>24&63]|k[P>>>16&63]|u[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=e;e=r;r=b}e=e>>>1|e<<31;r=r>>>1|r<<31;b=(e>>>1^r)&1431655765;r^=b;e^=b<<1;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(e>>>4^r)&252645135;c[0]=e^b<<4;c[1]=r^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
358 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
359 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
360 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[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],
361 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],r=[0,268435456,8,268435464,0,268435456,
360 +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],
361 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],r=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
362 8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],F=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],B=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],L=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
363 1,C=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],K=0,D,W=0;W<n;W++){var I=b.getInt32(),G=b.getInt32();D=(I>>>4^G)&252645135;G^=D;I^=D<<4;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>2^G)&858993459;G^=D;I^=D<<2;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=(G>>>8^I)&16711935;I^=D;G^=D<<8;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=I<<8|G>>>20&240;for(var I=G<<24|G<<8&16711680|G>>>8&65280|G>>>24&240,G=D,S=0;S<v.length;++S){v[S]?(I=I<<2|I>>>26,G=G<<2|G>>>26):(I=I<<1|I>>>27,G=G<<1|G>>>27);
364 -var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|e[I>>>20&15]|g[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|q[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|r[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
364 +var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|g[I>>>20&15]|e[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|r[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|u[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
365 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[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,
366 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,
367 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[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,
368 8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[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],h=[256,34078976,34078720,1107296512,
369 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,
370 -524288,0,1074266112,34078976,1073742080],r=[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,
370 +524288,0,1074266112,34078976,1073742080],u=[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,
371 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[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,
372 67108866,67110912,2048,2097154],B=[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,
373 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<g.length;++q)g[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,
374 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,g;e&&!a.disableNativeCode&&(g=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,q){function l(){if(N>A)return q(null,z);n.start(null,
375 -null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();u=2;B()}function B(){if(u<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++u,a.util.setImmediate(B);z+=N<A?E:E.substr(0,y);++N;l()}"function"===typeof h&&(q=h,h=null);if(e&&!a.disableNativeCode&&g.pbkdf2&&(null===h||"object"!==typeof h)&&(4<g.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),q?4===g.pbkdf2Sync.length?g.pbkdf2(b,
376 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):g.pbkdf2(b,c,d,k,h,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===g.pbkdf2Sync.length?g.pbkdf2Sync(b,c,d,k).toString("binary"):g.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
377 -if(q)return q(b);throw b;}var A=Math.ceil(k/x),y=k-(A-1)*x,n=a.hmac.create();n.start(h,b);var z="",E,O,H;if(!q){for(var N=1;N<=A;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var u=2;u<=d;++u)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;z+=N<A?E:E.substr(0,y)}return z}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
378 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
379 -"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
380 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function g(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
381 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)e.putInt32(k[h])}catch(z){if(!("undefined"!==typeof QuotaExceededError&&z instanceof QuotaExceededError))throw z;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
382 -e.putByte(String.fromCharCode(k&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),q=0;32>q;++q)h[q]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(g(k.key,h(k.seed)));k.seed=z(g(k.key,k.seed));
383 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,q=k.plugin.formatKey,z=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var z=c(k.key,
384 -k.seed);k.generated+=z.length;q.putBytes(z);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,g(a))}catch(c){b(c)}},k.seedFileSync=g);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
373 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var r=0;r<e.length;++r)e[r](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
374 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},g="undefined"!==typeof process&&process.versions&&process.versions.node,e;g&&!a.disableNativeCode&&(e=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,r){function l(){if(N>z)return r(null,y);n.start(null,
375 +null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();q=2;B()}function B(){if(q<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++q,a.util.setImmediate(B);y+=N<z?E:E.substr(0,A);++N;l()}"function"===typeof h&&(r=h,h=null);if(g&&!a.disableNativeCode&&e.pbkdf2&&(null===h||"object"!==typeof h)&&(4<e.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),r?4===e.pbkdf2Sync.length?e.pbkdf2(b,
376 +c,d,k,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):e.pbkdf2(b,c,d,k,h,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):4===e.pbkdf2Sync.length?e.pbkdf2Sync(b,c,d,k).toString("binary"):e.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
377 +if(r)return r(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,n=a.hmac.create();n.start(h,b);var y="",E,O,H;if(!r){for(var N=1;N<=z;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var q=2;q<=d;++q)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;y+=N<z?E:E.substr(0,A)}return y}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
378 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
379 +"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,g=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(g=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
380 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function e(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var g=
381 +a.util.createBuffer();if(c)for(;g.length()<b;){var h=Math.max(1,Math.min(b-g.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)g.putInt32(k[h])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(g.length()<b)for(c=Math.floor(65536*Math.random());g.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
382 +g.putByte(String.fromCharCode(k&255));return g.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),r=0;32>r;++r)h[r]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function g(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(g)});l=e(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=r(e(k.key,h(k.seed)));k.seed=y(e(k.key,k.seed));
383 +a.util.setImmediate(g)}if(!d)return k.generateSync(b);var e=k.plugin.cipher,h=k.plugin.increment,r=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;g()};k.generateSync=function(b){var c=k.plugin.cipher,g=k.plugin.increment,e=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var r=a.util.createBuffer();r.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
384 +k.seed);k.generated+=y.length;r.putBytes(y);k.key=e(c(k.key,g(k.seed)));k.seed=h(c(k.key,k.seed))}return r.getBytes(b)};g?(k.seedFile=function(a,b){g.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return g.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,e(a))}catch(c){b(c)}},k.seedFileSync=e);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
385 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
386 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<g.length;++q)g[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
387 -0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},g=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
388 -b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,g,!1);l.putInt32(g[0]);l.putInt32(g[1]);l.putInt32(g[2]);l.putInt32(g[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
389 -process.versions.node,h=null;if("undefined"!==typeof window){var r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(h=function(a){return r.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
390 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<g.length;++q)g[q](c);
391 -return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
386 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var r=0;r<e.length;++r)e[r](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
387 +0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
388 +b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
389 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
390 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var r=0;r<e.length;++r)e[r](c);
391 +return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
392 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,
393 -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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
394 -1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var g=function(b,c,g){var k=!1,h=null,q=null,l=null,n,x,A,y,v=[];b=a.rc2.expandKey(b,c);for(A=0;64>A;A++)v.push(b.getInt16Le());g?(n=function(a){for(A=0;4>A;A++){a[A]+=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);var b=a[A],c=d[A];a[A]=b<<c&65535|(b&65535)>>16-c;y++}},x=function(a){for(A=0;4>A;A++)a[A]+=v[a[(A+3)%4]&63]}):(n=function(a){for(A=3;0<=A;A--){var b=a[A],c=d[A];a[A]=
395 -(b&65535)>>c|b<<16-c&65535;a[A]-=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);y--}},x=function(a){for(A=3;0<=A;A--)a[A]-=v[a[(A+3)%4]&63]});var z=null;return z={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();q=c||new a.util.createBuffer;l=b;z.output=q},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(A=0;4>A;A++){var c=h.getInt16Le();null!==l&&(g?c^=l.getInt16Le():l.putInt16Le(c));
396 -b.push(c&65535)}y=g?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(A=0;4>A;A++)null!==l&&(g?l.putInt16Le(b[A]):b[A]^=l.getInt16Le()),q.putInt16Le(b[A])}},finish:function(a){var b=!0;if(g)if(a)b=a(8,h,!g);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,z.update());!g&&(b=0===h.length())&&(a?b=a(8,q,!g):(a=q.length(),c=q.at(a-1),c>a?b=!1:q.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
397 -a.rc2.createEncryptionCipher=function(a,b){return g(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return g(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
398 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
399 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function g(a,b,c,d,e,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+e;e=Math.floor(h/67108864);c.data[d++]=h&67108863}return e}function l(a,b,c,d,e,p){var g=b&32767;for(b>>=15;0<=--p;){var h=this.data[a]&32767,z=this.data[a++]>>15,k=b*h+z*g,h=g*h+((k&32767)<<15)+c.data[d]+(e&1073741823);e=(h>>>30)+(k>>>15)+b*z+(e>>>30);c.data[d++]=h&1073741823}return e}function n(a,b,
400 -c,d,e,g){var p=b&16383;for(b>>=14;0<=--g;){var h=this.data[a]&16383,z=this.data[a++]>>14,k=b*h+z*p,h=p*h+((k&16383)<<14)+c.data[d]+e;e=(h>>28)+(k>>14)+b*z;c.data[d++]=h&268435455}return e}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function r(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
401 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function A(a,b){return a^b}function y(a,b){return a&~b}function R(){}function z(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
402 -navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=g,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],u;H=48;for(u=0;9>=u;++u)N[H++]=u;H=97;for(u=10;36>u;++u)N[H++]=u;H=65;for(u=10;36>u;++u)N[H++]=u;r.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};r.prototype.revert=function(a){return a};r.prototype.reduce=
403 -function(a){a.divRemTo(this.m,null,a)};r.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};r.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
393 +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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var g=b,e=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=e;128>n;n++)g.putByte(c[g.at(n-
394 +1)+g.at(n-e)&255]);g.setAt(128-l,c[g.at(128-l)&h]);for(n=127-l;0<=n;n--)g.setAt(n,c[g.at(n+1)^g.at(n+l)]);return g};var e=function(b,c,e){var k=!1,h=null,r=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
395 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();r=c||new a.util.createBuffer;l=b;y.output=r},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
396 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),r.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,r,!e):(a=r.length(),c=r.at(a-1),c>a?b=!1:r.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
397 +a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
398 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
399 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,g,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+g;g=Math.floor(h/67108864);c.data[d++]=h&67108863}return g}function l(a,b,c,d,g,e){var p=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,y=this.data[a++]>>15,k=b*h+y*p,h=p*h+((k&32767)<<15)+c.data[d]+(g&1073741823);g=(h>>>30)+(k>>>15)+b*y+(g>>>30);c.data[d++]=h&1073741823}return g}function n(a,b,
400 +c,d,g,e){var p=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,y=this.data[a++]>>14,k=b*h+y*p,h=p*h+((k&16383)<<14)+c.data[d]+g;g=(h>>28)+(k>>14)+b*y;c.data[d++]=h&268435455}return g}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
401 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
402 +navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=e,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],q;H=48;for(q=0;9>=q;++q)N[H++]=q;H=97;for(q=10;36>q;++q)N[H++]=q;H=65;for(q=10;36>q;++q)N[H++]=q;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
403 +function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
404 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
405 -c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var e=a.length,p=!1,g=0;0<=--e;){var h=8==d?a[e]&255:m(a,e);0>h?"-"==a.charAt(e)&&(p=!0):(p=!1,0==g?this.data[this.t++]=h:g+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-g)-1)<<g,this.data[this.t++]=
406 -h>>this.DB-g):this.data[this.t-1]|=h<<g,g+=d,g>=this.DB&&(g-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<g&&(this.data[this.t-1]|=(1<<this.DB-g)-1<<g));this.clamp();p&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
407 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,e=(1<<d)-1,g=Math.floor(a/this.DB),p=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+g+1]=this.data[h]>>d|p,p=(this.data[h]&e)<<c;for(h=g-1;0<=h;--h)b.data[h]=0;b.data[g]=p;b.t=this.t+g+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,e=this.DB-d,g=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var p=
408 -c+1;p<this.t;++p)b.data[p-c-1]|=(this.data[p]&g)<<e,b.data[p-c]=this.data[p]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&g)<<e);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
409 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),e=a.abs(),g=d.t;for(b.t=g+e.t;0<=--g;)b.data[g]=0;for(g=0;g<e.t;++g)b.data[g+d.t]=d.am(0,e.data[g],b,g,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
410 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,g){var p=a.abs();if(!(0>=p.t)){var z=this.abs();if(z.t<p.t)null!=b&&b.fromInt(0),null!=g&&this.copyTo(g);else{null==g&&(g=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),z.lShiftTo(l,g)):(p.copyTo(k),z.copyTo(g));p=k.t;z=k.data[p-1];if(0!=z){var E=z*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),u=this.FV/E,E=(1<<this.F1)/E,y=1<<this.F2,r=g.t,x=r-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=g.compareTo(w)&&
411 -(g.data[g.t++]=1,g.subTo(w,g));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=g.data[--r]==z?this.DM:Math.floor(g.data[r]*u+(g.data[r-1]+y)*E);if((g.data[r]+=k.am(0,O,g,x,0,p))<O)for(k.dlShiftTo(x,w),g.subTo(w,g);g.data[r]<--O;)g.subTo(w,g)}null!=b&&(g.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));g.t=p;g.clamp();0<l&&g.rShiftTo(l,g);0>m&&c.ZERO.subTo(g,g)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
412 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var g=d(),p=d(),z=b.convert(this),k=h(a)-1;for(z.copyTo(g);0<=--k;)if(b.sqrTo(g,p),0<(a&1<<k))b.mulTo(p,z,g);else var m=g,g=p,p=m;return b.revert(g)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
413 -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 b=(1<<a)-1,c,d=!1,e="",g=this.t,p=this.DB-g*this.DB%a;if(0<g--)for(p<this.DB&&0<(c=this.data[g]>>p)&&(d=!0,e="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=g;)p<a?(c=(this.data[g]&(1<<p)-1)<<a-p,c|=this.data[--g]>>(p+=this.DB-a)):(c=this.data[g]>>(p-=a)&b,0>=p&&(p+=this.DB,--g)),0<c&&(d=!0),d&&(e+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?e:"0"};c.prototype.negate=function(){var a=
405 +c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var g=a.length,e=!1,p=0;0<=--g;){var h=8==d?a[g]&255:m(a,g);0>h?"-"==a.charAt(g)&&(e=!0):(e=!1,0==p?this.data[this.t++]=h:p+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-p)-1)<<p,this.data[this.t++]=
406 +h>>this.DB-p):this.data[this.t-1]|=h<<p,p+=d,p>=this.DB&&(p-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<p&&(this.data[this.t-1]|=(1<<this.DB-p)-1<<p));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
407 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,g=(1<<d)-1,p=Math.floor(a/this.DB),e=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+p+1]=this.data[h]>>d|e,e=(this.data[h]&g)<<c;for(h=p-1;0<=h;--h)b.data[h]=0;b.data[p]=e;b.t=this.t+p+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,g=this.DB-d,p=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var e=
408 +c+1;e<this.t;++e)b.data[e-c-1]|=(this.data[e]&p)<<g,b.data[e-c]=this.data[e]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&p)<<g);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,g=Math.min(a.t,this.t);c<g;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
409 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),g=a.abs(),p=d.t;for(b.t=p+g.t;0<=--p;)b.data[p]=0;for(p=0;p<g.t;++p)b.data[p+d.t]=d.am(0,g.data[p],b,p,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
410 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,p){var e=a.abs();if(!(0>=e.t)){var y=this.abs();if(y.t<e.t)null!=b&&b.fromInt(0),null!=p&&this.copyTo(p);else{null==p&&(p=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(e.data[e.t-1]);0<l?(e.lShiftTo(l,k),y.lShiftTo(l,p)):(e.copyTo(k),y.copyTo(p));e=k.t;y=k.data[e-1];if(0!=y){var E=y*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),q=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=p.t,x=u-e,w=null==b?d():b;k.dlShiftTo(x,w);0<=p.compareTo(w)&&
411 +(p.data[p.t++]=1,p.subTo(w,p));c.ONE.dlShiftTo(e,w);for(w.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--x;){var O=p.data[--u]==y?this.DM:Math.floor(p.data[u]*q+(p.data[u-1]+A)*E);if((p.data[u]+=k.am(0,O,p,x,0,e))<O)for(k.dlShiftTo(x,w),p.subTo(w,p);p.data[u]<--O;)p.subTo(w,p)}null!=b&&(p.drShiftTo(e,b),m!=a&&c.ZERO.subTo(b,b));p.t=e;p.clamp();0<l&&p.rShiftTo(l,p);0>m&&c.ZERO.subTo(p,p)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
412 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var p=d(),e=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(p);0<=--k;)if(b.sqrTo(p,e),0<(a&1<<k))b.mulTo(e,y,p);else var l=p,p=e,e=l;return b.revert(p)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
413 +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 b=(1<<a)-1,c,d=!1,p="",g=this.t,e=this.DB-g*this.DB%a;if(0<g--)for(e<this.DB&&0<(c=this.data[g]>>e)&&(d=!0,p="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=g;)e<a?(c=(this.data[g]&(1<<e)-1)<<a-e,c|=this.data[--g]>>(e+=this.DB-a)):(c=this.data[g]>>(e-=a)&b,0>=e&&(e+=this.DB,--g)),0<c&&(d=!0),d&&(p+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?p:"0"};c.prototype.negate=function(){var a=
414 d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
415 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new r(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=z;R.prototype.revert=z;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
415 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
416 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)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var T=[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,
417 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],P=67108864/T[T.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
418 -b),c=k(b),g=d(),p=d(),h="";for(this.divRemTo(c,g,p);0<g.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,g.divRemTo(c,g,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,z=0;z<a.length;++z){var k=m(a,z);0>k?"-"==a.charAt(z)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
419 -this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var e=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<e?d[0]&(1<<e)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,e,g=Math.min(a.t,this.t);for(d=
420 -0;d<g;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){e=a.s&this.DM;for(d=g;d<this.t;++d)c.data[d]=b(this.data[d],e);c.t=this.t}else{e=this.s&this.DM;for(d=g;d<a.t;++d)c.data[d]=b(e,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
418 +b),c=k(b),p=d(),e=d(),h="";for(this.divRemTo(c,p,e);0<p.signum();)h=(b+e.intValue()).toString(a).substr(1)+h,p.divRemTo(c,p,e);return e.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),p=Math.pow(b,d),g=!1,e=0,h=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(g=!0):(h=b*h+k,++e>=d&&(this.dMultiply(p),this.dAddOffset(h,0),h=e=0))}0<e&&(this.dMultiply(Math.pow(b,e)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
419 +this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var p=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<p?d[0]&(1<<p)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,p,g=Math.min(a.t,this.t);for(d=
420 +0;d<g;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){p=a.s&this.DM;for(d=g;d<this.t;++d)c.data[d]=b(this.data[d],p);c.t=this.t}else{p=this.s&this.DM;for(d=g;d<a.t;++d)c.data[d]=b(p,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
421 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
422 -0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var e;for(e=c.t-this.t;d<e;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(e=Math.min(a.t,b);d<e;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
423 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var z=1;z++<d&&0!=
424 -p.compareTo(b);)if(p=p.modPowInt(2,this),0==p.compareTo(c.ONE))return!1;if(0!=p.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.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]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
425 -function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,e=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[e++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==e&&
426 -(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,A,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
427 -y,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
428 -0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,e=0;0!=d;)d&=d-1,++e;a+=e}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
429 -y)};c.prototype.flipBit=function(a){return this.changeBit(a,A)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
430 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),g,p=k(1),z;if(0>=c)return p;g=18>c?1:48>c?3:144>c?4:768>c?5:6;z=8>c?new r(b):b.isEven()?new E(b):new v(b);var m=[],l=3,q=g-1,u=(1<<g)-1;m[1]=z.convert(this);if(1<g)for(c=d(),z.sqrTo(m[1],c);l<=u;)m[l]=d(),z.mulTo(c,m[l-2],m[l]),l+=2;for(var y=a.t-1,x,w=!0,O=d(),c=h(a.data[y])-1;0<=y;){c>=q?x=a.data[y]>>c-q&u:(x=(a.data[y]&(1<<c+1)-1)<<q-c,0<y&&(x|=a.data[y-1]>>this.DB+c-q));for(l=g;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--y);
431 -if(w)m[x].copyTo(p),w=!1;else{for(;1<l;)z.sqrTo(p,O),z.sqrTo(O,p),l-=2;0<l?z.sqrTo(p,O):(l=p,p=O,O=l);z.mulTo(O,m[x],p)}for(;0<=y&&0==(a.data[y]&1<<c);)z.sqrTo(p,O),l=p,p=O,O=l,0>--c&&(c=this.DB-1,--y)}return z.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),g=k(1),p=k(0),h=k(0),z=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(g.isEven()&&p.isEven()||(g.addTo(this,g),p.subTo(a,p)),g.rShiftTo(1,
432 -g)):p.isEven()||p.subTo(a,p),p.rShiftTo(1,p);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&z.isEven()||(h.addTo(this,h),z.subTo(a,z)),h.rShiftTo(1,h)):z.isEven()||z.subTo(a,z),z.rShiftTo(1,z);0<=d.compareTo(e)?(d.subTo(e,d),b&&g.subTo(h,g),p.subTo(z,p)):(e.subTo(d,e),b&&h.subTo(g,h),z.subTo(p,z))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=z.compareTo(a))return z.subtract(a);if(0>z.signum())z.addTo(a,z);else return z;return 0>z.signum()?z.add(a):z};c.prototype.pow=function(a){return this.exp(a,
422 +0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var p;for(p=c.t-this.t;d<p;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(p=Math.min(a.t,b);d<p;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
423 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var p=b.shiftRight(d),g=O(),e,h=0;h<a;++h){do e=new c(this.bitLength(),g);while(0>=e.compareTo(c.ONE)||0<=e.compareTo(b));e=e.modPow(p,this);if(0!=e.compareTo(c.ONE)&&0!=e.compareTo(b)){for(var y=1;y++<d&&0!=
424 +e.compareTo(b);)if(e=e.modPowInt(2,this),0==e.compareTo(c.ONE))return!1;if(0!=e.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.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]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
425 +function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,p=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[p++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==p&&
426 +(this.s&128)!=(d&128)&&++p,0<p||d!=this.s)b[p++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
427 +A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
428 +0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,p=0;0!=d;)d&=d-1,++p;a+=p}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
429 +A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
430 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),p,e=k(1),y;if(0>=c)return e;p=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var l=[],m=3,r=p-1,q=(1<<p)-1;l[1]=y.convert(this);if(1<p)for(c=d(),y.sqrTo(l[1],c);m<=q;)l[m]=d(),y.mulTo(c,l[m-2],l[m]),m+=2;for(var A=a.t-1,x,w=!0,O=d(),c=h(a.data[A])-1;0<=A;){c>=r?x=a.data[A]>>c-r&q:(x=(a.data[A]&(1<<c+1)-1)<<r-c,0<A&&(x|=a.data[A-1]>>this.DB+c-r));for(m=p;0==(x&1);)x>>=1,--m;0>(c-=m)&&(c+=this.DB,--A);
431 +if(w)l[x].copyTo(e),w=!1;else{for(;1<m;)y.sqrTo(e,O),y.sqrTo(O,e),m-=2;0<m?y.sqrTo(e,O):(m=e,e=O,O=m);y.mulTo(O,l[x],e)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(e,O),m=e,e=O,O=m,0>--c&&(c=this.DB-1,--A)}return y.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),p=this.clone(),e=k(1),g=k(0),h=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&g.isEven()||(e.addTo(this,e),g.subTo(a,g)),e.rShiftTo(1,
432 +e)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);for(;p.isEven();)p.rShiftTo(1,p),b?(h.isEven()&&y.isEven()||(h.addTo(this,h),y.subTo(a,y)),h.rShiftTo(1,h)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(p)?(d.subTo(p,d),b&&e.subTo(h,e),g.subTo(y,g)):(p.subTo(d,p),b&&h.subTo(e,h),y.subTo(g,y))}if(0!=p.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
433 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
434 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
435 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<g.length;++l)g[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
434 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],p=b+1;p<T.length&&d<P;)d*=T[p++];for(d=c.modInt(d);b<p;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
435 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<e.length;++l)e[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
436 0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var l=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+l);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
437 v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
438 v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
439 2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
440 -0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs1}},
441 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?g(a,b,p,h):d(a,b,p,h)}function d(b,c,g,k){var m=l(b,c),z=0,q=n(m.bitLength());"millerRabinTests"in
442 -g&&(q=g.millerRabinTests);var r=10;"maxBlockTime"in g&&(r=g.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(q))return k(null,m);m.dAddOffset(h[z++%8],0)}while(0>r||+new Date-v<r);a.util.setImmediate(function(){d(b,c,g,k)})}function g(b,c,h,m){function q(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}z.bitLength()>b&&(z=l(b,c));h=z.toString(16);e.target.postMessage({hex:h,workLoad:r});
443 -z.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var z=l(b,c),E=h.workers,r=h.workLoad||100,n=30*r/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;q()});q()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(r).byteValue(),0);return c}
444 -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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],r=new k(null);r.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
445 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
446 -0;l<g.length;++l)g[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
440 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
441 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?e(a,b,p,h):d(a,b,p,h)}function d(b,c,e,k){var m=l(b,c),y=0,r=n(m.bitLength());"millerRabinTests"in
442 +e&&(r=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(r))return k(null,m);m.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,m){function r(){function a(e){if(!g){--p;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();g=!0;return m(null,new k(h.prime,16))}y.bitLength()>b&&(y=l(b,c));h=y.toString(16);e.target.postMessage({hex:h,workLoad:u});
443 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var p=E,e=0;e<E;++e)d[e].addEventListener("message",a);var g=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;r()});r()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
444 +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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
445 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
446 +0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
447 Error("Message is too long for PKCS#1 v1.5 padding."),g.length=b.length,g.max=d-11,g;g.putByte(0);g.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var h=0;h<d;++h)g.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),h=0;h<d;++h)e=l.charCodeAt(h),0===e?++k:g.putByte(e);d=k}g.putByte(0);g.putBytes(b);return g}function d(b,c,e,g){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var h=b.getByte(),k=b.getByte();if(0!==h||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
448 -typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function g(b,c,d){function e(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
449 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var g=b.p;b.p=b.q;b.q=g}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,e()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,e()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
450 -(g=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,g,b.p,b.q,g.mod(b.p1),g.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);e()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
451 -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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,r=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
448 +typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
449 +b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,r,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
450 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var r={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(r.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
451 +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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
452 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},B={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
453 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
454 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
455 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},A=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
456 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},y=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
455 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
456 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
457 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
458 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
459 -b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,g,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
460 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,g).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,g):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
459 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
460 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,e):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
461 c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:g,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},g=+new Date,p,k=0;null===a.keys&&
462 -(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(r[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
462 +(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
463 null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(p=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,p,a.p,a.q,
464 p.mod(a.p1),p.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});p=+new Date;k+=p-g;g=p}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
465 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var e=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(e,0),e.keys;g(e,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,g){var l={n:b,e:g,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
465 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var g=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(g,0),g.keys;e(g,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
466 b,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+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
467 -l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,g,k,l,m,q,r){var x={n:b,e:c,d:g,p:k,q:l,dP:m,dQ:q,qInv:r,decrypt:function(b,c,g){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,g)}};else if(-1!==["RAW","NONE",
468 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:y},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
467 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,l,m,r,u){var x={n:b,e:c,d:e,p:k,q:l,dP:m,dQ:r,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
468 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
469 [k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,B,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
470 -c.errors=d,c;var e,g,l,q,y,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();y=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
471 -16),new m(e,16),new m(g,16),new m(l,16),new m(q,16),new m(y,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
472 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,A,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
470 +c.errors=d,c;var e,g,l,r,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();r=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
471 +16),new m(e,16),new m(g,16),new m(l,16),new m(r,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
472 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
473 c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
474 -!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||
475 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<g.length;++l)g[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
476 -b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var g=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encryptionOid"},
477 -{name:"AlgorithmIdentifier.parameters",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
478 -tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:g.Class.UNIVERSAL,
479 -type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"salt"},
480 -{name:"pkcs-12PbeParams.iterations",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var e=a.random.getBytesSync(d.saltSize),h=d.count,k=g.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var z,q;switch(d.algorithm){case "aes128":z=m=16;d=n["aes128-CBC"];q=a.aes.createEncryptionCipher;break;case "aes192":m=24;
481 -z=16;d=n["aes192-CBC"];q=a.aes.createEncryptionCipher;break;case "aes256":m=32;z=16;d=n["aes256-CBC"];q=a.aes.createEncryptionCipher;break;case "des":z=m=8;d=n.desCBC;q=a.des.createEncryptionCipher;break;default:throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;}var v=a.pkcs5.pbkdf2(c,e,h,m);c=a.random.getBytesSync(z);h=q(v);h.start(c);h.update(g.toDer(b));h.finish();b=h.output.getBytes();e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,
482 -g.Type.OID,!1,g.oidToDer(n.pkcs5PBES2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n.pkcs5PBKDF2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(d).getBytes()),g.create(g.Class.UNIVERSAL,
483 -g.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(e),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(g.toDer(b)),h.finish(),b=h.output.getBytes(),e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,
484 -!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]);else throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[e,g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,e={},h=[];if(!g.validate(b,m,e,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=g.derToOid(e.encryptionOid);
485 -h=l.pbe.getCipher(h,e.encryptionParams,c);e=a.util.createBuffer(e.encryptedData);h.update(e);h.finish()&&(d=g.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:g.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
486 -b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return g.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var e,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
487 -h=24;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
488 -e.substr(0,8),h);c=k(c);c.start(e);c.update(g.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(e).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,e=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==e.type&&"PRIVATE KEY"!==e.type&&"RSA PRIVATE KEY"!==e.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".'),
489 -d.headerType=d,d;if(e.procType&&"ENCRYPTED"===e.procType.type){var h,k;switch(e.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
490 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+e.dekInfo.algorithm+'".'),d.algorithm=e.dekInfo.algorithm,d;}var m=a.util.hexToBytes(e.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(e.body));if(k.finish())d=k.output.getBytes();else return d}else d=
491 -e.body;d="ENCRYPTED PRIVATE KEY"===e.type?l.decryptPrivateKeyInfo(g.fromDer(d),c):g.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,q=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var u=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,q);
492 -var C=q*Math.ceil(u/q);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%u));C=q*Math.ceil(b/q);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<q;l++)D.putByte(C.at(l%m));var Y=Math.ceil(u/q)+Math.ceil(b/q),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(q)),
474 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
475 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
476 +b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
477 +{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"}]},k={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",
478 +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,
479 +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"}]}]},h={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"},
480 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var g=a.random.getBytesSync(d.saltSize),h=d.count,k=e.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,r;switch(d.algorithm){case "aes128":y=m=16;d=n["aes128-CBC"];r=a.aes.createEncryptionCipher;break;case "aes192":m=24;
481 +y=16;d=n["aes192-CBC"];r=a.aes.createEncryptionCipher;break;case "aes256":m=32;y=16;d=n["aes256-CBC"];r=a.aes.createEncryptionCipher;break;case "des":y=m=8;d=n.desCBC;r=a.des.createEncryptionCipher;break;default:throw g=Error("Cannot encrypt private key. Unknown encryption algorithm."),g.algorithm=d.algorithm,g;}var v=a.pkcs5.pbkdf2(c,g,h,m);c=a.random.getBytesSync(y);h=r(v);h.start(c);h.update(e.toDer(b));h.finish();b=h.output.getBytes();g=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
482 +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,
483 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(g),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(e.toDer(b)),h.finish(),b=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,
484 +!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,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,g={},h=[];if(!e.validate(b,m,g,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=e.derToOid(g.encryptionOid);
485 +h=l.pbe.getCipher(h,g.encryptionParams,c);g=a.util.createBuffer(g.encryptedData);h.update(g);h.finish()&&(d=e.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
486 +b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var g,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
487 +h=24;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
488 +g.substr(0,8),h);c=k(c);c.start(g);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(g).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,g=a.pem.decode(b)[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".'),
489 +d.headerType=d,d;if(g.procType&&"ENCRYPTED"===g.procType.type){var h,k;switch(g.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
490 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+g.dekInfo.algorithm+'".'),d.algorithm=g.dekInfo.algorithm,d;}var m=a.util.hexToBytes(g.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(g.body));if(k.finish())d=k.output.getBytes();else return d}else d=
491 +g.body;d="ENCRYPTED PRIVATE KEY"===g.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,r=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var q=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,r);
492 +var C=r*Math.ceil(q/r);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%q));C=r*Math.ceil(b/r);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<r;l++)D.putByte(C.at(l%m));var Y=Math.ceil(q/r)+Math.ceil(b/r),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(r)),
493 V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);L.putBuffer(ea)}v=L;n.putBuffer(C)}n.truncate(n.length()-g);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
494 -"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var e={};b=[];if(!g.validate(c,k,e,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=g.derToOid(e.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=g.derToOid(e.encOid);if(b!==l.oids["aes128-CBC"]&&
495 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=e.kdfSalt;var m=a.util.createBuffer(e.kdfIterationCount),m=m.getInt(m.length()<<3),q;switch(l.oids[b]){case "aes128-CBC":q=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":q=24;h=a.aes.createDecryptionCipher;break;
496 -case "aes256-CBC":q=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":q=24;h=a.des.createDecryptionCipher;break;case "desCBC":q=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,q);e=e.encIv;h=h(b);h.start(e);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var e={},k=[];if(!g.validate(c,h,e,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(e.salt),e=a.util.createBuffer(e.iterations),
497 -e=e.getInt(e.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,e,m);d=l.pbe.generatePkcs12Key(d,k,2,e,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
498 -typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
499 -0;l<g.length;++l)g[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
500 -a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var g={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
494 +"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var g={};b=[];if(!e.validate(c,k,g,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=e.derToOid(g.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=e.derToOid(g.encOid);if(b!==l.oids["aes128-CBC"]&&
495 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=g.kdfSalt;var m=a.util.createBuffer(g.kdfIterationCount),m=m.getInt(m.length()<<3),r;switch(l.oids[b]){case "aes128-CBC":r=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":r=24;h=a.aes.createDecryptionCipher;break;
496 +case "aes256-CBC":r=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":r=24;h=a.des.createDecryptionCipher;break;case "desCBC":r=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,r);g=g.encIv;h=h(b);h.start(g);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
497 +g=g.getInt(g.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,g,m);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
498 +typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
499 +0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
500 +a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
501 tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",
502 -tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(g)};d.encryptedDataValidator={name:"EncryptedData",
503 -tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(g)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
502 +tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(e)};d.encryptedDataValidator={name:"EncryptedData",
503 +tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(e)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
504 captureAsn1:"digestAlgorithms"},a,{name:"SignedData.Certificates",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,capture:"signerInfos",optional:!0,value:[{name:"SignerInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:c.Class.UNIVERSAL,
505 type:c.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
506 value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,
507 constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]}]}]};d.recipientInfoValidator={name:"RecipientInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,
508 constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
509 -value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
510 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
511 -["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var g=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());g.putBuffer(b.digest())}g.truncate(g.length()-d);return g.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
512 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
513 -Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
514 -{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
515 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,g=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,x=Math.ceil(v/8),A=b.digest().getBytes();
516 -if(x<g+m+2)throw Error("Message is too long to encrypt.");var y;y=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(A);n.putBytes(y);c.start();c.update(n.getBytes());A=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-g-2);n.putByte(1);n.putBytes(y);var R=n.getBytes(),z=x-g-1,E=d.generate(A,z);y="";for(n=0;n<z;n++)y+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;y=String.fromCharCode(y.charCodeAt(0)&~v)+y.substr(1);
517 -return y+A+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<g+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-g-1,v=k.substr(0,n);k=k.substr(n,g);var y=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&y))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),z="";for(q=0;q<n;q++)z+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
518 -z=String.fromCharCode(z.charCodeAt(0)&~y)+z.substr(1);l=l-g-m-2;for(q=0;q<l;q++)if(0!==z.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==z.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=z.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,
519 -module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
509 +value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
510 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
511 +["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var e=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());e.putBuffer(b.digest())}e.truncate(e.length()-d);return e.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
512 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
513 +Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
514 +{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
515 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,r){var n,v=r-1,x=Math.ceil(v/8),z=b.digest().getBytes();
516 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
517 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var r;r=l-1;l=Math.ceil(r/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-r&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(r=0;r<n;r++)y+=String.fromCharCode(v.charCodeAt(r)^R.charCodeAt(r));
518 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(r=0;r<l;r++)if(0!==y.charCodeAt(r))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
519 +module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
520 ["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
521 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function g(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
522 -v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===r.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
521 +var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
522 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
523 typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
524 (e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
525 -"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in r?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
525 +"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
526 d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
527 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
528 -d.extension=b,d;return b}function n(a,b){switch(a){case r["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
528 +d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
529 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
530 !1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
531 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},r=h.oids,v={};v.CN=r.commonName;v.commonName="CN";v.C=r.countryName;v.countryName="C";v.L=r.localityName;v.localityName="L";v.ST=r.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=r.organizationName;v.organizationName="O";v.OU=r.organizationalUnitName;v.organizationalUnitName="OU";v.E=r.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
531 +h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
532 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
533 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
534 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
535 {name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},B,{name:"Certificate.TBSCertificate.issuerUniqueID",
536 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
537 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
538 -{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},A={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
538 +{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
539 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
540 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
541 -tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},y={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
541 +tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
542 tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},B,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
543 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
544 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in r&&(g.name=r[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
545 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in r&&(p.name=r[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===r.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==r["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:r.sha1},mgf:{algorithmOid:r.mgf1,hash:{algorithmOid:r.sha1}},
546 -saltLength:20});c={};a=[];if(!k.validate(b,A,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
544 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
545 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
546 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
547 b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
548 return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
549 body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
550 break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
551 c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
552 -null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){g([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){g(a);
553 -b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){g(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
554 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
555 -e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in r)switch(r[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
556 -e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case r.sha1WithRSAEncryption:l=void 0;break;case r["RSASSA-PSS"]:d=r[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=r[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
557 -e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=r[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
558 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=r.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
559 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,x,e,l))throw e=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),e.errors=l,e;if("string"!==typeof e.certSignature){for(var l="\x00",m=0;m<e.certSignature.length;++m)l+=k.toDer(e.certSignature[m]).getBytes();e.certSignature=l}var l=k.derToOid(e.publicKeyOid),y=h.createCertificate();y.version=e.certVersion?e.certVersion.charCodeAt(0):
560 -0;m=a.util.createBuffer(e.certSerialNumber);y.serialNumber=m.toHex();y.signatureOid=a.asn1.derToOid(e.certSignatureOid);y.signatureParameters=R(y.signatureOid,e.certSignatureParams,!0);y.siginfo.algorithmOid=a.asn1.derToOid(e.certinfoSignatureOid);y.siginfo.parameters=R(y.siginfo.algorithmOid,e.certinfoSignatureParams,!1);m=a.util.createBuffer(e.certSignature);++m.read;y.signature=m.getBytes();m=[];void 0!==e.certValidity1UTCTime&&m.push(k.utcTimeToDate(e.certValidity1UTCTime));void 0!==e.certValidity2GeneralizedTime&&
561 -m.push(k.generalizedTimeToDate(e.certValidity2GeneralizedTime));void 0!==e.certValidity3UTCTime&&m.push(k.utcTimeToDate(e.certValidity3UTCTime));void 0!==e.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(e.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
562 -y.validity.notBefore=m[0];y.validity.notAfter=m[1];y.tbsCertificate=e.tbsCertificate;if(d){y.md=null;if(y.signatureOid in r)switch(l=r[y.signatureOid],l){case "sha1WithRSAEncryption":y.md=a.md.sha1.create();break;case "md5WithRSAEncryption":y.md=a.md.md5.create();break;case "sha256WithRSAEncryption":y.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":y.md=a.md.sha512.create();break;case "RSASSA-PSS":y.md=a.md.sha256.create()}if(null===y.md)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
563 -e.signatureOid=y.signatureOid,e;m=k.toDer(y.tbsCertificate);y.md.update(m.getBytes())}m=a.md.sha1.create();y.issuer.getField=function(a){return c(y.issuer,a)};y.issuer.addField=function(a){g([a]);y.issuer.attributes.push(a)};y.issuer.attributes=h.RDNAttributesAsArray(e.certIssuer,m);e.certIssuerUniqueId&&(y.issuer.uniqueId=e.certIssuerUniqueId);y.issuer.hash=m.digest().toHex();m=a.md.sha1.create();y.subject.getField=function(a){return c(y.subject,a)};y.subject.addField=function(a){g([a]);y.subject.attributes.push(a)};
564 -y.subject.attributes=h.RDNAttributesAsArray(e.certSubject,m);e.certSubjectUniqueId&&(y.subject.uniqueId=e.certSubjectUniqueId);y.subject.hash=m.digest().toHex();y.extensions=e.certExtensions?h.certificateExtensionsFromAsn1(e.certExtensions):[];l===h.oids.rsaEncryption&&(y.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo));return y};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
565 -return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in r)if(c.name=r[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
552 +null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
553 +b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
554 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
555 +e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
556 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
557 +e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
558 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
559 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),q=h.createCertificate();q.version=g.certVersion?g.certVersion.charCodeAt(0):
560 +0;m=a.util.createBuffer(g.certSerialNumber);q.serialNumber=m.toHex();q.signatureOid=a.asn1.derToOid(g.certSignatureOid);q.signatureParameters=R(q.signatureOid,g.certSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;q.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
561 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
562 +q.validity.notBefore=m[0];q.validity.notAfter=m[1];q.tbsCertificate=g.tbsCertificate;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===q.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
563 +g.signatureOid=q.signatureOid,g;m=k.toDer(q.tbsCertificate);q.md.update(m.getBytes())}m=a.md.sha1.create();q.issuer.getField=function(a){return c(q.issuer,a)};q.issuer.addField=function(a){e([a]);q.issuer.attributes.push(a)};q.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(q.issuer.uniqueId=g.certIssuerUniqueId);q.issuer.hash=m.digest().toHex();m=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};
564 +q.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(q.subject.uniqueId=g.certSubjectUniqueId);q.subject.hash=m.digest().toHex();q.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return q};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
565 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
566 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
567 -k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in r?c[r[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
568 -g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,y,e,l))throw e=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),e.errors=l,e;if("string"!==typeof e.csrSignature){for(var l=
569 -"\x00",m=0;m<e.csrSignature.length;++m)l+=k.toDer(e.csrSignature[m]).getBytes();e.csrSignature=l}l=k.derToOid(e.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var u=h.createCertificationRequest();u.version=e.csrVersion?e.csrVersion.charCodeAt(0):0;u.signatureOid=a.asn1.derToOid(e.csrSignatureOid);u.signatureParameters=R(u.signatureOid,e.csrSignatureParams,!0);u.siginfo.algorithmOid=a.asn1.derToOid(e.csrSignatureOid);u.siginfo.parameters=R(u.siginfo.algorithmOid,
570 -e.csrSignatureParams,!1);l=a.util.createBuffer(e.csrSignature);++l.read;u.signature=l.getBytes();u.certificationRequestInfo=e.certificationRequestInfo;if(d){u.md=null;if(u.signatureOid in r)switch(l=r[u.signatureOid],l){case "sha1WithRSAEncryption":u.md=a.md.sha1.create();break;case "md5WithRSAEncryption":u.md=a.md.md5.create();break;case "sha256WithRSAEncryption":u.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":u.md=a.md.sha512.create();break;case "RSASSA-PSS":u.md=a.md.sha256.create()}if(null===
571 -u.md)throw e=Error("Could not compute certification request digest. Unknown signature OID."),e.signatureOid=u.signatureOid,e;l=k.toDer(u.certificationRequestInfo);u.md.update(l.getBytes())}l=a.md.sha1.create();u.subject.getField=function(a){return c(u.subject,a)};u.subject.addField=function(a){g([a]);u.subject.attributes.push(a)};u.subject.attributes=h.RDNAttributesAsArray(e.certificationRequestInfoSubject,l);u.subject.hash=l.digest().toHex();u.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo);
572 -u.getAttribute=function(a){return c(u,a)};u.addAttribute=function(a){g([a]);u.attributes.push(a)};u.attributes=h.CRIAttributesAsArray(e.certificationRequestInfoAttributes||[]);return u};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
573 -null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){g([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){g(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){g(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
574 -e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in r)switch(r[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
575 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case r["RSASSA-PSS"]:c=r[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=r[b.signatureParameters.mgf.algorithmOid];
576 -if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=r[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
567 +k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
568 +g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
569 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var q=h.createCertificationRequest();q.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;q.signatureOid=a.asn1.derToOid(g.csrSignatureOid);q.signatureParameters=R(q.signatureOid,g.csrSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,
570 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;q.signature=l.getBytes();q.certificationRequestInfo=g.certificationRequestInfo;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===
571 +q.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=q.signatureOid,g;l=k.toDer(q.certificationRequestInfo);q.md.update(l.getBytes())}l=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};q.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);q.subject.hash=l.digest().toHex();q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
572 +q.getAttribute=function(a){return c(q,a)};q.addAttribute=function(a){e([a]);q.attributes.push(a)};q.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return q};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
573 +null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
574 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
575 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
576 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
577 h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
578 k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
579 !1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
580 return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
581 return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
582 -h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return g.certs[b.hash]||
583 -null}var g={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in g.certs?(c=g.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):g.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
584 -for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)g.addCertificate(b[l]);return g};h.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"};
585 -h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var q=c.shift(),y=null,r=!1;if(g<q.validity.notBefore||g>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:g};if(null===k){y=c[0]||b.getIssuer(q);null===y&&q.isIssuer(q)&&(r=!0,y=q);if(y){var n=y;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){y=n.shift();
586 -try{x=y.verify(q)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||y&&!r||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&y&&!q.isIssuer(y)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<q.extensions.length;++x){var w=q.extensions[x];!w.critical||w.name in n||(k=
587 -{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||y&&!r)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
588 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
589 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
590 -c.defined.x509=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
591 -[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function g(b,c,h,q){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
592 -for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],r,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},u=null,u=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(u.tagClass!==m.Class.UNIVERSAL||u.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");u=d(u).value;break;case k.oids.encryptedData:var A=q,x={},B=[];if(!m.validate(u,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
593 -b.errors=B,b;u=m.derToOid(x.contentType);if(u!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=u,b;u=m.derToOid(x.encAlgorithm);u=k.pbe.getCipher(u,x.encParameter,A);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);u.update(x);if(!u.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");u=u.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
594 -l(u,h,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var q,r,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
595 -k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:q=A;r=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
596 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(x,q,g,h))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=h,a;r()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
597 -a.pkcs12||{},r={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
598 -r,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
582 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
583 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
584 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.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"};
585 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var r=c.shift(),A=null,u=!1;if(g<r.validity.notBefore||g>r.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:r.validity.notBefore,notAfter:r.validity.notAfter,now:g};if(null===k){A=c[0]||b.getIssuer(r);null===A&&r.isIssuer(r)&&(u=!0,A=r);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
586 +try{x=A.verify(r)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(r)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&A&&!r.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<r.extensions.length;++x){var w=r.extensions[x];!w.critical||w.name in n||(k=
587 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=r.getExtension("basicConstraints"),r=r.getExtension("keyUsage"),null!==r&&(r.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
588 +null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==r&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));r=null===k?!0:k.error;l=d?d(r,m,e):r;if(!0===l)k=null;else{!0===r&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
589 +if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
590 +c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
591 +[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,r){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
592 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},q=null,q=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(q.tagClass!==m.Class.UNIVERSAL||q.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");q=d(q).value;break;case k.oids.encryptedData:var z=r,x={},B=[];if(!m.validate(q,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
593 +b.errors=B,b;q=m.derToOid(x.contentType);if(q!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=q,b;q=m.derToOid(x.encAlgorithm);q=k.pbe.getCipher(q,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);q.update(x);if(!q.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");q=q.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
594 +l(q,h,r);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var r,u,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
595 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:r=z;u=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
596 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==r&&!m.validate(x,r,g,h))throw a=Error("Cannot read PKCS#12 "+r.name),a.errors=h,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
597 +a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
598 +u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
599 tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},B={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
600 value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
601 -capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},A={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
602 -h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var r={};if(!m.validate(b,v,r,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:r.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
603 -(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==r.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=r.version.charCodeAt(0),l;if(m.derToOid(r.contentType)!==k.oids.data)throw l=
604 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(r.contentType),l;b=r.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(r.mac){var w=null,A=0,u=m.derToOid(r.macAlgorithm);switch(u){case k.oids.sha1:w=a.md.sha1.create();A=20;break;case k.oids.sha256:w=a.md.sha256.create();A=32;break;case k.oids.sha384:w=a.md.sha384.create();A=48;break;case k.oids.sha512:w=a.md.sha512.create();
605 -A=64;break;case k.oids.md5:w=a.md.md5.create(),A=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+u);var u=new a.util.ByteBuffer(r.macSalt),B="macIterations"in r?parseInt(a.util.bytesToHex(r.macIterations),16):1,A=h.generateKey(n,u,3,B,A,w),u=a.hmac.create();u.start(w,A);u.update(b.value);if(u.getMac().getBytes()!==r.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}g(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
606 -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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(q)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);q=[];null!==
607 -g&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
608 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));g=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],n=0;n<q.length;++n){c=q[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
609 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
601 +capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
602 +h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
603 +(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
604 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var w=null,z=0,q=m.derToOid(u.macAlgorithm);switch(q){case k.oids.sha1:w=a.md.sha1.create();z=20;break;case k.oids.sha256:w=a.md.sha256.create();z=32;break;case k.oids.sha384:w=a.md.sha384.create();z=48;break;case k.oids.sha512:w=a.md.sha512.create();
605 +z=64;break;case k.oids.md5:w=a.md.md5.create(),z=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+q);var q=new a.util.ByteBuffer(u.macSalt),B="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,z=h.generateKey(n,q,3,B,z,w),q=a.hmac.create();q.start(w,z);q.update(b.value);if(q.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
606 +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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var r=a.util.isArray(c)?c[0]:c;"string"===typeof r&&(r=k.certificateFromPem(r));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(r)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);r=[];null!==
607 +g&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
608 +0<r.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,r));g=[];r=[];null!==c&&(r=a.util.isArray(c)?c:[c]);for(var u=[],n=0;n<r.length;++n){c=r[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
609 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);u.push(c)}0<u.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,u),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
610 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
611 [m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var v;e.useMac&&(g=a.md.sha1.create(),v=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,v,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),v=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
612 !0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,v.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
613 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
614 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
615 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var g=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
616 -g.headerType=b.type;throw g;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,g){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:g})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
617 -typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
613 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
614 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
615 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
616 +e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
617 +typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
618 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var g=a.util.createBuffer(),h=b.length>>1,l=h+(b.length&1),k=b.substr(0,l),l=b.substr(h,l);b=a.util.createBuffer();h=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);h.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
619 -for(var q=0;q<m;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
620 -a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},g=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
619 +for(var r=0;r<m;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(r=0;r<c;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
620 +a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
621 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
622 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
623 certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};m.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};m.CipherSuites={};m.getCipherSuite=function(a){var b=null,c;for(c in m.CipherSuites){var d=m.CipherSuites[c];if(d.id[0]===a.charCodeAt(0)&&d.id[1]===a.charCodeAt(1)){b=d;break}}return b};
@@ -628,41 +628,41 @@ send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protoco
628 b.session.compressionMethod=g?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.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,
629 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
630 (a.expect=B,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
631 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:z,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
631 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
632 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
633 !1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
634 -l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:z:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:z)):b.error(b,{message:e?"No server certificate provided.":
635 -"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=r;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
634 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
635 +"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
636 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
637 try{var g=b.session.sp;g.pre_master_secret=d.decrypt(c);var h=b.session.clientHelloVersion;if(h.major!==g.pre_master_secret.charCodeAt(0)||h.minor!==g.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){g.pre_master_secret=a.random.getBytes(48)}b.expect=O;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
638 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
639 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(g){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=O;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
640 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
641 -return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=y;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
641 +return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
642 data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=B;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
643 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:H;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var g=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
644 e.putBuffer(b.session.sha1.digest());var h=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,h?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(g);b.session.sha1.update(g);if(b.session.resuming&&h||!b.session.resuming&&!h)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
645 -data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?A:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
645 +data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?z:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
646 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
647 "Bad certificate.";break;case m.Alert.Description.unsupported_certificate:d="Unsupported certificate.";break;case m.Alert.Description.certificate_revoked:d="Certificate revoked.";break;case m.Alert.Description.certificate_expired:d="Certificate expired.";break;case m.Alert.Description.certificate_unknown:d="Certificate unknown.";break;case m.Alert.Description.illegal_parameter:d="Illegal parameter.";break;case m.Alert.Description.unknown_ca:d="Unknown certificate authority.";break;case m.Alert.Description.access_denied:d=
648 "Access denied.";break;case m.Alert.Description.decode_error:d="Decode error.";break;case m.Alert.Description.decrypt_error:d="Decrypt error.";break;case m.Alert.Description.export_restriction:d="Export restriction.";break;case m.Alert.Description.protocol_version:d="Unsupported protocol version.";break;case m.Alert.Description.insufficient_security:d="Insufficient security.";break;case m.Alert.Description.internal_error:d="Internal error.";break;case m.Alert.Description.user_canceled:d="User canceled.";
649 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt24();if(g>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var h=d.bytes(g+
650 4);d.read+=4;e in J[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(h),b.session.sha1.update(h)),J[b.entity][b.expect][e](b,c,g)):
651 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt16(),d=d.getBytes(g);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||g>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
652 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,r=3,v=4,B=5,x=6,A=7,y=8,R=1,z=2,E=3,O=4,H=5,N=6,u=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];ea[m.ConnectionEnd.server]=[[u,P,F,u,L],[u,
653 -P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[u,u,m.handleServerHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,P,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,L,u,u,u,u,u,u],
654 -[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];J[m.ConnectionEnd.server]=[[u,m.handleClientHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,P,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleClientKeyExchange,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleCertificateVerify,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,
655 -u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
652 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,B=5,x=6,z=7,A=8,R=1,y=2,E=3,O=4,H=5,N=6,q=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];ea[m.ConnectionEnd.server]=[[q,P,F,q,L],[q,
653 +P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[q,q,m.handleServerHello,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,P,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,L,q,q,q,q,q,q],
654 +[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q]];J[m.ConnectionEnd.server]=[[q,m.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,P,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.handleClientKeyExchange,q,q,q,q],[q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,m.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,
655 +q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[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]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
656 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};g&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
657 cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
658 a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
659 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=g;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
659 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
660 }return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
661 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
662 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
661 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var r=a.util.createBuffer();
662 +n(r,2,k);n(l,2,r);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
663 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var g=
664 -null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(q.bytes(),!1));
665 -var y=a.util.createBuffer();n(y,3,q);e.putBuffer(y)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
664 +null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var r=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(r.bytes(),!1));
665 +var u=a.util.createBuffer();n(u,3,r);e.putBuffer(u)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(q){return b.error(b,{message:"Could not send certificate list.",cause:q,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
666 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
667 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(g){b.error(b,{message:"Could not get private key.",cause:g,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
668 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var g=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(g))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -684,199 +684,199 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_versio
684 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_message}})),c.record.ready=!0));c=b}if(!h.fail&&null!==h.record&&h.record.ready)if(b=h.record,d=b.type-m.ContentType.change_cipher_spec,e=ea[h.entity][h.expect],d in e)e[d](h,b);else m.handleUnexpected(h,b)}return c};h.prepare=function(b){m.queue(h,m.createRecord(h,{type:m.ContentType.application_data,data:a.util.createBuffer(b)}));return m.flush(h)};h.prepareHeartbeatRequest=function(b,c){b instanceof a.util.ByteBuffer&&
685 (b=b.bytes());"undefined"===typeof c&&(c=b.length);h.expectedHeartbeatPayload=b;m.queue(h,m.createRecord(h,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_request,b,c)}));return m.flush(h)};h.close=function(a){if(!h.fail&&h.sessionCache&&h.session){var b={id:h.session.id,version:h.session.version,sp:h.session.sp};b.sp.keys=null;h.sessionCache.setSession(b.id,b)}if(h.open){h.open=!1;h.input.clear();if(h.isConnected||h.handshaking)h.isConnected=h.handshaking=!1,
686 m.queue(h,m.createAlert(h,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(h);h.closed(h)}h.reset(a)};return h};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
687 -return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<g.length;++l)g[l](c);return c.tls}},
688 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,g,l){g=g.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
689 -g?l.keys.server_write_key:l.keys.client_write_key),iv:g?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",g?l.keys.client_write_key:l.keys.server_write_key),iv:g?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var e=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
690 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(g)&&(b.fragment=k.output,b.length=b.fragment.length(),e=!0);return e}function g(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
691 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,q=a.random.getBytesSync(g),y=e.output.length();y>=g?(b.fragment=e.output.getBytes(y-g),q=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
692 -b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;y=a.hmac.create();y.start("SHA1",e);y.update(q);q=y.digest().getBytes();y.start(null,null);y.update(g);g=y.digest().getBytes();return q===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
687 +return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
688 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
689 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
690 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
691 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,r=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),r=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
692 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(r);r=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return r===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
693 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
694 -20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<g.length;++l)g[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
695 -typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
696 -a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
697 -function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<g.length;++l)g[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
698 -(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<q;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var g=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(g.getBytesSync(h)),
699 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));h-=q.length;0<h&&(q=a.util.fillString(String.fromCharCode(0),h)+q);h=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:h,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
700 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<g.length;++l)g[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
701 -"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],g=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var g=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):g<=c[m.level].index&&
694 +20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
695 +typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
696 +a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
697 +function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
698 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,r=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<r;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),r;do r=(new d(a.util.bytesToHex(e.getBytesSync(h)),
699 +16)).mod(c.n);while(r.equals(d.ZERO));r=a.util.hexToBytes(r.toString(16));h-=r.length;0<h&&(r=a.util.fillString(String.fromCharCode(0),h)+r);h=c.encrypt(r,"NONE");r=b.generate(r,l);return{encapsulation:h,key:r}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
700 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
701 +"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
702 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
703 a.log.logMessage({timestamp:new Date,level:b,category:c,message:d,arguments:e})}})(n[l]);a.log.makeLogger=function(b){b={flags:0,f:b};a.log.setLevel(b,"none");return b};a.log.setLevel=function(b,c){var d=!1;if(b&&!(b.flags&a.log.LEVEL_LOCKED))for(var e=0;e<a.log.levels.length;++e)if(c==a.log.levels[e]){b.level=c;d=!0;break}return d};a.log.lock=function(b,c){b.flags="undefined"===typeof c||c?b.flags|a.log.LEVEL_LOCKED:b.flags&~a.log.LEVEL_LOCKED};a.log.addLogger=function(a){d.push(a)};if("undefined"!==
704 -typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},g=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else g=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};g=a.log.makeLogger(g);a.log.setLevel(g,"debug");a.log.addLogger(g)}else console={log:function(){}};
705 -null!==g&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(g,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(g));a.log.consoleLogger=g}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
706 -c.defined.log=!0;for(var l=0;l<g.length;++l)g[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!r.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
707 -b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:r.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
708 -r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.encryptedContent.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]),r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function g(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
709 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.digestAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(r.create(r.Class.UNIVERSAL,
710 -r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.signatureAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]));c.value.push(r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=r.create(r.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
711 -r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?r.utcTimeToDate(e):r.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?r.create(r.Class.UNIVERSAL,r.Type.UTCTIME,!1,r.dateToUtcTime(e)):
712 -r.create(r.Class.UNIVERSAL,r.Type.GENERALIZEDTIME,!1,r.dateToGeneralizedTime(e))}return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[c])])}function m(b){return[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,
713 -r.Type.OCTETSTRING,!1,b.parameter.getBytes())]),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!r.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(r.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
714 -0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:r.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
704 +typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},e=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else e=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};e=a.log.makeLogger(e);a.log.setLevel(e,"debug");a.log.addLogger(e)}else console={log:function(){}};
705 +null!==e&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(e,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(e));a.log.consoleLogger=e}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
706 +c.defined.log=!0;for(var l=0;l<e.length;++l)e[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!u.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
707 +b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:u.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
708 +u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.encryptedContent.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]),u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function e(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
709 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.digestAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(u.create(u.Class.UNIVERSAL,
710 +u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.signatureAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]));c.value.push(u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=u.create(u.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
711 +u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?u.utcTimeToDate(e):u.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?u.create(u.Class.UNIVERSAL,u.Type.UTCTIME,!1,u.dateToUtcTime(e)):
712 +u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
713 +u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
714 +0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
715 c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
716 -break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var r=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
717 -b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=r.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:r.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!r.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=r.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
716 +break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
717 +b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
718 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
719 -c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
720 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.signerInfos));return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),
719 +c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
720 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
721 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
722 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
723 -signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(r.create(r.Class.CONTEXT_SPECIFIC,
724 -0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(g).getBytes()),r.create(r.Class.UNIVERSAL,
725 -r.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=r.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=r.toDer(d);h.getByte();r.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
726 -}else{e.authenticatedAttributesAsn1=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=r.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
722 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var r=c[m];if(!l&&r.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&r.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
723 +signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
724 +0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
725 +u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
726 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var r=e.authenticatedAttributes[m];r.type===a.pki.oids.messageDigest?r.value=c[e.digestAlgorithm].digest():r.type!==a.pki.oids.signingTime||r.value||(r.value=k);h.value.push(n(r));e.authenticatedAttributesAsn1.value.push(n(r))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
727 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
728 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,
729 -!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,g(b.recipients)),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
728 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
729 +!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
730 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
731 }h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
732 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
733 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
734 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
735 -Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function g(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
736 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=g(w.bytes()),b.truncate(b.length()-
737 -x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(g("\x00\x00\x00\x00",l)),x.putBuffer(g("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=g("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
738 -h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,g){g=g||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+g};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
739 -function(b,g){g=g||{};var l=g.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===g.encoding)return l=l.toHex(),g.delimiter?l.match(/.{2}/g).join(g.delimiter):l;if("binary"===g.encoding)return l.getBytes();if(g.encoding)throw Error('Unknown encoding "'+g.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
740 -(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<g.length;++l)g[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
741 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var g={};a.debug.set("forge.task","queues",g);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
734 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
735 +Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
736 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
737 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
738 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
739 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
740 +(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
741 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
742 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
743 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
744 -this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",g)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
744 +this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
745 (c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
746 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
747 this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
748 a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
749 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in g?0===g[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):g[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(g[b.type].shift(),0===g[b.type].length?delete g[b.type]:g[b.type][0].start()):a.log.error("forge.task",
750 -"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in g?g[a.type].push(b):(g[b.type]=[b],m(b))};a.task.cancel=function(a){a in g&&(g[a]=[g[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
751 -a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<g.length;++l)g[l](c);return c.task}},
752 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
753 -return}var g,v=function(a,b){b.exports=function(b){var c=g.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){g="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
749 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
750 +"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
751 +a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
752 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
753 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
754 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});
755 -function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var g=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),g=g.substring(0,g.length-24),v=0;v<c.length;v++)if(g===c[v].DERKey||g==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
756 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),g=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(g,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
757 -var e=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,e,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,g){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,g)}
758 -function amtcert_createCertificate(b,c,a,d,g){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
759 -value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==g?g={name:"extKeyUsage",serverAuth:!0}:g.name="extKeyUsage",
760 -n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},g,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
761 -function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,g=b.length;d<g;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
755 +function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),e=e.substring(0,e.length-24),v=0;v<c.length;v++)if(e===c[v].DERKey||e==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
756 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),r=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(r).getBytes();
757 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
758 +function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
759 +value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
760 +n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
761 +function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,e=b.length;d<e;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
762 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
763 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
764 -require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var g="";a.on("data",function(a){null!=g&&(g+=a.toString("binary"));5E5<g.length&&(g=null)});a.on("end",function(){certUrlCache[b]={data:btoa(g),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,g)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
765 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,e,k,m,q){var r=a[b++];q={};var u=0,B=0;if(0==r){if(2==h.bpp)for(e=0;e<m;e++)n(a[b++]+(a[b++]<<8),e);else for(e=0;e<m;e++)v(a[b++],e);g(h.spare,c,d)}else if(1==r)h.graymode?(r=a[b++],h.lowcolor&&(r<<=4),h.canvas.fillStyle="rgb("+r+","+r+","+r+")"):(r=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(r&224)+","+((r&28)<<3)+","+D((r&3)<<6):(r>>8&248)+","+(r>>3&252)+","+
766 -((r&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,e,k);else if(1<r&&17>r){k=4;B=15;if(2==h.bpp){for(e=0;e<r;e++)q[e]=a[b++]+(a[b++]<<8);2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)n(q[r>>e&B],u++)}else{for(e=0;e<r;e++)q[e]=a[b++];2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)v(q[r>>e&B],u++)}g(h.spare,c,d)}else if(128==r){if(2==h.bpp)for(;u<m&&b<a.byteLength;){r=a[b++]+(a[b++]<<8);B=1;do B+=e=a[b++];while(255==e);if(0==
767 -h.rotation)p(r,u,B),u+=B;else for(;0<=--B;)n(r,u++)}else for(;u<m&&b<a.byteLength;){r=a[b++];B=1;do B+=e=a[b++];while(255==e);if(0==h.rotation)l(r,u,B),u+=B;else for(;0<=--B;)v(r,u++)}g(h.spare,c,d)}else if(129<r){if(2==h.bpp)for(e=0;e<r-128;e++)q[e]=a[b++]+(a[b++]<<8);else for(e=0;e<r-128;e++)q[e]=a[b++];for(;u<m&&b<a.byteLength;){B=1;e=a[b++];r=q[e%128];if(127<e){do B+=e=a[b++];while(255==e)}if(0==h.rotation)2==h.bpp?p(r,u,B):l(r,u,B),u+=B;else if(2==h.bpp)for(;0<=--B;)n(r,u++);else for(;0<=--B;)v(r,
768 -u++)}g(h.spare,c,d)}}function g(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
764 +require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
765 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,r){var u=a[b++];r={};var q=0,B=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
766 +((u&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;B=15;if(2==h.bpp){for(g=0;g<u;g++)r[g]=a[b++]+(a[b++]<<8);2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(r[u>>g&B],q++)}else{for(g=0;g<u;g++)r[g]=a[b++];2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(r[u>>g&B],q++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;q<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);B=1;do B+=g=a[b++];while(255==g);if(0==
767 +h.rotation)p(u,q,B),q+=B;else for(;0<=--B;)n(u,q++)}else for(;q<m&&b<a.byteLength;){u=a[b++];B=1;do B+=g=a[b++];while(255==g);if(0==h.rotation)l(u,q,B),q+=B;else for(;0<=--B;)v(u,q++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)r[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)r[g]=a[b++];for(;q<m&&b<a.byteLength;){B=1;g=a[b++];u=r[g%128];if(127<g){do B+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?p(u,q,B):l(u,q,B),q+=B;else if(2==h.bpp)for(;0<=--B;)n(u,q++);else for(;0<=--B;)v(u,
768 +q++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
769 h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
770 b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
771 -1]=e,h.spare.data[b+2]=a,b+=4}function q(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function e(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
772 -2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):r[c.code];
773 -null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
774 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
775 -0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
776 -h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var e=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)e=12,h.state=1,h.parent&&delete h.parent.connectTime,
777 -h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)e=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){e=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;e=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
771 +1]=e,h.spare.data[b+2]=a,b+=4}function r(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
772 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];null!=c&&h.sendkey(c,
773 +a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);173==c&&(d=45);186==c&&
774 +(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=0;h.spareh2=0;
775 +h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=h.rwidth=
776 +h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
777 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
778 h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
779 0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
780 -50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);e=4;break;case 2:e=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)e=0;else if(b=l.getUint32(4)+8,c.byteLength<b)e=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
780 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
781 0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
782 -h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}e=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),e=l.getUint16(4),q=l.getUint16(6),p=e*q,r=l.getUint32(8);if(17>r){if(1>e||64<e||1>q||
783 -64<q)return console.log("Invalid tile size ("+e+","+q+"), disconnecting."),h.Stop();if(h.sparew!=e||h.spareh!=q){h.sparew=h.sparew2=e;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=e;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==r){h.canvas.canvas.width=h.rwidth=h.width=e;h.canvas.canvas.height=h.rheight=
784 -h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));e=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==r){r=12;e=12+p*h.bpp;if(h.acc.byteLength<e)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(r,!0),w),r+=2;else for(w=0;w<p;w++)v(h.acc[r++],w);g(h.spare,b,c)}else if(16==r){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
785 -16+w)break;r=16;if(5<w&&0==h.acc[r]&&l.getUint16(r+1,!0)==w-5)d(h.acc,r+5,b,c,e,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(r,r+w-0)))),0<l.length){for(var r=l,N=new Uint8Array(r.length),u=0,C=r.length;u<C;++u)N[u]=r.charCodeAt(u);d(N,0,b,c,e,q,p,l.length)}else console.log("Invalid deflate data");e=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==e)break;h.acc=e!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(e)):
782 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),r=l.getUint16(6),p=g*r,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>r||
783 +64<r)return console.log("Invalid tile size ("+g+","+r+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=r){h.sparew=h.sparew2=g;h.spareh=h.spareh2=r;if(1==h.rotation||3==h.rotation)h.sparew2=r,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
784 +h.height=r;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
785 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,r,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,N=new Uint8Array(u.length),q=0,C=u.length;q<C;++q)N[q]=u.charCodeAt(q);d(N,0,b,c,g,r,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
786 null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
787 function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
788 -h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,C(0,0),w(0,0));h.width=h.canvas.canvas.width;
789 -h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var r={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
789 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
790 NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
791 F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
792 h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
793 h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var K=!1,B=!1;h.GrabMouseInput=function(){if(1!=K){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;K=!0}};h.UnGrabMouseInput=function(){if(0!=K){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;K=!1}};h.GrabKeyInput=function(){1!=B&&(document.onkeyup=
794 h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,B=!0)};h.UnGrabKeyInput=function(){0!=B&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,B=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
795 0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){h.ReverseMouseWheel&&(b*=-1);var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/
796 -Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,g=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-g[0])*d;h.my=(event.pageY-g[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=q(h.mx,h.my),h.my=e(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
796 +Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=r(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
797 h.mNagleTimer=null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=
798 -0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;
799 -a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,g="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?g:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");
800 -a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&
801 -a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var g=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<g&&0!=a.State)for(a.PendingOperations.push([g,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];
802 -if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&
803 -255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),g=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),n=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,n,b,e,g,n,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);
804 -a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();
805 -if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,e=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,
806 -4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),e=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+
807 -q+" Y="+e);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,e);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,e);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,
808 -4));break;case 11:c=0;q={};e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<e)for(c=((b.charCodeAt(6+2*e)&255)<<8)+(b.charCodeAt(7+2*e)&255),n=0;n<e;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,
809 -4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);g=v[b];d&&(a.CanvasId.style.cursor=g)}return w+D}}};a.MouseButton=
810 -{NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,
811 -Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?
812 -d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,
813 -a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,
814 -67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,g;for(g in a.TouchArray)g==b?e=c:1==a.TouchArray[g].f?(e=65542,a.TouchArray[g].f=3):e=2==a.TouchArray[g].f?262144:131078,d+=String.fromCharCode(g)+a.intToStr(e)+a.shortToStr(a.TouchArray[g].x)+a.shortToStr(a.TouchArray[g].y),2==a.TouchArray[g].f&&
815 -delete a.TouchArray[g];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,g=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-g[0])*e,d=(c.pageY-
816 -g[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var n=g=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?g=a.MouseButton.LEFT:2==c.which?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT:c.button&&(0==c.button?g=a.MouseButton.LEFT:1==c.button?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?n=-120*c.detail:c.wheelDelta&&(n=3*c.wheelDelta));var v="",v=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,
817 -a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,n/256&255,n&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?g:2*g&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(v),a.Alternate=1):a.Alternate=0:a.send(v)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",
818 -b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,
819 -a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&
820 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&
821 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&
822 -(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&
823 -a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};
824 -a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,g=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]=
825 -{x:e,y:g});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
826 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<
827 -b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/
828 -a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=
829 -a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
830 -null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=
831 -null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;
832 -if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||
833 -3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,
834 -0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};
835 -a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;
836 -d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var g=new FileReader,v=!1,n=[];g.readAsBinaryString?g.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:g.readAsBinaryString(new Blob([n.shift()]))}:g.readAsArrayBuffer&&(g.onloadend=function(a){d.xxOnSocketData(a.target.result);
837 -0==n.length?v=!1:g.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(g.readAsBinaryString)v=!0,g.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,g.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=
838 -function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=
839 -a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");
840 -d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(u[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<
841 -b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){y[m][D]=a;A[m][D]=(e<<6)+(C<<12)+q}function g(){for(var a=(e<<6)+(C<<12)+q,b=D;b<l.width;b++)y[m][b]=" ",A[m][b]=a}function v(a){for(var b=(e<<6)+(C<<12)+q,c=0;c<l.width;c++)y[a][c]=" ",A[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)y[b]=y[b+a],A[b]=A[b+a];for(b=E[1]-a+1;b<=
842 -E[1];b++)for(y[b]=[],A[b]=[],a=0;a<l.width;a++)y[b][a]=" ",A[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,e=7,C=0,w=!0,D=0,m=0,k=0,h=0,r=0,K=[],B=0,x=0,A=[],y=[],R=!1,z=!0,E,O=!1,H=[],
843 -N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){y[c]=[];A[c]=[];for(var d=0;d<l.width;d++)y[c][d]=" ",A[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=
844 -decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(r){case 0:switch(n){case 27:r=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":r=2;break;case "(":r=4;break;case ")":r=5;break;case "]":r=6;break;case "=":O=!0;r=0;break;case ">":O=!1;r=0;break;case "7":k=D;h=m;r=0;break;case "8":D=k;m=h;r=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var u=0;u<l.width;u++)y[n][u]=y[n-1][u],A[n][u]=A[n-1][u];for(n=
845 -E[0]+1-1;n>E[0]-1;n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;r=0;break;default:console.log("unknown terminal short code",p),r=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,u=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(z=!1);break;case "h":25==n[0]&&(z=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==u&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==
846 -u&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==u&&(0==n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==u&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==u&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==u&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==u&&(p=n[0]);for(J=D;J<l.width-p;J++)y[m][J]=y[m][J+p],A[m][J]=A[m][J+p];for(J=l.width-p;J<l.width;J++)y[m][J]=" ",A[m][J]=448;break;case "L":J=1;1==u&&(J=n[0]);0==J&&(J=1);
847 -for(n=E[1];n>=m+J;n--)y[n]=y[n-J],A[n]=A[n-J];for(n=m;n<m+J;n++)for(y[n]=[],A[n]=[],p=0;p<l.width;p++)y[n][p]=" ",A[n][p]=448;break;case "J":if(1==u&&2==n[0])l.TermClear((C<<12)+(e<<6)),m=D=0,H=[];else if(0==u||1==u&&0==n[0])for(g(),J=m+1;J<l.height;J++)v(J);else if(1==u&&1==n[0])for(g(),J=0;J<m-1;J++)v(J);break;case "H":2==u?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<u;J++)n[J]&&0!=n[J]?1==n[J]?
848 -8>e&&(e+=8):2==n[J]||22==n[J]?8<=e&&(e-=8):7==n[J]?q=2:27==n[J]?q=0:30<=n[J]&&37>=n[J]?(p=8<=e,e=n[J]-30,p&&8>=e&&(e+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?e=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,e=7,q=0);break;case "K":if(0!=u&&(1!=u||n[0]&&0!=n[0])){if(1==u)if(1==n[0])for(n=(e<<6)+(C<<12)+q,u=0;u<D;u++)y[m][u]=" ",A[m][u]=n;else 2==n[0]&&v(m)}else g();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==u&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-
849 -1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=E[1]);break;case "S":p=1;1==u&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "M":p=1;1==u&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "T":p=1;1==u&&(p=n[0]);for(n=E[1];n>E[0]+
850 -p;n--)for(u=0;u<l.width;u++)y[n][u]=y[n-p][u],A[n][u]=A[n-p][u];for(n=E[0]+p;n>E[0];n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "X":p=1;J=D;R=m;for(1==u&&(p=n[0]);0<p&&R<l.height;)y[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}r=0}break;case 4:r=0;break;case 5:r=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(u=parseInt(n[0]),(0==u||2==u)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,
851 -l.title=n[1]);r=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var u=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
852 -9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,
853 -9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)y[b][c]=" ",A[b][c]=a;H=[]};l.TermResetScreen=function(){q=0;e=7;C=0;w=z=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);
854 -N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};
855 -l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,
856 -79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,
857 -91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;
858 -var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
859 -a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=A[b][h],D==h&&m==b&&z&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=y[b][h],d){case "&":a+="&amp;";
798 +0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=
799 +700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
800 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
801 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
802 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
803 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
804 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
805 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,r=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
806 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),r=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+r+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
807 +a.ProcessPictureMsg(c,r,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(r,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;r={};g=((b.charCodeAt(4)&255)<<8)+
808 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);r[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,r,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
809 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
810 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
811 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&
812 +7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==
813 +a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&
814 +a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+
815 +a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
816 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
817 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
818 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
819 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
820 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
821 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
822 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
823 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
824 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
825 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
826 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
827 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
828 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
829 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
830 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
831 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
832 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
833 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
834 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
835 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
836 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
837 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
838 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
839 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
840 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(q[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
841 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(C<<12)+r}function e(){for(var a=(g<<6)+(C<<12)+r,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(C<<12)+r,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
842 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),r=0,g=7,C=0,w=!0,D=0,m=0,k=0,h=0,u=0,K=[],B=0,x=0,z=[],A=[],R=!1,y=!0,E,O=!1,H=[],N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
843 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=
844 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":O=!0;u=0;break;case ">":O=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var q=0;q<l.width;q++)A[n][q]=A[n-1][q],z[n][q]=z[n-1][q];for(n=E[0]+1-1;n>E[0]-1;n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;u=0;break;
845 +default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,q=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==q&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==q&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==q&&(0==
846 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==q&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==q&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==q&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==q&&(p=n[0]);for(J=D;J<l.width-p;J++)A[m][J]=A[m][J+p],z[m][J]=z[m][J+p];for(J=l.width-p;J<l.width;J++)A[m][J]=" ",z[m][J]=448;break;case "L":J=1;1==q&&(J=n[0]);0==J&&(J=1);for(n=E[1];n>=m+J;n--)A[n]=A[n-J],z[n]=z[n-J];for(n=m;n<m+J;n++)for(A[n]=[],
847 +z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==q&&2==n[0])l.TermClear((C<<12)+(g<<6)),m=D=0,H=[];else if(0==q||1==q&&0==n[0])for(e(),J=m+1;J<l.height;J++)v(J);else if(1==q&&1==n[0])for(e(),J=0;J<m-1;J++)v(J);break;case "H":2==q?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<q;J++)n[J]&&0!=n[J]?1==n[J]?8>g&&(g+=8):2==n[J]||22==n[J]?8<=g&&(g-=8):7==n[J]?r=2:27==n[J]?r=0:30<=n[J]&&
848 +37>=n[J]?(p=8<=g,g=n[J]-30,p&&8>=g&&(g+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?g=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,g=7,r=0);break;case "K":if(0!=q&&(1!=q||n[0]&&0!=n[0])){if(1==q)if(1==n[0])for(n=(g<<6)+(C<<12)+r,q=0;q<D;q++)A[m][q]=" ",z[m][q]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==q&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
849 +E[1]);break;case "S":p=1;1==q&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "M":p=1;1==q&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "T":p=1;1==q&&(p=n[0]);for(n=E[1];n>E[0]+p;n--)for(q=0;q<l.width;q++)A[n][q]=A[n-p][q],z[n][q]=z[n-p][q];for(n=
850 +E[0]+p;n>E[0];n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "X":p=1;J=D;R=m;for(1==q&&(p=n[0]);0<p&&R<l.height;)A[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(q=parseInt(n[0]),(0==q||2==q)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=
851 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var q=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
852 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
853 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;H=[]};l.TermResetScreen=function(){r=0;g=7;C=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
854 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
855 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
856 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
857 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
858 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
859 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
860 break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<H.length&&(H=H.slice(H.length-800));c=H.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
861 l.Init();return l},ZLIB=ZLIB||{};
862 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
863 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
864 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,x,A,B,D,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=A=1;15>=p;p++)if(A<<=1,A-=M[p],0>A)return-1;if(0<A&&(0==
865 -b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(q=0;q<n;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=r,fa=K,ga=ca=0,U=-1}q=D=0;p=d;S=c;n=w;x=0;W=-1;B=1<<w;I=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[q]<U?G.val=e[q]:e[q]>U?(G.op=fa[ga+e[q]],G.val=Z[ca+e[q]]):G.op=96;A=1<<p-x;d=C=1<<n;do C-=A,m[S+(D>>>x)+C]=G;while(0!=C);for(A=1<<p-1;D&A;)A>>>=1;
866 -0!=A?(D&=A-1,D+=A):D=0;q++;if(0==--M[p]){if(p==v)break;p=g[l+e[q]]}if(p>w&&(D&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(A=1<<n;n+x<v;){A-=M[n+x];if(0>=A)break;n++;A<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=D&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=D&&(m[S+D]={op:64,bits:p-x,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function g(){var a;this.total=this.check=
864 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,p;p=1==b?a.nlen:2==b?a.ndist:19;var n,r,v,w,x,z,D,B,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(n=0;15>=n;n++)M[n]=0;for(r=0;r<p;r++)M[g[l+r]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(n=z=1;15>=n;n++)if(z<<=1,z-=M[n],0>z)return-1;if(0<z&&(0==
865 +b||1!=v))return a.next=c,-1;x[1]=0;for(n=1;15>n;n++)x[n+1]=x[n]+M[n];for(r=0;r<p;r++)0!=g[l+r]&&(e[x[g[l+r]]++]=r);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=u,fa=K,ga=ca=0,U=-1}r=B=0;n=d;S=c;p=w;x=0;W=-1;D=1<<w;I=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){G={op:0,bits:n-x,val:0};e[r]<U?G.val=e[r]:e[r]>U?(G.op=fa[ga+e[r]],G.val=Z[ca+e[r]]):G.op=96;z=1<<n-x;d=C=1<<p;do C-=z,m[S+(B>>>x)+C]=G;while(0!=C);for(z=1<<n-1;B&z;)z>>>=1;
866 +0!=z?(B&=z-1,B+=z):B=0;r++;if(0==--M[n]){if(n==v)break;n=g[l+e[r]]}if(n>w&&(B&I)!=W){0==x&&(x=w);S+=d;p=n-x;for(z=1<<p;p+x<v;){z-=M[p+x];if(0>=z)break;p++;z<<=1}D+=1<<p;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&I;m[c+W]={op:p,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:n-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
867 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
868 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function e(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function C(a,b){return a.hold&
869 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
868 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function r(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!r(a))return!1;return!0}function C(a,b){return a.hold&
869 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
870 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
871 -e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new g;ZLIB.inflateReset(b,
872 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,g,h,k,r,u=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);g={};n(a,g);h=g.have;k=g.left;
873 -P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!e(g,16))break a;if(d.wrap&2&&35615==g.hold){d.check=a.checksum_function(0,null,0,0);v(a,g.hold);p(g);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(g,8)<<8)+(g.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(g,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(g,4);u=C(g,4)+8;if(0==d.wbits)d.wbits=u;else if(u>d.wbits){a.msg="invalid window size";d.mode=
874 -29;break}d.dmax=1<<u;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=g.hold&512?9:11;p(g);break;case 1:if(!e(g,16))break a;d.flags=g.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=g.hold>>>8&1);d.flags&512&&v(a,g.hold);p(g);d.mode=2;case 2:if(!e(g,32))break a;null!==d.head&&(d.head.time=g.hold);d.flags&512&&(r=g.hold,a.state.check=a.checksum_function(a.state.check,
875 -[r&255,r>>>8&255,r>>>16&255,r>>>24&255],0,4));p(g);d.mode=3;case 3:if(!e(g,16))break a;null!==d.head&&(d.head.xflags=g.hold&255,d.head.os=g.hold>>>8);d.flags&512&&v(a,g.hold);p(g);d.mode=4;case 4:if(d.flags&1024){if(!e(g,16))break a;d.length=g.hold;null!==d.head&&(d.head.extra_len=g.hold);d.flags&512&&v(a,g.hold);p(g);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(r=d.length,r>g.have&&(r=g.have),r&&(null!==d.head&&null!==d.head.extra&&(u=d.head.extra_len-
876 -d.length,d.head.extra+=a.input_data.substring(g.next,g.next+(u+r>d.head.extra_max?d.head.extra_max-u:r))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r)),g.have-=r,g.next+=r,d.length-=r),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==g.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");r=0;do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=u,d.length++)}while(r<g.have);d.flags&
877 -512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==g.have)break a;r=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=u,d.length++)}while(r<g.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=
878 -r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!e(g,16))break a;if(g.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(g)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!e(g,32))break a;a.adler=d.check=m(g.hold);p(g);d.mode=10;case 10:if(0==d.havedict)return l(g),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
879 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(g);d.mode=26;break}if(!e(g,3))break a;d.last=C(g,1);w(g,1);switch(C(g,2)){case 0:d.mode=13;break;case 1:r=d;u=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
871 +e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
872 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,q=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
873 +P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);q=C(e,4)+8;if(0==d.wbits)d.wbits=q;else if(q>d.wbits){a.msg="invalid window size";d.mode=
874 +29;break}d.dmax=1<<q;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
875 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(q=d.head.extra_len-
876 +d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(q+u>d.head.extra_max?d.head.extra_max-q:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=q,d.length++)}while(u<e.have);d.flags&
877 +512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=q,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
878 +u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
879 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=C(e,1);w(e,1);switch(C(e,2)){case 0:d.mode=13;break;case 1:u=d;q=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
880 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
881 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
882 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -899,28 +899,28 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
899 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
900 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
901 {op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
902 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);r.lencode=0;r.distcode=512;for(u=0;512>u;u++)r.codes[u]=B[u];for(u=0;32>u;u++)r.codes[u+512]=x[u];r.lenbits=9;r.distbits=5;
903 -d.mode=19;if(c==ZLIB.Z_TREES){w(g,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(g,2);break;case 13:D(g);if(!e(g,32))break a;if((g.hold&65535)!=(g.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=g.hold&65535;p(g);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(r=d.length){r>g.have&&(r=g.have);r>g.left&&(r=g.left);if(0==r)break a;a.output_data+=a.input_data.substring(g.next,g.next+r);a.next_out+=r;g.have-=
904 -r;g.next+=r;g.left-=r;d.length-=r;break}d.mode=11;break;case 16:if(!e(g,14))break a;d.nlen=C(g,5)+257;w(g,5);d.ndist=C(g,5)+1;w(g,5);d.ncode=C(g,4)+4;w(g,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!e(g,3))break a;r=C(g,3);d.lens[A[d.have++]]=r;w(g,3)}for(;19>d.have;)d.lens[A[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
905 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(16>r.val)w(g,r.bits),d.lens[d.have++]=r.val;else{if(16==r.val){if(!e(g,r.bits+2))break a;w(g,r.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}u=d.lens[d.have-1];r=3+C(g,2);w(g,2)}else if(17==r.val){if(!e(g,r.bits+3))break a;w(g,r.bits);u=0;r=3+C(g,3);w(g,3)}else{if(!e(g,r.bits+7))break a;w(g,r.bits);u=0;r=11+C(g,7);w(g,7)}if(d.have+r>d.nlen+d.ndist){a.msg=
906 -"invalid bit length repeat";d.mode=29;break}for(;r--;)d.lens[d.have++]=u}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=g.have&&258<=g.left){l(g);r=a;var F=K=u=void 0,Y=void 0,L=void 0,
907 -ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,u=r.state,K=r.input_data,F=r.next_in,Y=F+r.avail_in-5,L=r.next_out,ea=L-(k-r.avail_out),V=L+(r.avail_out-257),J=u.wsize,aa=u.whave,ba=u.wnext,W=u.window,I=u.hold,G=u.bits,S=u.codes,Z=u.lencode,ca=u.distcode,fa=(1<<u.lenbits)-1,ga=(1<<u.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
908 -G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)r.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
909 -u.sane){r.msg="invalid distance too far back";u.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,r.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)r.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);r.output_data+=r.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),X-=3;X&&(r.output_data+=r.output_data.charAt(U++),
910 -1<X&&(r.output_data+=r.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{r.msg="invalid distance code";u.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?u.mode=11:(r.msg="invalid literal/length code",u.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;r.next_in=F;r.next_out=L;r.avail_in=F<Y?5+(Y-F):5-(F-Y);r.avail_out=L<V?257+(V-L):257-(L-V);u.hold=I;u.bits=G;n(a,g);11==d.mode&&(d.back=-1);
911 -break}for(d.back=0;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(r.op&&0==(r.op&240)){for(u=r;;){r=d.codes[d.lencode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;d.length=r.val;if(0==r.op){d.mode=25;break}if(r.op&32){d.back=-1;d.mode=11;break}if(r.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=r.op&15;d.mode=21;case 21:if(d.extra){if(!e(g,d.extra))break a;
912 -d.length+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){r=d.codes[d.distcode+C(g,d.distbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(0==(r.op&240)){for(u=r;;){r=d.codes[d.distcode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;if(r.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=r.val;d.extra=r.op&15;d.mode=23;case 23:if(d.extra){if(!e(g,d.extra))break a;
913 -d.offset+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==g.left)break a;r=k-g.left;if(d.offset>r){r=d.offset-r;if(r>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}r>d.wnext?(r-=d.wnext,u=d.wsize-r):u=d.wnext-r;K=-1;r>d.length&&(r=d.length)}else u=-1,K=a.next_out-d.offset,r=d.length;r>g.left&&(r=g.left);g.left-=r;d.length-=r;if(0<=u)a.output_data+=d.window.substring(u,u+r),a.next_out+=r;else{a.next_out+=r;do a.output_data+=a.output_data.charAt(K++);while(--r)}0==
914 -d.length&&(d.mode=20);break;case 25:if(0==g.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;g.left--;d.mode=20;break;case 26:if(d.wrap){if(!e(g,32))break a;k-=g.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=g.left;if((d.flags?g.hold:m(g.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(g)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!e(g,32))break a;if(g.hold!=(d.total&4294967295)){a.msg="incorrect length check";
915 -d.mode=29;break}p(g)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(g);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))g=a.state,r=a.output_data.length,null===g.window&&(g.window=""),0==g.wsize&&(g.wsize=1<<g.wbits),g.window=r>=g.wsize?a.output_data.substring(r-g.wsize):g.whave+r<g.wsize?g.window+a.output_data:g.window.substring(g.whave-(g.wsize-r))+a.output_data,g.whave=g.window.length,
916 -g.wnext=g.whave<g.wsize?g.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
902 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(q=0;512>q;q++)u.codes[q]=B[q];for(q=0;32>q;q++)u.codes[q+512]=x[q];u.lenbits=9;u.distbits=5;
903 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
904 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=C(e,5)+257;w(e,5);d.ndist=C(e,5)+1;w(e,5);d.ncode=C(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=C(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
905 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}q=d.lens[d.have-1];u=3+C(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);q=0;u=3+C(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);q=0;u=11+C(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
906 +"invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=q}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var F=K=q=void 0,Y=void 0,L=void 0,
907 +ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,q=u.state,K=u.input_data,F=u.next_in,Y=F+u.avail_in-5,L=u.next_out,ea=L-(k-u.avail_out),V=L+(u.avail_out-257),J=q.wsize,aa=q.whave,ba=q.wnext,W=q.window,I=q.hold,G=q.bits,S=q.codes,Z=q.lencode,ca=q.distcode,fa=(1<<q.lenbits)-1,ga=(1<<q.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
908 +G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)u.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
909 +q.sane){u.msg="invalid distance too far back";q.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)u.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);u.output_data+=u.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),X-=3;X&&(u.output_data+=u.output_data.charAt(U++),
910 +1<X&&(u.output_data+=u.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{u.msg="invalid distance code";q.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?q.mode=11:(u.msg="invalid literal/length code",q.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;u.next_in=F;u.next_out=L;u.avail_in=F<Y?5+(Y-F):5-(F-Y);u.avail_out=L<V?257+(V-L):257-(L-V);q.hold=I;q.bits=G;n(a,e);11==d.mode&&(d.back=-1);
911 +break}for(d.back=0;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(u.op&&0==(u.op&240)){for(q=u;;){u=d.codes[d.lencode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
912 +d.length+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+C(e,d.distbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(0==(u.op&240)){for(q=u;;){u=d.codes[d.distcode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
913 +d.offset+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,q=d.wsize-u):q=d.wnext-u;K=-1;u>d.length&&(u=d.length)}else q=-1,K=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=q)a.output_data+=d.window.substring(q,q+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(K++);while(--u)}0==
914 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
915 +d.mode=29;break}p(e)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
916 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
917 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
918 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
919 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
920 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
921 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;a%=65521;n%=65521}return a|n<<16}function c(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b[c],65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),
922 a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b[c++],n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=
923 -a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,g,v){return"string"===typeof d?b(a,d,g,v):c(a,d,g,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
923 +a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,e,v){return"string"===typeof d?b(a,d,e,v):c(a,d,e,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
924 65521);131042<=v&&(v-=131042);65521<=v&&(v-=65521);return c|v<<16}})();"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-crc32.js");
925 (function(){function b(a,b){var c,n=0;for(c=0;b;)b&1&&(c^=a[n]),b>>=1,n++;return c}function c(a,c){var v;for(v=0;32>v;v++)a[v]=b(c,c[v])}var a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,
926 3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,
@@ -929,32 +929,32 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
929 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
930 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
931 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
932 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,g,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^g}})();
933 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),g=b.webkitRequestFileSystem,v=b.requestFileSystem||g||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
934 -b.chrome?c():setTimeout(c,500)},q=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(g){n(g)}}},e=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},C=function(n,m,k){k||(n=e(n));var h=this;k=n.type;var r=!1,w,B,x=function(){q(h,["writestart","progress","write","writeend"])},A=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
935 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(r||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},y=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},z;h.readyState=h.INIT;m||(m="download");if(a)w=
936 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(z=n.slice||n.webkitSlice,n=z.call(n,0,n.size,"application/octet-stream"),r=!0);g&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||g)B=b;v?(l+=n.size,v(b.TEMPORARY,l,y(function(a){a.root.getDirectory("saved",C,y(function(a){var b=function(){a.getFile(m,C,y(function(a){a.createWriter(y(function(b){b.onwriteend=
937 -function(b){B.location.href=a.toURL();h.readyState=h.DONE;q(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&A()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),A)}),A)};a.getFile(m,{create:!1},y(function(a){a.remove();b()}),y(function(a){a.code===a.NOT_FOUND_ERR?b():A()}))}),A)}),A)):A()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
938 -b,c){c||(a=e(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
932 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,r;if(0>=v)return a;p=Array(32);r=Array(32);r[0]=3988292384;for(n=l=1;32>n;n++)r[n]=l,l<<=1;c(p,r);c(r,p);do{c(p,r);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(r,p);v&1&&(a=b(r,a));v>>=1}while(0!=v);return a^e}})();
933 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
934 +b.chrome?c():setTimeout(c,500)},r=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(g){n(g)}}},g=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},C=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){r(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
935 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
936 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",C,A(function(a){var b=function(){a.getFile(m,C,A(function(a){a.createWriter(A(function(b){b.onwriteend=
937 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;r(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
938 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;r(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
939 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
940 -var version="0.9.3",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
940 +var version="0.9.7",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
941 null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>\ubd88\ub7ec\uc624\ub294 \uc911 ...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetAuth NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
942 StatusStrs=["\uc5f0\uacb0 \ud574\uc81c","\uc5f0\uacb0 \uc911 ...","\uc124\uc815...","\uc5f0\uacb0\ub428"],t,t2,rsepass=null;
943 -function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
944 -applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
945 -haltEvent,!1);document.addEventListener("dragleave",haltEvent,!1);document.addEventListener("drop",documentFileSelectHandler,!1);Q("p16").addEventListener("dragover",haltEvent,!1);Q("p16").addEventListener("dragleave",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",
946 -p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
943 +function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(23).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
944 +urlvars.kvmenc&&(c=parseInt(urlvars.kvmenc),"number"==typeof c&&(desktopsettings.encflags=c));urlvars.kvmdec&&(c=parseInt(urlvars.kvmdec),"number"==typeof c&&(desktopsettings.decimationMode=c));applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(34).value=terminalEmulations[terminal.m.terminalEmulation];Q(31).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",
945 +haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);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",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);
946 +document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
947 function documentFileSelectHandler(b){haltEvent(b);for(var c=!0,a=0;a<b.dataTransfer.files.length;a++)0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".img")&&0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".iso")&&(c=!1);1==c&&null!=b.dataTransfer&&0<currentView&&100>currentView&&(1==b.dataTransfer.files.length||2==b.dataTransfer.files.length)?(a=c=null,b.dataTransfer.files[0].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[0]),b.dataTransfer.files[0].name.toLowerCase().endsWith(".img")&&
948 (c=b.dataTransfer.files[0]),2==b.dataTransfer.files.length&&(b.dataTransfer.files[1].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[1]),b.dataTransfer.files[1].name.toLowerCase().endsWith(".img")&&(c=b.dataTransfer.files[1])),null==c&&null==a||iderStart3(c,a,1)):null!=b.dataTransfer&&1==b.dataTransfer.files.length&&(c=b.dataTransfer.files[0].name.toLowerCase(),21==currentView&&UploadToStorage(b.dataTransfer.files[0],c))}
949 function connectButtonfunction(){wsstack&&0!=wsstack.socketState?disconnect():meshcentral2credCallback()}function connectButtonfunctionEx(){currentMeshNode=parent.getCurrentNode();connect(currentMeshNode._id,16992,null,null,0);Q("xconnectbutton1").value="\ubd84\ub9ac"}function getCurrentMeshNode(){return currentMeshNode}function setConnectionState(b){QE("xconnectbutton1",b);0==b&&disconnect()}function setFrameHeight(b){}function setAuthCallback(b){meshcentral2credCallback=b}
950 function setUrlVar(b,c){urlvars||(urlvars={});urlvars[b]=c}function cleanup(){c3.value="\ucea1\ucc98 \uc2dc\uc791";terminal.m.capture&&delete terminal.m.capture;terminal.Stop();desktop.disconnectCode=0;desktop.Stop()}
951 -function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
952 -function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
953 -function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
954 -function connect(b,c,a,d,g,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,g);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(28,"");QH(39,"");amtversion=amtversionmin=amtFirstPull=
955 -0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(21,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(49,"");
956 -QH(50,LoadingHtml);xxCertificates=null;QH(51,LoadingHtml);QH(24,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(52,LoadingHtml);QH(54,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
957 -!1;QH(53,LoadingHtml);QE(43,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(48,!1),Q(48).checked=!0);QE(44,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
951 +function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
952 +function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
953 +function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
954 +function connect(b,c,a,d,e,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,e);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(29,"");QH(40,"");amtversion=amtversionmin=amtFirstPull=
955 +0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(22,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(50,"");
956 +QH(51,LoadingHtml);xxCertificates=null;QH(52,LoadingHtml);QH(25,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(53,LoadingHtml);QH(55,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
957 +!1;QH(54,LoadingHtml);QE(44,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(49,!1),Q(49).checked=!0);QE(45,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
958 function disconnect(){null!=desktopPollTimer&&(clearInterval(desktopPollTimer),desktopPollTimer=null);fullscreen&&deskToggleFull();iderStop();StopDefenseStatsTimer();dialogclose(0);amtstack&&(amtstack.onProcessChanged=null,amtstack.CancelAllQueries(999),amtstack=null);cleanup();wsstack=null;delete amtstack;onProcessChanged(0,1);go(101);Q("xconnectbutton1").value="\uc787\ub2e4";QH(5,"\uc5f0\uacb0 \ud574\uc81c");go(100)}
959 function onProcessChanged(b,c){QS(3).width=100*b/c+"%";0==b&&refreshButtons(!0);0==b&&amtstack&&(0<amtversion&&0==(amtFirstPull&64)?(amtFirstPull|=64,PullPowerPolicy(),subscriptionsFilters=null,PullEventSubscriptions(),PullWatchdog(),5<amtversion&&(PullCertificates(),PullRemoteAccess())):0==(amtFirstPull&1)?PullHardware():0==(amtFirstPull&16)?PullEventLog():0==(amtFirstPull&32)&&PullAuditLog())}
960 function checkAmtVersion(b){var c=b.split(".");b=parseInt(c[0]);var a=parseInt(c[1]),c=parseInt(c[2]),c=1E3*a+c,d=0;5>=b||12<=b?d=1:6==b&&2061<=c?d=1:7==b&&1091<=c?d=1:8==b&&1071<=c?d=1:9==b?5>a&&1041<=c?d=1:5061<=c&&(d=1):10==b&&55<=c?d=1:11==b&&(5>a&&25<=c?d=1:6027<=c&&(d=1));return 0==d}
@@ -963,38 +963,39 @@ function processSystemVersion(b,c,a,d){if(200==d||400==d){if(200==d){amtlogicale
963 1==urlvars.sol&&(go(13),connectTerminal())}else errcheck(d,b)}var refreshButtonsState=!0;function refreshButtons(b){if(refreshButtonsState!=b){refreshButtonsState=b;for(var c=0,a=document.getElementsByTagName("input");c<a.length;c++)"refreshbtn"==a[c].name&&(a[c].disabled=!b)}}
964 function PullPowerState(){amtstack&&0==amtstack.GetPendingActions()&&amtsysstate&&amtsysstate.CIM_ServiceAvailableToElement&&amtstack.Enum("CIM_ServiceAvailableToElement",function(b,c,a,d){200==d&&(amtsysstate.CIM_ServiceAvailableToElement.responses=a,9<amtversion&&null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?
965 amtstack.Get("IPS_PowerManagementService",function(a,b,c,d){200==d&&(amtsysstate.IPS_PowerManagementService.response=c.Body,updateSystemStatus())}):updateSystemStatus())})}
966 -function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c=["CIM_ServiceAvailableToElement","*AMT_GeneralSettings","AMT_EthernetPortSettings","*AMT_RedirectionService","CIM_ElementSettingData"];5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");15<amtversion&&1==amtstack.wsman.comm.xtls&&
967 -c.push("*CIM_BootService");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
966 +function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c="CIM_ServiceAvailableToElement *AMT_GeneralSettings AMT_EthernetPortSettings *AMT_RedirectionService CIM_ElementSettingData *AMT_BootCapabilities".split(" ");5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");
967 +15<amtversion&&c.push("*CIM_BootService");2<amtversion&&c.push("*AMT_8021XProfile");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
968 function processSystemStatus(b,c,a,d){if(void 0==a.IPS_ScreenConfigurationService||400==a.IPS_ScreenConfigurationService.status)a.IPS_ScreenConfigurationService=null;if(void 0==a.IPS_KVMRedirectionSettingData||400==a.IPS_KVMRedirectionSettingData.status)a.IPS_KVMRedirectionSettingData=null;if(void 0==a.CIM_KVMRedirectionSAP||400==a.CIM_KVMRedirectionSAP.status)a.CIM_KVMRedirectionSAP=null;if(void 0==a.IPS_OptInService||400==a.IPS_OptInService.status)a.IPS_OptInService=null;void 0!=a.AMT_RedirectionService&&
969 -200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var g in a)null!=a[g]&&a[g].status>d&&(d=a[g].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"\uc2dc\uacc4 \ub3d9\uae30\ud654",3,syncClockEx,"\uc774 \ucef4\ud4e8\ud130\uc640 Intel AMT \uc2dc\uacc4\ub97c \ub3d9\uae30\ud654 \ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?")}
969 +200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var e in a)null!=a[e]&&a[e].status>d&&(d=a[e].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"\uc2dc\uacc4 \ub3d9\uae30\ud654",3,syncClockEx,"\uc774 \ucef4\ud4e8\ud130\uc640 Intel AMT \uc2dc\uacc4\ub97c \ub3d9\uae30\ud654 \ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?")}
970 function syncClockEx(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(b,c,a,d){200!=d?messagebox("","\uc2dc\uac04\uc744 \uc124\uc815\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc0c1\ud0dc ="+d):0!=a.Body.ReturnValue?messagebox("","\uc2dc\uac04\uc744 \uc124\uc815\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc624\ub958 : "+a.Body.ReturnValueStr):(b=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(a.Body.Ta0,b,b,function(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}))})}
971 var DMTFPowerStates=";;\uc804\uc6d0 \ucf1c\uc9d0;\uac00\ubcbc\uc6b4 \uc218\uba74;\uae4a\uc740 \uc7a0;\uc804\uc6d0 \uc0ac\uc774\ud074 (\uc18c\ud504\ud2b8 \uc624\ud504);\uaebc\uc9d0-\ud558\ub4dc;\ucd5c\ub300 \uc808\uc804 \ubaa8\ub4dc;\uc18c\ud504\ud2b8 \uc624\ud504;\uc804\uc6d0\uc744 \uaed0\ub2e4 \ucf1c\uc2ed\uc2dc\uc624 (\uaebc\uc9d0);\uba54\uc778 \ubc84\uc2a4 \ub9ac\uc14b;\uc9c4\ub2e8 \uc778\ud130\ub7fd\ud2b8 (NMI);\ud574\ub2f9 \uc0ac\ud56d \uc5c6\uc74c;\uaebc\uc9d0-\ubd80\ub4dc\ub7fd\uace0 \uc6b0\uc544\ud55c;\ub044\uae30-\ub2e8\ub2e8\ud568;\uc6b0\uc544\ud55c \ub9c8\uc2a4\ud130 \ubc84\uc2a4 \ub9ac\uc14b;\uc804\uc6d0\uc8fc\uae30 (\uaebc\uc9d0-\uc18c\ud504\ud2b8 \uc6b0\uc544\ud568);\uc804\uc6d0\uc744 \uaed0\ub2e4 \ucf1c\uc2ed\uc2dc\uc624 (\uaebc\uc9d0-\uc815\uc0c1 \uc791\ub3d9);\uc9c4\ub2e8 \uc778\ud130\ub7fd\ud2b8 (INIT)".split(";");
972 -function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),g="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>\uc54c \uc218 \uc5c6\ub294</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"\uc804\uc6d0 \ucf1c\uc9d0"==n&&amtsysstate.IPS_PowerManagementService&&
973 -amtsysstate.IPS_PowerManagementService.response&&3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", \ud50c\ub7ec\uadf8\uc778","\ubc30\ud130\ub9ac \uc0ac\uc6a9"][v.PowerSource]);d+=TableEntry("\ud798",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>\uc5c6\uc74c</i>":EscapeHtml(c);d+=TableEntry("\uc774\ub984 \ubc0f \ub3c4\uba54\uc778",
972 +function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>\uc54c \uc218 \uc5c6\ub294</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"\uc804\uc6d0 \ucf1c\uc9d0"==n&&amtsysstate.IPS_PowerManagementService&&
973 +amtsysstate.IPS_PowerManagementService.response&&3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(29,n),QH(40,n));v.PowerSource&&(n+=[", \ud50c\ub7ec\uadf8\uc778","\ubc30\ud130\ub9ac \uc0ac\uc6a9"][v.PowerSource]);d+=TableEntry("\ud798",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>\uc5c6\uc74c</i>":EscapeHtml(c);d+=TableEntry("\uc774\ub984 \ubc0f \ub3c4\uba54\uc778",
974 addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?d+=TableEntry("\uc2dc\uc2a4\ud15c ID",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("\uc2dc\uc2a4\ud15c ID",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" \uad00\ub9ac \uc81c\uc5b4 \ubaa8\ub4dc (ACM)\uc5d0\uc11c \ud65c\uc131\ud654",
975 -4==l.ProvisioningMode&&(n=" \ud074\ub77c\uc774\uc5b8\ud2b8 \uc81c\uc5b4 \ubaa8\ub4dc (CCM)\uc5d0\uc11c \ud65c\uc131\ud654",b=9));d+=TableEntry("\uc778\ud154 &reg; ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,
976 -2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),e=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),e=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&
977 -2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(g+=", \ub9ac\ub514\ub809\uc158 \ud3ec\ud2b8");q&&(g+=", Serial-over-LAN");n&&(g+="IDE \ub9ac\ub514\ub809\uc158");e&&(g+=", KVM");""==g&&(g=" \uc5c6\uc74c");d+=TableEntry("\ud65c\uc131 \uae30\ub2a5",addLinkConditional(g.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&
978 -amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,g="\uae30\ubcf8 \ub514\uc2a4\ud50c\ub808\uc774",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(g=["\uae30\ubcf8 \ub514\uc2a4\ud50c\ub808\uc774","\ubcf4\uc870 \ub514\uc2a4\ud50c\ub808\uc774","\uc138\ubc88\uc9f8 \ub514\uc2a4\ud50c\ub808\uc774"][n.DefaultScreen]),g='<span title="'+format("\uae30\ubcf8 \uc6d0\uaca9 \ub514\uc2a4\ud50c\ub808\uc774\ub294 {0}\uc785\ub2c8\ub2e4.",g.toLowerCase())+
979 -'">'+g+"</span>",1==n.Is5900PortEnabled&&(g+="\ud3ec\ud2b8 5900 \uc0ac\uc6a9"),1==n.OptInPolicy&&(g+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"\ucd08 \uc635\ud2b8 \uc778":"\ub450 \ubc88\uc9f8 \uc635\ud2b8 \uc778")),g+=","+n.SessionTimeout+" \ubd84"+(0<n.SessionTimeout?"s":"")+" \uc138\uc158 \ud0c0\uc784 \uc544\uc6c3",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(g+=", \ube14\ub7ad\ud0b9 \ud5c8\uc6a9"),
980 -QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1",addLinkConditional(g,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!e);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(g="\uc54c \uc218\uc5c6\ub294 \uc0c1\ud0dc",p=amtsysstate.IPS_OptInService.response.OptInRequired,
981 -0==p&&(g="\ubd88\ud544\uc694"),1==p&&(g="KVM\uc5d0\ub9cc \ud544\uc694"),4294967295==p&&(g="\ud56d\uc0c1 \ud544\uc218"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(g=addLinkConditional(g,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("\uc0ac\uc6a9\uc790 \ub3d9\uc758",g));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(g={0:"\uc54c \uc218 \uc5c6\ub294",1:"\ub2e4\ub978",2:"\uac00\ub2a5",3:"\ube44\ud65c\uc131\ud654",
982 -4:"\uc885\ub8cc",5:"\ud574\ub2f9 \uc0ac\ud56d \uc5c6\uc74c",6:"\ud65c\uc131\ud654\ub418\uc5c8\uc9c0\ub9cc \uc624\ud504\ub77c\uc778",7:"\ud14c\uc2a4\ud2b8 \uc911",8:"\uc5f0\uae30 \ub428",9:"Quiesce",10:"\uc2dc\uc791",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(g[32768]="OCR & RPE Disabled",g[32769]="OCR Enabled, RPE Disabled"),n=g[amtsysstate.CIM_BootService.response.EnabledState]?g[amtsysstate.CIM_BootService.response.EnabledState]:
983 -"\uc54c \uc218 \uc5c6\ub294",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)if(g[C].SettingData&&1==g[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==g[C].SettingData.ReferenceParameters.ResourceURI)for(p=g[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==
984 -p&&(d+=TableEntry("\uc804\uc6d0 \uc815\ucc45",addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\ub0a0\uc9dc \uc2dc\uac04",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));g=AddRefreshButton("PullSystemStatus()")+" ";g+=AddButton("\uc804\uc6d0 \ub3d9\uc791 ...","showPowerActionDlg()")+" ";g+=AddButton("\uc0c1\ud0dc \uc800\uc7a5 ...",
985 -"saveEntireAmtState()")+" ";d+=TableEnd(g);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" \ub124\ud2b8\uc6cc\ud06c \uc124\uc815\uc744 \ubcc0\uacbd\ud558\uba74\uc774 \ud398\uc774\uc9c0\ub97c \uc0ac\uc6a9\ud558\uc9c0 \ubabb\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.");
986 -d=d+"<br><h2>\uc77c\ubc18 \uc124\uc815</h2>"+TableStart();g="";"<i>\uc5c6\uc74c</i>"!=c&&(1==v.SharedFQDN&&(g=", OS\uc640 \uacf5\uc720"),0==v.SharedFQDN&&(g="OS\uc640 \ub2e4\ub978"));d+=TableEntry("\uc774\ub984 \ubc0f \ub3c4\uba54\uc778",addLinkConditional(c+g,"showEditNameDlg(1)",xxAccountAdminName));c="\ube44\ud65c\uc131\ud654";1==v.DDNSUpdateEnabled?c="\uac01\uac01 \ud65c\uc131\ud654"+v.DDNSPeriodicUpdateInterval+" \ubd84, TTL\uc740"+v.DDNSTTL+" \uc758\uc0ac\ub85d":1==v.DDNSUpdateByDHCPServerEnabled&&
987 -(c="DHCP \uc11c\ubc84\ub85c \uc5c5\ub370\uc774\ud2b8");d+=TableEntry("\ub3d9\uc801 DNS",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"\ubb34\uc120 \uc778\ud130\ud398\uc774\uc2a4":"\uc720\uc120 \uc778\ud130\ud398\uc774\uc2a4")+
988 -"</h2>";d+=TableStart();d+=TableEntry("\uc5f0\uacb0 \uc0c1\ud0dc",1==c.LinkIsUp?"\uc5f0\uacb0\ub418\uc5c8\uc2b5\ub2c8\ub2e4":"\ub9c1\ud06c\uac00 \ub2e4\uc6b4\ub418\uc5c8\uc2b5\ub2c8\ub2e4");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);g=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&g.push("S0 / AC"),14==c.LinkPolicy[C]&&g.push("Sx / AC"),16==c.LinkPolicy[C]&&g.push("S0 / DC"),224==c.LinkPolicy[C]&&g.push("Sx / DC");0==g.length&&g.push("");d+=TableEntry("\ub9c1\ud06c \uc815\ucc45",addLinkConditional(0==
989 -g.length?"\uc0ac\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4":"\uac00\ub2a5: "+g.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("MAC \uc8fc\uc18c",c.MACAddress));amtwirelessif==a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("\uc0c1\ud0dc",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("\ub77c\ub514\uc624 \uc0c1\ud0dc",
990 -xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>\uc5c6\uc74c</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"\uac00\ub2a5":"\ube44\ud65c\uc131\ud654",
991 -"showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"\uac00\ub2a5":"\ube44\ud65c\uc131\ud654","showUefiWifiCoExDlg()",
992 -xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("\ud551\uc5d0 \uc751\ub2f5",addLinkConditional(["\ube44\ud65c\uc131\ud654","ICMP \uc751\ub2f5","RMCP \uc751\ub2f5","ICMP \ubc0f RMCP \uc751\ub2f5"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),g=1==c.DHCPEnabled?"DHCP \uc11c\ubc84\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc790\ub3d9":"\uace0\uc815 IP \uc8fc\uc18c",1==c.IpSyncEnabled&&(g+=", IP sync with OS"),
993 -d+=TableEntry("IPv4 \uc0c1\ud0dc",addLinkConditional(g,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("IPv4 \uc8fc\uc18c",isIpAddress(c.IPAddress,"\uc5c6\uc74c"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4 \uac8c\uc774\ud2b8\uc6e8\uc774 / \ub9c8\uc2a4\ud06c",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"\uc5c6\uc74c")));g=c.PrimaryDNS;isIpAddress(g)&&(c.SecondaryDNS&&(g+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4 \ub3c4\uba54\uc778 \uc774\ub984 \uc11c\ubc84",g));if(200==amtsysstate.IPS_IPv6PortSettings.status&&
994 -5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="\ube44\ud65c\uc131\ud654",w,g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)g[C].SettingData&&g[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==g[C].IsCurrent);1==w&&(p=(g=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"\uc0ac\uc6a9, \uc790\ub3d9 \ubc0f \uc218\ub3d9 \uc8fc\uc18c":"\uc0ac\uc6a9, \uc790\ub3d9 \uc8fc\uc18c");
995 -d+=TableEntry("IPv6 \uc0c1\ud0dc",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("IPv6 \uc8fc\uc18c",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6 \uc8fc\uc18c",
996 -"\uc5c6\uc74c");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6 \uae30\ubcf8 \ub77c\uc6b0\ud130",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(g=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(g+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6 \ub3c4\uba54\uc778 \uc774\ub984 \uc11c\ubc84",g))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&
997 -PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
975 +4==l.ProvisioningMode&&(n=" \ud074\ub77c\uc774\uc5b8\ud2b8 \uc81c\uc5b4 \ubaa8\ub4dc (CCM)\uc5d0\uc11c \ud65c\uc131\ud654",b=9));d+=TableEntry("\uc778\ud154 &reg; ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(28,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(39,
976 +2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,r=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&
977 +2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(e+=", \ub9ac\ub514\ub809\uc158 \ud3ec\ud2b8");r&&(e+=", Serial-over-LAN");n&&(e+="IDE \ub9ac\ub514\ub809\uc158");g&&(e+=", KVM");""==e&&(e=" \uc5c6\uc74c");d+=TableEntry("\ud65c\uc131 \uae30\ub2a5",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&
978 +amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="\uae30\ubcf8 \ub514\uc2a4\ud50c\ub808\uc774",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["\uae30\ubcf8 \ub514\uc2a4\ud50c\ub808\uc774","\ubcf4\uc870 \ub514\uc2a4\ud50c\ub808\uc774","\uc138\ubc88\uc9f8 \ub514\uc2a4\ud50c\ub808\uc774"][n.DefaultScreen]),e='<span title="'+format("\uae30\ubcf8 \uc6d0\uaca9 \ub514\uc2a4\ud50c\ub808\uc774\ub294 {0}\uc785\ub2c8\ub2e4.",e.toLowerCase())+
979 +'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+="\ud3ec\ud2b8 5900 \uc0ac\uc6a9"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"\ucd08 \uc635\ud2b8 \uc778":"\ub450 \ubc88\uc9f8 \uc635\ud2b8 \uc778")),e+=","+n.SessionTimeout+" \ubd84"+(0<n.SessionTimeout?"s":"")+" \uc138\uc158 \ud0c0\uc784 \uc544\uc6c3",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+=", \ube14\ub7ad\ud0b9 \ud5c8\uc6a9"),
980 +QV(46,n),Q(47).checked=!1):QV(46,!1),d+=TableEntry("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(26,!p||!r);QV(27,xxAccountAdminName);QV(37,!p||!g);QV(38,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="\uc54c \uc218\uc5c6\ub294 \uc0c1\ud0dc",p=amtsysstate.IPS_OptInService.response.OptInRequired,
981 +0==p&&(e="\ubd88\ud544\uc694"),1==p&&(e="KVM\uc5d0\ub9cc \ud544\uc694"),4294967295==p&&(e="\ud56d\uc0c1 \ud544\uc218"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("\uc0ac\uc6a9\uc790 \ub3d9\uc758",e));null!=amtsysstate.AMT_BootCapabilities.response.PlatformErase&&0<amtsysstate.AMT_BootCapabilities.response.PlatformErase&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&
982 +(e={0:"\uc54c \uc218 \uc5c6\ub294",1:"\ub2e4\ub978",2:"\uac00\ub2a5",3:"\ube44\ud65c\uc131\ud654",4:"\uc885\ub8cc",5:"\ud574\ub2f9 \uc0ac\ud56d \uc5c6\uc74c",6:"\ud65c\uc131\ud654\ub418\uc5c8\uc9c0\ub9cc \uc624\ud504\ub77c\uc778",7:"\ud14c\uc2a4\ud2b8 \uc911",8:"\uc5f0\uae30 \ub428",9:"Quiesce",10:"\uc2dc\uc791",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=
983 +e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:"\uc54c \uc218 \uc5c6\ub294",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)if(e[C].SettingData&&1==e[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[C].SettingData.ReferenceParameters.ResourceURI)for(p=
984 +e[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,r=0;r<AmtSystemPowerSchemes.length;r++)AmtSystemPowerSchemes[r].SchemeGUID==p&&(d+=TableEntry("\uc804\uc6d0 \uc815\ucc45",addLinkConditional(AmtSystemPowerSchemes[r].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\ub0a0\uc9dc \uc2dc\uac04",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+
985 +" ";e+=AddButton("\uc804\uc6d0 \ub3d9\uc791 ...","showPowerActionDlg()")+" ";e+=AddButton("\uc0c1\ud0dc \uc800\uc7a5 ...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+
986 +" \ub124\ud2b8\uc6cc\ud06c \uc124\uc815\uc744 \ubcc0\uacbd\ud558\uba74\uc774 \ud398\uc774\uc9c0\ub97c \uc0ac\uc6a9\ud558\uc9c0 \ubabb\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.");d=d+"<br><h2>\uc77c\ubc18 \uc124\uc815</h2>"+TableStart();e="";"<i>\uc5c6\uc74c</i>"!=c&&(1==v.SharedFQDN&&(e=", OS\uc640 \uacf5\uc720"),0==v.SharedFQDN&&(e="OS\uc640 \ub2e4\ub978"));d+=TableEntry("\uc774\ub984 \ubc0f \ub3c4\uba54\uc778",addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));c="\ube44\ud65c\uc131\ud654";
987 +1==v.DDNSUpdateEnabled?c="\uac01\uac01 \ud65c\uc131\ud654"+v.DDNSPeriodicUpdateInterval+" \ubd84, TTL\uc740"+v.DDNSTTL+" \uc758\uc0ac\ub85d":1==v.DDNSUpdateByDHCPServerEnabled&&(c="DHCP \uc11c\ubc84\ub85c \uc5c5\ub370\uc774\ud2b8");d+=TableEntry("\ub3d9\uc801 DNS",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=
988 +a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"\ubb34\uc120 \uc778\ud130\ud398\uc774\uc2a4":"\uc720\uc120 \uc778\ud130\ud398\uc774\uc2a4")+"</h2>";d+=TableStart();d+=TableEntry("\uc5f0\uacb0 \uc0c1\ud0dc",1==c.LinkIsUp?"\uc5f0\uacb0\ub418\uc5c8\uc2b5\ub2c8\ub2e4":"\ub9c1\ud06c\uac00 \ub2e4\uc6b4\ub418\uc5c8\uc2b5\ub2c8\ub2e4");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);e=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&e.push("S0 / AC"),
989 +14==c.LinkPolicy[C]&&e.push("Sx / AC"),16==c.LinkPolicy[C]&&e.push("S0 / DC"),224==c.LinkPolicy[C]&&e.push("Sx / DC");0==e.length&&e.push("");d+=TableEntry("\ub9c1\ud06c \uc815\ucc45",addLinkConditional(0==e.length?"\uc0ac\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4":"\uac00\ub2a5: "+e.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("MAC \uc8fc\uc18c",c.MACAddress));amtwirelessif==a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&
990 +(d+=TableEntry("\uc0c1\ud0dc",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("\ub77c\ub514\uc624 \uc0c1\ud0dc",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>\uc5c6\uc74c</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&
991 +(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"\uac00\ub2a5":"\ube44\ud65c\uc131\ud654","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",
992 +addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"\uac00\ub2a5":"\ube44\ud65c\uc131\ud654","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("\ud551\uc5d0 \uc751\ub2f5",addLinkConditional(["\ube44\ud65c\uc131\ud654","ICMP \uc751\ub2f5","RMCP \uc751\ub2f5","ICMP \ubc0f RMCP \uc751\ub2f5"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",
993 +xxAccountAdminName)),e="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-FAST/TLS".split(" "),p="\ube44\ud65c\uc131\ud654",amtsysstate.AMT_8021XProfile.responses.Body.Enabled&&(p="\uc0ac\uc6a9,"+e[amtsysstate.AMT_8021XProfile.responses.Body.AuthenticationProtocol]),d+=TableEntry("802.1x",addLinkConditional(p,"editNetAuthProfile()",xxAccountAdminName)),e=1==c.DHCPEnabled?"DHCP \uc11c\ubc84\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc790\ub3d9":"\uace0\uc815 IP \uc8fc\uc18c",
994 +1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("IPv4 \uc0c1\ud0dc",addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("IPv4 \uc8fc\uc18c",isIpAddress(c.IPAddress,"\uc5c6\uc74c"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4 \uac8c\uc774\ud2b8\uc6e8\uc774 / \ub9c8\uc2a4\ud06c",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"\uc5c6\uc74c")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4 \ub3c4\uba54\uc778 \uc774\ub984 \uc11c\ubc84",
995 +e));if(5<amtversion&&200==amtsysstate.IPS_IPv6PortSettings.status){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="\ube44\ud65c\uc131\ud654",w,e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)e[C].SettingData&&e[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[C].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"\uc0ac\uc6a9, \uc790\ub3d9 \ubc0f \uc218\ub3d9 \uc8fc\uc18c":
996 +"\uc0ac\uc6a9, \uc790\ub3d9 \uc8fc\uc18c");d+=TableEntry("IPv6 \uc0c1\ud0dc",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("IPv6 \uc8fc\uc18c",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+
997 +'")'))}else d+=TableEntry("IPv6 \uc8fc\uc18c","\uc5c6\uc74c");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6 \uae30\ubcf8 \ub77c\uc6b0\ud130",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6 \ub3c4\uba54\uc778 \uc774\ub984 \uc11c\ubc84",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,
998 +d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
999 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
1000 "")+">Available in S0/DC - Powered on & on battery</label><br>";a+="<label><input type=checkbox id=d11p4 value=224 "+(0<=c.LinkPolicy.indexOf(224)?"checked":"")+">Available in Sx/DC - Sleeping & on battery</label><br>";setDialogMode(11,"\ub9c1\ud06c \uc815\ucc45",3,showLinkPolicyDlgEx,a,b)}}
1001 function showLinkPolicyDlgEx(b,c){var a=Clone(amtsysstate.AMT_EthernetPortSettings.responses[c]);a.DHCPEnabled&&(delete a.IPAddress,delete a.SubnetMask,delete a.DefaultGateway,delete a.PrimaryDNS,delete a.SecondaryDNS);a.LinkPolicy=[];Q("d11p1").checked&&a.LinkPolicy.push(1);Q("d11p2").checked&&a.LinkPolicy.push(14);Q("d11p3").checked&&a.LinkPolicy.push(16);Q("d11p4").checked&&a.LinkPolicy.push(224);amtstack.Put("AMT_EthernetPortSettings",a,showLinkPolicyDlgExDone,0,1,a)}
@@ -1003,31 +1004,31 @@ function showAuthCsme(){if(!xxdialogMode){var b;b="<div style=margin-top:8px>Int
1004 for(var c in amtstack.amtauth.Certificates){var a=amtstack.amtauth.Certificates[c];b+="<tr><td style=width:32px;vertical-align:top><img src=images-commander/cert1.png height=32 width=32 />";b+="<td style=padding-bottom:6px><b>"+EscapeHtml(a.subject.getField("CN").value)+(!0===a.xTrusted?", <span style=color:#080>\uc2e0\ub8b0</span>":"")+"</b><br />";a.subject.getField("OU")&&(b+=EscapeHtml(a.subject.getField("OU").value)+"<br />");b+=amtstack.amtauth.CertificatesDer[c].length+" \ubc14\uc774\ud2b8<a style=cursor:pointer;color:blue onclick=downloadAuthCert("+
1005 c+")>\ub2e4\uc6b4\ub85c\ub4dc</a>";a.xCrl&&(b+="<br />CRL "+a.xCrl.length+" \ubc14\uc774\ud2b8<a style=cursor:pointer;color:blue onclick=downloadCertCrl("+c+")>\ub2e4\uc6b4\ub85c\ub4dc</a>")}setDialogMode(11,"Authentic CSME",1,null,b+"</table><div>")}}function downloadCertCrl(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.Certificates[b].xCrl),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".crl")}
1006 function downloadAuthCert(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.CertificatesDer[b]),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".cer")}var IntelAmtEntireState,IntelAmtEntireStateCalls;
1006 -function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c30.value="amtstate"+b+".json";setDialogMode(19,"\uc804\uccb4 \uc778\ud154 &reg; AMT \uc0c1\ud0dc \uc800\uc7a5",3,saveEntireAmtStateOk)}}
1007 -function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(60,"Fetching entire state, please wait...");setDialogMode(1,"\uc804\uccb4 \uc778\ud154 &reg; AMT \uc0c1\ud0dc \uc800\uc7a5",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
1008 -function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c30.value))}
1007 +function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c55.value="amtstate"+b+".json";setDialogMode(19,"\uc804\uccb4 \uc778\ud154 &reg; AMT \uc0c1\ud0dc \uc800\uc7a5",3,saveEntireAmtStateOk)}}
1008 +function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(61,"Fetching entire state, please wait...");setDialogMode(1,"\uc804\uccb4 \uc778\ud154 &reg; AMT \uc0c1\ud0dc \uc800\uc7a5",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
1009 +function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c55.value))}
1010 function showDesktopSettingsDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_KVMRedirectionSettingData.response,c;c="<div style=text-align:left><div style=height:26px;margin-top:4px><select id=subddisplay style=float:right;width:200px><option value=0>\uae30\ubcf8 \ub514\uc2a4\ud50c\ub808\uc774</option><option value=1>\ubcf4\uc870 \ub514\uc2a4\ud50c\ub808\uc774</option>";9<amtversion&&(c+="<option value=2>\uc138\ubc88\uc9f8 \ub514\uc2a4\ud50c\ub808\uc774</option>");c+='</select><div style=padding-top:4px>\uae30\ubcf8 \ud45c\uc2dc</div></div><div style=height:26px;margin-top:4px><input id=subsessiontimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>\uc138\uc158 \uc2dc\uac04 \ucd08\uacfc (\ubd84)</div></div>';
1011 1==b.OptInPolicy&&(c+='<div style=height:26px;margin-top:4px><input id=suboptintimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>\uc635\ud2b8 \uc778 \ud0c0\uc784 \uc544\uc6c3 (\ucd08)</div></div>');c+="<div style=height:26px;margin-top:4px><select id=subdlegacy style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>\ube44\ud65c\uc131\ud654, \uad8c\uc7a5</option><option value=1>\ud65c\uc131\ud654 \ub41c \ub808\uac70\uc2dc KVM \ubdf0\uc5b4</option></select><div style=padding-top:4px>\ud3ec\ud2b8 5900</div></div>";
1012 c+="<div style=height:26px;margin-top:4px id=subspassx><input id=subspass type=password autocomplete=off style=float:right;width:200px maxlength=8 onkeyup=showDesktopSettingsDlgUpdate()><div style=padding-top:4px>\ube44\ubc00\ubc88\ud638 5900 (8 \uc790)</div></div>";9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(c+='<div style=height:26px;margin-top:4px><select id=subsb style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>\ube44\ud65c\uc131\ud654</option><option value=1>\uac00\ub2a5</option></select><div style=padding-top:4px title="\uc774 \uae30\ub2a5\uc740 \uc885\uc885 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4">\uc2a4\ud06c\ub9b0 \ube14\ub7ad\ud0b9</div></div>');
1013 c+="</div>";setDialogMode(11,"\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud1b1 \uc124\uc815",3,showDesktopSettingsDlgOk,c);Q("subddisplay").value=b.DefaultScreen;Q("subsessiontimeout").value=b.SessionTimeout;1==b.OptInPolicy&&(Q("suboptintimeout").value=b.OptInPolicyTimeout);Q("subdlegacy").value=1==b.Is5900PortEnabled?1:0;9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(Q("subsb").value=amtsysstate.IPS_ScreenConfigurationService.response.EnabledState);showDesktopSettingsDlgUpdate()}}
1013 -function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c54",b)}
1014 +function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c106",b)}
1015 function showDesktopSettingsDlgOk(){var b=Clone(amtsysstate.IPS_KVMRedirectionSettingData.response);b.DefaultScreen=Q("subddisplay").value;b.SessionTimeout=Q("subsessiontimeout").value;b.Is5900PortEnabled=1==Q("subdlegacy").value;1==b.OptInPolicy&&(b.OptInPolicyTimeout=Q("suboptintimeout").value);1==b.Is5900PortEnabled&&(b.RFBPassword=Q("subspass").value);amtstack.Put("IPS_KVMRedirectionSettingData",b,showDesktopSettingsDlgOk2);b=Clone(amtsysstate.IPS_ScreenConfigurationService.response);b.EnabledState=
1016 parseInt(Q("subsb").value);amtstack.Put("IPS_ScreenConfigurationService",b,showDesktopSettingsDlgOk3)}function showDesktopSettingsDlgOk2(b,c,a,d){200==d?PullSystemStatus():messagebox("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud1b1 \uc124\uc815",format("\uc624\ub958 {0}, \uac12\uc744 \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.",d))}
1017 function showDesktopSettingsDlgOk3(b,c,a,d){200!=d?messagebox("\uc624\ub958",format("\ud654\uba74 \ube44\uc6b0\uae30\ub97c \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\uc774 \uc2dc\uc2a4\ud15c\uc5d0\uc11c \ube44\uc6b0\uae30\ub97c \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4 ({0}).",d)):amtstack.Get("IPS_ScreenConfigurationService",function(a,b,c,d){200==d&&(amtsysstate.IPS_ScreenConfigurationService.response=c.Body,updateSystemStatus())},0,1)}
1018 function PullEventLog(b){1==b&&xxdialogMode||(amtFirstPull|=16,amtstack.Enum("AMT_MessageLog",processMessageLog0),amtstack.GetMessageLog(processMessageLog1))}var processMessageLog0responses=null;
1019 function processMessageLog0(b,c,a,d){200==d&&(d&&QV("go6",!0),a&&(processMessageLog0responses=a),b="",c="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>",null!=processMessageLog0responses&&(b=1==processMessageLog0responses[0].IsFrozen?AddButton("\uace0\uc815 \ud574\uc81c \ub85c\uadf8","FreezeLog(0)"):AddButton("\ub3d9\uacb0 \ub85c\uadf8","FreezeLog(1)")),c+=TableEnd('<div style=float:right><input id=eventFilter placeholder="\ud544\ud130" style=margin:4px onkeyup=eventFilter()>&nbsp;</div><div>&nbsp;'+
1020 AddRefreshButton("PullEventLog(1)")+AddButton("\ub85c\uadf8 \uc9c0\uc6b0\uae30","ClearLog()")+AddButton("\uc800\uc7a5...","SaveEventLog()")+b),QH(17,c+"<br>"))}function SaveEventLog(){xxdialogMode||null==eventmessages||SaveJsonFile("IntelAmtEventlog","events","Intel AMT Event Log",eventmessages)}var eventmessages=null;
1020 -function processMessageLog1(b,c){eventmessages=c;var a,d=0,g;g="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>\ucd9c\ucc98</b><td class=r1><b>\uae30\uc220</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);g+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1021 -a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}g+=TableEnd(0==d?"&nbsp;":"");QH(18,g+"<br>");processMessageLog0()}
1022 -function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(60,"\uc774\ubca4\ud2b8 \ub85c\uadf8\ub97c \uc9c0\uc6b0\uc2dc\uaca0\uc2b5\ub2c8\uae4c?"),setDialogMode(1,"\uc774\ubca4\ud2b8 \ub85c\uadf8",3,ClearLogEx))}
1021 +function processMessageLog1(b,c){eventmessages=c;var a,d=0,e;e="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>\ucd9c\ucc98</b><td class=r1><b>\uae30\uc220</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);e+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1022 +a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}e+=TableEnd(0==d?"&nbsp;":"");QH(18,e+"<br>");processMessageLog0()}
1023 +function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(61,"\uc774\ubca4\ud2b8 \ub85c\uadf8\ub97c \uc9c0\uc6b0\uc2dc\uaca0\uc2b5\ub2c8\uae4c?"),setDialogMode(1,"\uc774\ubca4\ud2b8 \ub85c\uadf8",3,ClearLogEx))}
1024 function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("\uc774\ubca4\ud2b8 \ub85c\uadf8","\uc9c0\uc6b8 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc624\ub958 : "+d):PullEventLog()})}
1024 -function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("\uc2dc\uac01",c.Time.toLocaleString());a+=addHtmlValue("\ucd9c\ucc98",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("\uae30\uc220",c.Desc);a+=MoreStart();a+=addHtmlValue("\uc7a5\uce58 \uc8fc\uc18c",c.DeviceAddress);a+=addHtmlValue("\uc2e4\uc7ac",c.Entity);a+=addHtmlValue("\uc5d4\ud130\ud2f0 \uc778\uc2a4\ud134\uc2a4",c.EntityInstance);var d="",g;for(g in c.EventData)0<d.length&&
1025 -(d+=","),d+=c.EventData[g];a+=addHtmlValue("\ub370\uc774\ud130",d);a+=addHtmlValue("\uc624\ud504\uc14b",c.EventOffset);a+=addHtmlValue("\uc13c\uc11c \ud0c0\uc785",c.EventSensorType);a+=addHtmlValue("\uc2ec\uac01\uc131",c.EventSeverity);a+=addHtmlValue("\uc18c\uc2a4 \uc720\ud615",c.EventSourceType);a+=addHtmlValue("\uc720\ud615",c.EventType);a+=addHtmlValue("\uc13c\uc11c \ubc88\ud638",c.SensorNumber);a+=MoreEnd();a+="</div>";messagebox(format("\uc774\ubca4\ud2b8 # {0} \uc138\ubd80 \uc0ac\ud56d",b+
1025 +function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("\uc2dc\uac01",c.Time.toLocaleString());a+=addHtmlValue("\ucd9c\ucc98",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("\uae30\uc220",c.Desc);a+=MoreStart();a+=addHtmlValue("\uc7a5\uce58 \uc8fc\uc18c",c.DeviceAddress);a+=addHtmlValue("\uc2e4\uc7ac",c.Entity);a+=addHtmlValue("\uc5d4\ud130\ud2f0 \uc778\uc2a4\ud134\uc2a4",c.EntityInstance);var d="",e;for(e in c.EventData)0<d.length&&
1026 +(d+=","),d+=c.EventData[e];a+=addHtmlValue("\ub370\uc774\ud130",d);a+=addHtmlValue("\uc624\ud504\uc14b",c.EventOffset);a+=addHtmlValue("\uc13c\uc11c \ud0c0\uc785",c.EventSensorType);a+=addHtmlValue("\uc2ec\uac01\uc131",c.EventSeverity);a+=addHtmlValue("\uc18c\uc2a4 \uc720\ud615",c.EventSourceType);a+=addHtmlValue("\uc720\ud615",c.EventType);a+=addHtmlValue("\uc13c\uc11c \ubc88\ud638",c.SensorNumber);a+=MoreEnd();a+="</div>";messagebox(format("\uc774\ubca4\ud2b8 # {0} \uc138\ubd80 \uc0ac\ud56d",b+
1027 1),a)}}function eventFilter(){var b=Q("eventFilter").value.toLowerCase(),c;for(c in eventmessages)QV("xamtevent"+c,""==b||0<=eventmessages[c].Desc.toLowerCase().indexOf(b)||0<=eventmessages[c].EntityStr.toLowerCase().indexOf(b))}var subscriptionsFilters=null,subscriptionsListeners=null;
1028 function PullEventSubscriptions(){null==subscriptionsFilters&&amtstack.Enum("CIM_FilterCollection",processEventSubscriptions0);amtstack.BatchEnum(null,["CIM_ListenerDestination","CIM_FilterCollectionSubscription"],processEventSubscriptions1)}function processEventSubscriptions0(b,c,a,d){408!=d&&400!=d&&(d&&errcheck(d,b)||(subscriptionsFilters=a))}
1028 -function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\uc774\ubca4\ud2b8 \uac00\uc785\uc790\ub97c \uad00\ub9ac\ud569\ub2c8\ub2e4.<br><br>";for(var g in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[g].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),
1029 -d=subscriptionsListeners.CIM_ListenerDestination.responses[g],b+='<div class=itemBar onclick="showSubscriptionDetails('+g+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>\uad6c\ub3c5\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.</i></div><br>");g="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&
1030 -(g+=AddButton("\uc0c8\ub85c\uc6b4 \uad6c\ub3c5","newSubscriptionButton()"));b+="<br><td class=r1>"+TableEnd(g+"</div>");QH(56,b)}}var subscriptionDeliveryModes={2:"\ud478\uc2dc",3:"ACK\ub85c \ud478\uc2dc",4:"\ud589\uc0ac",5:"\uc190\uc7a1\uc774"};
1029 +function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\uc774\ubca4\ud2b8 \uac00\uc785\uc790\ub97c \uad00\ub9ac\ud569\ub2c8\ub2e4.<br><br>";for(var e in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[e].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),
1030 +d=subscriptionsListeners.CIM_ListenerDestination.responses[e],b+='<div class=itemBar onclick="showSubscriptionDetails('+e+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>\uad6c\ub3c5\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.</i></div><br>");e="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&
1031 +(e+=AddButton("\uc0c8\ub85c\uc6b4 \uad6c\ub3c5","newSubscriptionButton()"));b+="<br><td class=r1>"+TableEnd(e+"</div>");QH(57,b)}}var subscriptionDeliveryModes={2:"\ud478\uc2dc",3:"ACK\ub85c \ud478\uc2dc",4:"\ud589\uc0ac",5:"\uc190\uc7a1\uc774"};
1032 function showSubscriptionDetails(b){if(!xxdialogMode){var c=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[b].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),a=subscriptionsListeners.CIM_ListenerDestination.responses[b],d;d="<div style=text-align:left>"+addHtmlValue("\ubaa9\uc801\uc9c0",a.Destination);d+=addHtmlValue("\ud544\ud130",c);d+=addHtmlValue("\uc804\ub2ec \ubaa8\ub4dc",subscriptionDeliveryModes[a.DeliveryMode]);setDialogMode(11,"\uc2e0\uccad"+
1033 (b+1),xxAccountAdminName?5:1,deleteSubscriptionButton,d+"</div>",b)}}
1034 function deleteSubscriptionButton(b,c){2==b&&amtstack.UnSubscribe("CIM_FilterCollectionSubscription",PullEventSubscriptions,null,1,{Filter:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_FilterCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+subscriptionsListeners.CIM_FilterCollectionSubscription.responses[c].Filter.ReferenceParameters.SelectorSet.Selector.Value+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference>",
@@ -1035,28 +1036,28 @@ Handler:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/a
1036 function newSubscriptionButton(){if(!xxdialogMode&&null!=subscriptionsFilters){var b;b="<div style=height:26px;margin-top:4px><select id=subtype style=float:right;width:260px><option value=Push>\ud478\uc2dc</option><option value=PushWithAck>ACK\ub85c \ud478\uc2dc</option></select><div style=padding-top:4px>\uc720\ud615</div></div><div style=height:26px;margin-top:4px><select id=subfilter style=float:right;width:260px>";for(var c in subscriptionsFilters)b+='<option value="'+subscriptionsFilters[c].InstanceID+
1037 '">'+subscriptionsFilters[c].CollectionName.substring(13)+"</option>";b+="</select><div style=padding-top:4px>\ud544\ud130</div></div>";b+='<div style=height:26px;margin-top:4px><input id=suburl style=float:right;width:260px maxlength=253 onkeyup=newSubscriptionUpdate() value="http://"><div style=padding-top:4px>URL</div></div>';b+="<div style=height:26px;margin-top:4px><select id=subauth style=float:right;width:260px onchange=newSubscriptionUpdate()><option value=0>\uc5c6\uc74c</option><option value=1>\uc694\ub78c</option></select><div style=padding-top:4px>\uc785\uc99d</div></div>";
1038 b+="<div style=height:26px;margin-top:4px id=subxuser><input id=subuser style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>\uc0ac\uc6a9\uc790 \uc774\ub984</div></div>";b+="<div style=height:26px;margin-top:4px id=subxpass><input id=subpass style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>\uc554\ud638</div></div>";b+="<div style=height:26px;margin-top:4px><input id=subargs style=float:right;width:260px maxlength=128><div style=padding-top:4px>\uc778\uc218</div></div>";
1038 -setDialogMode(11,"\uc774\ubca4\ud2b8 \uad6c\ub3c5 \ucd94\uac00",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c54",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1039 +setDialogMode(11,"\uc774\ubca4\ud2b8 \uad6c\ub3c5 \ucd94\uac00",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c106",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1040 function newSubscriptionButtonOk(){var b=0==Q("subuser").value.length?void 0:Q("subuser").value,c=0==Q("subpass").value.length?void 0:Q("subpass").value;amtstack.Subscribe("CIM_FilterCollection",Q("subtype").value,Q("suburl").value,newSubscriptionButtonOk2,null,1,{InstanceID:Q("subfilter").value},0<Q("subargs").value.length?Q("subargs").value:null,b,c)}function newSubscriptionButtonOk2(b,c,a,d){200==d&&PullEventSubscriptions()}
1041 function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AMT_AuditLog",processAuditLog0))}var auditLog=null,auditLogEnabledStates="\uc54c \uc218 \uc5c6\ub294;\ub2e4\ub978;\uac00\ub2a5;\ube44\ud65c\uc131\ud654;\uc885\ub8cc;\ud574\ub2f9 \uc0ac\ud56d \uc5c6\uc74c;\ud65c\uc131\ud654\ub418\uc5c8\uc9c0\ub9cc \uc624\ud504\ub77c\uc778;\ud14c\uc2a4\ud2b8 \uc911;\uc5f0\uae30 \ub428;Quiesce;\uc2dc\uc791".split(";");
1041 -function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"\ube44\ud65c\uc131\ud654":"\uac00\ub2a5",c&2&&(b+=", \uc7a0\uae40"),c&4&&(b+=", \uac70\uc758 \uc804\uccb4"),c&8&&(b+=", \uc804\uccb4"),c&16&&(b+=", NoKey"),c="<h1>\uac10\uc0ac \ub85c\uadf8 \uc124\uc815</h1>"+TableStart(),c+=TableEntry("\uc0c1\ud0dc",b),c+=TableEntry("\uc800\uc7a5",a[0].CurrentNumberOfRecords+" \uae30\ub85d,"+a[0].PercentageFree+"% \ubb34\ub8cc"),c+=TableEntry("\uc815\ucc45 \ub36e\uc5b4 \uc4f0\uae30",
1042 -2==a[0].OverwritePolicy?"\uac00\ub4dd \ucc28\uba74 \ub7a9":"\ub36e\uc5b4 \uc4f0\uc9c0 \uc54a\uc74c"),c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1042 +function processAuditLog0(b,c,a,d){200==d&&a&&0<a.length&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"\ube44\ud65c\uc131\ud654":"\uac00\ub2a5",c&2&&(b+=", \uc7a0\uae40"),c&4&&(b+=", \uac70\uc758 \uc804\uccb4"),c&8&&(b+=", \uc804\uccb4"),c&16&&(b+=", NoKey"),c="<h1>\uac10\uc0ac \ub85c\uadf8 \uc124\uc815</h1>"+TableStart(),c+=TableEntry("\uc0c1\ud0dc",b),c+=TableEntry("\uc800\uc7a5",a[0].CurrentNumberOfRecords+" \uae30\ub85d,"+a[0].PercentageFree+"% \ubb34\ub8cc"),c+=TableEntry("\uc815\ucc45 \ub36e\uc5b4 \uc4f0\uae30",
1043 +2==a[0].OverwritePolicy?"\uac00\ub4dd \ucc28\uba74 \ub7a9":"\ub36e\uc5b4 \uc4f0\uc9c0 \uc54a\uc74c"),c+=TableEnd(),QH(50,c),amtstack.GetAuditLog(processAuditLog1))}
1044 function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="\ud544\ud130" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("\uc800\uc7a5...","SaveAuditLog()")+AddButton("\ub85c\uadf8 \uc9c0\uc6b0\uae30","ClearAuditLog()"))+"<br>");if(0==c.length)d="\uac10\uc0ac \ub85c\uadf8 \uc774\ubca4\ud2b8\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.";
1044 -else{var g=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>\uc2dc\uac01</b><td class=r1 style=width:260px><b>\ucc3d\uc2dc\uc790</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;g++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=
1045 -l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==g?"&nbsp;":"")+"<br>"}QH(50,d)}
1045 +else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>\uc2dc\uac01</b><td class=r1 style=width:260px><b>\ucc3d\uc2dc\uc790</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=
1046 +l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(51,d)}
1047 function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","\uc778\ud154 AMT \uac10\uc0ac \ub85c\uadf8",auditLog)}
1047 -function ClearAuditLog(b){QH(60,"\uac10\uc0ac \ub85c\uadf8\ub97c \uc9c0\uc6b0\uc2dc\uaca0\uc2b5\ub2c8\uae4c?");setDialogMode(1,"\uac10\uc0ac \ub85c\uadf8",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}
1048 +function ClearAuditLog(b){QH(61,"\uac10\uc0ac \ub85c\uadf8\ub97c \uc9c0\uc6b0\uc2dc\uaca0\uc2b5\ub2c8\uae4c?");setDialogMode(1,"\uac10\uc0ac \ub85c\uadf8",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}
1049 function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("\uac10\uc0ac \ub85c\uadf8","\uc624\ub958: "+d)}
1049 -function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("\uc2dc\uac01",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("\ucc3d\uc2dc\uc790",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("\uc8fc\uc18c",a.NetAddress));d+=addHtmlValue("\uc2e0\uccad",a.AuditApp);d+=addHtmlValue("\ud589\uc0ac",a.Event);if(null!=a.ExStr)d+=addHtmlValue("\ud655\uc7a5 \ub41c \ub370\uc774\ud130",a.ExStr);else if(0<a.Ex.length){var g="";for(c in a.Ex)0<
1050 -g.length&&(g+=","),g+=a.Ex.charCodeAt(c);""!=g&&(d+=addHtmlValue("\ub370\uc774\ud130 \uac12",g));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("\ub370\uc774\ud130 \ubb38\uc790\uc5f4",a.Ex.substring(2)))}messagebox("\uac10\uc0ac \uc774\ubca4\ud2b8 #"+(b+1)+" \uc138\ubd80",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1050 +function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("\uc2dc\uac01",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("\ucc3d\uc2dc\uc790",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("\uc8fc\uc18c",a.NetAddress));d+=addHtmlValue("\uc2e0\uccad",a.AuditApp);d+=addHtmlValue("\ud589\uc0ac",a.Event);if(null!=a.ExStr)d+=addHtmlValue("\ud655\uc7a5 \ub41c \ub370\uc774\ud130",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<
1051 +e.length&&(e+=","),e+=a.Ex.charCodeAt(c);""!=e&&(d+=addHtmlValue("\ub370\uc774\ud130 \uac12",e));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("\ub370\uc774\ud130 \ubb38\uc790\uc5f4",a.Ex.substring(2)))}messagebox("\uac10\uc0ac \uc774\ubca4\ud2b8 #"+(b+1)+" \uc138\ubd80",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1052 function PullCertificates(){amtstack.BatchEnum(null,["AMT_PublicKeyCertificate","AMT_PublicPrivateKeyPair","AMT_TLSSettingData","AMT_TLSCredentialContext"],processCerts1)}
1052 -function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var g in xxCertificates)xxCertificates[g].InstanceID==b&&(xxTlsCurrentCert=
1053 -g)}for(g in xxCertificates)xxCertificates[g].TrustedRootCertficate=1==xxCertificates[g].TrustedRootCertficate,xxCertificates[g].X509Certificate=window.atob(xxCertificates[g].X509Certificate),xxCertificates[g].XIssuer=parseCertName(xxCertificates[g].Issuer),xxCertificates[g].XSubject=parseCertName(xxCertificates[g].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1053 +function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var e in xxCertificates)xxCertificates[e].InstanceID==b&&(xxTlsCurrentCert=
1054 +e)}for(e in xxCertificates)xxCertificates[e].TrustedRootCertficate=1==xxCertificates[e].TrustedRootCertficate,xxCertificates[e].X509Certificate=window.atob(xxCertificates[e].X509Certificate),xxCertificates[e].XIssuer=parseCertName(xxCertificates[e].Issuer),xxCertificates[e].XSubject=parseCertName(xxCertificates[e].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1055 function parseCertName(b){var c={},a=b.split(","),d;for(d in a)b=a[d].indexOf("="),c[a[d].substring(0,b)]=a[d].substring(b+1);return c}
1056 function getTlsSecurityState(b){if(0==xxTlsSettings[b].Enabled)return"\ube44\ud65c\uc131\ud654";var c=(1==xxTlsSettings[b].MutualAuthentication?"\uc0c1\ud638 \uc778\uc99d TLS":"\uc11c\ubc84 \uc778\uc99d TLS")+(1==xxTlsSettings[b].AcceptNonSecureConnections?" \uadf8\ub9ac\uace0 \ube44 TLS":"");1==xxTlsSettings[b].MutualAuthentication&&xxTlsSettings[b].TrustedCN&&(b=MakeToArray(xxTlsSettings[b].TrustedCN),0<b.length&&(c+=", "+(1<b.length?"Trusted names":"Trusted name")+": "+b.join(", ")+"."));return c}
1057 function updateCertificates(){if(null!=xxCertificates){var b="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,c=1-b,a=TableStart(),a=a+TableEntry("\uc6d0\uaca9 TLS \ubcf4\uc548",addLinkConditional(getTlsSecurityState(c),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEntry("\ub85c\uceec TLS \ubcf4\uc548",addLinkConditional(getTlsSecurityState(b),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEnd(),a=a+("<br>"+TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\uc774 \ucef4\ud4e8\ud130\uc758 \uc778\ud154 &reg; AMT \uc778\uc99d\uc11c\ub97c \uad00\ub9ac\ud558\uc2ed\uc2dc\uc624.<br><br>");
1058 if(0==xxCertificates.length&&0==xxCertPrivateKeys.length)a+="<div style=padding-left:15px><br><i>\uc778\uc99d\uc11c\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.</i></div><br>";else{for(var d in xxCertificates)b="",xxCertificates[d].TrustedRootCertficate&&(b="\uc2e0\ub8b0\ud560 \uc218\uc788\ub294 \ub8e8\ud2b8"),xxCertificates[d].XPrivateKey&&(b="\uac1c\uc778 \ud0a4"),d==xxTlsCurrentCert&&(b+=", TLS \uc778\uc99d\uc11c"),a+="<div class=itemBar onclick=showCertDetails("+d+")><div style=padding-top:3px><b>"+
1059 EscapeHtml(xxCertificates[d].XSubject.CN)+"</b><i>"+b+"</i></div></div>";for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>\ud560\ub2f9\ub418\uc9c0 \uc54a\uc740 \uac1c\uc778 \ud0a4 \uc30d #"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("\uc778\uc99d\uc11c \ucd94\uac00 ...","addCertButton()")+AddButton("\uc778\uc99d\uc11c \ubc1c\uae09 ...","issueCertButton()"));
1059 -a+="<br><td class=r1>"+TableEnd(d);QH(51,a)}}
1060 +a+="<br><td class=r1>"+TableEnd(d);QH(52,a)}}
1061 function showKeyPairDetails(b){setDialogMode(11,"\ud0a4 \ud398\uc5b4 #"+b,5,function(c){2==c&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertPrivateKeys[b].InstanceID},PullCertificates,0,1)},"\uc774\uac83\uc740 \uc778\uc99d\uc11c\uc5d0 \uc18d\ud558\uc9c0 \uc54a\uc740 \uacf5\uac1c / \uac1c\uc778 \uc778\uc99d\uc11c \ud0a4 \uc30d\uc785\ub2c8\ub2e4. \uc774 \ud56d\ubaa9\uc740 \uc77c\uc2dc\uc801\uc774\uc5b4\uc57c\ud569\ub2c8\ub2e4.")}
1062 var xxCertSubjectNames={CN:"\uacf5\ud1b5 \uc774\ub984",O:"\uc870\uc9c1",OU:"\uc870\uc9c1 \ub2e8\uc704",S:"\uc2dc /\ub3c4",ST:"\uc2dc /\ub3c4",L:"\uc18c\uc7ac\uc9c0",C:"\uad6d\uac00",SN:"\uc131",GN:"\uc774\ub984"};
1063 function showCertDetails(b){if(!xxdialogMode){var c=xxCertificates[b],a;a="<br>"+addHtmlValue("\uc99d\uba85\uc11c",c.X509Certificate.length+" \ubc14\uc774\ud2b8<a style=cursor:pointer;color:blue onclick=downloadCert("+b+")>\ub2e4\uc6b4\ub85c\ub4dc</a>");a+=addHtmlValue("\uc2e0\ub8b0\ud560 \uc218\uc788\ub294 \ub8e8\ud2b8",c.TrustedRootCertficate?"\uc608":"\uc544\ub2c8");0==c.TrustedRootCertficate&&c.XPrivateKey&&(a+=addHtmlValue("\uac1c\uc778 \ud0a4","\uc120\ubb3c"));a+='<br><div style="border-bottom:1px solid gray"><i>\uc778\uc99d\uc11c \uc8fc\uccb4</i></div><br>';
@@ -1064,53 +1065,53 @@ for(var d in c.XSubject)c.XSubject[d]&&(a+=addHtmlValue(xxCertSubjectNames[d]?xx
1065 {InstanceID:xxCertificates[b].XPrivateKey.InstanceID},function(){},0,1),amtstack.Delete("AMT_PublicKeyCertificate",xxCertificates[b],certificateRemoved,0,1))},a)}}function downloadCert(b){saveAs(data2blob(xxCertificates[b].X509Certificate),xxCertificates[b].XSubject.CN+".cer")}function cert_FileSelectHandler(b){haltEvent(b);1==b.dataTransfer.files.length&&(b.dataTransfer.files[0].name.toLowerCase().endsWith(".p12")?issueCertButton(b.dataTransfer.files):addCertButton(b.dataTransfer.files))}
1066 var xxDragDropCertFiles=null;
1067 function addCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen onchange=addCertButtonUpdate() type=file style=float:right;width:260px accept=".cer,.pem">',xxDragDropCertFiles&&(b='<input style=float:right;width:260px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b="<div style=height:10px></div>"+("<div style=height:26px;margin-top:4px>"+b+"<div style=padding-top:4px>\uc778\uc99d\uc11c \ud30c\uc77c</div></div>")+"<div style=height:26px;margin-top:4px><select id=certtype style=float:right;width:260px><option value=1>\uc2e0\ub8b0\ud560 \uc218\uc788\ub294 \ub8e8\ud2b8 \uc778\uc99d\uc11c</option><option value=0>\uccb4\uc778 \uc778\uc99d\uc11c</option></select><div style=padding-top:4px>\uc99d\uba85\uc11c \uc885\ub958</div></div>",
1067 -setDialogMode(11,"\uc778\uc99d\uc11c \ucd94\uac00",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c54",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1068 +setDialogMode(11,"\uc778\uc99d\uc11c \ucd94\uac00",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c106",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1069 function addCertButtonOk2(b){b=b.target.result;var c=b.indexOf("-----BEGIN CERTIFICATE-----");0<=c?(b=b.substring(c+27),c=b.indexOf("-----END CERTIFICATE-----"),0<=c&&(b=b.substring(0,c)),b=b.replace(/\r\n/g,"")):b=btoa(b);1==getSelectElement("certtype").value?amtstack.AMT_PublicKeyManagementService_AddTrustedRootCertificate(b,certificateAdded):amtstack.AMT_PublicKeyManagementService_AddCertificate(b,certificateAdded)}
1070 function issueCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen type=file style=float:right;width:230px onchange=issueCertButtonUpdate() accept=".p12">',xxDragDropCertFiles&&(b='<input style=float:right;width:230px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b=""+("<div styleheight:26px;margin-top:14px>"+b+"<div style=padding-top:4px>Certificate file</div></div>")+"<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certopenpass type=password autocomplete=off style=float:right;width:230px><div style=padding-top:4px>\uc778\uc99d\uc11c \ube44\ubc00\ubc88\ud638</div></div>",
1071 b+='<br><div style="border-bottom:1px solid gray"><i>\uc778\ud154 &reg; AMT \uc778\uc99d\uc11c</i></div>',b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certcn style=float:right;width:230px><div style=padding-top:4px>\uacf5\ud1b5 \uc774\ub984</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certo style=float:right;width:230px><div style=padding-top:4px>\uc870\uc9c1</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certst style=float:right;width:230px><div style=padding-top:4px>\uc2dc /\ub3c4</div></div>",
1072 b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certc style=float:right;width:230px><div style=padding-top:4px>\uad6d\uac00</div></div>",b+='<div>\uc778\uc99d\uc11c \uc0ac\uc6a9\ubc95</div><ul 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">',b+="<li><label><input type=checkbox id=d11_cu4 checked>TLS \uc11c\ubc84 (HTTPS)</label></li>",b+="<li><label><input type=checkbox id=d11_cu5>TLS \ud074\ub77c\uc774\uc5b8\ud2b8 (HTTPS)</label></li>",
1073 b+="<li><label><input type=checkbox id=d11_cu6>\uc774\uba54\uc77c \ubcf4\ud638</label></li>",b+="<li><label><input type=checkbox id=d11_cu7>\ucf54\ub4dc \uc11c\uba85</label></li>",b+="<li><label><input type=checkbox id=d11_cu8>\ud0c0\uc784 \uc2a4\ud0ec\ud504</label></li>",b+="</ul>",setDialogMode(11,"\ubc1c\uae09 \uc99d\uba85\uc11c",3,issueCertButtonOk,b),issueCertButtonUpdate())}
1073 -function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c54",c)}
1074 +function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c106",c)}
1075 function issueCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length?(b=new FileReader,b.onload=issueCertButtonOk2,b.readAsBinaryString(c[0])):issueCertButtonOk3(null)}function issueCertButtonOk2(b){0==amtcert_loadP12File(b.target.result,Q("certopenpass").value,issueCertButtonOk3)&&messagebox("\ubc1c\uae09 \uc99d\uba85\uc11c","\uc778\uc99d\uc11c\ub97c \ud574\ub3c5 / \ub514\ucf54\ub529 \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.")}
1076 function issueCertButtonOk3(b,c,a){xxCaPrivateKey=b;xxCaSubjectAttributes=c;amtstack.AMT_PublicKeyManagementService_GenerateKeyPair(0,2048,GenerateKeyPairResponse)}
1077 function GenerateKeyPairResponse(b,c,a,d){200!=d?messagebox("\ubc1c\uae09 \uc99d\uba85\uc11c","\ud0a4 \ud398\uc5b4\ub97c \uc0dd\uc131\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc0c1\ud0dc: "+d):0!=a.Body.ReturnValue?messagebox("\ubc1c\uae09 \uc99d\uba85\uc11c","\ud0a4 \ud398\uc5b4\ub97c \uc0dd\uc131\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4."+a.Body.ReturnValueStr):amtstack.Enum("AMT_PublicPrivateKeyPair",GenerateKeyPairResponse2,a.Body.KeyPair.ReferenceParameters.SelectorSet.Selector.Value)}
1077 -function GenerateKeyPairResponse2(b,c,a,d,g){if(200!=d)messagebox("\ubc1c\uae09 \uc99d\uba85\uc11c","\ud0a4 \ud398\uc5b4\ub97c \uc0dd\uc131\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc0c1\ud0dc: "+d);else{b=null;for(var v in a)a[v].InstanceID==g&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};g={CN:"\uc2e0\ub8b0\ud560 \uc218\uc5c6\ub294 \ub8e8\ud2b8 \uc778\uc99d\uc11c"};if(null!=xxCaPrivateKey&&
1078 -xxCaSubjectAttributes)for(v in g={},xxCaSubjectAttributes)g[xxCaSubjectAttributes[v].shortName]=xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,g,v);null==v?messagebox("\ubc1c\uae09 \uc99d\uba85\uc11c","\uc778\uc99d\uc11c\uc5d0 \uc11c\uba85 \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."):
1078 +function GenerateKeyPairResponse2(b,c,a,d,e){if(200!=d)messagebox("\ubc1c\uae09 \uc99d\uba85\uc11c","\ud0a4 \ud398\uc5b4\ub97c \uc0dd\uc131\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc0c1\ud0dc: "+d);else{b=null;for(var v in a)a[v].InstanceID==e&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};e={CN:"\uc2e0\ub8b0\ud560 \uc218\uc5c6\ub294 \ub8e8\ud2b8 \uc778\uc99d\uc11c"};if(null!=xxCaPrivateKey&&
1079 +xxCaSubjectAttributes)for(v in e={},xxCaSubjectAttributes)e[xxCaSubjectAttributes[v].shortName]=xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,e,v);null==v?messagebox("\ubc1c\uae09 \uc99d\uba85\uc11c","\uc778\uc99d\uc11c\uc5d0 \uc11c\uba85 \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."):
1080 (v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,v.length-25),GenerateKeyPairResponse4))}}function GenerateKeyPairResponse4(b,c,a,d){200!=d?messagebox("\ubc1c\uae09 \uc99d\uba85\uc11c","\ud0a4 \ud398\uc5b4\ub97c \uc0dd\uc131\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc0c1\ud0dc: "+d):PullCertificates()}
1081 function certificateAdded(b,c,a,d){200!=d||0!=a.Body.ReturnValue?messagebox("\uc778\uc99d\uc11c \ucd94\uac00","\uc778\uc99d\uc11c\ub97c \ucd94\uac00 \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc624\ub958"+(200!=d?d:a.Body.ReturnValueStr)):PullCertificates()}function certificateRemoved(b,c,a,d){200!=d?messagebox("\uc778\uc99d\uc11c \uc81c\uac70","\uc778\uc99d\uc11c\ub97c \uc81c\uac70 \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc624\ub958"+d):PullCertificates()}
1082 function getInputElement(b){var c=document.getElementsByTagName("input");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}function getSelectElement(b){var c=document.getElementsByTagName("select");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}
1082 -function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>\uc778\uc99d\uc11c \uc5c6\uc74c, TLS \ube44\ud65c\uc131\ud654</option>";for(var c in xxCertificates)0!=xxCertificates[c].TrustedRootCertficate||!xxCertificates[c].XPrivateKey||null!=xxTlsCurrentCert&&xxTlsCurrentCert!=c||(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>\uc99d\uba85\uc11c</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1083 +function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>\uc778\uc99d\uc11c \uc5c6\uc74c, TLS \ube44\ud65c\uc131\ud654</option>";for(var c in xxCertificates)0==xxCertificates[c].TrustedRootCertficate&&xxCertificates[c].XPrivateKey&&(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>\uc99d\uba85\uc11c</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1084 b+="<option value=2>Mutual-auth TLS only</option><option value=3>Mutual-auth, non-TLS allowed</option>";b+='</select><div style=padding-top:4px>Security</div></div><div style=height:26px id=d11rcn title="\uc6d0\uaca9\uc73c\ub85c \uc5f0\uacb0\ud560 \uc218\uc788\ub294 \uc27c\ud45c\ub85c \uad6c\ubd84 \ub41c \uc778\uc99d\uc11c \uacf5\ud1b5 \uc774\ub984 \ubaa9\ub85d\uc785\ub2c8\ub2e4."><input id=d11_rcn style=float:right;width:260px onkeyup=showSetTlsSecurityDlgUpdate() placeholder="\uc774\ub984 1, \uc774\ub984 2"><div style=padding-top:4px>\uc6d0\uaca9 CN</div></div>';
1085 setDialogMode(11,"TLS \uc124\uc815",3,showSetTlsSecurityDlgOk,b);if(0==xxTLSCredentialContext.length||0==xxTlsSettings[0].Enabled||0==xxTlsSettings[1].Enabled)getSelectElement("tlscert").value=-1;else for(c in b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value,xxCertificates)xxCertificates[c].InstanceID==b&&(getSelectElement("tlscert").value=c);c=1-("Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1);getSelectElement("tlsremote").value=(1==xxTlsSettings[c].MutualAuthentication?
1085 -2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c54",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1086 +2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c106",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1087 function showSetTlsSecurityDlgOk(){var b=getSelectElement("tlscert").value,c=getSelectElement("tlsremote").value,a=Clone(xxTlsSettings);setTlsSecurityPendingCalls=0;setTlsSecurityDeleteCredentialContext=null;if(-1!=b){if(0<xxTLSCredentialContext.length){var d=Clone(xxTLSCredentialContext[0]);d.ElementInContext.ReferenceParameters.SelectorSet.Selector.Value=xxCertificates[b].InstanceID;amtstack.Put("AMT_TLSCredentialContext",d,setTlsSecurityResponse,0,1)}else amtstack.Create("AMT_TLSCredentialContext",
1088 {ElementInContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[b].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",ElementProvidingContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_TLSProtocolEndpointCollection")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters>'},
1088 -setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,g=1-d;a[g].Enabled=-1!=b;a[g].MutualAuthentication=2<=c;a[g].AcceptNonSecureConnections=1==c%2;a[g].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1089 +setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,e=1-d;a[e].Enabled=-1!=b;a[e].MutualAuthentication=2<=c;a[e].AcceptNonSecureConnections=1==c%2;a[e].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1090 b,c,d){200!=d?messagebox("","\uc2dc\uac04\uc744 \uc124\uc815\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc0c1\ud0dc ="+d):0!=c.Body.ReturnValue?messagebox("","\uc2dc\uac04\uc744 \uc124\uc815\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc624\ub958 : "+c.Body.ReturnValueStr):(a=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(c.Body.Ta0,a,a,function(){setTlsSecurityResponse()}))}));setTlsSecurityPendingCalls+=2;amtstack.Put("AMT_TLSSettingData",
1091 a[0],setTlsSecurityResponse,0,1,a[0]);amtstack.Put("AMT_TLSSettingData",a[1],setTlsSecurityResponse,0,1,a[1]);statusbox("TLS \uc124\uc815","\uc0c8\ub85c\uc6b4 \ubcf4\uc548 \uc124\uc815 \uc801\uc6a9 \uc911 ...")}function splitDomains(b){b=b.split(",");if(0!=b.length){for(var c in b)if(b[c]=b[c].trim(),0<=b[c].indexOf(" ")||0==b[c].length)return;if(!(4<b.length))return b}}
1092 function setTlsSecurityResponse(b,c,a,d){if(b){if(200!=d){messagebox("","TLS \ubcf4\uc548\uc744 \uc124\uc815\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc0c1\ud0dc ="+d);return}if(a.Body.ReturnValueStr&&!methodcheck(a))return}0==--setTlsSecurityPendingCalls&&amtstack.AMT_SetupAndConfigurationService_CommitChanges(null,setTlsSecurityResponse2)}
1093 function setTlsSecurityResponse2(b,c,a,d){200!=d?messagebox("","TLS \ubcf4\uc548\uc744 \uc124\uc815\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc0c1\ud0dc ="+d):0!=a.Body.ReturnValue?messagebox("","TLS \ubcf4\uc548\uc744 \uc124\uc815\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc624\ub958 : "+a.Body.ReturnValueStr):setTimeout(setTlsSecurityResponse3,2E3)}
1094 function setTlsSecurityResponse3(){null!=setTlsSecurityDeleteCredentialContext&&amtstack.Delete("AMT_TLSCredentialContext",setTlsSecurityDeleteCredentialContext,function(){});PullCertificates();setDialogMode();amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}var xxWatchdog=null;
1095 function PullWatchdog(){amtstack.BatchEnum(null,["*AMT_AgentPresenceCapabilities","AMT_AgentPresenceWatchdog","AMT_AgentPresenceWatchdogAction","AMT_StateTransitionCondition","CIM_ConcreteDependency"],PullWatchdogResponse)}
1095 -function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var g in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[g],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1096 +function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var e in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[e],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1097 "@Name","PolicyConditionName").Value,d=getItem(xxWatchdog.AMT_AgentPresenceWatchdog.responses,"DeviceID",d),a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,"PolicyConditionName",a),d.transitions||(d.transitions=[]),d.transitions.push(a)),c&&"AMT_StateTransitionCondition"==c.Value&&(a=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyConditionName").Value,b=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyActionName").Value,a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,
1098 "PolicyConditionName",a),b=getItem(xxWatchdog.AMT_AgentPresenceWatchdogAction.responses,"PolicyActionName",b),a.actions||(a.actions=[]),a.actions.push(b));updateWatchdog();QV("go19",!0)}}
1099 var watchdogEnabledStates="\uc54c \uc218 \uc5c6\ub294;\ub2e4\ub978;\uac00\ub2a5;\ube44\ud65c\uc131\ud654;\uc885\ub8cc;\ud574\ub2f9 \uc0ac\ud56d \uc5c6\uc74c;\ud65c\uc131\ud654\ub418\uc5c8\uc9c0\ub9cc \uc624\ud504\ub77c\uc778;\ud14c\uc2a4\ud2b8 \uc911;\uc5f0\uae30 \ub428;Quiesce;\uc2dc\uc791".split(";"),watchdogMonitoredEntity="\uc54c \uc218 \uc5c6\ub294;\ub2e4\ub978;\uc6b4\uc601 \uccb4\uc81c;\uc6b4\uc601 \uccb4\uc81c \ubd80\ud305 \ud504\ub85c\uc138\uc2a4;\uc6b4\uc601 \uccb4\uc81c \uc885\ub8cc \ud504\ub85c\uc138\uc2a4;\ud38c\uc6e8\uc5b4 \ubd80\ud305 \ud504\ub85c\uc138\uc2a4;BIOS \ubd80\ud305 \ud504\ub85c\uc138\uc2a4;\uc2e0\uccad;\uc11c\ube44\uc2a4 \ud504\ub85c\uc138\uc11c".split(";");
1100 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("\ucd5c\ub300 \uc6cc\uce58 \ub3c5",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" \uac10\uc2dc\uacac");b+=TableEntry("\ucd5c\ub300 \ucd1d \uc561\uc158",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" \ud589\uc704");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\uc778\ud154 &reg; AMT \uc5d0\uc774\uc804\ud2b8 \uc874\uc7ac \uac10\uc2dc \uae30\ub2a5\uc744 \uad00\ub9ac\ud558\uc2ed\uc2dc\uc624.<br><br>";
1101 if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>\uc0c1\ub2f4\uc6d0 \uc874\uc7ac \uac10\uc2dc\uae30\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));
1101 -b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="\uc561\uc158 \ucd94\uac00 ..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="\uc791\uc5c5 \uc0ad\uc81c ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",g;for(g in a.transitions){var v=a.transitions[g];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+
1102 -" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : \uae30\ub85d \ud560 \uc774\ubca4\ud2b8")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("\uc6cc\uce58 \ub3c5 \ucd94\uac00 ...","AddWatchdog()"));b+="<br>";QH(54,b)}}
1102 +b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="\uc561\uc158 \ucd94\uac00 ..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="\uc791\uc5c5 \uc0ad\uc81c ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+
1103 +" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : \uae30\ub85d \ud560 \uc774\ubca4\ud2b8")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("\uc6cc\uce58 \ub3c5 \ucd94\uac00 ...","AddWatchdog()"));b+="<br>";QH(55,b)}}
1104 function getWatchdogTransitionStr(b){if(31==b)return"\uc5b4\ub5a4 \uc8fc";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1105 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("\uae30\uc220",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("\ubaa8\ub2c8\ud130\ub9c1 \ub300\uc0c1",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("\ud604\uc7ac \uc0c1\ud0dc",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("\ud65c\uc131\ud654 \ub41c \uc0c1\ud0dc",watchdogEnabledStates[b.EnabledState]);
1106 c+=addHtmlValue("\uc2dc\uc791 \uac04\uaca9",b.StartupInterval+" \ucd08");c+=addHtmlValue("\ud0c0\uc784 \uc544\uc6c3 \uac04\uaca9",b.TimeoutInterval+" \ucd08");setDialogMode(11,format("\uc6cc\uce58 \ub3c5 {0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
1107 function AddWatchdog(){var b;b="<div style=height:26px;margin-top:4px><input id=wgname style=float:right;width:240px maxlength=16 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>\uc774\ub984</div></div>"+('<div style=height:26px;margin-top:4px><input id=wgguid style=float:right;width:240px maxlength=36 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px title="\uc784\uc758\uc758 DeviceID \uc0dd\uc131">'+addLink("\uc7a5\uce58 \uc544\uc774\ub514","GenerateWatchdogGuid()")+"</div></div>");
1108 b+="<div style=height:26px;margin-top:4px><input id=wgstart style=float:right;width:240px maxlength=8 placeholder=3600 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>\uc2dc\uc791 (\ucd08)</div></div>";b+="<div style=height:26px;margin-top:4px><input id=wgtimeout style=float:right;width:240px maxlength=8 placeholder=60 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>\ud0c0\uc784 \uc544\uc6c3 (\ucd08)</div></div>";setDialogMode(11,"\uc6cc\uce58 \ub3c5 \ucd94\uac00",3,AddWatchdogOk,b);
1108 -AddWatchdogUpdate()}function GenerateWatchdogGuid(){var b,c="";for(b=0;16>b;b++)c+=String.fromCharCode(random(255));Q("wgguid").value=guidToStr(rstr2hex(c));AddWatchdogUpdate()}function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var g=a.charCodeAt(d);45!=g&&(48<=g&&57>=g||97<=g&&102>=g?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1109 +AddWatchdogUpdate()}function GenerateWatchdogGuid(){var b,c="";for(b=0;16>b;b++)c+=String.fromCharCode(random(255));Q("wgguid").value=guidToStr(rstr2hex(c));AddWatchdogUpdate()}function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var e=a.charCodeAt(d);45!=e&&(48<=e&&57>=e||97<=e&&102>=e?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1110 function AddWatchdogOk(){var b=Q("wgtimeout").value,c=Q("wgstart").value;""==b&&(b=60);""==c&&(c=3600);b={CreationClassName:0,DeviceID:btoa(hex2rstr(guidToStr(Q("wgguid").value.replace(/-/g,"")).replace(/-/g,""))),StartupInterval:c,SystemCreationClassName:0,SystemName:0,TimeoutInterval:b,MonitoredEntityDescription:Q("wgname").value};amtstack.Create("AMT_AgentPresenceWatchdog",b,AddWatchdogOk2)}
1111 function AddWatchdogOk2(b,c,a,d){200!=d?messagebox("\uc9c0\ud0a4\ub294 \uac1c","\uc6cc\uce58 \ub3c5\uc744 \ucd94\uac00 \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc624\ub958 \ubc88\ud638"+d):PullWatchdog()}
1112 function addWatchdogAction(b,c){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d;d="<table><td style=width:180px>\uc5d0\uc11c<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsa"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";d+="<td>\uc5d0<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsb"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";setDialogMode(11,"\uac10\uc2dc \uc870\uce58 \ucd94\uac00",
1113 3,addWatchdogActionOk,d+"</table><br>\uc870\uce58 \uc218\ud589<br><input id=wgsevent type=checkbox checked onclick=addWatchdogActionUpdate()>\uc774\ubca4\ud2b8 \ub85c\uadf8\uc5d0 \uc4f0\uae30<br />",a);addWatchdogActionUpdate();haltEvent(b)}function addWatchdogActionUpdate(){var b=0,c=0,a;for(a in amtstack.WatchdogCurrentStates)1==Q("wgsa"+a).checked&&(b+=parseInt(a)),1==Q("wgsb"+a).checked&&(c+=parseInt(a));QE("dlgOkButton",0<b&&0<c&&1==Q("wgsevent").checked)}
1113 -function addWatchdogActionOk(b,c){var a=0,d=0,g;for(g in amtstack.WatchdogCurrentStates)1==Q("wgsa"+g).checked&&(a+=parseInt(g)),1==Q("wgsb"+g).checked&&(d+=parseInt(g));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
1114 +function addWatchdogActionOk(b,c){var a=0,d=0,e;for(e in amtstack.WatchdogCurrentStates)1==Q("wgsa"+e).checked&&(a+=parseInt(e)),1==Q("wgsb"+e).checked&&(d+=parseInt(e));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
1115 function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("\uc6cc\uce58 \ub3c5 \uc561\uc158","\uac10\uc2dc \uc870\uce58\ub97c \ucd94\uac00 \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc624\ub958 #"+d):PullWatchdog()}
1116 function deleteWatchdogActions(b,c){setDialogMode(11,"\uac10\uc2dc \uc870\uce58 \uc0ad\uc81c",3,deleteWatchdogActionsOk,"\uc774 \uc6cc\uce58 \ub3c5\uc5d0 \ub300\ud55c \ubaa8\ub4e0 \uc791\uc5c5\uc744 \uc0ad\uc81c \ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?",xxWatchdog.AMT_AgentPresenceWatchdog.responses[c]);haltEvent(b)}function deleteWatchdogActionsOk(b,c){amtstack.AMT_AgentPresenceWatchdog_DeleteAllActions(deleteWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
1117 function deleteWatchdogActionResponse(b,c,a,d){200!=d?messagebox("\uc6cc\uce58 \ub3c5 \uc561\uc158","\uac10\uc2dc \uc870\uce58\ub97c \uc81c\uac70 \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc624\ub958 #"+d):PullWatchdog()}
@@ -1118,16 +1119,16 @@ var xxSystemDefense=null,xxSystemDefenceLinkedPolicy={},xxUpdatingDefenseStats=!
1119 xxSystemDefenceFilters={HdrProtocolID:1,HdrDestAddress:2,HdrDestMask:2,HdrSrcAddress:2,HdrSrcMask:2,HdrSrcPortStart:1,HdrSrcPortEnd:1,HdrDestPortStart:1,HdrDestPortEnd:1,HdrSrcAddressEndOfRange:2,"HdrDestAddressEndOfRange ":2,TCPFlagsOn:3,TCPFlagsOff:3};function PullSystemDefense(){amtFirstPull|=4;amtstack.BatchEnum(null,["AMT_SystemDefensePolicy","AMT_NetworkPortSystemDefensePolicy","AMT_Hdr8021Filter","AMT_IPHeadersFilter","AMT_NetworkFilter"],PullSystemDefenseResponse)}
1120 function PullSystemDefenseResponse(b,c,a,d){200==d&&(xxSystemDefense=a,updateSystemDefense(),QV("go18",!0),urlvars.norefresh&&UpdateDefenseStats())}
1121 function updateSystemDefense(){if(null!=xxSystemDefense){var b="";xxSystemDefenceLinkedPolicy={};for(var c in xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses){var a=xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses[c],d=+getItem(a.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value.substring(27),a=getItem(xxSystemDefense.AMT_SystemDefensePolicy.responses,"InstanceID",a.Dependent.ReferenceParameters.SelectorSet.Selector.Value);xxSystemDefenceLinkedPolicy[d]=
1121 -a}b+=TableStart();c="<i>\uc5c6\uc74c</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("\uae30\ubcf8 \uc720\uc120 \uc815\ucc45",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],g;for(g in a)d=a[g],d+=" \ud328\ud0b7",b+=TableEntry((0==c?"\uc5f4\uad11\ud55c":"\ubb34\uc120 \uc804\ud654")+g,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>\uc778\ud154 &reg; AMT \uc2dc\uc2a4\ud15c \ubc29\uc5b4 \uc815\ucc45\uc744 \uad00\ub9ac\ud569\ub2c8\ub2e4.<br><br>";
1122 +a}b+=TableStart();c="<i>\uc5c6\uc74c</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("\uae30\ubcf8 \uc720\uc120 \uc815\ucc45",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],e;for(e in a)d=a[e],d+=" \ud328\ud0b7",b+=TableEntry((0==c?"\uc5f4\uad11\ud55c":"\ubb34\uc120 \uc804\ud654")+e,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>\uc778\ud154 &reg; AMT \uc2dc\uc2a4\ud15c \ubc29\uc5b4 \uc815\ucc45\uc744 \uad00\ub9ac\ud569\ub2c8\ub2e4.<br><br>";
1123 if(0==xxSystemDefense.AMT_SystemDefensePolicy.responses.length)b+="<div style=padding-left:15px><i>\uc2dc\uc2a4\ud15c \ubc29\uc5b4 \uc815\ucc45\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.</i></div><br>";else for(c in xxSystemDefense.AMT_SystemDefensePolicy.responses)a=xxSystemDefense.AMT_SystemDefensePolicy.responses[c],d="",a.FilterCreationHandles&&(a.FilterCreationHandles=MakeToArray(a.FilterCreationHandles),d=a.FilterCreationHandles.length,d=", "+d+" filter"+(1<d?"s":"")),b+="<div class=itemBar onclick=showPolicyDetails("+
1124 c+")><div style=padding-top:3px><b>"+EscapeHtml(a.PolicyName)+"</b>"+d+"</div></div>";b+="<tr><td class=r1 style=padding-left:15px><br>\uc778\ud154 &reg; AMT \uc2dc\uc2a4\ud15c \ubc29\uc5b4 \ud544\ud130\ub97c \uad00\ub9ac\ud569\ub2c8\ub2e4.<br><br>";if(0==xxSystemDefense.AMT_Hdr8021Filter.responses.length&&0==xxSystemDefense.AMT_IPHeadersFilter.responses.length)b+="<div style=padding-left:15px><i>\uc2dc\uc2a4\ud15c \ubc29\uc5b4 \ud544\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.</i></div><br>";else{for(c in xxSystemDefense.AMT_Hdr8021Filter.responses)a=
1125 xxSystemDefense.AMT_Hdr8021Filter.responses[c],(d=xxSystemDefenceFilterEthernetTypes[a.HdrProtocolID8021])||(d="\ubaa8\ub4e0 \uc774\ub354\ub137 \ud504\ub85c\ud1a0\ucf5c"+a.HdrProtocolID8021),d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile],2==a.FilterProfile&&(d+=" ...\uc5d0\uc11c"+a.FilterProfileData+" \ud328\ud0b7 / \ucd08"),1==a.ActionEventOnMatch&&(d+=", \uacbd\uae30 \uc911 \uc774\ubca4\ud2b8"),b+="<div class=itemBar onclick=showFilterDetails(0,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?
1126 "&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>";for(c in xxSystemDefense.AMT_IPHeadersFilter.responses){a=xxSystemDefense.AMT_IPHeadersFilter.responses[c];(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="\ubaa8\ub4e0 \uc774\ub354\ub137 \ud504\ub85c\ud1a0\ucf5c"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" ...\uc5d0\uc11c"+a.FilterProfileData+" \ud328\ud0b7 / \ucd08");1==a.ActionEventOnMatch&&(d+=", \uacbd\uae30 \uc911 \uc774\ubca4\ud2b8");
1126 -var v=0;for(g in xxSystemDefenceFilters)a[g]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("\ud544\ud130 \ucd94\uac00 ...","AddDefenseFilter()")+AddButton("\uc815\ucc45 \ucd94\uac00 ...","AddDefensePolicy()"));QH(53,b);
1127 +var v=0;for(e in xxSystemDefenceFilters)a[e]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("\ud544\ud130 \ucd94\uac00 ...","AddDefenseFilter()")+AddButton("\uc815\ucc45 \ucd94\uac00 ...","AddDefensePolicy()"));QH(54,b);
1128 null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}function StopDefenseStatsTimer(){null!=xxFilterStatisticsTimer&&(clearInterval(xxFilterStatisticsTimer),xxFilterStatisticsTimer=null);xxFilterStatisticsTimerActive=!1}
1129 function UpdateDefenseStats(b){if(b||1!=xxFilterStatisticsTimerActive)xxFilterStatisticsTimerActive=!0,b=b?b:0,xxSystemDefenceLinkedPolicy[b]?amtstack.AMT_SystemDefensePolicy_UpdateStatistics('<a:Address></a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+b+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",!1,UpdateDefenseStats2,b,0,{InstanceID:xxSystemDefenceLinkedPolicy[b].InstanceID}):
1129 -(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,g){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,g):StopDefenseStatsTimer()}
1130 -function UpdateDefenseStats3(b,c,a,d,g){b=0;if(200==d){xxFilterStatistics[g]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[g][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1130 +(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,e){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,e):StopDefenseStatsTimer()}
1131 +function UpdateDefenseStats3(b,c,a,d,e){b=0;if(200==d){xxFilterStatistics[e]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[e][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1132 function changeDefaultPolicy(b){if(!xxdialogMode){var c;c="<div style=height:26px;margin-top:4px><select id=policySelection style=float:right;width:266px><option value=-1>\uc5c6\uc74c";for(var a in xxSystemDefense.AMT_SystemDefensePolicy.responses)c+="<option value="+a+(xxSystemDefenceLinkedPolicy[b]&&xxSystemDefense.AMT_SystemDefensePolicy.responses[a].InstanceID==xxSystemDefenceLinkedPolicy[b].InstanceID?" selected":"")+">"+xxSystemDefense.AMT_SystemDefensePolicy.responses[a].PolicyName;setDialogMode(11,
1133 "\uae30\ubcf8 \uc2dc\uc2a4\ud15c \ubc29\uc5b4 \uc815\ucc45",3,changeDefaultPolicyOk,c+"</select><div style=padding-top:4px>\uae30\ubcf8 \uc815\ucc45</div></div>",b)}}
1134 function changeDefaultPolicyOk(b,c){var a=Q("policySelection").value,d=xxSystemDefenceLinkedPolicy[c];d&&amtstack.Delete("AMT_NetworkPortSystemDefensePolicy",'<w:SelectorSet><w:Selector Name="Antecedent"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">CIM_EthernetPort</w:Selector><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+c+
@@ -1140,125 +1141,143 @@ function AddDefenseFilter(){if(!xxdialogMode){var b;b="<div style=height:26px;ma
1141 b+="<div style=height:26px;margin-top:4px><select id=filterprofile style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=0>\ud5c8\uc6a9, \uacc4\uc0b0<option value=1>\ub4dc\ub86d, \uce74\uc6b4\ud2b8<option value=2>\uc18d\ub3c4 \uc81c\ud55c<option value=3>\ud5c8\uc6a9\ud558\ub2e4<option value=4>\ud558\ub77d</select><div style=padding-top:4px>\ub3d9\uc791</div></div>";b+="<div style=height:26px;margin-top:4px id=filterdatadiv><input id=filterdata style=float:right;width:260px maxlength=8 onkeyup=AddDefenseFilterUpdate()><div style=padding-top:4px>\ud328\ud0b7 / \ucd08</div></div>";
1142 b+="<div style=height:26px;margin-top:4px><select id=filteraction style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=false>\uc544\ubb34\uac83\ub3c4\ud558\uc9c0 \ub9c8\uc138\uc694<option value=1>\uacbd\uae30 \uc911 \uc774\ubca4\ud2b8</select><div style=padding-top:4px>\uc774\ubca4\ud2b8 \ub85c\uadf8</div></div>";setDialogMode(11,"\uc2dc\uc2a4\ud15c \ubc29\uc5b4 \ud544\ud130 \ucd94\uac00",3,AddDefenseFilterOk,b);AddDefenseFilterUpdate()}}
1143 function AddDefenseFilterOk(){if(1>=Q("filtertype").value){var b=0==Q("filtertype").value?2048:2054,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrProtocolID8021:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value};2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_Hdr8021Filter",c,AddDefenseFilterOk2)}else{var b=2==Q("filtertype").value?
1143 -4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var g=a[d].indexOf("="),v=a[d].substring(0,g),g=a[d].substring(g+1),n=xxSystemDefenceFilters[v];n||(v="HDR"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(g=g.split("."),4==g.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(g[0]),
1144 -parseInt(g[1]),parseInt(g[2]),parseInt(g[3]))))):c[v]=g)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c54",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1144 +4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var e=a[d].indexOf("="),v=a[d].substring(0,e),e=a[d].substring(e+1),n=xxSystemDefenceFilters[v];n||(v="HDR"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(e=e.split("."),4==e.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(e[0]),
1145 +parseInt(e[1]),parseInt(e[2]),parseInt(e[3]))))):c[v]=e)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c106",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1146 function AddDefenseFilterOk2(b,c,a,d){200!=d?messagebox("\uc2dc\uc2a4\ud15c \ubc29\uc5b4 \ud544\ud130 \ucd94\uac00","\ud544\ud130\ub97c \ucd94\uac00 \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc624\ub958 #"+d):PullSystemDefense()}
1146 -function showFilterDetails(b,c){if(!xxdialogMode){var a,d,g,v;0==b?(v="AMT_Hdr8021Filter",g="\uc774\ub354\ub137 \ud2b8\ub798\ud53d",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="\ubaa8\ub4e0 \uc774\ub354\ub137 \ud504\ub85c\ud1a0\ucf5c"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",g="IP \ud2b8\ub798\ud53d",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="\ubaa8\ub4e0 IP \ud504\ub85c\ud1a0\ucf5c"+d.HdrIPVersion));
1147 -var n;n=""+addHtmlValue("\uc774\ub984",EscapeHtml(d.Name));n+=addHtmlValue("\uc720\ud615",g);n+=addHtmlValue("\uc77c\uce58\ud558\ub294 \ud2b8\ub798\ud53d",a);n+=addHtmlValue("\ubc29\ud5a5",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,g=d[l],b=xxSystemDefenceFilters[l],2==b&&4==g.length&&(g=hex2rstr(g),g=g.charCodeAt(0)+"."+g.charCodeAt(1)+"."+g.charCodeAt(2)+"."+g.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("\ud544\ud130"+
1148 -a,g));n+=addHtmlValue("\uacbd\uae30 \uc911 \uc774\ubca4\ud2b8",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,"\uc774\ub354\ub137 \ud544\ud130 #"+d.InstanceID,5,showFilterDetailsOk,n,[v,d])}}function showFilterDetailsOk(b,c){2==b&&amtstack.Delete(c[0],c[1],deleteDefenseFilter)}
1147 +function showFilterDetails(b,c){if(!xxdialogMode){var a,d,e,v;0==b?(v="AMT_Hdr8021Filter",e="\uc774\ub354\ub137 \ud2b8\ub798\ud53d",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="\ubaa8\ub4e0 \uc774\ub354\ub137 \ud504\ub85c\ud1a0\ucf5c"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",e="IP \ud2b8\ub798\ud53d",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="\ubaa8\ub4e0 IP \ud504\ub85c\ud1a0\ucf5c"+d.HdrIPVersion));
1148 +var n;n=""+addHtmlValue("\uc774\ub984",EscapeHtml(d.Name));n+=addHtmlValue("\uc720\ud615",e);n+=addHtmlValue("\uc77c\uce58\ud558\ub294 \ud2b8\ub798\ud53d",a);n+=addHtmlValue("\ubc29\ud5a5",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,e=d[l],b=xxSystemDefenceFilters[l],2==b&&4==e.length&&(e=hex2rstr(e),e=e.charCodeAt(0)+"."+e.charCodeAt(1)+"."+e.charCodeAt(2)+"."+e.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("\ud544\ud130"+
1149 +a,e));n+=addHtmlValue("\uacbd\uae30 \uc911 \uc774\ubca4\ud2b8",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,"\uc774\ub354\ub137 \ud544\ud130 #"+d.InstanceID,5,showFilterDetailsOk,n,[v,d])}}function showFilterDetailsOk(b,c){2==b&&amtstack.Delete(c[0],c[1],deleteDefenseFilter)}
1150 function deleteDefenseFilter(b,c,a,d){200!=d?messagebox("\ud544\ud130 \uc81c\uac70","\ud544\ud130\ub97c \uc81c\uac70 \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc0ac\uc6a9 \uc911\uc774 \uc544\ub2cc\uc9c0 \ud655\uc778\ud558\uc2ed\uc2dc\uc624."):PullSystemDefense()}var xxAddDefensePolicyFilters;
1151 function AddDefensePolicy(){if(!xxdialogMode){xxAddDefensePolicyFilters=[];var b;b='<div style=height:26px;margin-top:4px><input id=policyname title="<policy name>:<policy precedence number>" style=float:right;width:260px maxlength=16 onkeyup=AddDefensePolicyUpdate()><div style=padding-top:4px>\uc774\ub984</div></div><div style=height:26px;margin-top:4px><select id=policytx title="\uc544\uc6c3 \ubc14\uc6b4\ub4dc \ud2b8\ub798\ud53d\uc5d0 \ub300\ud55c \uae30\ubcf8 \uc870\uce58" style=float:right;width:133px><option value=0>Allow<option value=1>\ud558\ub77d<option value=2>\ud5c8\uc6a9, \uce74\uc6b4\ud2b8<option value=3>\ub4dc\ub78d, \uce74\uc6b4\ud2b8<option value=4>\ud5c8\uc6a9, \uce74\uc6b4\ud2b8, \uc774\ubca4\ud2b8<option value=5>\ub4dc\ub78d, \uce74\uc6b4\ud2b8, \uc774\ubca4\ud2b8</select><select id=policyrx style=float:right;width:133px title="\uc778\ubc14\uc6b4\ub4dc \ud2b8\ub798\ud53d\uc5d0 \ub300\ud55c \uae30\ubcf8 \uc870\uce58"><option value=0>\ud5c8\uc6a9\ud558\ub2e4<option value=1>\ud558\ub77d<option value=2>\ud5c8\uc6a9, \uce74\uc6b4\ud2b8<option value=3>\ub4dc\ub78d, \uce74\uc6b4\ud2b8<option value=4>\ud5c8\uc6a9, \uce74\uc6b4\ud2b8, \uc774\ubca4\ud2b8<option value=5>\ub4dc\ub78d, \uce74\uc6b4\ud2b8, \uc774\ubca4\ud2b8</select><div style=padding-top:4px>\uae30\ubcf8 TX / RX</div></div>';b+=
1152 "<div id=policyFilters></div>";if(0<xxSystemDefense.AMT_Hdr8021Filter.responses.length||0<xxSystemDefense.AMT_IPHeadersFilter.responses.length){b+="<div style=height:26px;margin-top:4px><div style=float:right><select id=xfilter style=width:186px>";for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];b+="<option value="+a.InstanceID+">"+a.Name}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],
1153 b+="<option value="+a.InstanceID+">"+a.Name;b+="</select><input id=addFilterButton type=button value=Add style=width:80px onclick=addFilterButton()></div><div style=padding-top:4px>\ud544\ud130 \ucd94\uac00</div></div>"}setDialogMode(11,"\uc2dc\uc2a4\ud15c \ubc29\uc5b4 \uc815\ucc45 \ucd94\uac00",3,AddDefensePolicyOk,b);AddDefensePolicyUpdate()}}
1154 function addFilterButton(){0<=xxAddDefensePolicyFilters.indexOf(Q("xfilter").value)||(xxAddDefensePolicyFilters.push(Q("xfilter").value),AddDefensePolicyUpdate())}function removeFilterButton(b){xxAddDefensePolicyFilters.splice(b,1);AddDefensePolicyUpdate()}
1154 -function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c54",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>\uc774 \uc815\ucc45\uc5d0\ub294 \ud544\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("\uc5c6\uc560\ub2e4","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+
1155 +function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c106",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>\uc774 \uc815\ucc45\uc5d0\ub294 \ud544\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("\uc5c6\uc560\ub2e4","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+
1156 GetFilterById(xxAddDefensePolicyFilters[c]).Name+"</b></div></div>";QH("policyFilters",b)}}function GetFilterById(b){for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];if(a.InstanceID==b)return a}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)if(a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],a.InstanceID==b)return a}
1157 function AddDefensePolicyOk(){var b=Q("policytx").value,c=Q("policyrx").value,a=0,d=Q("policyname").value.split(":");2==d.length&&(a=parseInt(d[1]));b={"InstanceID ":0,PolicyName:d[0],PolicyPrecedence:a,TxDefaultCount:1<b,TxDefaultDrop:1==b%2,TxDefaultMatchEvent:3<b,RxDefaultCount:1<c,RxDefaultDrop:1==c%2,RxDefaultMatchEvent:3<c};0<xxAddDefensePolicyFilters.length&&(b.FilterCreationHandles=xxAddDefensePolicyFilters);amtstack.Create("AMT_SystemDefensePolicy",b,AddDefensePolicyOk2)}
1158 function AddDefensePolicyOk2(b,c,a,d){200!=d?messagebox("\uc2dc\uc2a4\ud15c \ubc29\uc5b4 \uc815\ucc45 \ucd94\uac00","\uc815\ucc45\uc744 \ucd94\uac00 \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc624\ub958 #"+d):PullSystemDefense()}
1159 function showPolicyDetails(b){if(!xxdialogMode){var c=xxSystemDefense.AMT_SystemDefensePolicy.responses[b],a;a=""+addHtmlValue("\uc774\ub984",EscapeHtml(c.PolicyName));0!=c.PolicyPrecedence&&(a+=addHtmlValue("\uc0c1\uc704",c.PolicyPrecedence));var d=1==c.TxDefaultDrop?"\ud558\ub77d":"\ud5c8\uc6a9\ud558\ub2e4";1==c.TxDefaultCount&&(d+="\uce74\uc6b4\ud2b8");1==c.TxDefaultMatchEvent&&(d+=", \uc774\ubca4\ud2b8");a+=addHtmlValue("\uae30\ubcf8 TX \uc561\uc158",d);d=1==c.RxDefaultDrop?"Drop":"Allow";1==
1160 c.RxDefaultCount&&(d+=", Count");1==c.RxDefaultMatchEvent&&(d+=", Event");a+=addHtmlValue("\uae30\ubcf8 RX \uc561\uc158",d);if(c.FilterCreationHandles)for(b in c.FilterCreationHandles)a+=addHtmlValue("\ud544\ud130 #"+(+b+1),GetFilterById(c.FilterCreationHandles[b]).Name);setDialogMode(11,format("\uc218\ub2e8 #",c.InstanceID.substring(20)),5,showPolicyDetailsOk,a,c)}}function showPolicyDetailsOk(b,c){2==b&&amtstack.Delete("AMT_SystemDefensePolicy",c,deleteDefensePolicy)}
1161 function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("\uc815\ucc45 \uc81c\uac70","\uc815\ucc45\uc744 \uc81c\uac70 \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc0ac\uc6a9 \uc911\uc774 \uc544\ub2cc\uc9c0 \ud655\uc778\ud558\uc2ed\uc2dc\uc624."):PullSystemDefense()}var xxWireless;
1161 -function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService *AMT_BootCapabilities".split(" "),processWireless)}function wifiRefresh(){xxdialogMode||PullWireless()}
1162 -var xxWifiState={3:"\ube44\ud65c\uc131\ud654",32768:"S0\uc5d0\uc11c \ud65c\uc131\ud654",32769:"S0, Sx / AC\uc5d0\uc11c \ud65c\uc131\ud654"},xxRadioState={2:"\uc5f0\uacb0\ub428",3:"\ub5a8\uc5b4\uc838\uc11c",6:"\ucf1c\uae30, \uc5f0\uacb0 \ub04a\uae30"},xxWifiAuthenticationMethod={1:"\ub2e4\ub978",2:"\uc5f4\ub2e4",3:"\uacf5\uc6a9 \uc5f4\uc1e0",4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE"},xxWifiEncryptionMethod={1:"\ub2e4\ub978",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",
1163 -5:"\uc5c6\uc74c"};function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1164 -function showWirelessInfo(){if(xxWireless){var b,c,a="",d,g;if(xxWireless.CIM_WiFiPortCapabilities.response){g="<br><h2>\ubb34\uc120 \ud504\ub85c\ud30c\uc77c</h2>"+TableStart2();g+="<tr><td class=r2 style=padding-left:15px><br>\uc778\ud154 &reg; AMT\uac00 \ub124\ud2b8\uc6cc\ud06c \uc5f0\uacb0\uc5d0 \uc0ac\uc6a9\ud560 \ubb34\uc120 \ud504\ub85c\ud30c\uc77c.<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&
1165 -d.Priority==b&&(g+="<div class=itemBar onclick=showWifiDetails("+c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+" &nbsp; ",xxAccountAdminName&&(g+=AddButton2("\uc5c6\uc560\ub2e4",'wifiRemoveButton("'+c+'")')),g+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>",a++);0==a&&(g+="<i>\ubb34\uc120 \ud504\ub85c\ud30c\uc77c\uc774 \uc5c6\uc2b5\ub2c8\ub2e4</i><br>");g+=
1166 -"<br><td class=r2>";g=xxAccountAdminName?g+TableEnd(AddButton("\uc0c8 \ud504\ub85c\ud544","showWifiNewProfile()")):g+TableEnd("");QH(20,g+"<br>")}}}function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"\ubb34\uc120 \uc0c1\ud0dc",3,wifiStateDlg,b)}}
1162 +function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService CIM_IEEE8021xSettings".split(" "),processWireless)}function wifiRefresh(){xxdialogMode||PullWireless()}
1163 +var xxWifiState={3:"\ube44\ud65c\uc131\ud654",32768:"S0\uc5d0\uc11c \ud65c\uc131\ud654",32769:"S0, Sx / AC\uc5d0\uc11c \ud65c\uc131\ud654"},xxRadioState={2:"\uc5f0\uacb0\ub428",3:"\ub5a8\uc5b4\uc838\uc11c",6:"\ucf1c\uae30, \uc5f0\uacb0 \ub04a\uae30"},xxWifiAuthenticationMethod={1:"\ub2e4\ub978",2:"\uc5f4\ub2e4",3:"\uacf5\uc6a9 \uc5f4\uc1e0",4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE IEEE 802.1x",32769:"WPA3 OWE IEEE 802.1x"},xxWifiEncryptionMethod={1:"\ub2e4\ub978",
1164 +2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"\uc5c6\uc74c"};function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1165 +function showWirelessInfo(){if(xxWireless){var b,c,a="",d,e;if(xxWireless.CIM_WiFiPortCapabilities.response){e="<br><h2>\ubb34\uc120 \ud504\ub85c\ud30c\uc77c</h2>"+TableStart2();e+="<tr><td class=r2 style=padding-left:15px><br>\uc778\ud154 &reg; AMT\uac00 \ub124\ud2b8\uc6cc\ud06c \uc5f0\uacb0\uc5d0 \uc0ac\uc6a9\ud560 \ubb34\uc120 \ud504\ub85c\ud30c\uc77c.<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)if(d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&
1166 +d.Priority==b){var v="",n=null,l="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");if(xxWireless.CIM_IEEE8021xSettings.responses)for(var p in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[p].ElementName==d.ElementName&&(n=xxWireless.CIM_IEEE8021xSettings.responses[p]);n&&(v=", "+l[n.AuthenticationProtocol]);e+="<div class=itemBar onclick=showWifiDetails("+c+")><div style=float:right>"+
1167 +EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+v+" &nbsp; ";xxAccountAdminName&&(e+=AddButton2("\uc5c6\uc560\ub2e4",'wifiRemoveButton("'+c+'")'));e+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>";a++}0==a&&(e+="<i>\ubb34\uc120 \ud504\ub85c\ud30c\uc77c\uc774 \uc5c6\uc2b5\ub2c8\ub2e4</i><br>");e+="<br><td class=r2>";e=xxAccountAdminName?e+TableEnd(AddButton("\uc0c8 \ud504\ub85c\ud544","showWifiNewProfile()")):
1168 +e+TableEnd("");QH(20,e+"<br>")}}}function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"\ubb34\uc120 \uc0c1\ud0dc",3,wifiStateDlg,b)}}
1169 function wifiStateDlg(){amtstack.CIM_WiFiPort_RequestStateChange(document.querySelector("input[name=d11]:checked").value,null,function(){amtstack.Get("CIM_WiFiPort",function(b,c,a,d){200==d&&(xxWireless.CIM_WiFiPort.response=a.Body,showWirelessInfo())})})}
1170 function showWifiSyncDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d11 id=wl0 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">\ube44\ud65c\uc131\ud654</label><br>");b+="<label><input type=radio name=d11 id=wl0 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">\uac00\ub2a5</label><br>";setDialogMode(11,"Local Profile Sync",3,showWifiSyncDlgEx,
1169 -b)}}function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,g){200==g&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1171 +b)}}function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,e){200==e&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1172 function showUefiWifiCoExDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d12 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Disabled</label><br>");b+="<label><input type=radio name=d12 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Enabled</label><br>";setDialogMode(11,"UEFI Wifi CoEx Profile Sharing",3,UefiWifiCoExDlg,b)}}
1171 -function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,g){200==g&&PullWireless()})}
1172 -function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("\ud504\ub85c\ud544 \uc774\ub984",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",b.SSID);c+=addHtmlValue("\uc785\uc99d",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("\uc554\ud638\ud654",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("\uc6b0\uc120 \uc21c\uc704",b.Priority);messagebox("\ubb34\uc120 \ud504\ub85c\ud30c\uc77c",
1173 -c+"</div>")}}function wifiRemoveButton(b){xxdialogMode||(QH(60,format('\ubb34\uc120 \ud504\ub85c\ud544 "{0}"\uc744 (\ub97c) \uc81c\uac70 \ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"\ubb34\uc120 \ud504\ub85c\ud30c\uc77c",3,function(){removeWifiButtonEx(b)}))}
1174 -function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}function removeWifiEntryResponse(b,c,a,d,g){methodcheck(a)||amtstack.Enum("CIM_WiFiEndpointSettings",function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c,showWirelessInfo())})}
1175 -function showWifiNewProfile(){if(!xxdialogMode){var b="";for(i=1;256>i;i++){var c=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==i&&(c=0);c&&(b+="<option value="+i+">"+i)}QH("c24",b);QV("c26",13<amtversion);c25.value=6;c27.value=4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"\ubb34\uc120 \ud504\ub85c\ud30c\uc77c \ucd94\uac00",3,function(){addWifiProfile()});
1176 -updateWifiDialog()}}
1177 -function addWifiProfile(){amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},{__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c27.value,SSID:c23.value,Priority:c24.value,PSKPassPhrase:c28.value},
1178 -null,null,null,removeWifiEntryResponse)}
1179 -function updateWifiDialog(){var b=!0,c=c25.value,a=c27.value;QV(66,4>c);QV(65,3<c);QV(64,3<c);QV(67,4>c);4>c&&(3==a||4==a)&&(c27.value=2);3<c&&(2==a||5==a)&&(c27.value=3);32768==c&&(c27.value=4);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);QE("c54",1==b&&0<c22.value.length&&0<c23.value.length&&7<c28.value.length&&
1180 -c28.value==c29.value)}function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1173 +function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,e){200==e&&PullWireless()})}
1174 +function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("\ud504\ub85c\ud544 \uc774\ub984",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",EscapeHtml(b.SSID));c+=addHtmlValue("\uc785\uc99d",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("\uc554\ud638\ud654",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("\uc6b0\uc120 \uc21c\uc704",b.Priority);var a=null,d="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");
1175 +if(xxWireless.CIM_IEEE8021xSettings.responses)for(var e in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[e].ElementName==b.ElementName&&(a=xxWireless.CIM_IEEE8021xSettings.responses[e]);a&&(c=c+'<div style="width:100%;border-bottom:1px solid #000;margin-bottom:5px;margin-top:5px">802.11x</div>'+addHtmlValue("\uc785\uc99d",d[a.AuthenticationProtocol]),a.Domain&&(c+=addHtmlValue("Domain",EscapeHtml(a.Domain))),a.Username&&(c+=addHtmlValue("\uc0ac\uc6a9\uc790 \uc774\ub984",
1176 +EscapeHtml(a.Username))));c+="</div>";messagebox("\ubb34\uc120 \ud504\ub85c\ud30c\uc77c",c)}}function wifiRemoveButton(b){xxdialogMode||(QH(61,format('\ubb34\uc120 \ud504\ub85c\ud544 "{0}"\uc744 (\ub97c) \uc81c\uac70 \ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"\ubb34\uc120 \ud504\ub85c\ud30c\uc77c",3,function(){removeWifiButtonEx(b)}))}
1177 +function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1178 +function removeWifiEntryResponse(b,c,a,d,e){methodcheck(a)||amtstack.BatchEnum("",["CIM_WiFiEndpointSettings","CIM_IEEE8021xSettings"],function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c.CIM_WiFiEndpointSettings.responses,xxWireless.CIM_IEEE8021xSettings.responses=c.CIM_IEEE8021xSettings.responses,showWirelessInfo())})}
1179 +function showWifiNewProfile(){if(!xxdialogMode){for(var b="",c=1;256>c;c++){var a=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==c&&(a=0);a&&(b+="<option value="+c+">"+c)}QH("c24",b);var b="<option value=-1>"+EscapeHtml("\uc5c6\uc74c")+"</option>",a="<option value=-1>"+EscapeHtml("\uc5c6\uc74c")+"</option>",c;for(c in xxCertificates)xxCertificates[c].TrustedRootCertficate?a+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+
1180 +"</option>":xxCertificates[c].XPrivateKey&&(b+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+"</option>");QH("c50",b);QH("c52",a);c="<option value=32769>WPA3 OWE IEEE 802.1x</option><option value=32768>WPA3 SAE IEEE 802.1x</option>";c+="<option value=7>WPA2 IEEE 802.1x</option>";c+="<option value=5>WPA IEEE 802.1x</option>";c+="<option value=6>WPA2 PSK</option>";c+="<option value=4>WPA PSK</option>";QH("c25",c);c25.value=6;c26.value=
1181 +4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"\ubb34\uc120 \ud504\ub85c\ud30c\uc77c \ucd94\uac00",3,function(){addWifiProfile()});updateWifiDialog()}}
1182 +function addWifiProfile(){var b,c,a,d={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c26.value,SSID:c23.value,Priority:c24.value};if(4==c25.value||6==c25.value)d.PSKPassPhrase=c28.value;if(5==c25.value||7==c25.value||32768==c25.value||
1183 +32769==c25.value)b={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_IEEE8021xSettings"),ElementName:"8021x-"+c22.value,InstanceID:"8021x-"+c22.value,ActiveInS0:1==Q("c54").value,AuthenticationProtocol:Q("c32").value},""!=Q("c44").value&&(b.RoamingIdentity=Q("c44").value),""!=Q("c34").value&&(b.ServerCertificateName=Q("c34").value,b.ServerCertificateNameComparison=Q("c36").value),
1184 +""!=Q("c40").value&&(b.Username=Q("c40").value),""!=Q("c42").value&&(b.Password=Q("c42").value),""!=Q("c38").value&&(b.Domain=Q("c38").value),3<Q("c32").value&&(b.ProtectedAccessCredential=Q("c46").value,b.PACPassword=Q("c48").value),0<=parseInt(Q("c50").value)&&(c='<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">'+
1185 +xxCertificates[parseInt(Q("c50").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>"),0<=parseInt(Q("c52").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">'+
1186 +xxCertificates[parseInt(Q("c52").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>");console.log("wifiepsettinginput",JSON.stringify(d,null,2));console.log("netAuthProfile",JSON.stringify(b,null,2));console.log("netAuthSettingsClientCert",c);console.log("netAuthSettingsServerCaCert",a);amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},d,b,c,a,removeWifiEntryResponse)}
1187 +function updateWifiDialog(){var b=!0,c=c25.value,a=c26.value;4>c&&(3==a||4==a)&&(c26.value=2);3<c&&(2==a||5==a)&&(c26.value=3);if(32768==c||32769==c)c26.value=4;QV("c27",4==c||6==c);QV("c30",5==c||7==c||32768==c||32769==c);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);0==c22.value.length&&0==c23.value.length&&(b=!1);4!=c&&6!=c||
1188 +!(8>c28.value.length||63<c28.value.length||c28.value!=c29.value)||(b=!1);QE("c106",b);updateNetAuthDialog()}function updateNetAuth2Dialog(){QV("c35",""!=Q("c33").value);QV("c45",3<Q("c32").value);QV("c47",3<Q("c32").value)}
1189 +function editNetAuthProfile(){if(!xxdialogMode){var b="<option value=-1>"+EscapeHtml("\uc5c6\uc74c")+"</option>",c="<option value=-1>"+EscapeHtml("\uc5c6\uc74c")+"</option>",a;for(a in xxCertificates)xxCertificates[a].TrustedRootCertficate?c+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>":xxCertificates[a].XPrivateKey&&(b+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>");QH("c98",b);QH("c100",c);b=amtsysstate.AMT_8021XProfile.responses.Body;
1190 +Q("c78").value=b.Enabled?1:0;Q("c102").value=b.ActiveInS0?1:0;Q("c104").value=b.PxeTimeout;if(b.Enabled){Q("c80").value=b.AuthenticationProtocol;Q("c92").value=b.RoamingIdentity?b.RoamingIdentity:"";Q("c82").value=b.ServerCertificateName?b.ServerCertificateName:"";Q("c84").value=b.ServerCertificateNameComparison?b.ServerCertificateNameComparison:0;Q("c88").value=b.Username?b.Username:
1191 +"";Q("c90").value=b.Password?b.Password:"";Q("c86").value=b.Domain?b.Domain:"";Q("c94").value=b.ProtectedAccessCredential?b.ProtectedAccessCredential:"";Q("c96").value=b.PACPassword?b.PACPassword:"";var d=c=-1;b.ServerCertificateIssuer&&(c=b.ServerCertificateIssuer.ReferenceParameters.SelectorSet.Selector.Value);b.ClientCertificate&&(d=b.ClientCertificate.ReferenceParameters.SelectorSet.Selector.Value);for(a in xxCertificates)xxCertificates[a].InstanceID==
1192 +c&&(Q("c100").value=a),xxCertificates[a].InstanceID==d&&(Q("c98").value=a)}setDialogMode(27,"802.1x Profile",3,function(){setNetAuthProfile()});updateNetAuthDialog()}}
1193 +function updateNetAuthDialog(){QV("c79",1==Q("c78").value);QV("c81",1==Q("c78").value);QV("c83",1==Q("c78").value&&""!=Q("c82").value);QV("c85",1==Q("c78").value);QV("c87",1==Q("c78").value);QV("c89",1==Q("c78").value);QV("c91",1==Q("c78").value);QV("c93",1==Q("c78").value&&
1194 +3<Q("c80").value);QV("c95",1==Q("c78").value&&3<Q("c80").value);QV("c97",1==Q("c78").value);QV("c99",1==Q("c78").value);QV("c101",1==Q("c78").value);QV("c103",1==Q("c78").value)}
1195 +function setNetAuthProfile(){var b=Clone(amtsysstate.AMT_8021XProfile.responses.Body);b.Enabled=1==Q("c78").value;b.Enabled&&(b.ActiveInS0=1==Q("c102").value,b.AuthenticationProtocol=Q("c80").value,""!=Q("c92").value?b.RoamingIdentity=Q("c92").value:delete b.RoamingIdentity,""!=Q("c82").value?(b.ServerCertificateName=Q("c82").value,b.ServerCertificateNameComparison=Q("c84").value):
1196 +(delete b.ServerCertificateName,delete b.ServerCertificateNameComparison),""!=Q("c88").value?b.Username=Q("c88").value:delete b.Username,""!=Q("c90").value?b.Password=Q("c90").value:delete b.Password,""!=Q("c86").value?b.Domain=Q("c86").value:delete b.Domain,3<Q("c80").value?(b.ProtectedAccessCredential=Q("c94").value,b.PACPassword=Q("c96").value):(delete b.ProtectedAccessCredential,delete b.PACPassword),
1197 +0<=parseInt(Q("c98").value)?b.ClientCertificate="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c98").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ClientCertificate,0<=parseInt(Q("c100").value)?b.ServerCertificateIssuer="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+
1198 +amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c100").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ServerCertificateIssuer,b.PxeTimeout=Q("c104").value);amtstack.Put("AMT_8021XProfile",b,setNetAuthProfileEx)}
1199 +function setNetAuthProfileEx(b,c,a,d){200==d?(amtsysstate.AMT_8021XProfile.responses.Body=amtsysstate.AMT_8021XProfile.response=a.Body,updateSystemStatus()):a.Header.WsmanError?messagebox("802.1x Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("802.1x Error","Error, Status = "+d)}
1200 +function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1201 var DMTFCPUStatus="\uc54c \uc218 \uc5c6\ub294;\uac00\ub2a5;\uc0ac\uc6a9\uc790\uac00 \ube44\ud65c\uc131\ud654;BIOS\uc5d0 \uc758\ud574 \ube44\ud65c\uc131\ud654 \ub428 (POST \uc624\ub958);\uac8c\uc73c\ub978;\ub2e4\ub978".split(";"),DMTFMemType="\uc54c \uc218 \uc5c6\ub294;\ub2e4\ub978;\uc74c\uc8fc;\ub3d9\uae30\uc2dd DRAM;\uce90\uc2dc DRAM;\uc5d0\ub3c4;EDRAM;VRAM;\uc2a4\ub7a8;\ub7a8;ROM;\ud50c\ub798\uc2dc;EEPROM;FEPROM;EPROM;CDRAM;3DRAM;SDRAM;SGRAM;RDRAM;DDR;DDR-2;\ube0c\ub78c;FB-DIMM;DDR3;FBD2;DDR4;LPDDR;LPDDR2;LPDDR3;LPDDR4".split(";"),
1202 DMTFMemFormFactor=";\ub2e4\ub978;\uc54c \uc218 \uc5c6\ub294;SIMM;\ud55c\ubaa8\uae08;\uce69;\ub2f4\uadf8\ub2e4;\uc9c0\ud37c;\ub3c5\uc810 \uce74\ub4dc;DIMM;TSOP;\uce69\uc758 \ud589;\ub9bc;SODIMM;\uc2a4\ub9bc;FB-DIM".split(";"),DMTFProcFamilly={191:"\uc778\ud154 &reg; \ucf54\uc5b4 &trade; 2 \ub4c0\uc624 \ud504\ub85c\uc138\uc11c",192:"\uc778\ud154 &reg; \ucf54\uc5b4 &trade; 2 \uc194\ub85c \ud504\ub85c\uc138\uc11c",193:"\uc778\ud154 &reg; \ucf54\uc5b4 &trade; 2 \uc775\uc2a4\ud2b8\ub9bc \ud504\ub85c\uc138\uc11c",
1203 194:"\uc778\ud154 &reg; \ucf54\uc5b4 &trade; 2 \ucffc\ub4dc \ud504\ub85c\uc138\uc11c",195:"\uc778\ud154 &reg; \ucf54\uc5b4 &trade; 2 \uc775\uc2a4\ud2b8\ub9bc \ubaa8\ubc14\uc77c \ud504\ub85c\uc138\uc11c",196:"\uc778\ud154 &reg; \ucf54\uc5b4 &trade; 2 \ub4c0\uc624 \ubaa8\ubc14\uc77c \ud504\ub85c\uc138\uc11c",197:"\uc778\ud154 &reg; \ucf54\uc5b4 &trade; 2 \uc194\ub85c \ubaa8\ubc14\uc77c \ud504\ub85c\uc138\uc11c",198:"\uc778\ud154 &reg; \ucf54\uc5b4 &trade; i7 \ud504\ub85c\uc138\uc11c",199:"\ub4c0\uc5bc \ucf54\uc5b4 \uc778\ud154 &reg; \uc140\ub7ec\ub860 &reg; \ud504\ub85c\uc138\uc11c"},
1204 HardwareInventory;
1185 -function processHardware(b,c,a,d){if(200==d){var g;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("\uc800\uc7a5...","SaveHardwareLog()")+" \ud558\ub4dc\uc6e8\uc5b4 \uc815\ubcf4\ub294 \uc2dc\uc2a4\ud15c \ubd80\ud305\uc2dc \uc218\uc9d1\ub429\ub2c8\ub2e4.");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+
1205 +function processHardware(b,c,a,d){if(200==d){var e;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("\uc800\uc7a5...","SaveHardwareLog()")+" \ud558\ub4dc\uc6e8\uc5b4 \uc815\ubcf4\ub294 \uc2dc\uc2a4\ud15c \ubd80\ud305\uc2dc \uc218\uc9d1\ub429\ub2c8\ub2e4.");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+
1206 "<br><h2>\ud50c\ub7ab\ud3fc</h2>"+FullTable({"\ucef4\ud4e8\ud130 \ubaa8\ub378":c.Model,"\uc81c\uc870\uc0ac":c.Manufacturer,"\ubc84\uc804":c.Version,"\uc77c\ub828 \ubc88\ud638":c.SerialNumber,"\uc2dc\uc2a4\ud15c ID":guidToStr(a.CIM_SystemPackaging.responses[0].PlatformGUID).toLowerCase()},"");b+="<br><h2>\ubca0\uc774\uc2a4 \ubcf4\ub4dc</h2>";b+=FullTable({"\uc81c\uc870\uc0ac":d.Manufacturer,"\uc0c1\ud488\uba85":d.Model,"\ubc84\uc804":d.Version,"\uc77c\ub828 \ubc88\ud638":d.SerialNumber,"\uc790\uc0b0 \ud0dc\uadf8":d.Tag,
1187 -"\uad50\uccb4 \uac00\ub2a5?":1==d.CanBeFRUed?"Yes":"No"},"");b+="<br><h2>BIOS</h2>";b+=FullTable({"\uacf5\uae09 \uc5c5\uccb4":a.CIM_BIOSElement.response.Manufacturer,"\ubc84\uc804":v,"\ucd9c\uc2dc\uc77c":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",{timeZone:"UTC"})},"");b+="<br>";for(g in a.CIM_Processor.responses)c=a.CIM_Processor.responses[g],d=a.CIM_Chip.responses[g],b+="<h2>\ud504\ub85c\uc138\uc11c "+(parseInt(g)+1)+"</h2>",b+=FullTable({"\uc81c\uc870\uc0ac":trademarks(d.Manufacturer),
1188 -"\uac00\uc871":DMTFProcFamilly[c.Family],"\ubc84\uc804":trademarks(d.Version),"\ucd5c\ub300 \uc18c\ucf13 \uc18d\ub3c4":c.MaxClockSpeed+" MHz","\uc0c1\ud0dc":DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(g in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[g],b+="<h2>\uba54\ubaa8\ub9ac \ubaa8\ub4c8 "+(+g+1)+"</h2>",b+=FullTable({"\uc740\ud589 \ub77c\ubca8":c.BankLabel,"\uc81c\uc870\uc0ac":c.Manufacturer,"\uc77c\ub828 \ubc88\ud638":c.SerialNumber,"\ud06c\uae30":parseInt(c.Capacity/1048576)+
1189 -" MB","\ud3fc \ud329\ud130":DMTFMemFormFactor[c.FormFactor],"\uc720\ud615":DMTFMemType[c.MemoryType],"\uc790\uc0b0 \ud0dc\uadf8":c.Tag,"\ubd80\ud488 \ubc88\ud638":c.PartNumber},"");b+="<br>";for(g in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[g],d=a.CIM_PhysicalPackage.responses[+g+1],b+="<h2>\uc800\uc7a5 \ub9e4\uccb4 "+(parseInt(g)+1)+"</h2>",b+=FullTable({"\ubaa8\ub378":d.Model,"\uc77c\ub828 \ubc88\ud638":""==d.SerialNumber?"Unknown":d.SerialNumber,"\ud06c\uae30":parseInt(Math.round(1E3*
1190 -c.MaxMediaSize/1048576))+" MB"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(g in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[g].PackageType&&(c=a.CIM_PhysicalPackage.responses[g]);null!=c&&(b+="<h2>Battery</h2>",g=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,"\uc81c\uc870\uc0ac":c.Manufacturer,"Manufacture date":g,"\uc77c\ub828 \ubc88\ud638":c.SerialNumber,"\uc720\ud615":"\ub2e4\ub978;\uc54c \uc218 \uc5c6\ub294;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],
1207 +"\uad50\uccb4 \uac00\ub2a5?":1==d.CanBeFRUed?"Yes":"No"},"");b+="<br><h2>BIOS</h2>";b+=FullTable({"\uacf5\uae09 \uc5c5\uccb4":a.CIM_BIOSElement.response.Manufacturer,"\ubc84\uc804":v,"\ucd9c\uc2dc\uc77c":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",{timeZone:"UTC"})},"");b+="<br>";for(e in a.CIM_Processor.responses)c=a.CIM_Processor.responses[e],d=a.CIM_Chip.responses[e],b+="<h2>\ud504\ub85c\uc138\uc11c "+(parseInt(e)+1)+"</h2>",b+=FullTable({"\uc81c\uc870\uc0ac":trademarks(d.Manufacturer),
1208 +"\uac00\uc871":DMTFProcFamilly[c.Family],"\ubc84\uc804":trademarks(d.Version),"\ucd5c\ub300 \uc18c\ucf13 \uc18d\ub3c4":c.MaxClockSpeed+" MHz","\uc0c1\ud0dc":DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(e in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[e],b+="<h2>\uba54\ubaa8\ub9ac \ubaa8\ub4c8 "+(+e+1)+"</h2>",b+=FullTable({"\uc740\ud589 \ub77c\ubca8":c.BankLabel,"\uc81c\uc870\uc0ac":c.Manufacturer,"\uc77c\ub828 \ubc88\ud638":c.SerialNumber,"\ud06c\uae30":parseInt(c.Capacity/1048576)+
1209 +" MB","\ud3fc \ud329\ud130":DMTFMemFormFactor[c.FormFactor],"\uc720\ud615":DMTFMemType[c.MemoryType],"\uc790\uc0b0 \ud0dc\uadf8":c.Tag,"\ubd80\ud488 \ubc88\ud638":c.PartNumber},"");b+="<br>";for(e in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[e],d=a.CIM_PhysicalPackage.responses[+e+1],b+="<h2>\uc800\uc7a5 \ub9e4\uccb4 "+(parseInt(e)+1)+"</h2>",b+=FullTable({"\ubaa8\ub378":d.Model,"\uc77c\ub828 \ubc88\ud638":""==d.SerialNumber?"Unknown":d.SerialNumber,"\ud06c\uae30":parseInt(Math.round(1E3*
1210 +c.MaxMediaSize/1048576))+" MB"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(e in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[e].PackageType&&(c=a.CIM_PhysicalPackage.responses[e]);null!=c&&(b+="<h2>Battery</h2>",e=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,"\uc81c\uc870\uc0ac":c.Manufacturer,"Manufacture date":e,"\uc77c\ub828 \ubc88\ud638":c.SerialNumber,"\uc720\ud615":"\ub2e4\ub978;\uc54c \uc218 \uc5c6\ub294;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],
1211 "Design capacity":a.CIM_Battery.response.DesignCapacity+" mWatt-hours","Design voltage":a.CIM_Battery.response.DesignVoltage+" mVolts"},c.OtherIdentifyingInfo&&(a["Other Info"]=c.OtherIdentifyingInfo),b+=FullTable(a,""))}b+="<br>";QH(16,b);updateSystemStatus()}}function SaveHardwareLog(){!xxdialogMode&&HardwareInventory&&SaveJsonFile("IntelAmtHardware","hardware","\uc778\ud154 AMT \ud558\ub4dc\uc6e8\uc5b4 \uc815\ubcf4",HardwareInventory)}var AmtSystemPowerSchemes=null;
1212 function PullPowerPolicy(){amtstack.Enum("AMT_SystemPowerScheme",powerPolicyResponse)}function powerPolicyResponse(b,c,a,d){AmtSystemPowerSchemes=a;updateSystemStatus()}
1213 function showPowerPolicyDlg(b){if(!xxdialogMode){for(var c="",a=0;a<AmtSystemPowerSchemes.length;a++)c+='<input type=radio name=powerpolicy value="'+AmtSystemPowerSchemes[a].InstanceID+'" '+(AmtSystemPowerSchemes[a].SchemeGUID==b?" checked":"")+">"+AmtSystemPowerSchemes[a].Description+"<br>";setDialogMode(11,"\uc778\ud154 &reg; AMT \uc804\uc6d0 \uc815\ucc45",3,showPowerPolicyDlgOk,c)}}
1214 function showPowerPolicyDlgOk(){for(var b=null,c=0,a=document.getElementsByTagName("input");c<a.length;c++)"powerpolicy"==a[c].name&&a[c].checked&&(b=a[c].value);amtstack.AMT_SystemPowerScheme_SetPowerScheme(showPowerPolicyDlgOkDone,b)}function showPowerPolicyDlgOkDone(b,c,a,d){200==d&&PullSystemStatus()}var xxAccountAdminName,xxAccountRealmInfo,xxAccountEnabledInfo={},xxAccountFetch,showHiddenAccounts=!1;
1215 function PullUserInfo(){xxAccountFetch=1;delete xxAccountAdminName;xxAccountRealmInfo={};amtstack.AMT_AuthorizationService_GetAdminAclEntry(getAdminAclEntryResponse);amtstack.AMT_AuthorizationService_EnumerateUserAclEntries(1,enumerateUserAclEntriesResponse)}function getAdminAclEntryResponse(b,c,a,d){200==d&&(xxAccountRealmInfo[-1]={AccessPermission:999,DigestUsername:a.Body.Username,Realms:null},xxAccountAdminName=a.Body.Username,updateAccounts())}
1196 -function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var g in a.Body.Handles)b=a.Body.Handles[g],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1197 -function getUserAclEntryExResponse(b,c,a,d,g){xxAccountFetch--;200==d&&(a.Body.Handle=g,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[g]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,g){200==d&&(xxAccountEnabledInfo[g]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,g){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(g,getAclEnabledStateResponse,g))}
1198 -function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>\uc774 \ucef4\ud4e8\ud130\uc758 \uc778\ud154 &reg; AMT \uc0ac\uc6a9\uc790 \uacc4\uc815\uc744 \uad00\ub9ac\ud558\uc2ed\uc2dc\uc624.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,g=!1,v=0;a.DigestUsername?(d=a.DigestUsername,g="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?
1199 -1:2);if(showHiddenAccounts||!g){var n="";if(999!=a.AccessPermission){2==v&&(n+="\uc7a5\uc560\uc778,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a["\uc601\uc5ed"][c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="\uac10\uc0ac,");n=0<=a.Realms.indexOf(3)?n+"\uad00\ub9ac\uc790":1==l?n+"1 \uac1c \uc601\uc5ed":n+(l+" \uc601\uc5ed")}else n+="\uad00\ub9ac\uc790",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?
1200 -"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!g&&xxAccountAdminName&&(b+=" "+AddButton2("\ud3b8\uc9d1\ud558\ub2e4...","changeAccountButton(event,"+a.Handle+")"));b+='</div><div style=padding-top:3px;width:330px;float:left;overflow-x:hidden title="'+d+'"><b>'+d+"</b></div><div style=padding-top:3px>"+n+"</div></div>"}}c='<div style=float:right;margin-right:8px><a title="\uc228\uaca8\uc9c4 \uacc4\uc815 \uc804\ud658" style=color:gray;cursor:pointer onclick=toggleAccountButton()>'+
1201 -(showHiddenAccounts?"&#x25B2;":"&#x25BC;")+"</a></div><div>&nbsp;"+AddRefreshButton("xxAccountFetch=999;PullUserInfo()");xxAccountAdminName&&(c+=AddButton("\uc0c8 \uacc4\uc815","newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}
1216 +function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var e in a.Body.Handles)b=a.Body.Handles[e],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1217 +function getUserAclEntryExResponse(b,c,a,d,e){xxAccountFetch--;200==d&&(a.Body.Handle=e,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[e]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,e){200==d&&(xxAccountEnabledInfo[e]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,e){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(e,getAclEnabledStateResponse,e))}
1218 +function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>\uc774 \ucef4\ud4e8\ud130\uc758 \uc778\ud154 &reg; AMT \uc0ac\uc6a9\uc790 \uacc4\uc815\uc744 \uad00\ub9ac\ud558\uc2ed\uc2dc\uc624.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,e=!1,v=0;a.DigestUsername?(d=a.DigestUsername,e="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?
1219 +1:2);if(showHiddenAccounts||!e){var n="";if(999!=a.AccessPermission){2==v&&(n+="\uc7a5\uc560\uc778,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a["\uc601\uc5ed"][c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="\uac10\uc0ac,");n=0<=a.Realms.indexOf(3)?n+"\uad00\ub9ac\uc790":1==l?n+"1 \uac1c \uc601\uc5ed":n+(l+" \uc601\uc5ed")}else n+="\uad00\ub9ac\uc790",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?
1220 +"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!e&&xxAccountAdminName&&(b+=" "+AddButton2("\ud3b8\uc9d1\ud558\ub2e4...","changeAccountButton(event,"+a.Handle+")"));b+='</div><div style=padding-top:3px;width:330px;float:left;overflow-x:hidden title="'+d+'"><b>'+d+"</b></div><div style=padding-top:3px>"+n+"</div></div>"}}c='<div style=float:right;margin-right:8px><a title="\uc228\uaca8\uc9c4 \uacc4\uc815 \uc804\ud658" style=color:gray;cursor:pointer onclick=toggleAccountButton()>'+
1221 +(showHiddenAccounts?"&#x25B2;":"&#x25BC;")+"</a></div><div>&nbsp;"+AddRefreshButton("xxAccountFetch=999;PullUserInfo()");xxAccountAdminName&&(c+=AddButton("\uc0c8 \uacc4\uc815","newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(22,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1222 function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1223 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"\uacc4\uc815 \ud3b8\uc9d1",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1224 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"\uc0c8 \uacc4\uc815",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1205 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,g=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("\uacc4\uc815 \uc624\ub958","\uc798\ubabb\ub41c \ub9e4\uac1c \ubcc0\uc218");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&
1206 -a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,l,n,g,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,g,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}
1207 -function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">\uad00\ub9ac\uc790</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1208 -function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["\uc9c0\uc5ed \ub9cc","\ub124\ud2b8\uc6cc\ud06c \ub9cc","\ubaa8\ub450 (\ub85c\uceec \ubc0f \ub124\ud2b8\uc6cc\ud06c)"];
1209 -function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,g=c.DigestUsername;g||(g=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("\uc774\ub984",g);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("\uc0c1\ud0dc",1==xxAccountEnabledInfo[b].Enabled?"\uac00\ub2a5":"\ube44\ud65c\uc131\ud654"));if(g==xxAccountAdminName)a+=addHtmlValue("\ud5c8\uac00","\uad00\ub9ac\uc790");else{var a=a+addHtmlValue("\ud5c8\uac00",xxUserPermissions[c.AccessPermission]),v=
1210 -"";if(0<=c.Realms.indexOf(3))v="\uad00\ub9ac\uc790",0<=c.Realms.indexOf(20)&&(v+="\uac10\uc0ac");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="\uc5c6\uc74c");a+=addHtmlValue("\uc601\uc5ed","")+"<b>"+v+"</b>"}messagebox("\uacc4\uc815"+g,a+"</div>")}}
1211 -function wsmanQuery(){QH(24,"");var b=getSelectedOptions(Q(22)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(23,!1),c&&0<c.length&&amtstack.BatchEnum("\ube0c\ub77c\uc6b0\uc800",c,browserResponse,null,!0))}
1212 -function browserResponse(b,c,a,d){QE(23,!0);b="";for(var g in a)c=a[g],b+="<h2>"+g+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(\ube48)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>\uc624\ub958 #"+c.status+"</div>"),b+="</div><br>";QH(24,b)}
1225 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("\uacc4\uc815 \uc624\ub958","\uc798\ubabb\ub41c \ub9e4\uac1c \ubcc0\uc218");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&
1226 +a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1227 +function updateRealms(b){QV(62,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">\uad00\ub9ac\uc790</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(63,c)}}
1228 +function updateAccountDialog(){var b=!0;if("none"!=Q(62).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c106",b)}var xxUserPermissions=["\uc9c0\uc5ed \ub9cc","\ub124\ud2b8\uc6cc\ud06c \ub9cc","\ubaa8\ub450 (\ub85c\uceec \ubc0f \ub124\ud2b8\uc6cc\ud06c)"];
1229 +function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,e=c.DigestUsername;e||(e=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("\uc774\ub984",e);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("\uc0c1\ud0dc",1==xxAccountEnabledInfo[b].Enabled?"\uac00\ub2a5":"\ube44\ud65c\uc131\ud654"));if(e==xxAccountAdminName)a+=addHtmlValue("\ud5c8\uac00","\uad00\ub9ac\uc790");else{var a=a+addHtmlValue("\ud5c8\uac00",xxUserPermissions[c.AccessPermission]),v=
1230 +"";if(0<=c.Realms.indexOf(3))v="\uad00\ub9ac\uc790",0<=c.Realms.indexOf(20)&&(v+="\uac10\uc0ac");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="\uc5c6\uc74c");a+=addHtmlValue("\uc601\uc5ed","")+"<b>"+v+"</b>"}messagebox("\uacc4\uc815"+e,a+"</div>")}}
1231 +function wsmanQuery(){QH(25,"");var b=getSelectedOptions(Q(23)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(24,!1),c&&0<c.length&&amtstack.BatchEnum("\ube0c\ub77c\uc6b0\uc800",c,browserResponse,null,!0))}
1232 +function browserResponse(b,c,a,d){QE(24,!0);b="";for(var e in a)c=a[e],b+="<h2>"+e+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(\ube48)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>\uc624\ub958 #"+c.status+"</div>"),b+="</div><br>";QH(25,b)}
1233 function wsmanFilter(){var b=c0.value.toLowerCase(),c;for(c in AllWsman)QV("WSB-"+AllWsman[c],""==b||0<=AllWsman[c].toLowerCase().indexOf(b))}function connectTerminal(){terminal&&(0==terminal.State?(terminal.tlsv1only=amtstack.wsman.comm.tlsv1only,terminal.Start(currentMeshNode._id,16994,"*","*",0)):terminal.Stop())}
1214 -function onTerminalStateChange(b,c){c4.value=0==c?"\uc787\ub2e4":"\ubd84\ub9ac";Q(29).textContent=StatusStrs[c];QE(34,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection of not supported.");
1215 -break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(31).value="100x30",terminal.m.Init(100,30)):(Q(31).value="80x25",terminal.m.Init(80,25))}
1216 -var terminalEmulations=["UTF8 \ud130\ubbf8\ub110","\ud655\uc7a5 ASCII","\uc778\ud154 ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(33).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(32).value=["\uc778\ud154 (F10 = ESC + [OM)","\ub300\uccb4 (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1217 -function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(30).value="LF",terminal.m.lineFeed="\n"):(Q(30).value="CR + LF",terminal.m.lineFeed="\r\n")}
1234 +function onTerminalStateChange(b,c){c4.value=0==c?"\uc787\ub2e4":"\ubd84\ub9ac";Q(30).textContent=StatusStrs[c];QE(35,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection is not supported.");
1235 +break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(32).value="100x30",terminal.m.Init(100,30)):(Q(32).value="80x25",terminal.m.Init(80,25))}
1236 +var terminalEmulations=["UTF8 \ud130\ubbf8\ub110","\ud655\uc7a5 ASCII","\uc778\ud154 ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(34).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(33).value=["\uc778\ud154 (F10 = ESC + [OM)","\ub300\uccb4 (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1237 +function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(31).value="LF",terminal.m.lineFeed="\n"):(Q(31).value="CR + LF",terminal.m.lineFeed="\r\n")}
1238 function terminalCaptureToggle(b){if(!xxdialogMode)if(void 0==terminal.m.capture)terminal.m.capture="",c3.value="\ucea1\ucc98 \uc911\uc9c0";else{if(0<terminal.m.capture.length){b="TerminalCapture";var c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);saveAs(data2blob(terminal.m.capture),
1239 b+".txt")}delete terminal.m.capture;c3.value="\ucea1\ucc98 \uc2dc\uc791"}}function terminal_FileSelectHandler(b){haltEvent(b);if(3==terminal.State&&null!=b.dataTransfer&&1==b.dataTransfer.files.length){var c=new FileReader;c.onload=terminal_onSetupBinRead;c.readAsText(b.dataTransfer.files[0])}}function terminal_onSetupBinRead(b){d3pastetextarea.value=b.target.result;setDialogMode(3,"\ud480",3,termPaste)}var desktopScreenInfo=null,desktopPollTimer=null,webRtcDesktop=null;
1240 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1241 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1222 -function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1223 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1242 +function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&(null==amtsysstate||null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&null!=amtsysstate.IPS_OptInService.response&&0!=amtsysstate.IPS_OptInService.response.OptInRequired)?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&
1243 +null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1244 0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1245 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1246 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1247 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
1248 "\r\n"},webRtcDesktop.webrtc.oniceconnectionstatechange=function(){null==webRtcDesktop||null==webRtcDesktop.webrtc||"disconnected"!=webRtcDesktop.webrtc.iceConnectionState&&"failed"!=webRtcDesktop.webrtc.iceConnectionState||webRtcDesktopReset()},webRtcDesktop.webrtc.createOffer(function(a){webRtcDesktop.webrtcoffer=a;webRtcDesktop.webrtc.setLocalDescription(a,function(){},webRtcDesktopReset)},webRtcDesktopReset,{mandatory:{OfferToReceiveAudio:!1,OfferToReceiveVideo:!1}})):"answer"==a.action&&null!=
1229 -webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=
1230 -setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(42).innerHTML="")}
1249 +webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.m.ReverseMouseWheel=desktopsettings.reverseMouseWheel,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),
1250 +PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(43).innerHTML="")}
1251 function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(desktopScreenInfo=a.IPS_ScreenSettingData.responses.Body,desktopScreenInfo.KVMRSD=a.IPS_KVMRedirectionSettingData.responses.Body,UpdateDesktopDisplayInfo())}
1232 -function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1252 +function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(43).innerHTML=b+"&nbsp;":Q(43).innerHTML=""}
1253 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1234 -function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"\uc787\ub2e4":"\ubd84\ub9ac";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1","The device indicated that this type of connection of not supported."):
1235 -5E4==b.disconnectCode?messagebox("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
1254 +function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"\uc787\ub2e4":"\ubd84\ub9ac";var d=3==c&&!urlvars.kvmviewonly;QE(44,d);QE("deskkeys",d);QE("DeskWD",d);QE(45,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1","The device indicated that this type of connection is not supported."):
1255 +5E4==b.disconnectCode?messagebox("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?a=null!=b.connectTime&&b.connectTime+5E3<Date.now():50002==b.disconnectCode&&messagebox("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
1256 break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1237 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b="\uc18c\ud504\ud2b8 -KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}
1257 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b="\uc18c\ud504\ud2b8 -KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(41).textContent=StatusStrs[desktop.State]+b}
1258 function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud1b1 \uc124\uc815",3,showDesktopSettingsChanged))}
1239 -function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1240 -1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1241 -function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1242 -15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1259 +function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.reverseMouseWheel=d7kvmrmw.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();
1260 +desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1261 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;d7kvmrmw.checked=desktopsettings.reverseMouseWheel;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",
1262 +12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1263 c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1244 -QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1245 -function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1246 -"8px"),center()))}
1247 -function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"\uc6d0\uaca9 \ud0a4\ubcf4\ub4dc \uc785\ub825",3,showDeskTypeEx,'<div>\ud14d\uc2a4\ud2b8\ub97c \uc785\ub825\ud558\uace0 \ud655\uc778\uc744 \ud074\ub9ad\ud558\uc5ec \ubbf8\uad6d \uc601\uc5b4 \ud0a4\ubcf4\ub4dc\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc6d0\uaca9\uc73c\ub85c \uc785\ub825\ud558\uc2ed\uc2dc\uc624. \uacc4\uc18d\ud558\uae30 \uc804\uc5d0 \uc6d0\uaca9 \ucee4\uc11c\ub97c \uc62c\ubc14\ub978 \uc704\uce58\uc5d0 \ub193\uc73c\uc2ed\uc2dc\uc624.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1248 -var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
1249 -function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(48).checked||desktop.m.sendcad()}
1264 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(44,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1265 +function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1!=urlvars.kvmonly&&disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(36,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding="8px"),center()))}
1266 +function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(45).blur(),setDialogMode(11,"\uc6d0\uaca9 \ud0a4\ubcf4\ub4dc \uc785\ub825",3,showDeskTypeEx,'<div>\ud14d\uc2a4\ud2b8\ub97c \uc785\ub825\ud558\uace0 \ud655\uc778\uc744 \ud074\ub9ad\ud558\uc5ec \ubbf8\uad6d \uc601\uc5b4 \ud0a4\ubcf4\ub4dc\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc6d0\uaca9\uc73c\ub85c \uc785\ub825\ud558\uc2ed\uc2dc\uc624. \uacc4\uc18d\ud558\uae30 \uc804\uc5d0 \uc6d0\uaca9 \ucee4\uc11c\ub97c \uc62c\ubc14\ub978 \uc704\uce58\uc5d0 \ub193\uc73c\uc2ed\uc2dc\uc624.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),
1267 +Q("d2typeText").focus())}var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
1268 +function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(49).checked||desktop.m.sendcad()}
1269 var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511,0]],2:[[65511,1],[65362,1],[65362,0],[65511,0]],3:[[65511,1],[108,1],[108,0],[65511,0]],4:[[65511,1],[109,1],[109,0],[65511,0]],5:[[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]],6:[[65470,1],[65470,0]],7:[[65471,1],[65471,0]],8:[[65472,1],[65472,0]],9:[[65473,1],[65473,0]],10:[[65474,1],[65474,0]],11:[[65475,1],[65475,0]],12:[[65476,1],[65476,0]],13:[[65477,1],[65477,0]],14:[[65478,1],[65478,0]],15:[[65479,
1251 -1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]]};
1252 -function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1270 +1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]],25:[[65293,1],[65293,0]]};
1271 +function deskSendKeys(){if(!Q(49).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1272 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1254 -function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1255 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1273 +function dmousedown(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1274 +function dmousemove(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1275 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1276 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1277 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1259 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\ubfcc\ub9ac</a>",g=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in g)""!=g[v]&&p24filetreelocation.push(g[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var g=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+
1260 -EscapeHtml(p.substring(0,70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),e="";null!=l.d&&(e=new Date(l.d),e=e.getMonth()+1+"/"+e.getDate()+"/"+e.getFullYear()+" "+e.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1261 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(g+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+e+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1278 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\ubfcc\ub9ac</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,r;r=70<p.length?'<span title="'+EscapeHtml(p)+'">'+
1279 +EscapeHtml(p.substring(0,70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1280 +encodeURIComponent(l.nx)+'")>'+r+"</a></span></div>":(w=r,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+r+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1281 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1282 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1283 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1268,8 +1287,8 @@ QE("p24PasteButton",(0<p24filetreelocation.length||0==d)&&null!=p24clipboard&&0<
1287 function p24createfolder(){setDialogMode(11,"\uc0c8 \ud3f4\ub354",3,p24createfolderEx,"<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% />");focusTextBox("p24renameinput");p24fileNameCheck()}function p24createfolderEx(){p24files.sendCtrlMsg(JSON.stringify({action:"mkdir",reqid:1,path:p24filetreelocation.join("/")+"/"+Q("p24renameinput").value}));p24folderup(999)}
1288 function p24deletefile(){var b=p24getFileSelCount();setDialogMode(11,"\uc9c0\uc6b0\ub2e4",3,p24deletefileEx,1<b?"Delete "+b+" selected items?":"Delete selected item?")}function p24deletefileEx(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);p24files.sendCtrlMsg(JSON.stringify({action:"rm",reqid:1,path:p24filetreelocation.join("/"),delfiles:b}));p24folderup(999)}
1289 function p24renamefile(){for(var b,c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&(b=p24filetree.dir[c[a].value].n);setDialogMode(11,"\uc774\ub984 \ubc14\uafb8\uae30",3,p24renamefileEx,'<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% value="'+b+'" />',{action:"rename",path:p24filetreelocation.join("/"),oldname:b});focusTextBox("p24renameinput");p24fileNameCheck()}
1271 -function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c54",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1272 -function p24uploadFile(){setDialogMode(11,"\ud30c\uc77c \uc5c5\ub85c\ub4dc",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c54",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1290 +function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c106",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1291 +function p24uploadFile(){setDialogMode(11,"\ud30c\uc77c \uc5c5\ub85c\ub4dc",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c106",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1292 function p24copyFile(b){var c=document.getElementsByName("fd");p24clipboard=[];p24clipboardCut=b;p24clipboardFolder=p24targetpath;for(b=0;b<c.length;b++)c[b].checked&&"3"==c[b].attributes.file.value&&p24clipboard.push(p24filetree.dir[c[b].value].n);p24updateClipview()}
1293 function p24pasteFile(){var b="";null!=p24clipboard&&0<p24clipboard.length&&(b="Confim "+(0==p24clipboardCut?"copy":"move")+" of "+p24clipboard.length+" entrie"+(1<p24clipboard.length?"s":"")+" to this location?");setDialogMode(11,"\ud480",3,p24pasteFileEx,b)}
1294 function p24pasteFileEx(){p24files.sendCtrlMsg(JSON.stringify({action:0==p24clipboardCut?"copy":"move",reqid:1,scpath:p24clipboardFolder,dspath:p24targetpath,names:p24clipboard}));p24folderup(999);1==p24clipboardCut&&(p24clipboardFolder=p24clipboard=null,p24clipboardCut=0,p24updateClipview())}
@@ -1293,36 +1312,36 @@ else if(1==Q("cdromImageInput").files.length&&0!=Q("cdromImageInput").files[0].s
1312 function iderStart3(b,c,a){iderStop();ider=CreateAmtRedirect(CreateAmtRemoteIder());ider.onStateChanged=onIderStateChange;ider.m.floppy=b;ider.m.cdrom=c;ider.m.iderStart=a;ider.m.sectorStats=iderSectorStats;ider.tlsv1only=amtstack.wsman.comm.tlsv1only;ider.Start(currentMeshNode._id,16994,"*","*",0);QV("IDERDiskMapButton",!0)}
1313 function iderStop(){ider&&(ider.m.Stop(),ider.onStateChanged=null,ider.m.onDialogPrompt=null,delete ider);iderTimer&&(clearInterval(iderTimer),delete iderTimer);iderToggleDiskMap(!1)}function onIderStateChange(b,c){QE("c2",3!=c);QE("c8",3!=c);QE("c1",3!=c);QE("c7",3!=c);QV(9,3==c);center();3==c?(urlvars.norefresh||(iderTimer=setInterval(onIderTimer,500)),onIderTimer()):iderTimer&&(clearInterval(iderTimer),delete iderTimer)}
1314 function onIderTimer(){ider.m.Update&&ider.m.Update();-1==ider.m.bytesFromAmt?iderStop():QH(10,"<b>"+(ider.m.server?"\uc12c\uae30\ub294 \uc0ac\ub78c":"")+"IDE-R \uc138\uc158 </ b>, \uc5f0\uacb0\ub428,"+ider.m.bytesFromAmt+" \uc5d0,"+ider.m.bytesToAmt+" \ubc16.")}var heatMapWidth=600,heatMapDividor={};
1296 -function iderSectorStats(b,c,a,d,g){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </ b>\uc5d0\uc11c \ube14\ub85d\uc740 {0} \ubc14\uc774\ud2b8\uc785\ub2c8\ub2e4.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> \ud50c\ub85c\ud53c </ b>, \ube14\ub85d\uc740 {0} \ubc14\uc774\ud2b8\uc785\ub2c8\ub2e4.",
1297 -512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;g/=c;if(0==b)v.height=6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+g;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1315 +function iderSectorStats(b,c,a,d,e){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </ b>\uc5d0\uc11c \ube14\ub85d\uc740 {0} \ubc14\uc774\ud2b8\uc785\ub2c8\ub2e4.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> \ud50c\ub85c\ud53c </ b>, \ube14\ub85d\uc740 {0} \ubc14\uc774\ud2b8\uc785\ub2c8\ub2e4.",
1316 +512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;e/=c;if(0==b)v.height=6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+e;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1317 function iderToggleDiskMap(b){var c="none"!=QS("iderHeatmap").display;null==b&&(b=!c);xxdialogMode&&(b=!1);QS("iderHeatmap").display=b?"":"none"}function onIderDialogPrompt(b,c,a){iderCodeBlock&&(document.body.removeChild(iderCodeBlock),delete iderCodeBlock);c.js&&(b=document.createElement("script"),b.text=c.js,iderCodeBlock=document.body.appendChild(b));setDialogMode(11,"\uc2a4\ud1a0\ub9ac\uc9c0 \ub9ac\ub514\ub809\uc158",a?a:3,onIderDialogPromptOk,c.html)}
1318 function onIderDialogPromptOk(b){1==b?window.iderServerCall?ider.m.dialogPrompt(window.iderServerCall()):ider.m.dialogPrompt():iderStop()}function iderServerStart(){xxdialogMode||(iderStop(),ider=CreateAmtRemoteServerIder(),null!=ider&&(ider.onStateChanged=onIderStateChange,ider.m.sectorStats=iderSectorStats,ider.m.onDialogPrompt=onIderDialogPrompt,ider.tlsv1only=amtstack.wsman.comm.tlsv1only,ider.Start(currentMeshNode._id,16994,"*","*",0)))}
1319 var xxRemoteAccess=null,xxEnvironementDetection=null,xxCiraServers=null,xxUserInitiatedCira=null,xxUserInitiatedEnabledState={32768:"\ube44\ud65c\uc131\ud654",32769:"BIOS \ud65c\uc131\ud654",32770:"OS \uc778 \uc5d0\uc774\ube14",32771:"BIOS \ubc0f OS \ud65c\uc131\ud654"},xxRemoteAccessCredentiaLinks=null,xxMPSUserPass=null,xxPolicies=null;
1320 function PullRemoteAccess(){var b="*AMT_EnvironmentDetectionSettingData AMT_ManagementPresenceRemoteSAP AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule *AMT_UserInitiatedConnectionService AMT_MPSUsernamePassword".split(" ");11<amtversion&&b.push("*IPS_HTTPProxyService","IPS_HTTPProxyAccessPoint");amtstack.BatchEnum(null,b,processRemote1)}
1302 -function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var g in a)200!=a[g].status&&(d=a[g].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1303 -MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(g in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[g],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1321 +function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var e in a)200!=a[e].status&&(d=a[e].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1322 +MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(e in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[e],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1323 "@Name","Name").Value)),b.MpsType=c.MpsType,c=getItem(c.PolicySet.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyRuleName").Value.split(" ")[0],xxPolicies[c].push(b);updateRemoteAccess()}}
1324 function updateRemoteAccess(){if(null!=xxEnvironementDetection){var b,c="\ube44\ud65c\uc131\ud654",a=xxRemoteAccess.IPS_HTTPProxyService&&xxRemoteAccess.IPS_HTTPProxyAccessPoint;xxEnvironementDetection.DetectionStrings&&0<xxEnvironementDetection.DetectionStrings.length&&(c="\uc0ac\uc6a9,"+xxEnvironementDetection.DetectionStrings.length+" "+(1<xxEnvironementDetection.DetectionStrings.length?"domains":"domain"));b=""+TableStart();b+=TableEntry("\ud658\uacbd \uac10\uc9c0",addLink(c,"editEnvironmentDetection()"));
1325 b+=TableEntry("\uc0ac\uc6a9\uc790 \uc2dc\uc791 \uc635\uc158",addLinkConditional(xxUserInitiatedEnabledState[xxUserInitiatedCira.EnabledState],"editUserInitiatedCira()",xxAccountAdminName));c="<i>\uc5c6\uc74c</i>";if(0<xxPolicies.User.length){var c="",d;for(d in xxPolicies.User)0<c.length&&(c+=", "),c+=xxPolicies.User[d].AccessInfo,1==xxPolicies.User[d].MpsType&&(c+=" (CILA)")}b+=TableEntry("\uc0ac\uc6a9\uc790 \uc2dc\uc791 \uc5f0\uacb0",addLinkConditional(c,'editMpsPolicy("User")',xxAccountAdminName));
1326 c="<i>\uc5c6\uc74c</i>";if(0<xxPolicies.Alert.length)for(d in c="",xxPolicies.Alert)0<c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("\uacbd\uace0 \uc2dc\uc791 \uc5f0\uacb0",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>\uc5c6\uc74c</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");
1308 -var g=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName","\uc8fc\uae30\uc801");if(g){var v=atob(g.ExtendedData);0==ReadInt(v,0)&&(c+=format("{0} \ucd08\ub9c8\ub2e4",ReadInt(v,4)));1==ReadInt(v,0)&&(g=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+g+":"+v+" daily")}b+=TableEntry("\uc8fc\uae30\uc801 \uc5f0\uacb0",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\uc778\ud154 &reg; AMT \uc6d0\uaca9 \uad00\ub9ac \uc11c\ubc84\ub97c \uad00\ub9ac\ud569\ub2c8\ub2e4.<br><br>";
1327 +var e=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName","\uc8fc\uae30\uc801");if(e){var v=atob(e.ExtendedData);0==ReadInt(v,0)&&(c+=format("{0} \ucd08\ub9c8\ub2e4",ReadInt(v,4)));1==ReadInt(v,0)&&(e=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+e+":"+v+" daily")}b+=TableEntry("\uc8fc\uae30\uc801 \uc5f0\uacb0",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\uc778\ud154 &reg; AMT \uc6d0\uaca9 \uad00\ub9ac \uc11c\ubc84\ub97c \uad00\ub9ac\ud569\ub2c8\ub2e4.<br><br>";
1328 if(0==xxCiraServers.length)b+="<div style=padding-left:15px><br><i>\uc6d0\uaca9 \uc11c\ubc84\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.</i></div><br>";else for(d in xxCiraServers)c=":"+xxCiraServers[d].Port,xxCiraServers[d].CN&&(c+=", "+xxCiraServers[d].CN),b+="<div class=itemBar onclick=showServerDetails("+d+")><div style=padding-top:3px><b>"+xxCiraServers[d].AccessInfo+"</b>"+EscapeHtml(c)+"</div></div>";if(a)if(b+="<br>\uc5f0\uacb0 \uad00\ub9ac\uc5d0 \uc0ac\uc6a9\ub418\ub294 HTTP \ud504\ub85d\uc2dc\ub97c \uad00\ub9ac\ud569\ub2c8\ub2e4.<br><br>",
1329 c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses,0==c.length)b+="<div style=padding-left:15px><br><i>\ud504\ub85d\uc2dc\uac00 \uad6c\uc131\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.</i></div><br>";else for(d in c)b+="<div class=itemBar onclick=showProxyDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(c[d].AccessInfo)+":"+c[d].Port+"</b> / "+EscapeHtml(c[d].NetworkDnsSuffix)+"</div></div>";d="";xxAccountAdminName&&(d=AddButton("\uc11c\ubc84 \ucd94\uac00...","AddRemoteAccessServer()"),
1311 -a&&(d+=AddButton("\ud504\ub85d\uc2dc \ucd94\uac00 ...","AddRemoteAccessProxy()")));b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+d);QH(52,b)}}var xxEditMpsPolicyType;
1312 -function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="\uc2dc\uc791\ub41c \uc0ac\uc6a9\uc790");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(\uc5c6\uc74c)",g;for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[g].Name?
1313 -" selected":"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>\uae30\ubcf8 \uc11c\ubc84</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA-\uc678\ubd80<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA-\ub0b4\ubd80</select><div>\uae30\ubcf8 MPS \uc720\ud615</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";
1314 -c+="<option value=-1>(\uc5c6\uc74c)";for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[g].Name?" selected":"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>\ubcf4\uc870 \uc11c\ubc84</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA-\uc678\ubd80<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA-\ub0b4\ubd80</select><div>\ubcf4\uc870 MPS \uc720\ud615</div></div>")}g=
1315 -0;d&&(g=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+g+">";c+="<div>\ud130\ub110 \uc218\uba85 (\ucd08)</div></div>";"Periodic"==b&&(a=0,g=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),g=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),g+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">\uc8fc\uae30\uc801, \uc2dc\uac04 \uac04\uaca9<option value=1"+
1316 -(1==a?" selected":"")+">\ud558\ub8e8\uc5d0 \ud55c \ubc88 \uc2dc\uac04",c+="</select><div>\ud2b8\ub9ac\uac70 \ud0c0\uc785</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+g+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0} \uc5f0\uacb0",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1317 -function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c54",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1330 +a&&(d+=AddButton("\ud504\ub85d\uc2dc \ucd94\uac00 ...","AddRemoteAccessProxy()")));b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+d);QH(53,b)}}var xxEditMpsPolicyType;
1331 +function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="\uc2dc\uc791\ub41c \uc0ac\uc6a9\uc790");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(\uc5c6\uc74c)",e;for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[e].Name?
1332 +" selected":"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>\uae30\ubcf8 \uc11c\ubc84</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA-\uc678\ubd80<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA-\ub0b4\ubd80</select><div>\uae30\ubcf8 MPS \uc720\ud615</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";
1333 +c+="<option value=-1>(\uc5c6\uc74c)";for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[e].Name?" selected":"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>\ubcf4\uc870 \uc11c\ubc84</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA-\uc678\ubd80<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA-\ub0b4\ubd80</select><div>\ubcf4\uc870 MPS \uc720\ud615</div></div>")}e=
1334 +0;d&&(e=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+e+">";c+="<div>\ud130\ub110 \uc218\uba85 (\ucd08)</div></div>";"Periodic"==b&&(a=0,e=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),e=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),e+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">\uc8fc\uae30\uc801, \uc2dc\uac04 \uac04\uaca9<option value=1"+
1335 +(1==a?" selected":"")+">\ud558\ub8e8\uc5d0 \ud55c \ubc88 \uc2dc\uac04",c+="</select><div>\ud2b8\ub9ac\uac70 \ud0c0\uc785</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+e+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0} \uc5f0\uacb0",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1336 +function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c106",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1337 -1!=Q("d2server1").value),QH("ttypelabel",0==Q("d2ttype").value?"\ud2b8\ub9ac\uac70 \uac04\uaca9 (\ucd08)":"\uc2dc\uac04 (HH : MM)"),QE("d2ttype",-1!=Q("d2server1").value));QE("d2lifetime",-1!=Q("d2server1").value);b&&(QE("d2server1cira",-1<Q("d2server1").value),1<xxCiraServers.length&&QE("d2server2cira",-1<Q("d2server1").value&&-1<Q("d2server2").value))}
1338 function editMpsPolicyOk(){var b=xxEditMpsPolicyType;"User"==b&&(b="User Initiated");getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",b)?amtstack.Delete("AMT_RemoteAccessPolicyRule",{PolicyRuleName:b},editMpsPolicyOk2):editMpsPolicyOk2()}
1320 -function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var g,v;0<=Q("d2server1").value&&(g='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1339 +function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var e,v;0<=Q("d2server1").value&&(e='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1340 xxCiraServers[Q("d2server1").value].Name+"</Selector></SelectorSet></ReferenceParameters>");0<=Q("d2server1").value&&1<xxCiraServers.length&&0<=Q("d2server2").value&&(v='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1322 -xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?g&&(0==Q("d2server1cira").value?d.push(g):n.push(g),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):g&&(d.push(g),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1341 +xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?e&&(0==Q("d2server1cira").value?d.push(e):n.push(e),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):e&&(d.push(e),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1342 function editEnvironmentDetection(b){1!=b&&(editEnvironmentDetectionTmp=xxEnvironementDetection.DetectionStrings?Clone(xxEnvironementDetection.DetectionStrings):[]);var c="";xxAccountAdminName&&(c+="\uc778\ud2b8\ub77c\ub137 \ub3c4\uba54\uc778 \uc811\ubbf8\uc0ac\ub97c \ucd5c\ub300 5 \uac1c\uae4c\uc9c0 \uc785\ub825\ud558\uc2ed\uc2dc\uc624. \ucef4\ud4e8\ud130\uac00\uc774 \ub3c4\uba54\uc778 \uc678\ubd80\uc5d0 \uc788\uc73c\uba74 \uc778\ud154 &reg; AMT \ub85c\uceec \ud3ec\ud2b8\uac00 \ub2eb\ud788\uace0 \uc6d0\uaca9 \uc11c\ubc84 \uc5f0\uacb0\uc774 \ud65c\uc131\ud654\ub429\ub2c8\ub2e4.<br><br>");
1343 0==editEnvironmentDetectionTmp.length&&(c+="<i>\uc778\ud2b8\ub77c\ub137 \ub3c4\uba54\uc778\uc774 \uc5c6\uc73c\uba70 \ud658\uacbd \ud0d0\uc9c0\uac00 \ube44\ud65c\uc131\ud654\ub418\uc5c8\uc2b5\ub2c8\ub2e4.</i><br>");for(var a in editEnvironmentDetectionTmp)c+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("\uc5c6\uc560\ub2e4","editEnvironmentDetectionRemove("+a+")")+'</div><div style=padding-top:3px;max-width:260px;overflow:hidden title="'+editEnvironmentDetectionTmp[a]+
1325 -'"><b>'+editEnvironmentDetectionTmp[a]+"</b></div></div>";xxAccountAdminName&&5>editEnvironmentDetectionTmp.length&&(c+="<br><input id=edInput placeholder=intranet.org style=width:276px onkeyup=edInputChg() maxlength=63><input type=button id=edAdd value=Add style=width:80px;margin-left:5px onclick=editEnvironmentDetectionAdd()>");1==b?QH(63,c):setDialogMode(11,"\ud658\uacbd \uac10\uc9c0",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}
1344 +'"><b>'+editEnvironmentDetectionTmp[a]+"</b></div></div>";xxAccountAdminName&&5>editEnvironmentDetectionTmp.length&&(c+="<br><input id=edInput placeholder=intranet.org style=width:276px onkeyup=edInputChg() maxlength=63><input type=button id=edAdd value=Add style=width:80px;margin-left:5px onclick=editEnvironmentDetectionAdd()>");1==b?QH(64,c):setDialogMode(11,"\ud658\uacbd \uac10\uc9c0",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}
1345 function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1346 function editEnvironmentDetectionDlg2(b,c,a,d){200!=d?messagebox("\ud658\uacbd \uac10\uc9c0",format("\uc11c\ubc84\ub97c \ucd94\uac00\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4 (\uc0c1\ud0dc {0}).",d)):a.Body.ReturnValue&&0!=a.Body.ReturnValue?messagebox("\ud658\uacbd \uac10\uc9c0",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}function edInputChg(){5>editEnvironmentDetectionTmp.length&&QE("edAdd",0<Q("edInput").value.length)}
1347 function editEnvironmentDetectionAdd(){editEnvironmentDetectionTmp.push(Q("edInput").value);editEnvironmentDetection(1)}function editEnvironmentDetectionRemove(b){editEnvironmentDetectionTmp.splice(b,1);editEnvironmentDetection(1)}
@@ -1337,7 +1356,7 @@ function showProxyDetails(b){var c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.respo
1356 function showProxyDetailsOk(b,c){var a=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses[c];2==b&&amtstack.Delete("IPS_HTTPProxyAccessPoint",{Name:a.Name},showProxyDetailsOk2)}function showProxyDetailsOk2(b,c,a,d){408==d?messagebox("HTTP \ud504\ub85d\uc2dc \uc81c\uac70","HTTP \ud504\ub85d\uc2dc\ub97c \uc81c\uac70 \ud560 \uc218 \uc5c6\uc73c\uba70 \uc561\uc138\uc2a4\uac00 \uac70\ubd80\ub418\uc5c8\uc2b5\ub2c8\ub2e4."):PullRemoteAccess()}
1357 function AddRemoteAccessProxy(){var b;b='<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessProxyUpdate()><option value=2>\ud638\uc2a4\ud2b8 \uc774\ub984 FQDN<option value=3>IPv4 \uc8fc\uc18c<option value=4>IPv6 \uc8fc\uc18c</select><div>\uc5f0\uacb0 \ud0c0\uc785</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>\ud3ec\ud2b8</div></div>';b+=
1358 "<div style=height:26px><input id=d2domain style=float:right;width:200px maxlength=191 onkeyup=AddRemoteAccessProxyUpdate()><div>DNS \uc811\ubbf8\uc0ac</div></div>";setDialogMode(11,"HTTP \ud504\ub85d\uc2dc \ucd94\uac00",3,AddRemoteAccessProxyOk,b);AddRemoteAccessProxyUpdate()}
1340 -function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c54",b);QH("d2typespan",["","","FQDN / \ud638\uc2a4\ud2b8 \uc774\ub984","IPv4 \uc8fc\uc18c","IPv6 \uc8fc\uc18c"][Q("d2type").value])}
1359 +function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c106",b);QH("d2typespan",["","","FQDN / \ud638\uc2a4\ud2b8 \uc774\ub984","IPv4 \uc8fc\uc18c","IPv6 \uc8fc\uc18c"][Q("d2type").value])}
1360 function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
1361 function AddRemoteAccessProxyOk2(b,c,a,d){200!=d?messagebox("\ud504\ub85d\uc2dc \uc11c\ubc84 \ucd94\uac00","\ud504\ub85d\uc2dc, \uc0c1\ud0dc\ub97c \ucd94\uac00\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4."+d):0!=a.Body.ReturnValue?messagebox("\ud504\ub85d\uc2dc \uc11c\ubc84 \ucd94\uac00",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1362 function AddRemoteAccessServer(){var b=[],c;for(c in xxCertificates)xxCertificates[c].XPrivateKey&&b.push(xxCertificates[c]);var a;a="<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()><option value=201>\ud638\uc2a4\ud2b8 \uc774\ub984 FQDN<option value=3>IPv4 \uc8fc\uc18c</select><div>\uc5f0\uacb0 \ud0c0\uc785</div></div><div style=height:26px><input id=d2name style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div id=d2lname></div></div>";a+=
@@ -1348,90 +1367,92 @@ function AddRemoteAccessServerOk(){var b,c,a,d;1==Q("d2auth").value?b='<Address
1367 "</Selector></SelectorSet></ReferenceParameters>":(c=Q("d2user").value,a=Q("d2pass").value);0<Q("d2cn").value.length&&(d=Q("d2cn").value);amtstack.AMT_RemoteAccessService_AddMpServer(Q("d2name").value,Q("d2type").value,Q("d2port").value,Q("d2auth").value,b,c,a,d,AddRemoteAccessServerOk2)}
1368 function AddRemoteAccessServerOk2(b,c,a,d){200!=d?messagebox("\uc778\ud130\ub137 \uc11c\ubc84 \ucd94\uac00",format("\uc11c\ubc84\ub97c \ucd94\uac00\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4 (\uc0c1\ud0dc {0}).",d)):0!=a.Body.ReturnValue?messagebox("\uc778\ud130\ub137 \uc11c\ubc84 \ucd94\uac00",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1369 function AddRemoteAccessServerUpdate(){var b=0!=Q("d2name").value.length;3==Q("d2type").value&&1==b&&(b=0!=Q("d2cn").value.length);2==Q("d2auth").value&&1==b&&(b=0!=Q("d2user").value.length&&passwordcheck(Q("d2pass").value));if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;if(-1!=Q("d2name").value.indexOf(":")||3==Q("d2type").value&&-1!=Q("d2cn").value.indexOf(":"))b=!1;QH("d2lname",201==Q("d2type").value?"\ud638\uc2a4\ud2b8 \uc774\ub984":"IPv4 \uc8fc\uc18c");QV("d2utype",2==
1351 -Q("d2auth").value);QV("d2ucn",3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c54",b)}
1370 +Q("d2auth").value);QV("d2ucn",3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c106",b)}
1371 function showEditNameDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_GeneralSettings.response.HostName,a=amtsysstate.AMT_GeneralSettings.response.DomainName;null!=a&&0<a.length&&(c+="."+a);c='<br><div style=height:26px><input id=d11name value="'+c+'" style=float:right;width:200px><div>\uc774\ub984 \ubc0f \ub3c4\uba54\uc778</div></div>';1==b&&(b=1==amtsysstate.AMT_GeneralSettings.response.SharedFQDN,c+="<div style=height:26px><select id=d11fqdn style=float:right;width:200px><option value=true "+(b?
1372 "selected":"")+'>OS\uc640 \ub3d9\uc77c<option value="false" '+(b?"":"selected")+">OS\uc640 \ub2e4\ub978 \uc804\uc6a9</select><div>\uc774\ub984 \uacf5\uc720</div></div>");setDialogMode(11,"\ucef4\ud4e8\ud130 \uc774\ub984",3,editNameDlgOk,c)}}
1373 function editNameDlgOk(){var b=Q("d11name").value,c=b.indexOf("."),a="";0<=c&&(a=b.substring(c+1),b=b.substring(0,c));c=Clone(amtsysstate.AMT_GeneralSettings.response);c.HostName=b;c.DomainName=a;Q("d11fqdn")&&(c.SharedFQDN=d11fqdn.value);amtstack.Put("AMT_GeneralSettings",c,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}function computerNameGet(b,c,a,d){200==d&&(amtsysstate.AMT_GeneralSettings.response=a.Body,updateSystemStatus())}
1355 -function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c36.value=c;c37.value=b.DDNSPeriodicUpdateInterval;c38.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"\ub3d9\uc801 DNS \ud074\ub77c\uc774\uc5b8\ud2b8",3,showEditDnsDlgOk)}}
1356 -function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c36.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c36.value?!0:!1;2==c36.value&&(b.DDNSPeriodicUpdateInterval=c37.value,b.DDNSTTL=c38.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1357 -function showEditDnsDlgChange(){QE("c37",2==c36.value);QE("c38",2==c36.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"\uc778\ud154 &reg; AMT \uae30\ub2a5",3,featuresDlgOk))}
1358 -function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,g){200!=g?messagebox("\uc624\ub958","RedirectionService, RequestStateChange \uc624\ub958"+g):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,g){200!=g?messagebox("\uc624\ub958",
1359 -"KVMRedirectionSAP, RequestStateChange \uc624\ub958"+g):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("\uc624\ub958","\ub9ac\ub514\ub809\uc158 \uc11c\ube44\uc2a4 PUT \uc624\ub958"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}
1374 +function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c61.value=c;c62.value=b.DDNSPeriodicUpdateInterval;c63.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"\ub3d9\uc801 DNS \ud074\ub77c\uc774\uc5b8\ud2b8",3,showEditDnsDlgOk)}}
1375 +function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c61.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c61.value?!0:!1;2==c61.value&&(b.DDNSPeriodicUpdateInterval=c62.value,b.DDNSTTL=c63.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1376 +function showEditDnsDlgChange(){QE("c62",2==c61.value);QE("c63",2==c61.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"\uc778\ud154 &reg; AMT \uae30\ub2a5",3,featuresDlgOk))}
1377 +function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,e){200!=e?messagebox("\uc624\ub958","RedirectionService, RequestStateChange \uc624\ub958"+e):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,e){200!=e?messagebox("\uc624\ub958",
1378 +"KVMRedirectionSAP, RequestStateChange \uc624\ub958"+e):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("\uc624\ub958","\ub9ac\ub514\ub809\uc158 \uc11c\ube44\uc2a4 PUT \uc624\ub958"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}
1379 function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1361 -function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c49.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c50.checked=!c49.checked),c51.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c52.checked=!c51.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1380 +function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c74.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c75.checked=!c74.checked),c76.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c77.checked=!c76.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1381 function showEnableBootServiceDlgOk(){var b=32768+parseInt(document.querySelector("input[name=d26a]:checked").value);15<amtversion&&(b+=parseInt(document.querySelector("input[name=d26b]:checked").value));amtstack.CIM_BootService_RequestStateChange(b,null,showEnableBootServiceDlgResponse,b)}
1363 -function showEnableBootServiceDlgResponse(b,c,a,d,g){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,g),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1364 -function showEnableBootServiceDlgResponse2(b,c,a,d,g){200==d&&a.Body.EnabledState!=g&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"\uc0ac\uc6a9\uc790 \ub3d9\uc758",3,consentDlgOk)}}
1382 +function showEnableBootServiceDlgResponse(b,c,a,d,e){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,e),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1383 +function showEnableBootServiceDlgResponse2(b,c,a,d,e){200==d&&a.Body.EnabledState!=e&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"\uc0ac\uc6a9\uc790 \ub3d9\uc758",3,consentDlgOk)}}
1384 function consentDlgOk(){amtsysstate.IPS_OptInService.response.OptInRequired=document.querySelector("input[name=d10]:checked").value;amtstack.Put("IPS_OptInService",amtsysstate.IPS_OptInService.response,function(){amtstack.Get("IPS_OptInService",consentGet,0,1)},0,1)}function consentGet(b,c,a,d){200==d&&PullSystemStatus()}var ipv6addrtype="\ud604\uc9c0 \uc8fc\uc18c \uc5f0\uacb0;\ub124\ud2b8\uc6cc\ud06c \ub85c\uceec \uc8fc\uc18c;\uc804 \uc138\uacc4 \uc8fc\uc18c;\uc0ac\uc6a9\uc790 \uad6c\uc131;\ud5c8\uc6a9\ub418\uc9c0 \uc54a\uc74c;\uc544\ube60\uac00 \uc9c4\ud589\uc911;\uc720\ud6a8\ud55c;\ub354 \uc774\uc0c1 \uc0ac\uc6a9\ub418\uc9c0 \uc54a\uc74c;\uc120\ud638 / \ube44\ucd94\ucc9c;\ub9cc\ub8cc;\ucda9\ub3cc;\ud5c8\uc6a9\ub418\uc9c0 \uc54a\uc74c".split(";");
1385 function showIPv6AddrDlg(b,c){if(!xxdialogMode){var a=TableStart();t=c.split(",");for(var d=0;d<t.length;d+=3)a+=TableEntry("<b>"+t[d]+"</b><br><span style=font-size:10px>"+ipv6addrtype[t[d+1]]+","+ipv6addrtype[+t[d+2]+5]+"</span>","");setDialogMode(11,0==b?"\uc720\uc120 \uc778\ud130\ud398\uc774\uc2a4 \uc6a9 IPv6 \uc8fc\uc18c":"\ubb34\uc120 \uc778\ud130\ud398\uc774\uc2a4 \uc6a9 IPv6 \uc8fc\uc18c",1,null,a+TableEnd())}}
1367 -function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(69,0==b);QV(70,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 \ube44\ud65c\uc131\ud654");QH("d21l1","IPv6 \uc0ac\uc6a9, \uc790\ub3d9");QH("d21l2","IPv6 \uc0ac\uc6a9, \uc790\ub3d9 + \uc218\ub3d9 \uc8fc\uc18c");d21o0.checked=
1368 -!c;d21o1.checked=c&&!ipv6manual;d21o2.checked=c&&ipv6manual;c31.value=isIpAddress(a.IPv6Address,"");c33.value=isIpAddress(a.DefaultRouter,"");c34.value=isIpAddress(a.PrimaryDNS,"");c35.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"\uc720\uc120 \uc778\ud130\ud398\uc774\uc2a4\uc5d0 \ub300\ud55c IPv6 \uc9c0\uc6d0":"\ubb34\uc120 \uc778\ud130\ud398\uc774\uc2a4\uc5d0 \ub300\ud55c IPv6 \uc9c0\uc6d0",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1369 -function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c31.value?"::":c31.value.toLocaleLowerCase(),a.DefaultRouter=""==c33.value?"::":c33.value.toLocaleLowerCase(),
1370 -a.PrimaryDNS=""==c34.value?"::":c34.value.toLocaleLowerCase(),a.SecondaryDNS=""==c35.value?"::":c35.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1371 -"CreationClassName").Value,g=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1372 -d+'</w:Selector><w:Selector Name="DeviceID">'+g+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1373 -b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",g=Clone(c[a]);g.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",g,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv6 \uc9c0\uc6d0",format("IPv6 \uc0c1\ud0dc\ub97c \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc624\ub958 {0}",d))}
1386 +function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(68,0==b);QV(69,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 \ube44\ud65c\uc131\ud654");QH("d21l1","IPv6 \uc0ac\uc6a9, \uc790\ub3d9");QH("d21l2","IPv6 \uc0ac\uc6a9, \uc790\ub3d9 + \uc218\ub3d9 \uc8fc\uc18c");d21o0.checked=
1387 +!c;d21o1.checked=c&&!ipv6manual;d21o2.checked=c&&ipv6manual;c56.value=isIpAddress(a.IPv6Address,"");c58.value=isIpAddress(a.DefaultRouter,"");c59.value=isIpAddress(a.PrimaryDNS,"");c60.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"\uc720\uc120 \uc778\ud130\ud398\uc774\uc2a4\uc5d0 \ub300\ud55c IPv6 \uc9c0\uc6d0":"\ubb34\uc120 \uc778\ud130\ud398\uc774\uc2a4\uc5d0 \ub300\ud55c IPv6 \uc9c0\uc6d0",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1388 +function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c56.value?"::":c56.value.toLocaleLowerCase(),a.DefaultRouter=""==c58.value?"::":c58.value.toLocaleLowerCase(),
1389 +a.PrimaryDNS=""==c59.value?"::":c59.value.toLocaleLowerCase(),a.SecondaryDNS=""==c60.value?"::":c60.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1390 +"CreationClassName").Value,e=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1391 +d+'</w:Selector><w:Selector Name="DeviceID">'+e+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1392 +b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",e=Clone(c[a]);e.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",e,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv6 \uc9c0\uc6d0",format("IPv6 \uc0c1\ud0dc\ub97c \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc624\ub958 {0}",d))}
1393 function showPingActionDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,b=(1==b.PingResponseEnabled)+((1==b.RmcpPingResponseEnabled)<<1);d20a.checked=0==b;d20b.checked=1==b;d20c.checked=2==b;d20d.checked=3==b;setDialogMode(20,"\uc778\ud154 &reg; AMT \ud551 \uc751\ub2f5",3,showPingActionDlgOk)}}
1394 function showPingActionDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response),c=document.querySelector("input[name=d20]:checked").value;b.PingResponseEnabled=0!=(c&1);b.RmcpPingResponseEnabled=0!=(c&2);amtstack.Put("AMT_GeneralSettings",b,PullSystemStatus,0,1)}
1376 -function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(68,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(69,!0);QV(70,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","DHCP \uc11c\ubc84\ub97c \uc0ac\uc6a9\ud55c \uc790\ub3d9 \uad6c\uc131");QH("d21l2","\uc544\ub798 IPv4 \uc124\uc815\uc744 \uc0ac\uc6a9\ud55c \uc815\uc801 \uad6c\uc131");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=
1377 -!d21o1.checked;c31.value=isIpAddress(b.IPAddress,"");c32.value=isIpAddress(b.SubnetMask,"");c33.value=isIpAddress(b.DefaultGateway,"");c34.value=isIpAddress(b.PrimaryDNS,"");c35.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"IPv4 \uc124\uc815",3,showIPSetupDlgOk)}}
1378 -function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6 \uc0ac\uc6a9, \uc790\ub3d9 + \uc218\ub3d9 \uc8fc\uc18c"==Q("d21l2").innerHTML&&2>c31.value.split(":").length&&(b=!1);QE("c54",b);c31.disabled=c32.disabled=c33.disabled=c34.disabled=c35.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1379 -function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c31.value,b.SubnetMask=c32.value,b.DefaultGateway=c33.value,""!=c34.value&&(b.PrimaryDNS=c34.value),""!=c35.value&&
1380 -(b.SecondaryDNS=c35.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv4 \uc124\uc815",format("\ub124\ud2b8\uc6cc\ud06c \ub9e4\uac1c \ubcc0\uc218\ub97c \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc624\ub958 {0}",d))}amtPowerBootCapabilities=null;
1395 +function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(67,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(68,!0);QV(69,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","DHCP \uc11c\ubc84\ub97c \uc0ac\uc6a9\ud55c \uc790\ub3d9 \uad6c\uc131");QH("d21l2","\uc544\ub798 IPv4 \uc124\uc815\uc744 \uc0ac\uc6a9\ud55c \uc815\uc801 \uad6c\uc131");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=
1396 +!d21o1.checked;c56.value=isIpAddress(b.IPAddress,"");c57.value=isIpAddress(b.SubnetMask,"");c58.value=isIpAddress(b.DefaultGateway,"");c59.value=isIpAddress(b.PrimaryDNS,"");c60.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"IPv4 \uc124\uc815",3,showIPSetupDlgOk)}}
1397 +function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6 \uc0ac\uc6a9, \uc790\ub3d9 + \uc218\ub3d9 \uc8fc\uc18c"==Q("d21l2").innerHTML&&2>c56.value.split(":").length&&(b=!1);QE("c106",b);c56.disabled=c57.disabled=c58.disabled=c59.disabled=c60.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1398 +function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c56.value,b.SubnetMask=c57.value,b.DefaultGateway=c58.value,""!=c59.value&&(b.PrimaryDNS=c59.value),""!=c60.value&&
1399 +(b.SecondaryDNS=c60.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv4 \uc124\uc815",format("\ub124\ud2b8\uc6cc\ud06c \ub9e4\uac1c \ubcc0\uc218\ub97c \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc624\ub958 {0}",d))}amtPowerBootCapabilities=null;
1400 function showPowerActionDlg(){xxdialogMode||(statusbox("\ud30c\uc6cc \uc561\uc158","\uae30\ub2a5 \ud655\uc778 \uc911 ..."),amtstack.Get("AMT_BootCapabilities",powerActionResponse00,0,1))}
1382 -function powerActionResponse00(b,c,a,d){if(200==d){b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(g){}amtPowerBootCapabilities=a.Body;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","\ud30c\uc6cc \uc5c5",2);b&1&&(addOption("d5actionSelect","\ucd08\uae30\ud654",10),addOption("d5actionSelect","\uc804\uc6d0 \uc0ac\uc774\ud074",5),addOption("d5actionSelect","\uc804\ub825 \ub2e4\uc6b4",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect",
1383 -"\uc9c4\ub2e8 \uc804\uc6d0 \ucf1c\uae30",300),b&1&&addOption("d5actionSelect","\uc9c4\ub2e8\uc73c\ub85c \uc7ac\uc124\uc815",301));9<amtversion&&b&1&&(addOption("d5actionSelect","\ub300\uae30 \ubaa8\ub4dc\uc5d0\uc11c OS \uc6e8\uc774\ud06c",500),addOption("d5actionSelect","OS \uc808\uc804",501),addOption("d5actionSelect","\uc18c\ud504\ud2b8 \uc624\ud504",12),addOption("d5actionSelect","\uc18c\ud504\ud2b8 \ub9ac\uc14b",14),addOption("d5actionSelect","\uc790\ub2e4",4),addOption("d5actionSelect","\ub3d9\uba74",
1384 -7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&addOption("d5actionSelect","BIOS \uc804\uc6d0",100),b&1&&addOption("d5actionSelect","BIOS\ub85c \uc7ac\uc124\uc815",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","\uc548\uc804\ud55c \uc9c0\uc6b0\uae30 \uae30\ub2a5",104),b&1&&addOption("d5actionSelect","\uc548\uc804\ud55c \uc9c0\uc6b0\uae30\ub85c \uc7ac\uc124\uc815",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&
1385 -amtsysstate.CIM_BootService.response.EnabledState&2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",106),b&1&&addOption("d5actionSelect","Reset to Platform Erase",107));b&1&&addOption("d5actionSelect","IDE-R \ud50c\ub85c\ud53c\ub85c \uc7ac\uc124\uc815",200);b&2&&addOption("d5actionSelect","IDE-R \ud50c\ub85c\ud53c \uc804\uc6d0 \ucf1c\uae30",201);b&1&&addOption("d5actionSelect","IDE-R CDROM\uc73c\ub85c \uc7ac\uc124\uc815",202);b&2&&addOption("d5actionSelect","IDE-R CDROM \uc804\uc6d0 \ucf1c\uae30",
1386 -203);b&1&&addOption("d5actionSelect","PXE\ub85c \uc7ac\uc124\uc815",400);b&2&&addOption("d5actionSelect","PXE \uc804\uc6d0 \ucf1c\uae30",401);addOption("d5actionSelect","\ub9de\ucda4 \uc791\uc5c5 ...",999);5<amtversion&&addOption("d5actionSelect","\uc0ac\uc6a9\uc790 \ub3d9\uc758 ...",998);setDialogMode(5,"\ud30c\uc6cc \uc561\uc158",3,powerActionDlgCheck)}else messagebox("\ud30c\uc6cc \uc561\uc158",format("\uc2dc\uc2a4\ud15c \uae30\ub2a5\uc744 \uac00\uc838\uc62c \uc218 \uc5c6\uc74c, \uc624\ub958 {0}",
1387 -d))}
1388 -function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"\uc804\uc6d0 \uc791\uc5c5\uc774 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4."):QH(60,format("\uc804\uc6d0 \uc791\uc5c5 \uc624\ub958 # {0}.",g));setDialogMode(1,"\ud30c\uc6cc \uc561\uc158",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Intel&reg; Remote Secure Erase \uc2e4\ud589\uc744 \ud655\uc778 \ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?<br>\ud544\uc694\ud55c \uacbd\uc6b0 \ubcf4\uc548 \uc9c0\uc6b0\uae30 \ube44\ubc00\ubc88\ud638\ub97c \uc785\ub825\ud558\uc2ed\uc2dc\uc624.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>\uc554\ud638</div></div><br><div style=color:red><b> \uacbd\uace0 : </ b> \uc6d0\uaca9 \uc2dc\uc2a4\ud15c\uc758 \ub370\uc774\ud130\ub97c \uc9c0 \uc6c1\ub2c8\ub2e4.</div>",rsepass=
1389 -1,setDialogMode(11,"\ud30c\uc6cc \uc561\uc158",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1390 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> \uacbd\uace0 : </ b> \uc6d0\uaca9 \uc2dc\uc2a4\ud15c\uc758 \ub370\uc774\ud130\ub97c \uc9c0 \uc6c1\ub2c8\ub2e4.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");
1391 -d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",
1392 -a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"\ud30c\uc6cc \uc561\uc158",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}
1393 -function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1394 -function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,g=[1,2,6,25,26,31],v;for(v in g)d&1<<g[v]&&Q("rpef"+g[v]).checked&&(a+=1<<g[v]);d=makeUefiBootParam(1,a,4);g=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),g++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),g++);platfromEraseTLV={tlv:btoa(d),tlvlen:g};c?(statusbox("\ud30c\uc6cc \uc561\uc158","\uc0c1\ud0dc \ud655\uc778 \uc911 ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1401 +function showPowerActionDlg(){if(!xxdialogMode){var b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(c){}amtPowerBootCapabilities=amtsysstate.AMT_BootCapabilities.response;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","\ud30c\uc6cc \uc5c5",2);b&1&&(addOption("d5actionSelect","\ucd08\uae30\ud654",10),addOption("d5actionSelect","\uc804\uc6d0 \uc0ac\uc774\ud074",5),addOption("d5actionSelect","\uc804\ub825 \ub2e4\uc6b4",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&
1402 +(b&2&&addOption("d5actionSelect","\uc9c4\ub2e8 \uc804\uc6d0 \ucf1c\uae30",300),b&1&&addOption("d5actionSelect","\uc9c4\ub2e8\uc73c\ub85c \uc7ac\uc124\uc815",301));9<amtversion&&b&1&&(addOption("d5actionSelect","\ub300\uae30 \ubaa8\ub4dc\uc5d0\uc11c OS \uc6e8\uc774\ud06c",500),addOption("d5actionSelect","OS \uc808\uc804",501),addOption("d5actionSelect","\uc18c\ud504\ud2b8 \uc624\ud504",12),addOption("d5actionSelect","\uc18c\ud504\ud2b8 \ub9ac\uc14b",14),addOption("d5actionSelect","\uc790\ub2e4",4),
1403 +addOption("d5actionSelect","\ub3d9\uba74",7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&addOption("d5actionSelect","BIOS \uc804\uc6d0",100),b&1&&addOption("d5actionSelect","BIOS\ub85c \uc7ac\uc124\uc815",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","\uc548\uc804\ud55c \uc9c0\uc6b0\uae30 \uae30\ub2a5",104),b&1&&addOption("d5actionSelect","\uc548\uc804\ud55c \uc9c0\uc6b0\uae30\ub85c \uc7ac\uc124\uc815",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&
1404 +32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",106),b&1&&addOption("d5actionSelect","Reset to Platform Erase",107));b&1&&addOption("d5actionSelect","IDE-R \ud50c\ub85c\ud53c\ub85c \uc7ac\uc124\uc815",200);b&2&&addOption("d5actionSelect","IDE-R \ud50c\ub85c\ud53c \uc804\uc6d0 \ucf1c\uae30",201);b&1&&addOption("d5actionSelect","IDE-R CDROM\uc73c\ub85c \uc7ac\uc124\uc815",202);
1405 +b&2&&addOption("d5actionSelect","IDE-R CDROM \uc804\uc6d0 \ucf1c\uae30",203);b&1&&addOption("d5actionSelect","PXE\ub85c \uc7ac\uc124\uc815",400);b&2&&addOption("d5actionSelect","PXE \uc804\uc6d0 \ucf1c\uae30",401);addOption("d5actionSelect","\ub9de\ucda4 \uc791\uc5c5 ...",999);5<amtversion&&addOption("d5actionSelect","\uc0ac\uc6a9\uc790 \ub3d9\uc758 ...",998);setDialogMode(5,"\ud30c\uc6cc \uc561\uc158",3,powerActionDlgCheck)}}
1406 +function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"\uc804\uc6d0 \uc791\uc5c5\uc774 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4."):QH(61,format("\uc804\uc6d0 \uc791\uc5c5 \uc624\ub958 # {0}.",e));setDialogMode(1,"\ud30c\uc6cc \uc561\uc158",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Intel&reg; Remote Secure Erase \uc2e4\ud589\uc744 \ud655\uc778 \ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?<br>\ud544\uc694\ud55c \uacbd\uc6b0 \ubcf4\uc548 \uc9c0\uc6b0\uae30 \ube44\ubc00\ubc88\ud638\ub97c \uc785\ub825\ud558\uc2ed\uc2dc\uc624.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>\uc554\ud638</div></div><br><div style=color:red><b> \uacbd\uace0 : </ b> \uc6d0\uaca9 \uc2dc\uc2a4\ud15c\uc758 \ub370\uc774\ud130\ub97c \uc9c0 \uc6c1\ub2c8\ub2e4.</div>",
1407 +rsepass=1,setDialogMode(11,"\ud30c\uc6cc \uc561\uc158",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1408 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> \uacbd\uace0 : </ b> \uc6d0\uaca9 \uc2dc\uc2a4\ud15c\uc758 \ub370\uc774\ud130\ub97c \uc9c0 \uc6c1\ub2c8\ub2e4.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");
1409 +d&8&&a.push("<label><input id=rpef3 type=checkbox onchange=powerActionDlgRPEValidate()>Verify Storage Erase</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&65536&&a.push("<label><input id=rpef16 type=checkbox onchange=powerActionDlgRPEValidate()>OEM Custom Action</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");
1410 +d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");0<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+
1411 +addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpeeomdata style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("OEM Data (HEX)","<input id=rpeoemdatax style=width:210px maxlength=256 type=input>")+"</div>";setDialogMode(11,"\ud30c\uc6cc \uc561\uc158",3,powerActionDlgRPEEx,c,b);QE("c106",!1)}
1412 +function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,3,6,16,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QV("rpeeomdata",b&65536);QE("c106",b)}var platfromEraseTLV=null;
1413 +function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,3,6,16,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);a&65536&&""!=Q("rpeoemdatax").value&&(d+=makeUefiBootParam(20,hex2rstr(Q("rpeoemdatax").value),null,11),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("\ud30c\uc6cc \uc561\uc158",
1414 +"\uc0c1\ud0dc \ud655\uc778 \uc911 ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1415 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("\ud30c\uc6cc \uc561\uc158","\uc0c1\ud0dc \ud655\uc778 \uc911 ...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==
1416 b&&(c=!1);13!=currentView&&10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
1397 -function showAdvPowerDlg(){try{Q("c39").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1417 +function showAdvPowerDlg(){try{Q("c64").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1418 QV("ForceHDBootOption",1==amtPowerBootCapabilities.ForceHardDriveBoot);QV("ForcePXEBootOption",1==amtPowerBootCapabilities.ForcePXEBoot);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);QV("d24dSerialOverLan",1==amtPowerBootCapabilities.SOL);
1419 QV("d24dSecureErase",1==amtPowerBootCapabilities.SecureErase);QV("d24dPlatformErase",null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&0!=(amtsysstate.CIM_BootService.response.EnabledState&2));QV("d24dFirmwareReset",1==amtPowerBootCapabilities.ConfigurationDataReset);QV("d24dLockSleepButton",1==amtPowerBootCapabilities.SleepButtonLock);QV("d24dUserPasswordBypass",1==amtPowerBootCapabilities.UserPasswordBypass);
1400 -QV("c46",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c47",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c48",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);setDialogMode(24,"\ucee4\uc2a4\ud140 \ud30c\uc6cc \uc561\uc158",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}
1401 -function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c39").value&&600>Q("c39").value;QE("c41",!b);QE("c43",!b);QE("idd_d24IDERBootDevice",!b);QE("c45",!b);QE("idd_d24RSEPass",!b);QE("c54",!0)}
1402 -function showAdvPowerDlgOk(){var b=Q("c39").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"\uc804\uc6d0 \uc791\uc5c5\uc774 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4."):QH(60,format("\uc804\uc6d0 \uc791\uc5c5 \uc624\ub958 # {0}.",g));setDialogMode(1,"\ud30c\uc6cc \uc561\uc158",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c39").value,AvdPowerDlg.BIOSPause=
1403 -Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=Q("d24BiosSecureBoot").checked,AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c43").value,AvdPowerDlg.FirmwareVerbosity=Q("c45").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c44").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=
1420 +QV("c71",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c72",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c73",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);QH("c66",'<option value=0>None</option><option id="ForceDVDBootOption" value=1>Force CD/DVD Boot</option><option id="ForcePXEBootOption" value=2>Force PXE Boot</option><option id="ForceHDBootOption" value=3>Force Hard Disk Boot</option><option id="ForceDiagBootOption" value=4>Force Diagnostic Boot</option>');
1421 +setDialogMode(24,"\ucee4\uc2a4\ud140 \ud30c\uc6cc \uc561\uc158",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}
1422 +function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c64").value&&600>Q("c64").value;QE("c66",!b);QE("c68",!b);QE("idd_d24IDERBootDevice",!b);QE("c70",!b);QE("idd_d24RSEPass",!b);QE("c106",!0)}
1423 +function showAdvPowerDlgOk(){var b=Q("c64").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"\uc804\uc6d0 \uc791\uc5c5\uc774 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4."):QH(61,format("\uc804\uc6d0 \uc791\uc5c5 \uc624\ub958 # {0}.",e));setDialogMode(1,"\ud30c\uc6cc \uc561\uc158",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c64").value,AvdPowerDlg.BIOSPause=
1424 +Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=Q("d24BiosSecureBoot").checked,AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c68").value,AvdPowerDlg.FirmwareVerbosity=Q("c70").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c69").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=
1425 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,AvdPowerDlg.PlatformErase=Q("d24PlatformErase").checked,AvdPowerDlg.FirmwareReset=Q("d24FirmwareReset").checked,
1426 !0===AvdPowerDlg.SecureErase&&0<Q("d24rsepass").value.length&&(AvdPowerDlg.RSEPassword=Q("d24rsepass").value),!0===AvdPowerDlg.PlatformErase?powerActionDlgRPE(!0):(statusbox("\ud30c\uc6cc \uc561\uc158","\uc0c1\ud0dc \ud655\uc778 \uc911 ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)))}
1406 -function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("\ud30c\uc6cc \uc561\uc158",format("\uc624\ub958 # {0}",d)):4294967295==a.Body.OptInRequired&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(d6ConsentText.value="",setDialogMode(6,"\uc0ac\uc6a9\uc790 \ub3d9\uc758",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("\ud30c\uc6cc \uc561\uc158","\uc635\ud2b8 \uc778 \uc2dc\uc791 \uc911 ..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,
1407 -0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("\uc0ac\uc6a9\uc790 \ub3d9\uc758","\uc0ac\uc6a9\uc790 \ub3d9\uc758\uac00 \ud544\uc694\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4."):(statusbox("\ud30c\uc6cc \uc561\uc158","\ubd80\ud305 \uc124\uc815 \uac00\uc838 \uc624\uae30 ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1427 +function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("\ud30c\uc6cc \uc561\uc158",format("\uc624\ub958 # {0}",d)):(4294967295==a.Body.OptInRequired||connectDesktopConsent&&0!=a.Body.OptInRequired)&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(amtstack.IPS_OptInService_CancelOptIn(null),d6ConsentText.value="",setDialogMode(6,"\uc0ac\uc6a9\uc790 \ub3d9\uc758",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("\ud30c\uc6cc \uc561\uc158",
1428 +"\uc635\ud2b8 \uc778 \uc2dc\uc791 \uc911 ..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("\uc0ac\uc6a9\uc790 \ub3d9\uc758","\uc0ac\uc6a9\uc790 \ub3d9\uc758\uac00 \ud544\uc694\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4."):(statusbox("\ud30c\uc6cc \uc561\uc158","\ubd80\ud305 \uc124\uc815 \uac00\uc838 \uc624\uae30 ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1429 function powerActionResponseC1(b,c,a,d){200!=d?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("\ud30c\uc6cc \uc561\uc158",format("\uc624\ub958 #",d)):0!=a.Body.ReturnValue?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("\uc0ac\uc6a9\uc790 \ub3d9\uc758 \uc624\ub958",a.Body.ReturnValueStr.replace(/_/g," ")):(d6ConsentText.value="",setDialogMode(6,"\uc0ac\uc6a9\uc790 \ub3d9\uc758",11,powerActionSendConsent),checkConsentDisplay(),consentChanged(),amtstack.Enum("CIM_ServiceAvailableToElement",
1430 function(a,b,c,d){errcheck(d,a)||(amtsysstate.CIM_ServiceAvailableToElement.responses=c,updateSystemStatus(),null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState&&amtstack.RequestPowerStateChange(2,function(a,b,c,d){}))}))}
1410 -function powerActionSendConsent(b){0==b?amtstack.IPS_OptInService_CancelOptIn(function(){}):(statusbox("\ud30c\uc6cc \uc561\uc158","\uc0ac\uc6a9\uc790 \ub3d9\uc758\ub97c \ubcf4\ub0b4\ub294 \uc911 ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1431 +function powerActionSendConsent(b){console.log("powerActionSendConsent",b);0==b?(amtstack.IPS_OptInService_CancelOptIn(function(){}),connectDesktopConsent=!1,desktop.Stop()):(statusbox("\ud30c\uc6cc \uc561\uc158","\uc0ac\uc6a9\uc790 \ub3d9\uc758\ub97c \ubcf4\ub0b4\ub294 \uc911 ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1432 function powerActionResponseC2(b,c,a,d){200!=d?messagebox("\ud30c\uc6cc \uc561\uc158",format("\uc624\ub958 # {0}",d)):0!=a.Body.ReturnValue?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("\uc0ac\uc6a9\uc790 \ub3d9\uc758","\uc0ac\uc6a9\uc790 \ub3d9\uc758\uc5d0 \uc131\uacf5\ud588\uc2b5\ub2c8\ub2e4."):(statusbox("\ud30c\uc6cc \uc561\uc158","\uc0c1\ud0dc \ud655\uc778 \uc911 ..."),amtstack.Get("AMT_BootSettingData",
1433 powerActionResponse1,0,1))}
1413 -function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("\ud30c\uc6cc \uc561\uc158",format("\uc624\ub958 # {0}",d));else{b=d5actionSelect.value;var g=a.Body;g.ConfigurationDataReset=!1;delete g.WinREBootEnabled;delete g.UEFILocalPBABootEnabled;delete g.UEFIHTTPSBootEnabled;delete g.SecureBootControlEnabled;delete g.BootguardStatus;delete g.OptionsCleared;delete g.BIOSLastStatus;delete g.UefiBootParametersArray;delete g.RPEEnabled;999==b?(g.BIOSPause=AvdPowerDlg.BIOSPause,g.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1414 -g.BIOSSetup=AvdPowerDlg.BIOSSetup,g.BootMediaIndex=AvdPowerDlg.BootMediaIndex,g.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,g.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,g.IDERBootDevice=AvdPowerDlg.IDERBootDevice,g.LockKeyboard=AvdPowerDlg.LockKeyboard,g.LockPowerButton=AvdPowerDlg.LockPowerButton,g.LockResetButton=AvdPowerDlg.LockResetButton,g.LockSleepButton=AvdPowerDlg.LockSleepButton,g.ReflashBIOS=AvdPowerDlg.ReflashBIOS,g.UseIDER=AvdPowerDlg.UseIDER,g.UseSOL=AvdPowerDlg.UseSOL,
1415 -g.UseSafeMode=AvdPowerDlg.UseSafeMode,g.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=g.SecureErase&&(g.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==g.SecureErase&&AvdPowerDlg.RSEPassword&&(g.RSEPassword=AvdPowerDlg.RSEPassword)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1416 -0!=(amtPowerBootCapabilities.PlatformErase&1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(g.BIOSPause=!1,g.EnforceSecureBoot=!1,g.BIOSSetup=99<b&&104>b,g.BootMediaIndex=0,g.FirmwareVerbosity=0,g.ForcedProgressEvents=!1,g.IDERBootDevice=202==b||203==b?1:0,g.LockKeyboard=!1,g.LockPowerButton=!1,g.LockResetButton=!1,g.LockSleepButton=!1,g.ReflashBIOS=
1417 -!1,g.UseIDER=199<b&&300>b,g.UseSOL=13==currentView&&8!=b&&300>b,g.UseSafeMode=!1,g.UserPasswordBypass=!1,null!=g.SecureErase&&(g.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===g.SecureErase&&0<rsepass.length&&(g.RSEPassword=rsepass)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&
1418 -1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=!1),rsepass=null);console.log("\ubd80\ud305 \ub3d9\uc791 : "+b);console.log("\ubd80\ud305 \uc124\uc815 \uc124\uc815 : "+ObjectToString2(g));statusbox("\ud30c\uc6cc \uc561\uc158","\ubd80\ud305 \uc124\uc815 ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,b,c,d){200!=d?messagebox("\ud30c\uc6cc \uc561\uc158",
1419 -format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",g,powerActionResponse2,0,1)},0,1)}}
1420 -function powerActionResponse2(b,c,a,d,g){200!=d?messagebox("\ud30c\uc6cc \uc561\uc158",format("PUT AMT_BootSettingData, \uc624\ub958 # {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("\ud30c\uc6cc \uc561\uc158","\ub2e4\uc74c \ubd80\ud305 \uc124\uc815 \uc911 ..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1421 -function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c41.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c41.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c41").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1434 +function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("\ud30c\uc6cc \uc561\uc158",format("\uc624\ub958 # {0}",d));else{b=d5actionSelect.value;var e=a.Body;e.ConfigurationDataReset=!1;delete e.WinREBootEnabled;delete e.UEFILocalPBABootEnabled;delete e.UEFIHTTPSBootEnabled;delete e.SecureBootControlEnabled;delete e.BootguardStatus;delete e.OptionsCleared;delete e.BIOSLastStatus;delete e.UefiBootParametersArray;delete e.RPEEnabled;999==b?(e.BIOSPause=AvdPowerDlg.BIOSPause,e.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1435 +e.BIOSSetup=AvdPowerDlg.BIOSSetup,e.BootMediaIndex=AvdPowerDlg.BootMediaIndex,e.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,e.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,e.IDERBootDevice=AvdPowerDlg.IDERBootDevice,e.LockKeyboard=AvdPowerDlg.LockKeyboard,e.LockPowerButton=AvdPowerDlg.LockPowerButton,e.LockResetButton=AvdPowerDlg.LockResetButton,e.LockSleepButton=AvdPowerDlg.LockSleepButton,e.ReflashBIOS=AvdPowerDlg.ReflashBIOS,e.UseIDER=AvdPowerDlg.UseIDER,e.UseSOL=AvdPowerDlg.UseSOL,
1436 +e.UseSafeMode=AvdPowerDlg.UseSafeMode,e.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=e.SecureErase&&(e.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==e.SecureErase&&AvdPowerDlg.RSEPassword&&(e.RSEPassword=AvdPowerDlg.RSEPassword)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1437 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(e.BIOSPause=!1,e.EnforceSecureBoot=!1,e.BIOSSetup=99<b&&104>b,e.BootMediaIndex=0,e.FirmwareVerbosity=0,e.ForcedProgressEvents=!1,e.IDERBootDevice=202==b||203==b?1:0,e.LockKeyboard=!1,e.LockPowerButton=!1,e.LockResetButton=!1,e.LockSleepButton=
1438 +!1,e.ReflashBIOS=!1,e.UseIDER=199<b&&300>b,e.UseSOL=13==currentView&&8!=b&&300>b,e.UseSafeMode=!1,e.UserPasswordBypass=!1,null!=e.SecureErase&&(e.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===e.SecureErase&&0<rsepass.length&&(e.RSEPassword=rsepass)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&
1439 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=!1),rsepass=null);console.log("\ubd80\ud305 \ub3d9\uc791 : "+b);console.log("\ubd80\ud305 \uc124\uc815 \uc124\uc815 : "+ObjectToString2(e));statusbox("\ud30c\uc6cc \uc561\uc158","\ubd80\ud305 \uc124\uc815 ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,
1440 +function(a,b,c,d){200!=d?messagebox("\ud30c\uc6cc \uc561\uc158",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",e,powerActionResponse2,0,1)},0,1)}}
1441 +function powerActionResponse2(b,c,a,d,e){200!=d?messagebox("\ud30c\uc6cc \uc561\uc158",format("PUT AMT_BootSettingData, \uc624\ub958 # {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("\ud30c\uc6cc \uc561\uc158","\ub2e4\uc74c \ubd80\ud305 \uc124\uc815 \uc911 ..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1442 +function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c66.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c66.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c66").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1443 c+"</Selector></SelectorSet></ReferenceParameters>",powerActionResponse3)}var targetPowerAction=0;
1423 -function powerActionResponse3(b,c,a,d){console.log("powerActionResponse3("+c+","+a+","+d+")");if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("\ud30c\uc6cc \uc561\uc158","\uc804\uc6d0 \uc791\uc5c5 \uc218\ud589 \uc911 ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&
1424 -(b=10);999==b&&(b=AvdPowerDlg.Action);targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("\ud30c\uc6cc \uc561\uc158","\ub2e4\uc74c \ubd80\ud305 \ub3d9\uc791 \uc138\ud2b8")}}
1425 -function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"\uc804\uc6d0 \uc791\uc5c5\uc774 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4."),setDialogMode(1,"\ud30c\uc6cc \uc561\uc158",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c54",6==d6ConsentText.value.length)}
1444 +function powerActionResponse3(b,c,a,d){if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("\ud30c\uc6cc \uc561\uc158","\uc804\uc6d0 \uc791\uc5c5 \uc218\ud589 \uc911 ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==b&&(b=AvdPowerDlg.Action);targetPowerAction=
1445 +b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("\ud30c\uc6cc \uc561\uc158","\ub2e4\uc74c \ubd80\ud305 \ub3d9\uc791 \uc138\ud2b8")}}
1446 +function powerActionResponse4(b,c,a,d){200==d&&(QH(61,"\uc804\uc6d0 \uc791\uc5c5\uc774 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4."),setDialogMode(1,"\ud30c\uc6cc \uc561\uc158",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c106",6==d6ConsentText.value.length)}
1447 function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1448 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1449 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1429 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var g=b[c].app?b[c].app:"";a[d][g]||(a[d][g]={});b[c].name&&(a[d][g][b[c].name]=b[c])}xxStorage.content=
1430 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\uc774 \ucef4\ud4e8\ud130\uc758 \uc778\ud154 &reg; AMT \uc2a4\ud1a0\ub9ac\uc9c0\ub97c \uad00\ub9ac\ud569\ub2c8\ub2e4.<br><br>";var v,n,g="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,e;for(e in b[c][p]){q++;if(c!=v||
1431 -p!=n)""!=g&&(a+=g,g="<br>"),v=c,n=p,g=""!=c?g+EscapeHtml(c+" / "+p):g+"\ubfcc\ub9ac";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+e+'"',g=g+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+e+'",'+C+")><div style=float:right>"),g=g+(" "+AddButton2("\ub2e4\uc6b4\ub85c\ub4dc","DownloadFromStorage("+C+',"'+e+'",event)')),g=g+("</div><div style=padding-top:3px><b>"+EscapeHtml(e)+"</b>, <i>"+b[c][p][e].size+" \ubc14\uc774\ud2b8</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);
1432 --1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==q&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=g&&(a+=g);0==d&&(a+="<div style=padding-left:15px><br><i>\ud30c\uc77c\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+=
1433 -"<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("\uc5c5\ub85c\ub4dc ...","UploadToStorage()"):""));QH(55,a)}else QH(55,"\uc2a4\ud1a0\ub9ac\uc9c0 \ub370\uc774\ud130\ub97c\ub85c\ub4dc \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4 ...<br/>"+AddButton("\uc0c8\ub86d\uac8c \ud558\ub2e4","PullStorage()"))}
1434 -function showStorageDetails(b,c,a,d){if(!xxdialogMode){var g="",v=xxStorage.content[b][c][a];""!=b&&(g+=addHtmlValue("\uacf5\uae09 \uc5c5\uccb4",b));""!=c&&(g+=addHtmlValue("\uc2e0\uccad",c));g+=addHtmlValue("\uc774\ub984",a);g+=addHtmlValue("\ud06c\uae30",v.size+" bytes");v.link&&(g+=addHtmlValue("\ub9c1\ud06c",v.link));setDialogMode(11,"\ubcf4\uad00 \uc544\uc774\ud15c",5,showStorageDetailsEx,g,d)}}
1450 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1451 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\uc774 \ucef4\ud4e8\ud130\uc758 \uc778\ud154 &reg; AMT \uc2a4\ud1a0\ub9ac\uc9c0\ub97c \uad00\ub9ac\ud569\ub2c8\ub2e4.<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var r=0,g;for(g in b[c][p]){r++;if(c!=v||
1452 +p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+" / "+p):e+"\ubfcc\ub9ac";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+g+'",'+C+")><div style=float:right>"),e=e+(" "+AddButton2("\ub2e4\uc6b4\ub85c\ub4dc","DownloadFromStorage("+C+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][p][g].size+" \ubc14\uc774\ud2b8</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);
1453 +-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==r&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>\ud30c\uc77c\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+=
1454 +"<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("\uc5c5\ub85c\ub4dc ...","UploadToStorage()"):""));QH(56,a)}else QH(56,"\uc2a4\ud1a0\ub9ac\uc9c0 \ub370\uc774\ud130\ub97c\ub85c\ub4dc \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4 ...<br/>"+AddButton("\uc0c8\ub86d\uac8c \ud558\ub2e4","PullStorage()"))}
1455 +function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("\uacf5\uae09 \uc5c5\uccb4",b));""!=c&&(e+=addHtmlValue("\uc2e0\uccad",c));e+=addHtmlValue("\uc774\ub984",a);e+=addHtmlValue("\ud06c\uae30",v.size+" bytes");v.link&&(e+=addHtmlValue("\ub9c1\ud06c",v.link));setDialogMode(11,"\ubcf4\uad00 \uc544\uc774\ud15c",5,showStorageDetailsEx,e,d)}}
1456 function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}function storageDeleteResponse(b,c){200!=c?messagebox("\uc800\uc7a5",format("\ud30c\uc77c (ERR {0})\uc744 \uc0ad\uc81c\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \ucef4\ud4e8\ud130 \uc804\uc6d0\uc774 \ucf1c\uc838 \uc788\ub294\uc9c0 \ud655\uc778\ud558\uc2ed\uc2dc\uc624.",c)):PullStorage()}
1457 function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}function DownloadFromStorageEx(b,c,a){200!=c||null==b?console.log(c,"Data = null"):saveAs(data2blob(b),a)}function OpenFromStorage(b,c){if(!xxdialogMode){haltEvent(c);var a=window.open("http://"+wsstack.comm.host+":"+wsstack.comm.port+"/amt-storage/"+b,"_blank","noopener,noreferrer");a.opener=null;a.focus()}}
1458 function PushToStorage(b,c,a){var d=null;7E3<c.length&&(d=[b,c.substring(7E3)],c=c.substring(0,7E3));wsstack.comm.PerformAjax(c,PushToStorageResponse,d,0,"/amt-storage/"+b+(1==a?"?append=":""),"PUT")}
@@ -1443,38 +1464,38 @@ a+="<datalist id=mstoragevendorlist>";for(var d in xxStorageVendors)a+='<option
1464 a,b);b&&SetStorageName(c)}}function UploadToStorageEx(b,c){if(c)d=new FileReader,d.onload=UploadToStorageEx2,d.filename=Q("mstoragefile").value,d.readAsBinaryString(c);else{var a=Q("mstoragefile");if(1==a.files.length){var d=new FileReader;d.onload=UploadToStorageEx2;d.filename=a.files[0].name;d.readAsBinaryString(a.files[0])}}}
1465 function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0].name:"");b=b.split(" ").join("");var c=b.split("-");3==c.length&&12>c[0].length&&12>c[1].length&&(Q("mstoragevendor").value=c[0],Q("mstorageapplication").value=c[1],b=c[2]);b=b.split("-").join("");b.endsWith(".gz")&&(b=b.substring(0,b.length-3));b.endsWith(".htm")||b.endsWith(".html")?Q("mstoragetype").value="text/html":b.endsWith(".txt")&&(Q("mstoragetype").value="text/plain");11<b.length&&(b=b.substring(0,11));Q("mstoragefilename").value=
1466 b}
1446 -function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var g=Q("mstoragetype").value;""==g&&(g="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1447 -"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+g+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1467 +function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1468 +"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1469 function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," \uc77c").replace("H"," \uc2dc\uac04").replace("M"," \uc758\uc0ac\ub85d");b=b.replace(" 1 \uc77c"," 1 \uc77c").replace(" 1 \uc2dc\uac04"," 1 \uc2dc\uac04").replace(" 1 \ubd84 "," 1 \ubd84 ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1449 -function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\uc54c\ub78c \uae68\uc6b0\uae30\ub97c \uad00\ub9ac\ud569\ub2c8\ub2e4.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,g){if(200==g){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, \uc77c\uc5b4\ub098 "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," ...\uc5d0\uc11c"),void 0!=d[c].Interval&&(a+=" \uadf8\ub9ac\uace0 \uac01\uac01"+_fmtinterval(d[c].Interval.Interval)),
1470 +function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\uc54c\ub78c \uae68\uc6b0\uae30\ub97c \uad00\ub9ac\ud569\ub2c8\ub2e4.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, \uc77c\uc5b4\ub098 "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," ...\uc5d0\uc11c"),void 0!=d[c].Interval&&(a+=" \uadf8\ub9ac\uace0 \uac01\uac01"+_fmtinterval(d[c].Interval.Interval)),
1471 1==d[c].DeleteOnCompletion&&(a+="\uc644\ub8cc\ub418\uba74 \uc0ad\uc81c"),b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("\ud3b8\uc9d1\ud558\ub2e4...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>\ub4f1\ub85d \ub41c \uae68\uc6b0\uae30 \uacbd\ubcf4\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.</i></div><br>";
1451 -d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("\ubaa8\ub4e0 \uc54c\ub78c \uc81c\uac70","RemoveAllAlarms()")+AddButton("\ub354\ud558\ub2e4","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
1452 -function prepareAlarmOccurenceTemplate(b,c,a,d,g){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1453 -g+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"\ubaa8\ub4e0 \uc54c\ub78c \ud574\uc81c",3,RemoveAllAlarmsEx,"\ubaa8\ub4e0 \uc54c\ub78c \ud574\uc81c\ub97c \ud655\uc778 \ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,g,v){0==--b&&PullAlarms()})}
1472 +d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton2("\ubaa8\ub4e0 \uc54c\ub78c \uc81c\uac70","RemoveAllAlarms()",xxAlarms?"":"disabled")+AddButton("\ub354\ud558\ub2e4","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(58,b)}},null,!0)}
1473 +function prepareAlarmOccurenceTemplate(b,c,a,d,e){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1474 +e+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"\ubaa8\ub4e0 \uc54c\ub78c \ud574\uc81c",3,RemoveAllAlarmsEx,"\ubaa8\ub4e0 \uc54c\ub78c \ud574\uc81c\ub97c \ud655\uc778 \ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,e,v){0==--b&&PullAlarms()})}
1475 function showAddAlarm(b){if(!xxdialogMode){QE("d25alarm_name",!b);if(void 0!=b){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime);Q("d25alarm_name").value=c.ElementName;Q("d25alarm_sdate").value=a.getFullYear()+"-"+_fmttimepad(a.getMonth()+1)+"-"+_fmttimepad(a.getDate());Q("d25alarm_stime").value=a.getHours()+":"+_fmttimepad(a.getMinutes())+":"+_fmttimepad(a.getSeconds());if(c.Interval){var a=c.Interval.Interval.replace("P","").replace("T","").replace("D","D,").replace("H","H,").replace("M","M,").split(","),
1455 -d=[0,0,0],g;for(g in a){var v=a[g].length-1;"D"==a[g][v]&&(d[0]=parseInt(a[g].substring(0,v)));"H"==a[g][v]&&(d[1]=parseInt(a[g].substring(0,v)));"M"==a[g][v]&&(d[2]=parseInt(a[g].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1456 -Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"\uc0c8 \uc54c\ub78c \ucd94\uac00",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c54",b)}
1457 -function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),g=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],g[0],g[1],g[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",g=Q("d25alarm_interval").value.split("-");3!=g.length&&(g=[0,0,0]);var g=
1458 -"P"+g[0]+"DT"+g[1]+"H"+g[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,g,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("\uc54c\ub78c \ucd94\uac00",format("\uc54c\ub78c\uc744 \ucd94\uac00\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc0c1\ud0dc : {0}. <br/> \uc54c\ub78c\uc774 \ubbf8\ub798\uc778\uc9c0 \ud655\uc778\ud558\uc2ed\uc2dc\uc624.",d)):0!=c.Body.ReturnValue?messagebox("\uc54c\ub78c \ucd94\uac00",
1459 -format("\uc54c\ub78c {0}\uc744 (\ub97c) \ucd94\uac00\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. <br/> \ud5a5\ud6c4 \uc54c\ub78c\uc744 \ud655\uc778\ud558\uc2ed\uc2dc\uc624.",c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+g+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,
1476 +d=[0,0,0],e;for(e in a){var v=a[e].length-1;"D"==a[e][v]&&(d[0]=parseInt(a[e].substring(0,v)));"H"==a[e][v]&&(d[1]=parseInt(a[e].substring(0,v)));"M"==a[e][v]&&(d[2]=parseInt(a[e].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1477 +Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"\uc0c8 \uc54c\ub78c \ucd94\uac00",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c106",b)}
1478 +function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),e=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],e[0],e[1],e[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",e=Q("d25alarm_interval").value.split("-");3!=e.length&&(e=[0,0,0]);var e=
1479 +"P"+e[0]+"DT"+e[1]+"H"+e[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,e,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("\uc54c\ub78c \ucd94\uac00",format("\uc54c\ub78c\uc744 \ucd94\uac00\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc0c1\ud0dc : {0}. <br/> \uc54c\ub78c\uc774 \ubbf8\ub798\uc778\uc9c0 \ud655\uc778\ud558\uc2ed\uc2dc\uc624.",d)):0!=c.Body.ReturnValue?messagebox("\uc54c\ub78c \ucd94\uac00",
1480 +format("\uc54c\ub78c {0}\uc744 (\ub97c) \ucd94\uac00\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. <br/> \ud5a5\ud6c4 \uc54c\ub78c\uc744 \ud655\uc778\ud558\uc2ed\uc2dc\uc624.",c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+e+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,
1481 b,c,d){200!=d?messagebox("\uc54c\ub78c \ud3b8\uc9d1",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1482 function showAlertDetails(b){if(!xxdialogMode){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime),a="<div style=text-align:left>"+addHtmlValue("\uc774\ub984",c.ElementName)+addHtmlValue("\uc6e8\uc774\ud06c \ud0c0\uc784",a.toLocaleString().replace(", "," at "));void 0!=c.Interval&&(a+=addHtmlValue("\ub0b4\ubd80\uc758",_fmtinterval(c.Interval.Interval)));a+=addHtmlValue("\uae68\uc5b4 \ub09c \ud6c4",1==c.DeleteOnCompletion?"\uc54c\ub78c \uc0ad\uc81c":"\uc54c\ub78c \uc720\uc9c0")+"</div>";messagebox(format("\uc54c\ub78c {0}",
1483 c.ElementName),a);setDialogMode(11,"\uacbd\ubcf4"+c.ElementName,5,showAlertDetailsDelete,a,b)}}function showAlertDetailsDelete(b,c){2==b&&amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,b,c,v){PullAlarms()})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag;
1463 -function setDialogMode(b,c,a,d,g,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c54",!0);QV("c54",a&1);QV("c53",a&2);QV(58,a&2);QV("c55",a&4);c&&QH(59,c);for(c=1;27>c;c++)QV("dialog"+c,c==b);QV("dialog",b);g&&(11==b?QH(63,g):QH(60,g));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1484 +function setDialogMode(b,c,a,d,e,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c106",!0);QV("c106",a&1);QV("c105",a&2);QV(59,a&2);QV("c107",a&4);c&&QH(60,c);for(c=1;28>c;c++)QV("dialog"+c,c==b);QV("dialog",b);e&&(11==b?QH(64,e):QH(61,e));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1485 function dialogclose(b){var c=xxdialogFunc,a=xxdialogButtons,d=xxdialogTag;setDialogMode();(a&8||b)&&c&&c(b,d)}
1465 -function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(41).offsetWidth&&(QS("Desk")["max-width"]=Q(41).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1466 -"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(60,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(60,c);setDialogMode(1,b)}
1467 -function SaveJsonFile(b,c,a,d){var g="",v={},n=new Date;amtsysstate&&(g="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));g+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1468 -n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+g+".json")}
1486 +function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(42).offsetWidth&&(QS("Desk")["max-width"]=Q(42).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1487 +"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(61,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(61,c);setDialogMode(1,b)}
1488 +function SaveJsonFile(b,c,a,d){var e="",v={},n=new Date;amtsysstate&&(e="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));e+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1489 +n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+e+".json")}
1490 var httpErrorTable={200:"\ud655\uc778",401:"\uc778\uc99d \uc624\ub958",408:"\ud0c0\uc784 \uc544\uc6c3 \uc5d0\ub7ec",601:"WSMAN \uad6c\ubb38 \ubd84\uc11d \uc624\ub958",602:"HTTP \uc751\ub2f5 \ud5e4\ub354\ub97c \uad6c\ubb38 \ubd84\uc11d \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4",603:"\uc608\uae30\uce58 \uc54a\uc740 HTTP \uc5f4\uac70 \ud615 \uc751\ub2f5",604:"\uc608\uae30\uce58 \uc54a\uc740 HTTP \ud480 \uc751\ub2f5",997:"\uc798\ubabb\ub41c \ub2e4\uc774\uc81c\uc2a4\ud2b8 \uc601\uc5ed"};
1491 function errcheck(b,c){if(null==wsstack||amtstack!=c)return!0;200!=b&&9!=b&&(setDialogMode(),wsstack.comm.FailAllError=999,amtstack.CancelAllQueries(999),QH(5,httpErrorTable[b]?httpErrorTable[b]:format("\uc624\ub958 # {0}",b)),401==b&&QH(5,'\uc778\uc99d \uc624\ub958<br /><br /><input type=button value="Set new credentials" onclick=meshcentral2credCallback(true)></input>'),go(100),QS(3).width=0);return 200!=b}
1492 function goiFrame(b,c,a){if(!xxdialogMode){go(c);if(1==b.shiftKey||0==Q(13).src.endsWith(a))Q(13).src=a;QV(14,!1);QV(12,!0)}}function go(b,c){if(!xxdialogMode||1==c){QV(12,!1);QV(14,!0);QV(4,100==b);QV(6,100>b);for(var a=0;80>a;a++){QV("p"+a,a==b);var d=QS("go"+a);d&&(d["background-color"]=a==b?"#abcae1":"");d&&(d["background-color"]=a==b?"gray":"")}currentView=b;center()}}
1472 -function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,g=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:g};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(g=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:g}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(g=parseInt(a[2]));return{host:a[0],http:d,redir:g}}
1493 +function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,e=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:e};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(e=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:e}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(e=parseInt(a[2]));return{host:a[0],http:d,redir:e}}
1494 function addLink(b,c){return"<a style=cursor:pointer;color:blue onclick='"+c+"'>&diams; "+b+"</a>"}function addLinkConditional(b,c,a){return a?addLink(b,c):b}function haltEvent(b){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1}function addOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;Q(b).add(d)}function addDisabledOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;d.disabled=1;Q(b).add(d)}
1474 -function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,g=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:g=1}return 4==c+a+d+g}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("\ud1b5\ud654 \uc624\ub958",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}
1495 +function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,e=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:e=1}return 4==c+a+d+e}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("\ud1b5\ud654 \uc624\ub958",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}
1496 function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}function TableStart2(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><p><td>"}function TableEntry(b,c){return"<tr><td class=r1><p>"+b+"<td class=r1>"+c}function FullTable(b,c){var a=TableStart();for(i in b)i&&b[i]&&(a+=TableEntry(i,b[i]));return a+TableEnd(c)}
1497 function TableEnd(b){return"<tr><td colspan=2><p>"+(b?b:"")+"</table>"}function AddButton(b,c){return"<input type=button value='"+b+"' onclick='"+c+"' style=margin:4px>"}function AddButton2(b,c,a){return"<input type=button value='"+b+"' onclick='"+c+"' "+a+">"}function AddRefreshButton(b){return'<input type=button name=refreshbtn value="\uc0c8\ub86d\uac8c \ud558\ub2e4" onclick=\'refreshButtons(false);'+b+"' style=margin:4px "+(0==refreshButtonsState?"disabled":"")+">"}
1477 -function MoreStart(){return'<a style=cursor:pointer;color:blue id=morexxx1 onclick=QV("morexxx1",false);QV("morexxx2",true)>&#x25BC; More</a><div id=morexxx2 style=display:none><br><hr>'}function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,g=b.options.length;d<g;d++)a=b.options[d],a.selected&&c.push(a.value);return c}
1498 +function MoreStart(){return'<a style=cursor:pointer;color:blue id=morexxx1 onclick=QV("morexxx1",false);QV("morexxx2",true)>&#x25BC; More</a><div id=morexxx2 style=display:none><br><hr>'}function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,e=b.options.length;d<e;d++)a=b.options[d],a.selected&&c.push(a.value);return c}
1499 function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}function guidToStr(b){return b.substring(6,8)+b.substring(4,6)+b.substring(2,4)+b.substring(0,2)+"-"+b.substring(10,12)+b.substring(8,10)+"-"+b.substring(14,16)+b.substring(12,14)+"-"+b.substring(16,20)+"-"+b.substring(20)}
1500 function getUrlVars(){for(var b,c=[],a=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),d=0;d<a.length;d++)b=a[d].indexOf("="),0<b&&(c[a[d].substring(0,b)]=a[d].substring(b+1,a[d].length));return c}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}
1501 function getDocHeight(){return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight&&0!=document.documentElement.clientHeight?document.documentElement.clientHeight:document.getElementsByTagName("body")[0].clientHeight}function addHtmlValue(b,c){return'<div style=height:20px><div style=float:right;width:220px;overflow:hidden><b title="'+c+'">'+c+"</b></div><div>"+b+"</div></div>"}
public/commander-nl.htm
+909 -885
@@ -1,8 +1,8 @@
1 -<!DOCTYPE html><html lang="nl" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Aansluiten 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>Losgekoppeld</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>Systeem status</a><p id=go14 class=nav1 onclick=go(14)><a>Extern bureaublad</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Bestanden</a><p id=go13 class=nav1 onclick=go(13)><a>Serieel via LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Hardware-informatie</a><p id=go6 class=nav1 onclick=go(6)><a>Logboek</a><p id=go15 class=nav1 onclick=go(15)><a>Auditlogboek</a><p id=go21 class=nav1 onclick=go(21)><a>Opslag</a><p id=go8 class=nav1 onclick=go(8)><a>Netwerkinstellingen</a><p id=go17 class=nav1 onclick=go(17)><a>Internetinstellingen</a><p id=go16 class=nav1 onclick=go(16)><a>Veiligheidsinstellingen</a><p id=go19 class=nav1 onclick=go(19)><a>Aanwezigheid van agent</a><p id=go18 class=nav1 onclick=go(18)><a>Systeemverdediging</a><p id=go11 class=nav1 onclick=go(11)><a>Gebruikersaccounts</a><p id=go22 class=nav1 onclick=go(22)><a>Abonnementen</a><p id=go23 class=nav1 onclick=go(23)><a>Wekkeralarmen</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN-browser</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value=Schijfkaart onclick=iderToggleDiskMap()><input type=button value="Stop IDE-R-sessie" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Floppy, blokken zijn 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, blokken zijn 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>De firmware van deze computer moet worden bijgewerkt,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>kijk hier</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>Bezig met laden...</h1></div><div id=p1 style=display:none><h1>Systeem status</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Hardware-informatie</h1><span id=16></span></div><div id=p6 style=display:none><h1>Logboek</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Netwerkinstellingen</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Gebruikersaccounts</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><tbody><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=Vraag style=margin:4px onclick=wsmanQuery()><input type=button value=Doorzichtig 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=p13 style=display:none;min-width:780px><h1>Serieel-over-LAN-terminal</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel® AMT Redirection-poort of Serial-over-LAN-functie is uitgeschakeld<span id=26>, klik hier om het in te schakelen.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>De externe computer is niet ingeschakeld, klik hier om een ​​aan / uit-commando te geven.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Stroomacties ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Start bediening op afstand op schijf" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Start Capture" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Aansluiten onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Losgekoppeld.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Schakel in wat de Return-toets verzendt" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Schakel de grootte van de terminal in" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Schakel het emulatietype van F1 naar F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Uitgebreide Ascii" title="Schakel het type terminalemulatie in" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Sturen onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Plakken disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Extern bureaublad</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel® AMT Redirection-poort of KVM-functie is uitgeschakeld<span id=37>, klik hier om het in te schakelen.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>De externe computer is niet ingeschakeld, klik hier om een ​​aan / uit-commando te geven.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Draai naar links" onclick=drotate(-1)>↺</div><div class=rb title="Draai naar rechts" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Schakel de modus Volledig scherm" onkeypress="return false" onkeydown="return false" value=Vol onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Sla een schermafbeelding van het externe bureaublad op" onkeypress="return false" onkeydown="return false" value=Opslaan... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Instellingen ..." title="Bewerk instellingen voor extern bureaublad" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Start bediening op afstand op schijf" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Wijzig de energiestatus van de externe machine" onkeypress="return false" onkeydown="return false" value="Stroomacties ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Aansluiten onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Losgekoppeld.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Winnen<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Win + Links<option value=24>Win + Right<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Sturen onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Type onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Leeg scherm&nbsp;</span><span id=47><input id=48 type=checkbox>Alleen bekijken&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Auditlogboek</h1><span id=50></span></div><div id=p16 style=display:none><h1>Veiligheidsinstellingen</h1><span id=51></span></div><div id=p17 style=display:none><h1>Internetinstellingen</h1><span id=52></span></div><div id=p18 style=display:none><h1>Systeemverdediging</h1><span id=53></span></div><div id=p19 style=display:none><h1>Aanwezigheid van agent</h1><span id=54></span></div><div id=p21 style=display:none><h1>Opslag</h1><span id=55></span></div><div id=p22 style=display:none><h1>Event abonnementen</h1><span id=56></span></div><div id=p23 style=display:none><h1>Wekkeralarmen</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Bestanden</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Omhoog>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Selecteer alles" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Hernoemen onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Verwijderen onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nieuwe map" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Uploaden onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Besnoeiing onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Kopiëren onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Plakken onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Vernieuwen onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Sorteren op naam<option value=2>Sorteer op maat<option value=3>Sorteren op datum<option value=4>Daal af op naam<option value=5>Daal af op maat<option value=6>Daal af op datum</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 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=60 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>Gebruikersnaam</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Wachtwoord*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>bevestig wachtwoord</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Lokaal<option value=1>Netwerk<option value=2>Ieder</select><div>Toestemming</div></div><div>Verleende machtigingen</div><ul id=62 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>* Minimaal 8 tekens met hoofdletters, kleine letters, 0-9 en een van! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Krachtige actie</div></div><div><span style=color:red>Waarschuwing:</span>Sommige stroomacties kunnen leiden tot gegevensverlies en kunnen de omleidingssessies van het bureaublad, de terminal of de schijf verbreken.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Toestemmingscode</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Primair beeldscherm<option value=1>Secundair beeldscherm<option id=d6ThirdDisplay value=2 style=display:none>Derde vertoning</select><div>Toestemming weergeven</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Beeldcodering</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Gehandicapt<option value=2>Automatic<option value=3>Ingeschakeld</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Toon lokale muiscursor</label><br><label><input type=checkbox id=d7showcad>Toon Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Framesnelheid beperken</label><br><label><input type=checkbox id=d7noMouseRotate>Draai de muis niet</label><br></div><div>Andere instellingen</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Kwaliteit</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Schalen</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=beheerder style=float:right;width:220px><div style=height:20px>Gebruikersnaam</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Wachtwoord</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Omleidingspoort</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM Extern bureaublad</label><label style=display:block><input type=checkbox id=c17>IDE-omleiding<br></label><label style=display:block><input type=checkbox id=c18>Serieel via LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Niet verplicht<br></label><label><input type=radio name=d10 id=c20 value=1>Alleen vereist voor KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Altijd vereist<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximaal 32 tekens"><div title="Maximaal 32 tekens">Profielnaam</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximaal 32 tekens"><div title="Maximaal 32 tekens">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Prioriteit</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Verificatie</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Geen</select><div>Versleuteling</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lengte tussen 8 en 63 tekens"><div title="Lengte tussen 8 en 63 tekens">Wachtwoord*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lengte tussen 8 en 63 tekens"><div title="Lengte tussen 8 en 63 tekens">bevestig wachtwoord</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Hiermee wordt de volledige staat van Intel® AMT voor deze machine in het bestand opgeslagen. Wachtwoorden worden niet opgeslagen, maar er kunnen enkele gevoelige gegevens worden opgenomen.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Gehandicapt<br><input type=radio name=d20 id=d20b value=1>ICMP-reactie<br><input type=radio name=d20 id=d20c value=2>RMCP-reactie<br><input type=radio name=d20 id=d20d value=3>ICMP &amp; RMCP-reactie<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Besturingssysteem IP-adres synchronisatie</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP adres</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Subnetmarkering</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>poort</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Primaire DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Alternatieve DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Gehandicapt<option value=1>Uitgeschakeld, DHCP-update<option value=2>Ingeschakeld</select><div>Dynamische DNS-client</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Interval bijwerken (minuten)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (seconden)</div></div><div style=font-size:10px><br>Defaut Interval is 1440 minuten, standaard TTL is 900 seconden.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Opstarten<option value=10>Reset<option value=5>Power cyclus<option value=8>Stroomstoring<option id=d24p500 value=500>OS Wake from Standby<option id=d24p501 value=501>OS energiebesparing<option value=999>Stel opstartopties in</select><div>Afstandsbediening</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS Pauze</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Dwing Secure Boot af</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS-instellingen</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forceer voortgangsgebeurtenissen</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Aan / uit-knop vergrendelen</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Reset-knop vergrendelen</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Slaapknop vergrendelen</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Toetsenbord vergrendelen</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS-wachtwoord omzeilen</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflash BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Veilige modus</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Gebruik IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serieel via LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Opstartinstellingen</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Geen<option id=ForceDVDBootOption value=1>Forceer CD / DVD Boot<option id=ForcePXEBootOption value=2>Forceer PXE Boot<option id=ForceHDBootOption value=3>Forceer harde schijf opstarten<option id=ForceDiagBootOption value=4>Forceer diagnostisch opstarten</select><div>Opstartbron</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Geen<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Start op naar floppy<option value=1>Start op naar CDROM</select><div>IDER opstartapparaat</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Systeemfout<option id=c46 value=1>Rustig<option id=c47 value=2>Uitgebreid<option id=c48 value=3>Leeg scherm</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-wachtwoord</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>Alarmnaam</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>Wekdatum (jaar-maand-dag)</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>Wektijd (uur: 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 (dagen-uren-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>Houd alarm<option value=1>Na voltooiing verwijderen</select></div><div style=padding-top:4px>Na het ontwaken</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Ingeschakeld<br></label><label><input type=radio name=d26b id=c50 value=0>Gehandicapt<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Ingeschakeld<br></label><label><input type=radio name=d26a id=c52 value=0>Gehandicapt<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=annuleren style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Verwijderen style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="nl" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Aansluiten 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>Losgekoppeld</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>Systeem status</a><p id=go14 class=nav1 onclick=go(14)><a>Extern bureaublad</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Bestanden</a><p id=go13 class=nav1 onclick=go(13)><a>Serieel via LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Hardware-informatie</a><p id=go6 class=nav1 onclick=go(6)><a>Logboek</a><p id=go15 class=nav1 onclick=go(15)><a>Auditlogboek</a><p id=go21 class=nav1 onclick=go(21)><a>Opslag</a><p id=go8 class=nav1 onclick=go(8)><a>Netwerkinstellingen</a><p id=go17 class=nav1 onclick=go(17)><a>Internetinstellingen</a><p id=go16 class=nav1 onclick=go(16)><a>Veiligheidsinstellingen</a><p id=go19 class=nav1 onclick=go(19)><a>Aanwezigheid van agent</a><p id=go18 class=nav1 onclick=go(18)><a>Systeemverdediging</a><p id=go11 class=nav1 onclick=go(11)><a>Gebruikersaccounts</a><p id=go22 class=nav1 onclick=go(22)><a>Abonnementen</a><p id=go23 class=nav1 onclick=go(23)><a>Wekkeralarmen</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN-browser</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value=Schijfkaart onclick=iderToggleDiskMap()><input type=button value="Stop IDE-R-sessie" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Floppy, blokken zijn 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, blokken zijn 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>De firmware van deze computer moet worden bijgewerkt,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>kijk hier</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>Bezig met laden...</h1></div><div id=p1 style=display:none><h1>Systeem status</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Hardware-informatie</h1><span id=16></span></div><div id=p6 style=display:none><h1>Logboek</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Netwerkinstellingen</h1><span id=19></span><span id=20></span><span id=21></span></div><div id=p11 style=display:none><h1>Gebruikersaccounts</h1><span id=22></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><tbody><tr><td><div style=padding:4px><select id=23 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=24 type=button value=Vraag style=margin:4px onclick=wsmanQuery()><input type=button value=Doorzichtig style=margin:4px onclick="QH(25, '')"><input id=c0 placeholder=Filter style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=25></div></div><div id=p13 style=display:none;min-width:780px><h1>Serieel-over-LAN-terminal</h1><br><div id=26 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel® AMT Redirection-poort of Serial-over-LAN-functie is uitgeschakeld<span id=27>, klik hier om het in te schakelen.</span></div></div><div id=28 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>De externe computer is niet ingeschakeld, klik hier om een ​​aan / uit-commando te geven.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=29></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Stroomacties ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Start bediening op afstand op schijf" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Start Capture" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Aansluiten onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=30>Losgekoppeld.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Schakel in wat de Return-toets verzendt" onclick="termToggleCr();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Schakel de grootte van de terminal in" onclick="termToggleSize();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Schakel het emulatietype van F1 naar F10" onclick="termToggleFx();Q(33).blur()"><input id=34 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Uitgebreide Ascii" title="Schakel het type terminalemulatie in" onclick="termToggleType();Q(34).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Sturen onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=35 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Plakken disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=36><h1>Extern bureaublad</h1><br></div><div id=37 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel® AMT Redirection-poort of KVM-functie is uitgeschakeld<span id=38>, klik hier om het in te schakelen.</span></div></div><div id=39 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>De externe computer is niet ingeschakeld, klik hier om een ​​aan / uit-commando te geven.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=40></span>&nbsp;<div class=rb title="Draai naar links" onclick=drotate(-1)>↺</div><div class=rb title="Draai naar rechts" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Schakel de modus Volledig scherm" onkeypress="return false" onkeydown="return false" value=Vol onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Sla een schermafbeelding van het externe bureaublad op" onkeypress="return false" onkeydown="return false" value=Opslaan... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Instellingen ..." title="Bewerk instellingen voor extern bureaublad" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Start bediening op afstand op schijf" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Wijzig de energiestatus van de externe machine" onkeypress="return false" onkeydown="return false" value="Stroomacties ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Aansluiten onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=41>Losgekoppeld.</span></div><tr><td id=42 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onwheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=43 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Winnen<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Win + Links<option value=24>Win + Right<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12<option value=25>Enter</select><input id=DeskWD type=button value=Sturen onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=44 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=45 type=button value=Type onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=46><input id=47 type=checkbox>Leeg scherm&nbsp;</span><span id=48><input id=49 type=checkbox>Alleen bekijken&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=50></span><h1>Auditlogboek</h1><span id=51></span></div><div id=p16 style=display:none><h1>Veiligheidsinstellingen</h1><span id=52></span></div><div id=p17 style=display:none><h1>Internetinstellingen</h1><span id=53></span></div><div id=p18 style=display:none><h1>Systeemverdediging</h1><span id=54></span></div><div id=p19 style=display:none><h1>Aanwezigheid van agent</h1><span id=55></span></div><div id=p21 style=display:none><h1>Opslag</h1><span id=56></span></div><div id=p22 style=display:none><h1>Event abonnementen</h1><span id=57></span></div><div id=p23 style=display:none><h1>Wekkeralarmen</h1><span id=58></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Bestanden</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Omhoog>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Selecteer alles" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Hernoemen onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Verwijderen onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nieuwe map" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Uploaden onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Besnoeiing onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Kopiëren onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Plakken onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Vernieuwen onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Sorteren op naam<option value=2>Sorteer op maat<option value=3>Sorteren op datum<option value=4>Daal af op naam<option value=5>Daal af op maat<option value=6>Daal af op datum</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=59 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=60 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=61 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>Gebruikersnaam</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Wachtwoord*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>bevestig wachtwoord</div></div><div id=62><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Lokaal<option value=1>Netwerk<option value=2>Ieder</select><div>Toestemming</div></div><div>Verleende machtigingen</div><ul id=63 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>* Minimaal 8 tekens met hoofdletters, kleine letters, 0-9 en een van! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Krachtige actie</div></div><div><span style=color:red>Waarschuwing:</span>Sommige stroomacties kunnen leiden tot gegevensverlies en kunnen de omleidingssessies van het bureaublad, de terminal of de schijf verbreken.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Toestemmingscode</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Primair beeldscherm<option value=1>Secundair beeldscherm<option id=d6ThirdDisplay value=2 style=display:none>Derde vertoning</select><div>Toestemming weergeven</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Beeldcodering</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Gehandicapt<option value=2>Automatic<option value=3>Ingeschakeld</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Toon lokale muiscursor</label><br><label><input type=checkbox id=d7showcad>Toon Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Framesnelheid beperken</label><br><label><input type=checkbox id=d7noMouseRotate>Draai de muis niet</label><br><label><input type=checkbox id=d7kvmrmw>Reverse Mouse Wheel</label><br></div><div>Andere instellingen</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Kwaliteit</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Schalen</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=beheerder style=float:right;width:220px><div style=height:20px>Gebruikersnaam</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Wachtwoord</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Omleidingspoort</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM Extern bureaublad</label><label style=display:block><input type=checkbox id=c17>IDE-omleiding<br></label><label style=display:block><input type=checkbox id=c18>Serieel via LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Niet verplicht<br></label><label><input type=radio name=d10 id=c20 value=1>Alleen vereist voor KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Altijd vereist<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=64></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximaal 32 tekens"><div title="Maximaal 32 tekens">Profielnaam</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximaal 32 tekens"><div title="Maximaal 32 tekens">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Prioriteit</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Verificatie</div></div><div style=height:26px><select id=c26 style=float:right;width:200px onclick=updateWifiDialog()><option id=65 value=4>CCMP-AES<option id=66 value=3>TKIP-RC4</select><div>Versleuteling</div></div><div id=c27><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lengte tussen 8 en 63 tekens"><div title="Lengte tussen 8 en 63 tekens">Wachtwoord*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lengte tussen 8 en 63 tekens"><div title="Lengte tussen 8 en 63 tekens">bevestig wachtwoord</div></div></div><div id=c30 style=display:none><div id=c31 style=height:26px><select id=c32 style=float:right;width:200px onchange=updateNetAuth2Dialog(event)><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protocol</div></div><div id=c33 style=height:26px><input id=c34 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximaal 32 tekens"><div title="Maximaal 32 tekens">Server Name</div></div><div id=c35 style=height:26px><select id=c36 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c37 style=height:26px><input id=c38 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c39 style=height:26px><input id=c40 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Gebruikersnaam</div></div><div id=c41 style=height:26px><input id=c42 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuth2Dialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Wachtwoord</div></div><div id=c43 style=height:26px><input id=c44 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuth2Dialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c45 style=height:26px><input id=c46 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c47 style=height:26px><input id=c48 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c49 style=height:26px><select id=c50 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Client Certificate</div></div><div id=c51 style=height:26px><select id=c52 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Server Issuer Cert</div></div><div id=c53 style=height:26px><select id=c54 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=1>Ingeschakeld<option value=0>Gehandicapt</select><div>Active in S0</div></div></div></div><div id=dialog19 style=margin:auto;margin:3px>Hiermee wordt de volledige staat van Intel® AMT voor deze machine in het bestand opgeslagen. Wachtwoorden worden niet opgeslagen, maar er kunnen enkele gevoelige gegevens worden opgenomen.<br><br><input id=c55 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Gehandicapt<br><input type=radio name=d20 id=d20b value=1>ICMP-reactie<br><input type=radio name=d20 id=d20c value=2>RMCP-reactie<br><input type=radio name=d20 id=d20d value=3>ICMP &amp; RMCP-reactie<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=67><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Besturingssysteem IP-adres synchronisatie</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=68><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c56 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP adres</div></div><div style=height:26px id=69><input id=c57 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Subnetmarkering</div></div><div style=height:26px><input id=c58 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>poort</div></div><div style=height:26px><input id=c59 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Primaire DNS</div></div><div style=height:26px><input id=c60 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Alternatieve DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c61 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Gehandicapt<option value=1>Uitgeschakeld, DHCP-update<option value=2>Ingeschakeld</select><div>Dynamische DNS-client</div></div><div style=height:26px><input id=c62 style=float:right;width:200px><div>Interval bijwerken (minuten)</div></div><div style=height:26px><input id=c63 style=float:right;width:200px><div>TTL (seconden)</div></div><div style=font-size:10px><br>Defaut Interval is 1440 minuten, standaard TTL is 900 seconden.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c64 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Opstarten<option value=10>Reset<option value=5>Power cyclus<option value=8>Stroomstoring<option id=d24p500 value=500>OS Wake from Standby<option id=d24p501 value=501>OS energiebesparing<option value=999>Stel opstartopties in</select><div>Afstandsbediening</div></div><div style=height:80px><div id=c65 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS Pauze</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Dwing Secure Boot af</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS-instellingen</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forceer voortgangsgebeurtenissen</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Aan / uit-knop vergrendelen</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Reset-knop vergrendelen</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Slaapknop vergrendelen</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Toetsenbord vergrendelen</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS-wachtwoord omzeilen</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflash BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Veilige modus</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Gebruik IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serieel via LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Opstartinstellingen</div></div><div style=height:26px><select id=c66 style=float:right;width:200px onchange=showAdvPowerDlgChange()></select><div>Opstartbron</div></div><div id=c67 style=height:26px><select id=c68 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Geen<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c69 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Start op naar floppy<option value=1>Start op naar CDROM</select><div>IDER opstartapparaat</div></div><div style=height:26px><select id=c70 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Systeemfout<option id=c71 value=1>Rustig<option id=c72 value=2>Uitgebreid<option id=c73 value=3>Leeg scherm</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-wachtwoord</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>Alarmnaam</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>Wekdatum (jaar-maand-dag)</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>Wektijd (uur: 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 (dagen-uren-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>Houd alarm<option value=1>Na voltooiing verwijderen</select></div><div style=padding-top:4px>Na het ontwaken</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c74 value=2>Ingeschakeld<br></label><label><input type=radio name=d26b id=c75 value=0>Gehandicapt<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c76 value=1>Ingeschakeld<br></label><label><input type=radio name=d26a id=c77 value=0>Gehandicapt<br></label></div><div id=dialog27 style=margin:auto;margin:3px><br><div style=height:26px><select id=c78 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>Gehandicapt<option value=1>Ingeschakeld</select><div>Ingeschakeld</div></div><div id=c79 style=height:26px><select id=c80 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protocol</div></div><div id=c81 style=height:26px><input id=c82 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximaal 32 tekens"><div title="Maximaal 32 tekens">Server Name</div></div><div id=c83 style=height:26px><select id=c84 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c85 style=height:26px><input id=c86 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c87 style=height:26px><input id=c88 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Gebruikersnaam</div></div><div id=c89 style=height:26px><input id=c90 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuthDialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Wachtwoord</div></div><div id=c91 style=height:26px><input id=c92 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c93 style=height:26px><input id=c94 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c95 style=height:26px><input id=c96 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c97 style=height:26px><select id=c98 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Client Certificate</div></div><div id=c99 style=height:26px><select id=c100 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Server Issuer Cert</div></div><div id=c101 style=height:26px><select id=c102 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>Ingeschakeld<option value=1>Gehandicapt</select><div>Active in S0</div></div><div id=c103 style=height:26px><input id=c104 style=float:right;width:200px onkeyup=updateNetAuthDialog()><div>PXE Timeout</div></div></div></div><div style=padding:10px;margin-bottom:4px><input id=c105 type=button value=annuleren style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c106 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c107 type=button value=Verwijderen style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
5 -$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var g=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==g&&$jscomp.global.Object.defineProperty(b,d,g)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
5 +$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var e=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==e&&$jscomp.global.Object.defineProperty(b,d,e)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
6 String.prototype.endsWith||(String.prototype.endsWith=function(b){return-1!==this.indexOf(b,this.length-b.length)});function Q(b){return document.getElementById(b)}function QS(b){try{return Q(b).style}catch(c){}}function QE(b,c){try{Q(b).disabled=!c}catch(a){}}function QV(b,c){try{QS(b).display=c?"":"none"}catch(a){}}function QA(b,c){Q(b).innerHTML+=c}function QH(b,c){Q(b).innerHTML=c}function inputBoxFocus(b){Q(b).focus();var c=Q(b).value;Q(b).value="";Q(b).value=c}
7 function ReadShort(b,c){return(b.charCodeAt(c)<<8)+b.charCodeAt(c+1)}function ReadShortX(b,c){return(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}function ReadInt(b,c){return 16777216*b.charCodeAt(c)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadSInt(b,c){return(b.charCodeAt(c)<<24)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadIntX(b,c){return 16777216*b.charCodeAt(c+3)+(b.charCodeAt(c+2)<<16)+(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}
8 function ShortToStr(b){return String.fromCharCode(b>>8&255,b&255)}function ShortToStrX(b){return String.fromCharCode(b&255,b>>8&255)}function IntToStr(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}function IntToStrX(b){return String.fromCharCode(b&255,b>>8&255,b>>16&255,b>>24&255)}function MakeToArray(b){return b&&null!=b&&"object"!=typeof b?[b]:b}function SplitArray(b){return b.split(",")}function Clone(b){return JSON.parse(JSON.stringify(b))}
@@ -12,262 +12,262 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a,d){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(d?d:32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,u,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.floppyReady)return g.floppyReady=!0,g.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.cdromReady)return g.cdromReady=!0,g.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}g.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,u);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),g.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 -d=0;switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}g.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),u&1);return}g.SendCommandEndResponse(1,5,c,36,0);break;case 27:g.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==g.floppy||176==c&&null==g.cdrom)return g.SendCommandEndResponse(1,
18 -2,c,58,0),-1;g.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}g.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),u&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.floppy&&(d=(g.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.cdrom&&(d=(g.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);g.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),u&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,F,d);a(c,F,d,u);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);g.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return g.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?g.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -u&1):0==N&&(H?g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),u&1):g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),u&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=r;if(16==v||N&&16>v)H+=K;if(30==
22 -v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=A;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));g.SendDataToHost(c,!0,H,u&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");g.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=g.floppy?d=2:176==c&&null!=g.cdrom&&(d=2);g.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),u&1);break;case 76:g.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),g.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),g.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;F=0;160==c?null!=g.floppy&&(F=g.floppy.size>>9):null!=g.cdrom&&(F=g.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?y:R:z;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?q:l:D;break;case 26:176==c&&(H=e);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?g.SendCommandEndResponse(0,5,c,32,0):g.SendDataToHost(c,!0,H,u&1);break;case 81:g.SendDataToHost(c,!0,E,u&1);break;case 172:g.SendDataToHost(c,!0,O,u&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),g.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 -b,x,e){var c=null,y=0;160==a&&(c=g.floppy,null!=g.floppy&&(y=g.floppy.size>>9));176==a&&(c=g.cdrom,null!=g.cdrom&&(y=g.cdrom.size>>11));if(0>x||b+x>y)return g.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return g.SendCommandEndResponse(1,0,a,0,0),0;null!=c&&(g.sectorStats&&g.sectorStats(1,160==a?0:1,y,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==u?H.push({media:c,dev:a,lba:b,len:x,fr:e}):(u=c,T=a,P=b,F=x,d(e)))}function d(a){var b=F,x=P;F>g.iderinfo.readbfr&&(b=g.iderinfo.readbfr);F-=b;P+=b;var e=
26 -new FileReader;e.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));g.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(u=null,N?(g.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),u=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};e.readAsBinaryString?e.readAsBinaryString(u.slice(x,x+b)):e.readAsArrayBuffer(u.slice(x,x+b))}var g={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,q,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,q);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),q&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),q&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);e.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),q&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,F,d);a(c,F,d,q);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);e.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +q&1):0==N&&(H?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),q&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),q&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=u;if(16==v||N&&16>v)H+=K;if(30==
22 +v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=z;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));e.SendDataToHost(c,!0,H,q&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),q&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;F=0;160==c?null!=e.floppy&&(F=e.floppy.size>>9):null!=e.cdrom&&(F=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?A:R:y;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?r:l:D;break;case 26:176==c&&(H=g);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,H,q&1);break;case 81:e.SendDataToHost(c,!0,E,q&1);break;case 172:e.SendDataToHost(c,!0,O,q&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 +b,x,c){var g=null,p=0;160==a&&(g=e.floppy,null!=e.floppy&&(p=e.floppy.size>>9));176==a&&(g=e.cdrom,null!=e.cdrom&&(p=e.cdrom.size>>11));if(0>x||b+x>p)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,p,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==q?H.push({media:g,dev:a,lba:b,len:x,fr:c}):(q=g,T=a,P=b,F=x,d(c)))}function d(a){var b=F,x=P;F>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);F-=b;P+=b;var c=
26 +new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));e.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(q=null,N?(e.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),q=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(q.slice(x,x+b)):c.readAsArrayBuffer(q.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
27 iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,
28 -0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),e=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 -18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),r=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 -0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),A=String.fromCharCode(1,5,3,0),y=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),z=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);g.xxStateChange=function(a){b("IDER-StateChange",a);
31 -0==a&&g.Stop();3==a&&g.Start()};g.Start=function(){b("IDER-Start");b(g.floppy,g.cdrom);g.bytesToAmt=0;g.bytesFromAmt=0;g.inSequence=0;g.outSequence=0;H=[];g.SendCommand(64,ShortToStrX(g.rx_timeout)+ShortToStrX(g.tx_timeout)+ShortToStrX(g.heartbeat)+IntToStrX(g.version));g.sectorStats&&(g.sectorStats(0,0,g.floppy?g.floppy.size>>9:0),g.sectorStats(0,1,g.cdrom?g.cdrom.size>>11:0))};g.Stop=function(){b("IDER-Stop");g.parent.Stop()};g.ProcessData=function(a){g.bytesFromAmt+=a.length;g.acc+=a;null!=v&&
32 -v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",g.acc.length,rstr2hex(g.acc));;){a=g.ProcessDataEx();if(0==a)break;if(g.inSequence!=ReadIntX(g.acc,4)){b("ERROR: Out of sequence",g.inSequence,ReadIntX(g.acc,4));g.Stop();break}g.inSequence++;g.acc=g.acc.substring(a)}};g.SendCommand=function(a,x,e,c){null==x&&(x="");e=50<a&&1==e?2:0;c&&(e+=1);x=String.fromCharCode(a,0,0,e)+IntToStrX(g.outSequence++)+x;g.parent.xxSend(x);g.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 -"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};g.SendCommandEndResponse=function(a,b,x,e,c){a?g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,e,c),!0)};g.SendDataToHost=function(a,b,x,e){var c=e?0:x.length;1==b?g.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,e):g.SendCommand(84,
34 -String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,e)};g.SendGetDataFromHost=function(a,b){g.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};g.SendDisableEnableFeatures=function(a,b){null==b&&(b="");g.SendCommand(72,String.fromCharCode(a)+b)};g.ProcessDataEx=function(){if(8>g.acc.length)return 0;switch(g.acc.charCodeAt(0)){case 65:if(30>g.acc.length)break;var a=g.acc.charCodeAt(29);
35 -if(g.acc.length<30+a)break;g.iderinfo={};g.iderinfo.major=g.acc.charCodeAt(8);g.iderinfo.minor=g.acc.charCodeAt(9);g.iderinfo.fwmajor=g.acc.charCodeAt(10);g.iderinfo.fwminor=g.acc.charCodeAt(11);g.iderinfo.readbfr=ReadShortX(g.acc,16);g.iderinfo.writebfr=ReadShortX(g.acc,18);g.iderinfo.proto=g.acc.charCodeAt(21);g.iderinfo.iana=ReadIntX(g.acc,25);b(g.iderinfo);0!=g.iderinfo.proto&&(b("Unknown proto",g.iderinfo.proto),g.Stop());8192<g.iderinfo.readbfr&&(b("Illegal read buffer size",g.iderinfo.readbfr),
36 -g.Stop());8192<g.iderinfo.writebfr&&(b("Illegal write buffer size",g.iderinfo.writebfr),g.Stop());0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),g.Stop(),8;case 68:return g.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>g.acc.length)break;a=g.acc.charCodeAt(8);null===u?(g.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 -a));return 9;case 73:if(13>g.acc.length)break;var a=g.acc.charCodeAt(8),x=ReadIntX(g.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:g.enabled=x&2?!0:!1;b("IDER Status: "+g.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>g.acc.length)break;b("IDER: ABORT",g.acc.charCodeAt(8));
38 -return 11;case 75:return 8;case 80:if(28>g.acc.length)break;var a=g.acc.charCodeAt(14)&16?176:160,x=g.acc.charCodeAt(14),e=g.acc.substring(16,28),y=g.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(e),y,x);c(a,e,y,x);return 28;case 83:if(14>g.acc.length)break;a=ReadShortX(g.acc,9);if(g.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",g.acc[0]),g.Stop()}return 0};
39 -var H=[],N=!1,u=null,T,P,F;return g},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 -a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,g,v,n){b("SIDER-Start",a,d,g,v,n);c.host=a;c.port=d;c.user=g;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==g?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+g:"")+"&tls1only="+
41 -c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(g){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
28 +0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),r=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 +18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 +0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);
31 +0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;H=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&
32 +v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 +"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,
34 +String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);
35 +if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),
36 +e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===q?(e.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 +a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));
38 +return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),d=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),d,x);c(a,g,d,x);return 28;case 83:if(14>e.acc.length)break;a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};
39 +var H=[],N=!1,q=null,T,P,F;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 +a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+
41 +c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
42 b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);break;
43 -default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,g){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){e.socketState=2;e.socketParseState=0;e.socketAccumulator="";e.socketHeader=null;e.socketData="";
44 -for(i in e.pendingAjaxCall)e.sendRequest(e.pendingAjaxCall[i][0],e.pendingAjaxCall[i][3],e.pendingAjaxCall[i][4])}function p(a){var b=e.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(e.socketAccumulator=b+a;;){if(0==e.socketParseState){b=e.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;e.socketHeader=e.socketAccumulator.substring(0,b).split("\r\n");if(null==e.amtVersion)for(var c in e.socketHeader)0==e.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 -(e.amtVersion=e.socketHeader[c].substring(46));e.socketAccumulator=e.socketAccumulator.substring(b+4);e.socketParseState=1;e.socketData="";e.socketXHeader={Directive:e.socketHeader[0].split(" ")};for(c in e.socketHeader)0!=c&&(b=e.socketHeader[c].indexOf(":"),e.socketXHeader[e.socketHeader[c].substring(0,b).toLowerCase()]=e.socketHeader[c].substring(b+2))}if(1==e.socketParseState){b=-1;if(void 0==e.socketXHeader.connection||"close"!=e.socketXHeader.connection.toLowerCase()||void 0!=e.socketXHeader["transfer-encoding"]&&
46 -"chunked"==e.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=e.socketXHeader["content-length"]){b=parseInt(e.socketXHeader["content-length"]);if(e.socketAccumulator.length<b)break;a=e.socketAccumulator.substring(0,b);e.socketAccumulator=e.socketAccumulator.substring(b);e.socketData=a;b=0}else{var p=e.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(e.socketAccumulator.substring(0,p),16);if(isNaN(b)){e.websocket&&e.websocket.close();break}if(e.socketAccumulator.length<p+2+b+2)break;
47 -a=e.socketAccumulator.substring(p+2,p+2+b);e.socketAccumulator=e.socketAccumulator.substring(p+2+b+2);e.socketData+=a}else b=0;if(0==b){p=e.socketXHeader;b=e.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++e.authcounter){if(e.challengeParams=e.parseDigest(p["www-authenticate"]),null!=e.challengeParams.qop){b=e.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 -e.challengeParams.qop="auth-int":e.challengeParams.qop="auth"}}else p=e.pendingAjaxCall.shift(),e.authcounter=0,e.ActiveAjaxCount--,e.gotNextMessages(b,"success",{status:a},p),e.PerformNextAjax();e.socketParseState=0;e.socketHeader=null}}}}function q(a){0==e.inDataCount&&(e.tlsv1only=1-e.tlsv1only);e.socketState=0;null!=e.socket&&(e.socket.close(),e.socket=null);if(0<e.pendingAjaxCall.length){a=e.pendingAjaxCall.shift();var b=a[5];e.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var e={PendingAjax:[],
49 -ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};e.host=b;e.port=c;e.user=a;e.pass=d;e.tls=g;e.tlsv1only=0;e.inDataCount=0;e.amtVersion=null;e.digestRealmMatch=null;e.digestRealm=null;e.PerformAjax=function(a,b,c,p,d,h){e.ActiveAjaxCount<e.MaxActiveAjaxCount&&0==e.PendingAjax.length?e.PerformAjaxEx(a,b,c,d,h):1==p?e.PendingAjax.unshift([a,b,c,d,h]):e.PendingAjax.push([a,b,c,d,h])};e.PerformNextAjax=function(){if(!(e.ActiveAjaxCount>=
50 -e.MaxActiveAjaxCount||0==e.PendingAjax.length)){var a=e.PendingAjax.shift();e.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);e.PerformNextAjax()}};e.PerformAjaxEx=function(a,b,c,p,d){if(0!=e.FailAllError)e.gotNextMessagesError({status:e.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),e.ActiveAjaxCount++,e.PerformAjaxExNodeJS(a,b,c,p,d)};e.pendingAjaxCall=[];e.PerformAjaxExNodeJS=function(a,b,c,p,d){e.PerformAjaxExNodeJS2(a,
51 -b,c,p,d,5)};e.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=e.FailAllError?(e.ActiveAjaxCount--,999!=e.FailAllError&&e.gotNextMessages(null,"error",{status:0==e.FailAllError?408:e.FailAllError},[a,b,c,p,d]),e.PerformNextAjax()):(e.pendingAjaxCall.push([a,b,c,p,d,h]),0==e.socketState?e.xxConnectHttpSocket():2==e.socketState&&e.sendRequest(a,p,d))};e.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=e.challengeParams){e.digestRealm=e.challengeParams.realm;
52 -if(e.digestRealmMatch&&e.digestRealm!=e.digestRealmMatch){e.FailAllError=997;e.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(e.user+":"+e.challengeParams.realm+":"+e.pass)+":"+e.challengeParams.nonce+":"+n(e.noncecounter)+":"+d+":"+e.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==e.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+e.renderDigest({username:e.user,realm:e.challengeParams.realm,nonce:e.challengeParams.nonce,uri:b,qop:e.challengeParams.qop,
53 -response:c,nc:n(e.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+e.host+":"+e.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==e.socketState&&null!=e.socket&&e.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{e.socket.send(b.buffer)}catch(h){}}};e.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var e=b.trim().split("=");a[e[0]]=e[1].replace(RegExp('"',"g"),"");return a},{})};e.renderDigest=function(a){var b=
54 -[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,e){return b+","+("nc"==e||"qop"==e?e+"="+a[e]:e+'="'+a[e]+'"')},"").substring(1)};e.xxConnectHttpSocket=function(){e.inDataCount=0;e.socketState=1;e.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+e.host+"&port="+e.port+"&tls="+e.tls+"&tls1only="+e.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 -typeof d?"&serverauth=1&user="+a:""));e.socket.binaryType="arraybuffer";e.socket.onopen=l;e.socket.onmessage=p;e.socket.onclose=q};e.gotNextMessages=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](a,c.status,p[2])};e.gotNextMessagesError=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](e,null,{Header:{HttpError:a.status}},a.status,p[2])};e.CancelAllQueries=function(a){for(;0<e.PendingAjax.length;){var b=
56 -e.PendingAjax.shift();b[1](null,a,b[2])}null!=e.websocket&&(e.websocket.close(),e.websocket=null,e.socketState=0)};return e},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
43 +default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){g.socketState=2;g.socketParseState=0;g.socketAccumulator="";g.socketHeader=null;g.socketData="";
44 +for(i in g.pendingAjaxCall)g.sendRequest(g.pendingAjaxCall[i][0],g.pendingAjaxCall[i][3],g.pendingAjaxCall[i][4])}function p(a){var b=g.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(g.socketAccumulator=b+a;;){if(0==g.socketParseState){b=g.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;g.socketHeader=g.socketAccumulator.substring(0,b).split("\r\n");if(null==g.amtVersion)for(var c in g.socketHeader)0==g.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 +(g.amtVersion=g.socketHeader[c].substring(46));g.socketAccumulator=g.socketAccumulator.substring(b+4);g.socketParseState=1;g.socketData="";g.socketXHeader={Directive:g.socketHeader[0].split(" ")};for(c in g.socketHeader)0!=c&&(b=g.socketHeader[c].indexOf(":"),g.socketXHeader[g.socketHeader[c].substring(0,b).toLowerCase()]=g.socketHeader[c].substring(b+2))}if(1==g.socketParseState){b=-1;if(void 0==g.socketXHeader.connection||"close"!=g.socketXHeader.connection.toLowerCase()||void 0!=g.socketXHeader["transfer-encoding"]&&
46 +"chunked"==g.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=g.socketXHeader["content-length"]){b=parseInt(g.socketXHeader["content-length"]);if(g.socketAccumulator.length<b)break;a=g.socketAccumulator.substring(0,b);g.socketAccumulator=g.socketAccumulator.substring(b);g.socketData=a;b=0}else{var p=g.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(g.socketAccumulator.substring(0,p),16);if(isNaN(b)){g.websocket&&g.websocket.close();break}if(g.socketAccumulator.length<p+2+b+2)break;
47 +a=g.socketAccumulator.substring(p+2,p+2+b);g.socketAccumulator=g.socketAccumulator.substring(p+2+b+2);g.socketData+=a}else b=0;if(0==b){p=g.socketXHeader;b=g.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++g.authcounter){if(g.challengeParams=g.parseDigest(p["www-authenticate"]),null!=g.challengeParams.qop){b=g.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 +g.challengeParams.qop="auth-int":g.challengeParams.qop="auth"}}else p=g.pendingAjaxCall.shift(),g.authcounter=0,g.ActiveAjaxCount--,g.gotNextMessages(b,"success",{status:a},p),g.PerformNextAjax();g.socketParseState=0;g.socketHeader=null}}}}function r(a){0==g.inDataCount&&(g.tlsv1only=1-g.tlsv1only);g.socketState=0;null!=g.socket&&(g.socket.close(),g.socket=null);if(0<g.pendingAjaxCall.length){a=g.pendingAjaxCall.shift();var b=a[5];g.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var g={PendingAjax:[],
49 +ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};g.host=b;g.port=c;g.user=a;g.pass=d;g.tls=e;g.tlsv1only=0;g.inDataCount=0;g.amtVersion=null;g.digestRealmMatch=null;g.digestRealm=null;g.PerformAjax=function(a,b,c,p,d,h){g.ActiveAjaxCount<g.MaxActiveAjaxCount&&0==g.PendingAjax.length?g.PerformAjaxEx(a,b,c,d,h):1==p?g.PendingAjax.unshift([a,b,c,d,h]):g.PendingAjax.push([a,b,c,d,h])};g.PerformNextAjax=function(){if(!(g.ActiveAjaxCount>=
50 +g.MaxActiveAjaxCount||0==g.PendingAjax.length)){var a=g.PendingAjax.shift();g.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);g.PerformNextAjax()}};g.PerformAjaxEx=function(a,b,c,p,d){if(0!=g.FailAllError)g.gotNextMessagesError({status:g.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),g.ActiveAjaxCount++,g.PerformAjaxExNodeJS(a,b,c,p,d)};g.pendingAjaxCall=[];g.PerformAjaxExNodeJS=function(a,b,c,p,d){g.PerformAjaxExNodeJS2(a,
51 +b,c,p,d,5)};g.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=g.FailAllError?(g.ActiveAjaxCount--,999!=g.FailAllError&&g.gotNextMessages(null,"error",{status:0==g.FailAllError?408:g.FailAllError},[a,b,c,p,d]),g.PerformNextAjax()):(g.pendingAjaxCall.push([a,b,c,p,d,h]),0==g.socketState?g.xxConnectHttpSocket():2==g.socketState&&g.sendRequest(a,p,d))};g.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=g.challengeParams){g.digestRealm=g.challengeParams.realm;
52 +if(g.digestRealmMatch&&g.digestRealm!=g.digestRealmMatch){g.FailAllError=997;g.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(g.user+":"+g.challengeParams.realm+":"+g.pass)+":"+g.challengeParams.nonce+":"+n(g.noncecounter)+":"+d+":"+g.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==g.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+g.renderDigest({username:g.user,realm:g.challengeParams.realm,nonce:g.challengeParams.nonce,uri:b,qop:g.challengeParams.qop,
53 +response:c,nc:n(g.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+g.host+":"+g.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==g.socketState&&null!=g.socket&&g.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{g.socket.send(b.buffer)}catch(h){}}};g.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};g.renderDigest=function(a){var b=
54 +[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+","+("nc"==c||"qop"==c?c+"="+a[c]:c+'="'+a[c]+'"')},"").substring(1)};g.xxConnectHttpSocket=function(){g.inDataCount=0;g.socketState=1;g.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+g.host+"&port="+g.port+"&tls="+g.tls+"&tls1only="+g.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 +typeof d?"&serverauth=1&user="+a:""));g.socket.binaryType="arraybuffer";g.socket.onopen=l;g.socket.onmessage=p;g.socket.onclose=r};g.gotNextMessages=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](a,c.status,p[2])};g.gotNextMessagesError=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](g,null,{Header:{HttpError:a.status}},a.status,p[2])};g.CancelAllQueries=function(a){for(;0<g.PendingAjax.length;){var b=
56 +g.PendingAjax.shift();b[1](null,a,b[2])}null!=g.websocket&&(g.websocket.close(),g.websocket=null,g.socketState=0)};return g},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
57 function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;
58 d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?
59 d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,
60 0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):d.Stop(2);
61 -else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),e=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),q=q+(e+
62 -1),e=0,e=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(e=n[q],e=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),w="00000002:"+C+":"+e+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(q+=e.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 -p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(e.length)+e);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
61 +else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var r=0,p=n[r],l=a(new Uint8Array(n.buffer.slice(r+1,r+1+p))),r=r+(p+1),g=n[r],p=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),r=r+(g+
62 +1),g=0,g=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[r],g=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),w="00000002:"+C+":"+g+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));r=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(r+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(r)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 +p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
64 break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;
65 break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&
66 1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+
67 "/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=
68 --1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,g,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
68 +-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
69 b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b="",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";
70 var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";
71 -b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,g,v);q.PerformAjax=function(a,b,c,p,d){null==d&&(d="");q.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" '+
72 -d+"><Header><a:Action>"+a,function(a,c,e){var p=q.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(q,p.Header.ResourceURI,p,c,e)}else b(q,null,{Header:{HttpError:c}},601,e)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,h,g,l,B){var x="",A="";
73 -g="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 -B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",A='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=g&&(g="<a:ReferenceParameters><m:arg>"+g+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+
75 -"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+g+"</e:NotifyTo>"+A+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=
76 -function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 -q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=q.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var g in b)if(b.hasOwnProperty(g)&&0!==g.indexOf("__")&&0!==g.indexOf("@")&&null!=b[g]&&"function"!==typeof b[g])if("object"===typeof b[g]&&
78 -b[g].ReferenceParameters){a+="<r:"+g+"><a:Address>"+b[g].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[g].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[g].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+g+">"}else if(Array.isArray(b[g]))for(B=0;B<b[g].length;B++)a+=
79 -"<r:"+g+">"+b[g][B].toString()+"</r:"+g+">";else a+="<r:"+g+">"+b[g].toString()+"</r:"+g+">";b=a+("</r:"+h+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var h=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
80 -p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var g in b)a+="<g:"+g+">"+b[g]+"</g:"+g+">";q.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
81 -p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>",b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,
82 -h){var g="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])g+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else g+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,g,p,d,k,h)};q.ExecMethodXml=function(a,b,c,d,m,k,h){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
83 -p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>',
84 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var g=a.getElementsByTagName("Body")[0];g||(g=a.getElementsByTagName("a:Body")[0]);
86 -if(!g)return null;if(0<g.childNodes.length){k=g.childNodes[0].localName;var q=k.indexOf("_OUTPUT");-1!=q&&q==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(g.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",g,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
87 -function AmtStackCreateService(b){function c(){var a=e.GetPendingActions();C<a&&(C=a);null!=e.onProcessChanged&&w!=a&&(w=a,e.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,z,h,k){200!=z?(c(e,a,null,z,h),g(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?e.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,e,p,z){d(a,p,c,e,[],z,h,k)}):(c(e,a,null,603,h),g(1))}function d(a,b,p,h,z,E,k,m){if(200!=E)p(e,a,null,E,k),g(1);else if(null==b||"PullResponse"!=b.Header.Method)p(e,
88 -a,null,604,k),g(1);else{for(var r in b.Body.Items)if(b.Body.Items[r]instanceof Array)for(var q in b.Body.Items[r])"function"!=typeof b.Body.Items[r][q]&&z.push(b.Body.Items[r][q]);else"function"!=typeof b.Body.Items[r]&&z.push(b.Body.Items[r]);b.Body.EnumerationContext?e.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,e,A){d(a,e,p,c,z,A,k,1)}):(g(1),p(e,a,z,E,k),c())}}function g(a){e.ActiveEnumsCount-=a;e.ActiveEnumsCount>=e.MaxActiveEnumsCount||0==e.PendingEnums.length?c():(a=e.PendingEnums.shift(),
89 -e.Enum(a[0],a[1],a[2]),g(0))}function v(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]),function(b,c,p,d){null==p||200!=d?a.callback(e,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](e,null,d[2]);else e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,z){if(200!=d||"0"!=c.Body.ReturnValue)z[0](e,
90 -null,z[2]);else{var h,m,g;b=z[2];d=new Date;var r=c.Body.RecordArray;"string"===typeof r&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in r){a=null;try{a=window.atob(r[h])}catch(q){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){g={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),
91 -EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)g.EventData.push(a.charCodeAt(m));g.EntityStr=k[g.Entity];g.Desc=p(g.EventSensorType,g.EventOffset,g.EventData,g.Entity);g.EntityStr||(g.EntityStr="Unknown");b.push(g)}}if(1!=c.Body.NoMoreRecords)e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[z[0],b,z[2]]);else z[0](e,b,z[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Onjuiste data";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
92 -r[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
93 -64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
94 -a&&170==c[0])return"Agent waakhond"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... veranderd in"+e.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Case inbraak";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Er is een externe Serial Over LAN-sessie tot stand gebracht.";if(1==c[2])return"Remote Serial Over LAN-sessie be\u00ebindigd. Gebruikerscontrole is hersteld.";if(2==c[2])return"Er is een externe IDE-omleidingssessie opgezet.";if(3==
71 +b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var r={NextMessageId:1,Address:"/wsman"};r.comm=CreateWsmanComm(b,c,a,d,e,v);r.PerformAjax=function(a,b,c,p,d){null==d&&(d="");r.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" '+
72 +d+"><Header><a:Action>"+a,function(a,c,g){var p=r.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(r,p.Header.ResourceURI,p,c,g)}else b(r,null,{Header:{HttpError:c}},601,g)},c,p)};r.CancelAllQueries=function(a){r.comm.CancelAllQueries(a)};r.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};r.ExecSubscribe=function(a,b,c,d,m,k,h,e,l,B){var x="",z="";
73 +e="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 +B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=e&&(e="<a:ReferenceParameters><m:arg>"+e+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+r.Address+
75 +"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+e+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";r.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};r.ExecUnSubscribe=
76 +function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";r.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};r.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 +r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=r.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var e in b)if(b.hasOwnProperty(e)&&0!==e.indexOf("__")&&0!==e.indexOf("@")&&null!=b[e]&&"function"!==typeof b[e])if("object"===typeof b[e]&&
78 +b[e].ReferenceParameters){a+="<r:"+e+"><a:Address>"+b[e].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[e].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[e].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+e+">"}else if(Array.isArray(b[e]))for(B=0;B<b[e].length;B++)a+=
79 +"<r:"+e+">"+b[e][B].toString()+"</r:"+e+">";else a+="<r:"+e+">"+b[e].toString()+"</r:"+e+">";b=a+("</r:"+h+">")}else b="";r.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};r.ExecCreate=function(a,b,c,d,m,k){var h=r.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
80 +p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";r.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};r.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
81 +p(b)+"</Header><Body /></Envelope>";r.PerformAjax(a,c,d,m)};r.ExecGet=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>",b,c,p)};r.ExecMethod=function(a,b,c,p,d,k,
82 +h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])e+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";r.ExecMethodXml(a,b,e,p,d,k,h)};r.ExecMethodXml=function(a,b,c,d,m,k,h){r.PerformAjax(a+"/"+b+"</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
83 +p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};r.ExecEnum=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>',
84 +b,c,p)};r.ExecPull=function(a,b,c,p,d){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 +c,p,d)};r.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var e=a.getElementsByTagName("Body")[0];e||(e=a.getElementsByTagName("a:Body")[0]);
86 +if(!e)return null;if(0<e.childNodes.length){k=e.childNodes[0].localName;var r=k.indexOf("_OUTPUT");-1!=r&&r==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(e.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",e,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return r};
87 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();C<a&&(C=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,g,p,y){d(a,p,c,g,[],y,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,p,h,y,E,k,m){if(200!=E)p(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(g,
88 +a,null,604,k),e(1);else{for(var u in b.Body.Items)if(b.Body.Items[u]instanceof Array)for(var r in b.Body.Items[u])"function"!=typeof b.Body.Items[u][r]&&y.push(b.Body.Items[u][r]);else"function"!=typeof b.Body.Items[u]&&y.push(b.Body.Items[u]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,p,c,y,z,k,1)}):(e(1),p(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
89 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
90 +null,y[2]);else{var h,m,e;b=y[2];d=new Date;var u=c.Body.RecordArray;"string"===typeof u&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in u){a=null;try{a=window.atob(u[h])}catch(r){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){e={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),
91 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)e.EventData.push(a.charCodeAt(m));e.EntityStr=k[e.Entity];e.Desc=p(e.EventSensorType,e.EventOffset,e.EventData,e.Entity);e.EntityStr||(e.EntityStr="Unknown");b.push(e)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Onjuiste data";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("One Click Recovery: {0}",
92 +u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("One Click Recovery: {0}",h[c[2]]):format("One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&64==c[1]){if(1==
93 +c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
94 +a&&170==c[0])return"Agent waakhond"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... veranderd in"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Case inbraak";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Er is een externe Serial Over LAN-sessie tot stand gebracht.";if(1==c[2])return"Remote Serial Over LAN-sessie be\u00ebindigd. Gebruikerscontrole is hersteld.";if(2==c[2])return"Er is een externe IDE-omleidingssessie opgezet.";if(3==
95 c[2])return"Remote IDE-Redirection-sessie voltooid. Gebruikerscontrole is hersteld."}if(36==a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="bedrade"),4294967293==a?"Alle ontvangen pakketfilter is gematcht"+b+" koppel.":4294967292==a?"Alle uitgaande pakketfilters zijn gematcht"+b+" koppel.":4294967290==a?"Er werd op een vervalst pakketfilter gezocht"+b+" koppel.":"Filter"+a+" werd gematcht op"+b+" koppel.";if(192==a)return 0==c[2]?"Beveiligingsbeleid ingeroepen. Een deel van of al het netwerkverkeer (TX) is gestopt.":
96 2==c[2]?"Beveiligingsbeleid ingeroepen. Sommige of al het netwerkverkeer (RX) werd gestopt.":"Beveiligingsbeleid ingeroepen.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"Gebruikersverzoek voor externe verbinding.";if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"EAC-fout: probeer houding te krijgen terwijl NAC in Intel\ufffd AMT is uitgeschakeld.";if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"HWA-fout: algemene fout"}return 6==a?"Verificatie mislukt"+(c[1]+(c[2]<<8))+" keer. Het systeem wordt mogelijk aangevallen.":
97 -30==a?"Geen opstartbare media":32==a?"Vergrendeling van besturingssysteem of stroomonderbreking":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"Systeem opstartfout":37==a?"Systeemfirmware is gestart (ten minste \u00e9\u00e9n CPU wordt correct uitgevoerd).":"Onbekend sensortype #"+a}function q(a,b,c,p,d){if(200!=p)d[0](e,[],p);else{var h,k,m=d[1],g=new Date,r;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=
97 +30==a?"Geen opstartbare media":32==a?"Vergrendeling van besturingssysteem of stroomonderbreking":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"Systeem opstartfout":37==a?"Systeemfirmware is gestart (ten minste \u00e9\u00e9n CPU wordt correct uitgevoerd).":"Onbekend sensortype #"+a}function r(a,b,c,p,d){if(200!=p)d[0](g,[],p);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=
98 window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator=
99 -"<i>Lokaal</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM-standaardpoort</i>",h=5);r=ReadInt(a,h);b.Time=new Date(1E3*(r+60*g.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);r=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+r);h+=r;r=a.charCodeAt(h++);b.Ex=a.substring(h,h+r);b.ExStr=e.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)e.AMT_AuditLog_ReadRecords(m.length+1,q,[d[0],m]);else d[0](e,m,p)}}var e={};e.wsman=b;e.pfx=
100 -["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 C=0,w=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,b,p,d,z,h,k,m,g,r){e.wsman.ExecSubscribe(e.CompleteName(a),
101 -b,p,function(b,p,y,A){c();d(e,a,y,A,z)},0,h,k,m,g,r);c()};e.UnSubscribe=function(a,b,p,d,z){e.wsman.ExecUnSubscribe(e.CompleteName(a),function(d,z,h,k){c();b(e,a,h,k,p)},0,d,z);c()};e.Get=function(a,b,p,d){e.wsman.ExecGet(e.CompleteName(a),function(d,h,k,m){c();b(e,a,k,m,p)},0,d);c()};e.Put=function(a,b,p,d,z,h){e.wsman.ExecPut(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z,h);c()};e.Create=function(a,b,p,d,z){e.wsman.ExecCreate(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},
102 -0,z);c()};e.Delete=function(a,b,p,d,z){e.wsman.ExecDelete(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Exec=function(a,b,p,d,z,h,k){e.wsman.ExecMethod(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.ExecWithXml=function(a,b,p,d,z,h,k){e.wsman.ExecMethodXml(e.CompleteName(a),b,execArgumentsToXml(p),function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.Enum=function(b,p,d,h){e.ActiveEnumsCount<e.MaxActiveEnumsCount?
103 -(e.ActiveEnumsCount++,e.wsman.ExecEnum(e.CompleteName(b),function(e,d,y,h,k){c();a(b,y,p,d,h,k)},d,h)):e.PendingEnums.push([b,p,d,h]);c()};e.BatchEnum=function(a,b,p,d,z,h){z={_pending:b.length};e.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],g=e.Enum;"*"==m[0]&&(g=e.Get,m=m.substring(1));g(m,function(b,z,A,h,k){e.PendingBatchOperations--;c();k[2][z]={response:null==A?null:A.Body,responses:A,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(e,e,a,k[2],h,d))},[a,b,z,g==e.Get?
104 -"Get":"Enum"],h)}};e.BatchGet=function(a,b,p,e,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:e,pri:d});c()};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==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,b){e.CIM_PowerManagementService_RequestPowerStateChange(a,
99 +"<i>Lokaal</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM-standaardpoort</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,r,[d[0],m]);else d[0](g,m,p)}}var g={};g.wsman=b;g.pfx=
100 +["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/"];g.PendingEnums=[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var C=0,w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,p,d,y,h,k,m,e,u){g.wsman.ExecSubscribe(g.CompleteName(a),
101 +b,p,function(b,p,A,z){c();d(g,a,A,z,y)},0,h,k,m,e,u);c()};g.UnSubscribe=function(a,b,p,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,p)},0,d,y);c()};g.Get=function(a,b,p,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,p)},0,d);c()};g.Put=function(a,b,p,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,p,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},
102 +0,y);c()};g.Delete=function(a,b,p,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,p,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,p,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,p,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?
103 +(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(g,d,A,h,k){c();a(b,A,p,d,h,k)},d,h)):g.PendingEnums.push([b,p,d,h]);c()};g.BatchEnum=function(a,b,p,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],e=g.Enum;"*"==m[0]&&(e=g.Get,m=m.substring(1));e(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(g,g,a,k[2],h,d))},[a,b,y,e==g.Get?
104 +"Get":"Enum"],h)}};g.BatchGet=function(a,b,p,g,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:g,pri:d});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.CIM_PowerManagementService_RequestPowerStateChange(a,
105 '<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>',
106 -null,null,b)};e.RequestOSPowerStateChange=function(a,b){e.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
107 -null,null,b)};e.SetBootConfigRole=function(a,b){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>',
108 -a,b)};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,b){e.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
109 -k,m,g){e.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,g)};e.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){e.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};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=
110 -function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){e.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};e.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA",
111 -"DeleteAllActions",{_method_dummy:a},b)};e.AMT_AuditLog_ClearLog=function(a){e.Exec("AMT_AuditLog","ClearLog",{},a)};e.AMT_AuditLog_RequestStateChange=function(a,b,c){e.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_AuditLog_ReadRecords=function(a,b,c){e.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};e.AMT_AuditLog_SetAuditLock=function(a,b,c,p){e.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};e.AMT_AuditLog_ExportAuditLogSignature=
112 -function(a,b){e.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};e.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){e.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule",
113 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){e.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};e.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){e.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};e.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService",
114 -"GetUserAclEntryEx",{Handle:a},b,c)};e.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){e.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};e.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){e.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};e.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
115 -{Username:a,DigestPassword:b},c)};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,b,c,p){e.Exec("AMT_AuthorizationService",
116 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};e.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){e.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};e.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_EndpointAccessControlService_GetPosture=function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};e.AMT_EndpointAccessControlService_GetPostureHash=
117 -function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};e.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){e.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};e.AMT_EndpointAccessControlService_GetEacOptions=function(a){e.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};e.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
118 -PostureHashAlgorithm:b},c)};e.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};e.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};e.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){e.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};e.AMT_GeneralSettings_AMTAuthenticate=
119 -function(a,b){e.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};e.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){e.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};e.AMT_KerberosSettingData_GetCredentialCacheState=function(a){e.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};e.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){e.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
120 -b)};e.AMT_MessageLog_CancelIteration=function(a,b){e.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};e.AMT_MessageLog_RequestStateChange=function(a,b,c){e.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_MessageLog_ClearLog=function(a){e.Exec("AMT_MessageLog","ClearLog",{},a)};e.AMT_MessageLog_GetRecords=function(a,b,c,p){e.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};e.AMT_MessageLog_GetRecord=function(a,
121 -b,c){e.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};e.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){e.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};e.AMT_MessageLog_PositionToFirstRecord=function(a,b){e.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};e.AMT_MessageLog_FreezeLog=function(a,b){e.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};e.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){e.Exec("AMT_PublicKeyManagementService",
122 -"AddCRL",{Url:a,SerialNumbers:b},c)};e.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){e.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};e.AMT_PublicKeyManagementService_AddCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddKey=
123 -function(a,b){e.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};e.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};e.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};e.AMT_PublicKeyManagementService_GenerateKeyPair=
124 -function(a,b,c){e.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};e.AMT_RedirectionService_RequestStateChange=function(a,b){e.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};e.AMT_RedirectionService_TerminateSession=function(a,b){e.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};e.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,g){e.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
125 -Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},g)};e.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){e.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};e.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){e.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){e.Exec("AMT_SetupAndConfigurationService",
126 -"CommitChanges",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_Unprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};e.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
127 -e.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};e.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){e.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};e.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){e.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){e.Exec("AMT_SetupAndConfigurationService",
128 -"GetProvisioningAuditRecord",{},a)};e.AMT_SetupAndConfigurationService_GetUuid=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};e.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){e.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};e.AMT_SystemDefensePolicy_GetTimeout=
129 -function(a){e.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};e.AMT_SystemDefensePolicy_SetTimeout=function(a,b){e.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};e.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){e.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};e.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){e.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};e.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
130 -function(a,b){e.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};e.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){e.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};e.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){e.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WebUIService_RequestStateChange=function(a,b,c){e.Exec("AMT_WebUIService",
131 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
132 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};e.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};e.CIM_Account_RequestStateChange=function(a,b,c){e.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
133 -c)};e.CIM_AccountManagementService_CreateAccount=function(a,b,c){e.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};e.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){e.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};e.CIM_BootService_SetBootConfigRole=function(a,b,c){e.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};e.CIM_BootService_RequestStateChange=function(a,b,c,p){e.Exec("CIM_BootService","RequestStateChange",
134 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};e.CIM_Card_ConnectorPower=function(a,b,c){e.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};e.CIM_Card_IsCompatible=function(a,b){e.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};e.CIM_Chassis_IsCompatible=function(a,b){e.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};e.CIM_Fan_SetSpeed=function(a,b){e.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};e.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){e.Exec("CIM_KVMRedirectionSAP",
135 -"RequestStateChange",{RequestedState:a},c)};e.CIM_MediaAccessDevice_LockMedia=function(a,b){e.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};e.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){e.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_MediaAccessDevice_Reset=function(a){e.Exec("CIM_MediaAccessDevice","Reset",{},a)};e.CIM_MediaAccessDevice_EnableDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};e.CIM_MediaAccessDevice_OnlineDevice=
136 -function(a,b){e.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};e.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};e.CIM_MediaAccessDevice_SaveProperties=function(a){e.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};e.CIM_MediaAccessDevice_RestoreProperties=function(a){e.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};e.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){e.Exec("CIM_MediaAccessDevice","RequestStateChange",
137 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_PhysicalFrame_IsCompatible=function(a,b){e.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};e.CIM_PhysicalPackage_IsCompatible=function(a,b){e.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};e.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){e.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.CIM_PowerSupply_SetPowerState=function(a,
138 -b,c){e.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_PowerSupply_Reset=function(a){e.Exec("CIM_PowerSupply","Reset",{},a)};e.CIM_PowerSupply_EnableDevice=function(a,b){e.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};e.CIM_PowerSupply_OnlineDevice=function(a,b){e.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};e.CIM_PowerSupply_QuiesceDevice=function(a,b){e.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};e.CIM_PowerSupply_SaveProperties=function(a){e.Exec("CIM_PowerSupply",
139 -"SaveProperties",{},a)};e.CIM_PowerSupply_RestoreProperties=function(a){e.Exec("CIM_PowerSupply","RestoreProperties",{},a)};e.CIM_PowerSupply_RequestStateChange=function(a,b,c){e.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Processor_SetPowerState=function(a,b,c){e.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Processor_Reset=function(a){e.Exec("CIM_Processor","Reset",{},a)};e.CIM_Processor_EnableDevice=function(a,b){e.Exec("CIM_Processor",
140 -"EnableDevice",{Enabled:a},b)};e.CIM_Processor_OnlineDevice=function(a,b){e.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};e.CIM_Processor_QuiesceDevice=function(a,b){e.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Processor_SaveProperties=function(a){e.Exec("CIM_Processor","SaveProperties",{},a)};e.CIM_Processor_RestoreProperties=function(a){e.Exec("CIM_Processor","RestoreProperties",{},a)};e.CIM_Processor_RequestStateChange=function(a,b,c){e.Exec("CIM_Processor","RequestStateChange",
141 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RecordLog_ClearLog=function(a){e.Exec("CIM_RecordLog","ClearLog",{},a)};e.CIM_RecordLog_RequestStateChange=function(a,b,c){e.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RedirectionService_RequestStateChange=function(a,b,c){e.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Sensor_SetPowerState=function(a,b,c){e.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
142 -c)};e.CIM_Sensor_Reset=function(a){e.Exec("CIM_Sensor","Reset",{},a)};e.CIM_Sensor_EnableDevice=function(a,b){e.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};e.CIM_Sensor_OnlineDevice=function(a,b){e.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};e.CIM_Sensor_QuiesceDevice=function(a,b){e.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Sensor_SaveProperties=function(a){e.Exec("CIM_Sensor","SaveProperties",{},a)};e.CIM_Sensor_RestoreProperties=function(a){e.Exec("CIM_Sensor","RestoreProperties",
143 -{},a)};e.CIM_Sensor_RequestStateChange=function(a,b,c){e.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_StatisticalData_ResetSelectedStats=function(a,b){e.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};e.CIM_Watchdog_KeepAlive=function(a){e.Exec("CIM_Watchdog","KeepAlive",{},a)};e.CIM_Watchdog_SetPowerState=function(a,b,c){e.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Watchdog_Reset=function(a){e.Exec("CIM_Watchdog",
144 -"Reset",{},a)};e.CIM_Watchdog_EnableDevice=function(a,b){e.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};e.CIM_Watchdog_OnlineDevice=function(a,b){e.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};e.CIM_Watchdog_QuiesceDevice=function(a,b){e.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};e.CIM_Watchdog_SaveProperties=function(a){e.Exec("CIM_Watchdog","SaveProperties",{},a)};e.CIM_Watchdog_RestoreProperties=function(a){e.Exec("CIM_Watchdog","RestoreProperties",{},a)};e.CIM_Watchdog_RequestStateChange=
145 -function(a,b,c){e.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_WiFiPort_SetPowerState=function(a,b,c){e.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_WiFiPort_Reset=function(a){e.Exec("CIM_WiFiPort","Reset",{},a)};e.CIM_WiFiPort_EnableDevice=function(a,b){e.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};e.CIM_WiFiPort_OnlineDevice=function(a,b){e.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};e.CIM_WiFiPort_QuiesceDevice=function(a,
146 -b){e.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};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,b,c){e.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){e.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
147 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};e.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};e.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){e.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},h)};e.IPS_HostBasedSetupService_UpgradeClientToAdmin=
148 -function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};e.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){e.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};e.IPS_KVMRedirectionSettingData_TerminateSession=function(a){e.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){e.Exec("IPS_KVMRedirectionSettingData",
149 -"DataChannelRead",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){e.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};e.IPS_OptInService_StartOptIn=function(a){e.Exec("IPS_OptInService","StartOptIn",{},a)};e.IPS_OptInService_CancelOptIn=function(a){e.Exec("IPS_OptInService","CancelOptIn",{},a)};e.IPS_OptInService_SendOptInCode=function(a,b){e.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};e.IPS_OptInService_StartService=function(a){e.Exec("IPS_OptInService",
150 -"StartService",{},a)};e.IPS_OptInService_StopService=function(a){e.Exec("IPS_OptInService","StopService",{},a)};e.IPS_OptInService_RequestStateChange=function(a,b,c){e.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){e.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.IPS_ProvisioningRecordLog_RequestStateChange=
151 -function(a,b,c){e.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_ProvisioningRecordLog_ClearLog=function(a,b){e.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};e.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){e.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};e.IPS_SecIOService_RequestStateChange=function(a,b,c){e.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
152 -TimeoutPeriod:b},c)};e.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){e.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};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",
153 -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",
154 -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",
155 -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",
156 -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,b){e.AMT_MessageLog_PositionToFirstRecord(n,
157 -[a,b,[]])};var D="Niet gespecificeerd. ; Er is geen fysiek systeemgeheugen ge\u00efnstalleerd in het systeem. ; Geen bruikbaar systeemgeheugen, al het ge\u00efnstalleerde geheugen heeft een onherstelbare fout ervaren. ; Onherstelbare storing op de harde schijf / ATAPI / IDE-apparaat. ; Onherstelbare systeemkaartfout. ; Onherstelbare diskette subsysteemfout. ; Onherstelbare storing van harde schijfcontroller. ; Onherstelbare PS / 2- of USB-toetsenbordfout. ; Verwijderbare opstartmedia niet gevonden. ; Onherstelbare videocontrollerfout. ; Geen videoapparaat gedetecteerd. ; Firmware (BIOS) ROM-corruptie gedetecteerd. ; CPU-spanning komt niet overeen (processoren die dezelfde voeding delen hebben niet-overeenkomende spanningsvereisten) ; Fout bij het matchen van de CPU-snelheid".split(";"),
106 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
107 +null,null,b)};g.SetBootConfigRole=function(a,b){g.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>',
108 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
109 +k,m,e){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,e)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
110 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
111 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,p){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};g.AMT_AuditLog_ExportAuditLogSignature=
112 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule",
113 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
114 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
115 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){g.Exec("AMT_AuthorizationService",
116 +"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
117 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
118 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
119 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
120 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,p){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};g.AMT_MessageLog_GetRecord=function(a,
121 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
122 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
123 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
124 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,e){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
125 +Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},e)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
126 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
127 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
128 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
129 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
130 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
131 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){console.log(JSON.stringify({WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},null,2));g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=
132 +function(a,b,c,p,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},
133 +b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,
134 +Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,p){g.Exec("CIM_BootService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c,p,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan",
135 +"SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=
136 +function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",
137 +{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",
138 +{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply",
139 +"QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply","SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor",
140 +"Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor","EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=
141 +function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,
142 +b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=
143 +function(a){g.Exec("CIM_Sensor","RestoreProperties",{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},
144 +c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog","Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog",
145 +"RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",
146 +{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){g.Exec("IPS_HostBasedSetupService",
147 +"Setup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,
148 +DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=
149 +function(a){g.Exec("IPS_KVMRedirectionSettingData","DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};
150 +g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService","StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,
151 +Time:c,TimeoutPeriod:p},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=
152 +function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",
153 +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",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",
154 +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",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",
155 +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",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",
156 +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",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",
157 +4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,[a,b,[]])};var D="Niet gespecificeerd. ; Er is geen fysiek systeemgeheugen ge\u00efnstalleerd in het systeem. ; Geen bruikbaar systeemgeheugen, al het ge\u00efnstalleerde geheugen heeft een onherstelbare fout ervaren. ; Onherstelbare storing op de harde schijf / ATAPI / IDE-apparaat. ; Onherstelbare systeemkaartfout. ; Onherstelbare diskette subsysteemfout. ; Onherstelbare storing van harde schijfcontroller. ; Onherstelbare PS / 2- of USB-toetsenbordfout. ; Verwijderbare opstartmedia niet gevonden. ; Onherstelbare videocontrollerfout. ; Geen videoapparaat gedetecteerd. ; Firmware (BIOS) ROM-corruptie gedetecteerd. ; CPU-spanning komt niet overeen (processoren die dezelfde voeding delen hebben niet-overeenkomende spanningsvereisten) ; Fout bij het matchen van de CPU-snelheid".split(";"),
158 m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS 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(";"),
159 k="Niet gespecificeerd ; Overige ; Onbekend ; Processor ; Schijf ; Randapparatuur ; Systeembeheermodule ; Moederbord ; Geheugenmodule ; Processormodule ; Voeding ; Insteekkaart ; Voorpaneelbord ; Achterpaneelbord ; Voedingssysteembord ; Schijfbackplane ; Interne systeemuitbreiding kaart ; Andere moederbord ; Processor board ; Power unit ; Power module ; Power management board ; Chassis achterpaneel board ; Systeem chassis ; Sub chassis ; Andere chassis board ; Disk drive bay ; Perifere bay ; Device bay ; Ventilator koeling ; Koeleenheid ; Kabelverbinding ; Geheugenapparaat ; Systeembeheersoftware ; BIOS ; Intel (r) ME ; Systeembus ; Groep ; Intel (r) ME ; Externe omgeving ; Batterij ; Verwerkingsblad ; Connectiviteitsschakelaar ; Processor / geheugenmodule ; I / O-module ; Processor I / O-module ; Beheercontrollerfirmware ; IPMI-kanaal ; PCI-bus ; PCI-expressbus ; SCSI-bus ; SATA / SAS-bus ; Processor voorkant bus".split(";");
160 -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 Beheerder ; Gebeurtenislogboeklezer ; Auditlogboek ; ACL-domein ;;; Lokaal systeem".split(";");e.WatchdogCurrentStates={1:"Niet begonnen",2:"Gestopt",4:"Rennen",8:"Niet meer geldig",16:"Geschorst"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),
161 -r=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),K={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},B={16:"Beveiligingsbeheerder",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Beveiligingsauditlogboek",21:"Netwerktijd",22:"Netwerk administratie",23:"Opslagbeheer",24:"Event Manager",25:"Circuit Breaker Manager",
160 +g.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 Beheerder ; Gebeurtenislogboeklezer ; Auditlogboek ; ACL-domein ;;; Lokaal systeem".split(";");g.WatchdogCurrentStates={1:"Niet begonnen",2:"Gestopt",4:"Rennen",8:"Niet meer geldig",16:"Geschorst"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),
161 +u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),K={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},B={16:"Beveiligingsbeheerder",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Beveiligingsauditlogboek",21:"Netwerktijd",22:"Netwerk administratie",23:"Opslagbeheer",24:"Event Manager",25:"Circuit Breaker Manager",
162 26:"Agent Presence Manager",27:"Draadloze configuratie",28:"EAC",29:"KVM",30:"Gebruikersaanmeldingsgebeurtenissen",32:"Scherm leegmaken",33:"Watchdog-evenementen",1600:"Bevoorrading gestart",1601:"Provisioning voltooid",1602:"ACL-vermelding toegevoegd",1603:"ACL-vermelding gewijzigd",1604:"ACL-vermelding verwijderd",1605:"ACL-toegang met ongeldige referenties",1606:"ACL-status van binnenkomst",1607:"TLS-status gewijzigd",1608:"TLS-servercertificaatset",1609:"TLS-servercertificaat verwijderen",1610:"TLS Trusted Root Certificate toegevoegd",
163 1611:"TLS Trusted Root Certificate verwijderd",1612:"TLS vooraf gedeelde sleutelset",1613:"Kerberos-instellingen gewijzigd",1614:"Kerberos hoofdsleutel gewijzigd",1615:"Flash Versleten tellers Reset",1616:"Power Package gewijzigd",1617:"Stel Realm Authentication Mode in",1618:"Upgrade Client naar Admin Control Mode",1619:"Unprovisioning Begonnen",1700:"Power Up uitgevoerd",1701:"Uitschakelen uitgevoerd",1702:"Power Cycle uitgevoerd",1703:"Reset uitgevoerd",1704:"Stel opstartopties in",1705:"Remote graceful power down initiated",
164 1706:"Remote graceful reset initiated",1707:"Remote Standby initiated",1708:"Remote Hiberate initiated",1709:"Remote NMI initiated",1800:"IDER-sessie geopend",1801:"IDER-sessie gesloten",1802:"IDER ingeschakeld",1803:"IDER uitgeschakeld",1804:"SoL-sessie geopend",1805:"SoL-sessie gesloten",1806:"SoL ingeschakeld",1807:"SoL uitgeschakeld",1808:"KVM-sessie gestart",1809:"KVM-sessie be\u00ebindigd",1810:"KVM ingeschakeld",1811:"KVM uitgeschakeld",1812:"VNC-wachtwoord 3 keer mislukt",1900:"Firmware bijgewerkt",
165 1901:"Firmware-update mislukt",2E3:"Beveiligingsauditlogboek gewist",2001:"Beveiligingsauditbeleid gewijzigd",2002:"Beveiligingsauditlogboek uitgeschakeld",2003:"Beveiligingsauditlogboek ingeschakeld",2004:"Beveiligingsauditlogboek ge\u00ebxporteerd",2005:"Beveiligingsauditlogboek hersteld",2100:"Intel&reg; ME Time Set",2200:"TCPIP-parameters ingesteld",2201:"Hostnaam ingesteld",2202:"Domeinnaam ingesteld",2203:"VLAN-parameterset",2204:"Linkbeleid instellen",2205:"IPv6-parameters ingesteld",2300:"Global Storage Attributes Set",
166 2301:"Opslag EACL gewijzigd",2302:"Opslag FPACL gewijzigd",2303:"Opslag schrijven",2400:"Waarschuwing geabonneerd",2401:"Melding afgemeld",2402:"Gebeurtenislogboek gewist",2403:"Gebeurtenislogboek bevroren",2500:"CB-filter toegevoegd",2501:"CB-filter verwijderd",2502:"CB-beleid toegevoegd",2503:"CB-beleid verwijderd",2504:"CB Standaardbeleid ingesteld",2505:"CB Heuristics Option Set",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog toegevoegd",2601:"Agent Watchdog verwijderd",2602:"Agent Watchdog-actieset",
167 2700:"Draadloos profiel toegevoegd",2701:"Draadloos profiel verwijderd",2702:"Draadloos profiel bijgewerkt",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",2800:"EAC Posture Signer SET",2801:"EAC ingeschakeld",2802:"EAC uitgeschakeld",2803:"EAC Posture State",2804:"EAC-opties instellen",2900:"KVM-aanmelding ingeschakeld",2901:"KVM-aanmelding uitgeschakeld",2902:"KVM-wachtwoord gewijzigd",
168 -2903:"KVM-toestemming geslaagd",2904:"KVM-toestemming mislukt",3E3:"Opt-in beleidswijziging",3001:"Toestemmingscode-gebeurtenis verzenden",3002:"Start opt-in geblokkeerde gebeurtenis",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};e.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?
169 -b.substring(3):null;if(1605==a)return["Ongeldige ME-toegang","Ongeldige MEBx-toegang"][b.charCodeAt(0)];if(1606==a){var c=["Gehandicapt","Ingeschakeld"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Afgelegen"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Lokaal"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?e.RealmNames[ReadInt(b,0)]+","+["NoAuth","Auth","Gehandicapt"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","Lokale MEI","Lokale WSMAN",
170 -"Externe WSAMN"][b.charCodeAt(0)]:1900==a?"Van"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" naar"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"Van"+["Geen","KVM","Allemaal"][b.charCodeAt(0)]+" naar"+["Geen","KVM","Allemaal"][b.charCodeAt(1)]:3001==a?["Succes","3 keer mislukt"][b.charCodeAt(0)]:null};e.GetAuditLog=function(a){e.AMT_AuditLog_ReadRecords(1,
171 -q,[a,[]])};return e}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
172 -function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",g=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+g+v+">"));return a+("</r:"+b+">")}
168 +2903:"KVM-toestemming geslaagd",2904:"KVM-toestemming mislukt",3E3:"Opt-in beleidswijziging",3001:"Toestemmingscode-gebeurtenis verzenden",3002:"Start opt-in geblokkeerde gebeurtenis",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?
169 +b.substring(3):null;if(1605==a)return["Ongeldige ME-toegang","Ongeldige MEBx-toegang"][b.charCodeAt(0)];if(1606==a){var c=["Gehandicapt","Ingeschakeld"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Afgelegen"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Lokaal"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?g.RealmNames[ReadInt(b,0)]+","+["NoAuth","Auth","Gehandicapt"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","Lokale MEI","Lokale WSMAN",
170 +"Externe WSAMN"][b.charCodeAt(0)]:1900==a?"Van"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" naar"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"Van"+["Geen","KVM","Allemaal"][b.charCodeAt(0)]+" naar"+["Geen","KVM","Allemaal"][b.charCodeAt(1)]:3001==a?["Succes","3 keer mislukt"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,
171 +r,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
172 +function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">";if("string"==typeof c)a+=c;else for(var v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
173 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
174 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
175 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
176 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function g(a,b){var c,p,e,d,x,h,k,m,g,q=b&&b.split("/"),w=r.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){q=q.slice(0,q.length-1);a=a.split("/");x=a.length-1;r.nodeIdCompat&&A.test(a[x])&&(a[x]=a[x].replace(A,""));a=q.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
177 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((q||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(q)for(g=q.length;0<g;--g)if(e=w[q.slice(0,g).join("/")])if(e=e[p]){d=e;h=x;break}if(d)break;!k&&l&&l[p]&&(k=l[p],m=x)}!d&&k&&(d=k,h=m);d&&(c.splice(0,h,d),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return g(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
178 -a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function e(a){return function(){return r&&r.config&&r.config[a]||{}}}var C,w,D,m,k={},h={},r={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,A=/\.js$/;D=function(a,b){var c,d=q(a),e=d[0];a=d[1];e&&(e=g(e,b),c=p(e));e?a=c&&c.normalize?c.normalize(a,n(b)):g(a,b):(a=g(a,b),d=q(a),
179 -e=d[0],a=d[1],e&&(c=p(e)));return{f:e?e+"!"+a:a,n:a,pr:e,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:e(a)}}};C=function(a,b,c,e){var x,g,A,r,q=[];g=typeof c;var w;e=e||a;if("undefined"===g||"function"===g){b=!b.length&&c.length?["require","exports","module"]:b;for(r=0;r<b.length;r+=1)if(A=D(b[r],e),g=A.f,"require"===g)q[r]=m.require(a);else if("exports"===g)q[r]=m.exports(a),
180 -w=!0;else if("module"===g)x=q[r]=m.module(a);else if(B.call(k,g)||B.call(h,g)||B.call(K,g))q[r]=p(g);else if(A.p)A.p.load(A.n,v(e,!0),l(g),{}),q[r]=k[g];else throw Error(a+" missing "+g);b=c?c.apply(k[a],q):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,e,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){r=a;r.deps&&w(r.deps,r.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
181 -typeof c&&(c=e,e=x);e?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(e.isArrayBuffer(a)||e.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
182 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var e=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)e.nextTick=process.nextTick,e.setImmediate="function"===typeof setImmediate?setImmediate:e.nextTick;else if("function"===typeof setImmediate)e.setImmediate=setImmediate,e.nextTick=function(a){return setImmediate(a)};
183 -else{e.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];e.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
184 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var d=e.setImmediate;e.setImmediate=function(e){15<Date.now()-b?(b=Date.now(),d(e)):(a.push(e),1===a.length&&p.setAttribute("a",c=!c))}}e.nextTick=e.setImmediate}})();e.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};e.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};e.isArrayBufferView=function(a){return a&&
185 -e.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};e.ByteBuffer=c;e.ByteStringBuffer=c;e.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};e.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};e.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};e.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
186 -e.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};e.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};e.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(e.encodeUtf8(a))};e.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
187 -255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
188 -8&255))};e.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};e.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};e.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
189 -e.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};e.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};e.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
190 -16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};e.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24Le=
191 -function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};e.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};e.ByteStringBuffer.prototype.getSignedInt=
192 -function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};e.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
193 -a)};e.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};e.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};e.ByteStringBuffer.prototype.copy=function(){var a=e.createBuffer(this.data);a.read=this.read;return a};e.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};e.ByteStringBuffer.prototype.clear=
194 -function(){this.data="";this.read=0;return this};e.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};e.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.ByteStringBuffer.prototype.toString=function(){return e.decodeUtf8(this.bytes())};e.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
195 -0;this.growSize=b.growSize||1024;var c=e.isArrayBuffer(a),p=e.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};e.DataBuffer.prototype.length=function(){return this.write-this.read};e.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
196 -e.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),p=new Uint8Array(this.length()+b);p.set(c);this.data=new DataView(p.buffer);return this};e.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};e.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
197 -return this};e.DataBuffer.prototype.putBytes=function(a,b){if(e.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var d=new Uint8Array(this.data.buffer,this.write);d.set(c);this.write+=p;return this}if(e.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),d=new Uint8Array(this.data.buffer),d.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof e.DataBuffer||"object"===typeof a&&"number"===
198 -typeof a.read&&"number"===typeof a.write&&e.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),d=new Uint8Array(a.data.byteLength,this.write),d.set(c),this.write+=c.byteLength,this;a instanceof e.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.hex.decode(a,c,this.write),this;if("base64"===
199 -b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=e.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=e.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
200 -b);}throw Error("Invalid parameter: "+a);};e.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};e.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};e.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};e.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
201 -e.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};e.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};e.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};e.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
202 -a,!0);this.write+=4;return this};e.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};e.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};e.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};e.DataBuffer.prototype.getInt24=
203 -function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};e.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};e.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};e.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};e.DataBuffer.prototype.getInt32Le=function(){var a=
204 -this.data.getInt32(this.read,!0);this.read+=4;return a};e.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};e.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
205 -e.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};e.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};e.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};e.DataBuffer.prototype.copy=function(){return new e.DataBuffer(this)};e.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
206 -new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};e.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};e.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};e.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
207 -this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return e.binary.raw.encode(b);if("hex"===a)return e.binary.hex.encode(b);if("base64"===a)return e.binary.base64.encode(b);if("utf8"===a)return e.text.utf8.decode(b);if("utf16"===a)return e.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};e.createBuffer=function(a,b){void 0!==a&&"utf8"===
208 -(b||"raw")&&(a=e.encodeUtf8(a));return new e.ByteBuffer(a)};e.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};e.xorBytes=function(a,b,c){for(var p="",e="",d="",h=0,k=0;0<c;--c,++h)e=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(p+=d,d="",k=0),d+=String.fromCharCode(e),++k;return p+d};e.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};e.bytesToHex=
209 -function(a){return e.createBuffer(a).toHex()};e.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var d=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];e.encode64=function(a,b){for(var c="",p="",e,d,h,k=0;k<a.length;)e=
210 -a.charCodeAt(k++),d=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,b)+"\r\n",c=c.substr(b));return p+
211 -c};e.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,p,e,h,k=0;k<a.length;)c=d[a.charCodeAt(k++)-43],p=d[a.charCodeAt(k++)-43],e=d[a.charCodeAt(k++)-43],h=d[a.charCodeAt(k++)-43],b+=String.fromCharCode(c<<2|p>>4),64!==e&&(b+=String.fromCharCode((p&15)<<4|e>>2),64!==h&&(b+=String.fromCharCode((e&3)<<6|h)));return b};e.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};e.decodeUtf8=function(a){return decodeURIComponent(escape(a))};e.binary={raw:{},hex:{},base64:{}};
212 -e.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};e.binary.raw.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(a.length));for(var e=c=c||0,d=0;d<a.length;++d)p[e++]=a.charCodeAt(d);return b?e-c:p};e.binary.hex.encode=e.bytesToHex;e.binary.hex.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var e=0,d=c;a.length&1&&(e=1,p[d++]=parseInt(a[0],16));for(;e<a.length;e+=2)p[d++]=parseInt(a.substr(e,2),16);return b?d-c:p};e.binary.base64.encode=
213 -function(a,b){for(var c="",p="",e,d,h,k=0;k<a.byteLength;)e=a[k++],d=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,
214 -b)+"\r\n",c=c.substr(b));return p+c};e.binary.base64.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var e,h,k,m,g=0,r=c;g<a.length;)e=d[a.charCodeAt(g++)-43],h=d[a.charCodeAt(g++)-43],k=d[a.charCodeAt(g++)-43],m=d[a.charCodeAt(g++)-43],p[r++]=e<<2|h>>4,64!==k&&(p[r++]=(h&15)<<4|k>>2,64!==m&&(p[r++]=(k&3)<<6|m));return b?r-c:p.subarray(0,r)};e.text={utf8:{},utf16:{}};e.text.utf8.encode=function(a,b,c){a=e.encodeUtf8(a);
215 -var p=b;p||(p=new Uint8Array(a.length));for(var d=c=c||0,h=0;h<a.length;++h)p[d++]=a.charCodeAt(h);return b?d-c:p};e.text.utf8.decode=function(a){return e.decodeUtf8(String.fromCharCode.apply(null,a))};e.text.utf16.encode=function(a,b,c){var p=b;p||(p=new Uint8Array(2*a.length));for(var e=new Uint16Array(p.buffer),d=c=c||0,h=c,k=0;k<a.length;++k)e[h++]=a.charCodeAt(k),d+=2;return b?d-c:p};e.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};e.deflate=function(a,
216 -b,c){b=e.decode64(a.deflate(e.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};e.inflate=function(a,b,c){a=a.inflate(e.encode64(b)).rval;return null===a?null:e.decode64(a)};var g=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=e.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
217 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(e.decode64(c)));return c},m=function(a,b,c,p){var e=l(a,b);null===e&&(e={});e[c]=p;g(a,b,e)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var p=l(a,b);if(null!==p&&c in p){delete p[c];c=!0;for(var e in p){c=!1;break}c&&(p=null);g(a,b,p)}},r=function(a,b){g(a,b,null)},K=function(a,b,
218 -c){var p=null;"undefined"===typeof c&&(c=["web","flash"]);var e,d=!1,h=null,k;for(k in c){e=c[k];try{if("flash"===e||"both"===e){if(null===b[0])throw Error("Flash local storage not available.");p=a.apply(this,b);d="flash"===e}if("web"===e||"both"===e)b[0]=localStorage,p=a.apply(this,b),d=!0}catch(m){h=m}if(d)break}if(!d)throw h;return p};e.setItem=function(a,b,c,p,e){K(m,arguments,e)};e.getItem=function(a,b,c,p){return K(k,arguments,p)};e.removeItem=function(a,b,c,p){K(h,arguments,p)};e.clearItems=
219 -function(a,b,c){K(r,arguments,c)};e.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;e.getQueryVariables=function(a){var b=function(a){var b=
220 -{};a=a.split("&");for(var c=0;c<a.length;c++){var p=a[c].indexOf("="),e;0<p?(e=a[c].substring(0,p),p=a[c].substring(p+1)):(e=a[c],p=null);e in b||(b[e]=[]);e in Object.prototype||null===p||b[e].push(unescape(p))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};e.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
221 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:e.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};e.makeRequest=function(a){var b=e.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var p;"undefined"===typeof a?p=b.query:(p=b.query[a])&&"undefined"!==typeof c&&(p=p[c]);return p},getQueryLast:function(a,b){var p=c.getQuery(a);return p?p[p.length-1]:b}};return c};e.makeLink=function(a,
222 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};e.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var p=0,e=b.length;p<e;){var d=b[p++];if(p==e)a[d]=c;else{var h=d in a;if(!h||h&&"object"!==typeof a[d]||h&&null===a[d])a[d]={};a=a[d]}}};e.getPath=function(a,b,c){for(var p=0,e=b.length,d=!0;d&&p<e&&"object"===typeof a&&null!==a;){var h=b[p++];(d=h in a)&&(a=a[h])}return d?a:c};e.deletePath=function(a,b){if("object"===
223 -typeof a&&null!==a)for(var c=0,p=b.length;c<p;){var e=b[c++];if(c==p)delete a[e];else{if(!(e in a)||"object"!==typeof a[e]||null===a[e])break;a=a[e]}}};e.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};e.format=function(a){var b=/%./g,c,p,e=0,d=[];for(p=0;c=b.exec(a);)switch(p=a.substring(p,b.lastIndex-2),0<p.length&&d.push(p),p=b.lastIndex,c=c[0][1],c){case "s":case "o":e<arguments.length?d.push(arguments[e++ +1]):d.push("<?>");break;case "%":d.push("%");break;default:d.push("<#"+
224 -c+"?>")}d.push(a.substring(p));return d.join("")};e.formatNumber=function(a,b,c,p){var e=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;p=void 0===p?".":p;c=0>a?"-":"";var d=parseInt(a=Math.abs(+a||0).toFixed(e),10)+"",h=3<d.length?d.length%3:0;return c+(h?d.substr(0,h)+p:"")+d.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+p)+(e?b+Math.abs(a-d).toFixed(e).slice(2):"")};e.formatSize=function(a){return a=1073741824<=a?e.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?e.formatNumber(a/1048576,2,".","")+
225 -" MiB":1024<=a?e.formatNumber(a/1024,0)+" KiB":e.formatNumber(a,0)+" bytes"};e.bytesFromIP=function(a){return-1!==a.indexOf(".")?e.bytesFromIPv4(a):-1!==a.indexOf(":")?e.bytesFromIPv6(a):null};e.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=e.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};e.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
226 -2*(8-a.length+b),p=e.createBuffer(),d=0;8>d;++d)if(a[d]&&0!==a[d].length){var h=e.hexToBytes(a[d]);2>h.length&&p.putByte(0);p.putBytes(h)}else p.fillWithByte(0,c),c=0;return p.getBytes()};e.bytesToIP=function(a){return 4===a.length?e.bytesToIPv4(a):16===a.length?e.bytesToIPv6(a):null};e.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};e.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,d=0;d<a.length;d+=
227 -2){for(var h=e.bytesToHex(a[d]+a[d+1]);"0"===h[0]&&"0"!==h;)h=h.substr(1);if("0"===h){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(h)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};e.estimateCores=function(a,b){function c(a,k,m){if(0===k){var g=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);e.cores=
228 -Math.max(1,g);URL.revokeObjectURL(h);return b(null,e.cores)}p(m,function(b,p){a.push(d(m,p));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],e=0;e<a;++e){var z=new Worker(h);z.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(z)}for(e=0;e<a;++e)c[e].postMessage(e)}function d(a,b){for(var c=[],p=0;p<a;++p)for(var e=b[p],h=c[p]=[],z=0;z<a;++z)if(p!==z){var k=b[z];(e.st>k.st&&e.st<k.et||k.st>e.st&&k.st<e.et)&&h.push(z)}return c.reduce(function(a,
229 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in e&&!a.update)return b(null,e.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return e.cores=navigator.hardwareConcurrency,b(null,e.cores);if("undefined"===typeof Worker)return e.cores=1,b(null,e.cores);if("undefined"===typeof Blob)return e.cores=2,b(null,e.cores);var h=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
230 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var q=0;q<g.length;++q)g[q](c);
231 -return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
176 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,g,x,h,k,m,e,r=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){r=r.slice(0,r.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=r.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
177 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((r||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(r)for(e=r.length;0<e;--e)if(d=w[r.slice(0,e).join("/")])if(d=d[p]){g=d;h=x;break}if(g)break;!k&&l&&l[p]&&(k=l[p],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
178 +a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function r(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var C,w,D,m,k={},h={},u={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=r(a),g=d[0];a=d[1];g&&(g=e(g,b),c=p(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=r(a),
179 +g=d[0],a=d[1],g&&(c=p(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};C=function(a,b,c,g){var x,e,z,u,r=[];e=typeof c;var w;g=g||a;if("undefined"===e||"function"===e){b=!b.length&&c.length?["require","exports","module"]:b;for(u=0;u<b.length;u+=1)if(z=D(b[u],g),e=z.f,"require"===e)r[u]=m.require(a);else if("exports"===e)r[u]=m.exports(a),
180 +w=!0;else if("module"===e)x=r[u]=m.module(a);else if(B.call(k,e)||B.call(h,e)||B.call(K,e))r[u]=p(e);else if(z.p)z.p.load(z.n,v(g,!0),l(e),{}),r[u]=k[e];else throw Error(a+" missing "+e);b=c?c.apply(k[a],r):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
181 +typeof c&&(c=g,g=x);g?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(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(b){for(var p=
182 +0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.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)};
183 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
184 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}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&&
185 +d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
186 +d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
187 +255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
188 +8&255))};d.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};d.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};d.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
189 +d.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};d.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};d.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
190 +16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};d.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24Le=
191 +function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};d.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};d.ByteStringBuffer.prototype.getSignedInt=
192 +function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
193 +a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
194 +function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
195 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
196 +d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
197 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
198 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
199 +b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
200 +b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
201 +d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
202 +a,!0);this.write+=4;return this};d.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};d.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};d.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};d.DataBuffer.prototype.getInt24=
203 +function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};d.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};d.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};d.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};d.DataBuffer.prototype.getInt32Le=function(){var a=
204 +this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};d.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
205 +d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
206 +new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
207 +this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
208 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
209 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
210 +a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
211 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
212 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
213 +function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
214 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,u=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[u++]=p<<2|g>>4,64!==h&&(d[u++]=(g&15)<<4|h>>2,64!==k&&(d[u++]=(h&3)<<6|k));return b?u-c:d.subarray(0,u)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
215 +var p=b;p||(p=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)p[y++]=a.charCodeAt(h);return b?y-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
216 +b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
217 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},K=function(a,b,
218 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){K(m,arguments,p)};d.getItem=function(a,b,c,d){return K(k,arguments,d)};d.removeItem=function(a,b,c,d){K(h,arguments,d)};d.clearItems=
219 +function(a,b,c){K(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;d.getQueryVariables=function(a){var b=function(a){var b=
220 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
221 +0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
222 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
223 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
224 +c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
225 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
226 +2*(8-a.length+b),p=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&p.putByte(0);p.putBytes(k)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,h=0;h<a.length;h+=
227 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],e=b.length;m&&e===m.end+1?(m.end=e,m.end-m.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:e,end:e})}b.push(k)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,e){if(0===m){var u=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
228 +Math.max(1,u);URL.revokeObjectURL(k);return b(null,d.cores)}p(e,function(b,d){a.push(h(e,d));c(a,m-1,e)})}function p(a,b){for(var c=[],d=[],g=0;g<a;++g){var h=new Worker(k);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(g=0;g<a;++g)c[g].postMessage(g)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],g=c[d]=[],y=0;y<a;++y)if(d!==y){var k=b[y];(p.st>k.st&&p.st<k.et||k.st>p.st&&k.st<p.et)&&g.push(y)}return c.reduce(function(a,
229 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
230 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var r=0;r<e.length;++r)e[r](c);
231 +return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
232 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
233 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
234 this.mode.start(c)};c.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()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
235 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
236 -c.defined.cipher=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
237 -4<b.length){var d=b;b=a.util.createBuffer();for(var e=0;e<d.length;++e)b.putByte(d[e])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function g(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
235 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
236 +c.defined.cipher=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
237 +4<b.length){var d=b;b=a.util.createBuffer();for(var g=0;g<d.length;++g)b.putByte(d[g])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
238 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
239 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.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);
240 this._outBlock=Array(this._ints)};w.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=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
241 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
242 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
243 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32()^this._outBlock[d],b.putInt32(this._inBlock[d]);else{var e=(this.blockSize-p)%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]);
244 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
245 -p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32(),b.putInt32(this._inBlock[d]^this._outBlock[d]);else{var e=(this.blockSize-p)%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);
246 -if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
247 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)b.putInt32(a.getInt32()^this._outBlock[d]),this._inBlock[d]=this._outBlock[d];else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(d=0;d<this._ints;++d)this._partialOutput.putInt32(a.getInt32()^
248 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
249 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var g=0;g<
250 -this._ints;++g)b.putInt32(a.getInt32()^this._outBlock[g]);else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);0<q&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
243 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
244 +if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
245 +d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
246 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
247 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
248 +this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
249 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var e=0;e<
250 +this._ints;++e)b.putInt32(a.getInt32()^this._outBlock[e]);else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);0<r&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<r&&!c)return b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
251 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
252 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.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,
253 -this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(g(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=g(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
254 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var g=0;g<this._ints;++g)b.putInt32(this._outBlock[g]^=a.getInt32());this._cipherLength+=this.blockSize}else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();
255 -for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);if(0===q||c){c?(g=p%this.blockSize,this._cipherLength+=g,this._partialOutput.truncate(this.blockSize-g)):this._cipherLength+=this.blockSize;for(g=0;g<this._ints;++g)this._outBlock[g]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),
256 -this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
257 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var e=this._aDataLength.concat(g(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,e);e=[];this.cipher.encrypt(this._j0,e);for(var q=0;q<
258 -this._ints;++q)this.tag.putInt32(this._s[q]^e[q]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],p=b.slice(0),d=0;128>d;++d)a[d/32|0]&1<<31-d%32&&(c[0]^=p[0],c[1]^=p[1],c[2]^=p[2],c[3]^=p[3]),this.pow(p,p);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,p=3;0<p;--p)b[p]=a[p]>>>1|(a[p-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
259 -[0,0,0,0],c=0;32>c;++c){var p=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=p[0];b[1]^=p[1];b[2]^=p[2];b[3]^=p[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,p=4*c,c=16*c,d=Array(c),e=0;e<c;++e){var g=[0,0,0,0];g[e/p|0]=1<<b-1<<(p-1-e%p)*b;d[e]=this.generateSubHashTable(this.multiply(g,a),b)}return d};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
260 -p=c>>>1,d=Array(c);d[p]=a.slice(0);for(var e=p>>>1;0<e;)this.pow(d[2*e],d[e]=[]),e>>=1;for(e=2;e<p;){for(var g=1;g<e;++g){var q=d[e],w=d[g];d[e+g]=[q[0]^w[0],q[1]^w[1],q[2]^w[2],q[3]^w[3]]}e*=2}d[0]=[0,0,0,0];for(e=p+1;e<c;++e)g=d[e^p],d[e]=[a[0]^g[0],a[1]^g[1],a[2]^g[2],a[3]^g[3]];return d}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=
261 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
262 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);r=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,e,g,k,q,u,b=0;256>b;++b){q=p^p<<1^p<<2^p<<3^p<<4;q=q>>8^q&255^99;h[c]=q;r[q]=c;u=a[q];e=a[c];g=a[e];k=a[g];u^=u<<24^q<<16^q<<8^q;g=(e^g^k)<<24^(c^
263 -k)<<16^(c^g^k)<<8^c^e^k;for(var w=0;4>w;++w)B[w][c]=u,x[w][q]=g,u=u<<24|u>>>8,g=g<<24|g>>>8;0===c?c=p=1:(c=e^a[a[a[e^k]]],p^=a[a[p]])}}function g(a,b){for(var c=a.slice(0),p,d=1,e=c.length,m=k*(e+6+1),q=e;q<m;++q)p=c[q-1],0===q%e?(p=h[p>>>16&255]<<24^h[p>>>8&255]<<16^h[p&255]<<8^h[p>>>24]^K[d]<<24,d++):6<e&&4===q%e&&(p=h[p>>>24]<<24^h[p>>>16&255]<<16^h[p>>>8&255]<<8^h[p&255]),c[q]=c[q-e]^p;if(b){for(var d=x[0],e=x[1],r=x[2],w=x[3],l=c.slice(0),m=c.length,q=0,F=m-k;q<m;q+=k,F-=k)if(0===q||q===m-k)l[q]=
264 -c[F],l[q+1]=c[F+3],l[q+2]=c[F+2],l[q+3]=c[F+1];else for(var B=0;B<k;++B)p=c[F+B],l[q+(3&-B)]=d[h[p>>>24]]^e[h[p>>>16&255]]^r[h[p>>>8&255]]^w[h[p&255]];c=l}return c}function w(a,b,c,p){var d=a.length/4-1,e,g,k,m,q;p?(e=x[0],g=x[1],k=x[2],m=x[3],q=r):(e=B[0],g=B[1],k=B[2],m=B[3],q=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[p?3:1]^a[1];C=b[2]^a[2];b=b[p?1:3]^a[3];for(var n=3,v=1;v<d;++v)L=e[w>>>24]^g[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=e[l>>>24]^g[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=e[C>>>24]^
265 -g[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=e[b>>>24]^g[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=q[w>>>24]<<24^q[l>>>16&255]<<16^q[C>>>8&255]<<8^q[b&255]^a[++n];c[p?3:1]=q[l>>>24]<<24^q[C>>>16&255]<<16^q[b>>>8&255]<<8^q[w&255]^a[++n];c[2]=q[C>>>24]<<24^q[b>>>16&255]<<16^q[w>>>8&255]<<8^q[l&255]^a[++n];c[p?1:3]=q[b>>>24]<<24^q[w>>>16&255]<<16^q[l>>>8&255]<<8^q[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
266 -a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;e.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!1,mode:p});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!0,mode:p});a.start(b);return a};a.aes.createDecryptionCipher=
253 +this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
254 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var e=0;e<this._ints;++e)b.putInt32(this._outBlock[e]^=a.getInt32());this._cipherLength+=this.blockSize}else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();
255 +for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(0===r||c){c?(e=p%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<r&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),
256 +this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
257 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var u=0;u<
258 +this._ints;++u)this.tag.putInt32(this._s[u]^g[u]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
259 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),g=0;g<c;++g){var e=[0,0,0,0];e[g/d|0]=1<<b-1<<(d-1-g%d)*b;p[g]=this.generateSubHashTable(this.multiply(e,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
260 +d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(p[2*g],p[g]=[]),g>>=1;for(g=2;g<d;){for(var e=1;e<g;++e){var r=p[g],w=p[e];p[g+e]=[r[0]^w[0],r[1]^w[1],r[2]^w[2],r[3]^w[3]]}g*=2}p[0]=[0,0,0,0];for(g=d+1;g<c;++g)e=p[g^d],p[g]=[a[0]^e[0],a[1]^e[1],a[2]^e[2],a[3]^e[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=
261 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
262 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,g,e,k,r,q,b=0;256>b;++b){r=p^p<<1^p<<2^p<<3^p<<4;r=r>>8^r&255^99;h[c]=r;u[r]=c;q=a[r];g=a[c];e=a[g];k=a[e];q^=q<<24^r<<16^r<<8^r;e=(g^e^k)<<24^(c^
263 +k)<<16^(c^e^k)<<8^c^g^k;for(var w=0;4>w;++w)B[w][c]=q,x[w][r]=e,q=q<<24|q>>>8,e=e<<24|e>>>8;0===c?c=p=1:(c=g^a[a[a[g^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,g=c.length,m=k*(g+6+1),r=g;r<m;++r)d=c[r-1],0===r%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^K[p]<<24,p++):6<g&&4===r%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[r]=c[r-g]^d;if(b){for(var p=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),m=c.length,r=0,F=m-k;r<m;r+=k,F-=k)if(0===r||r===m-k)l[r]=
264 +c[F],l[r+1]=c[F+3],l[r+2]=c[F+2],l[r+3]=c[F+1];else for(var B=0;B<k;++B)d=c[F+B],l[r+(3&-B)]=p[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,g,e,k,m,r;d?(g=x[0],e=x[1],k=x[2],m=x[3],r=u):(g=B[0],e=B[1],k=B[2],m=B[3],r=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[d?3:1]^a[1];C=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)L=g[w>>>24]^e[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^e[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=g[C>>>24]^
265 +e[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^e[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=r[w>>>24]<<24^r[l>>>16&255]<<16^r[C>>>8&255]<<8^r[b&255]^a[++n];c[d?3:1]=r[l>>>24]<<24^r[C>>>16&255]<<16^r[b>>>8&255]<<8^r[w&255]^a[++n];c[2]=r[C>>>24]<<24^r[b>>>16&255]<<16^r[w>>>8&255]<<8^r[l&255]^a[++n];c[d?1:3]=r[b>>>24]<<24^r[w>>>16&255]<<16^r[l>>>8&255]<<8^r[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
266 +a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;g.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
267 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
268 -c;for(var c=a.util.createBuffer(),e=0;e<d.length;++e)c.putByte(d[e])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,e=0;e<h;++e)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=g(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return g(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
269 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,r,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
270 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
268 +c;for(var c=a.util.createBuffer(),g=0;g<d.length;++g)c.putByte(d[g])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,g=0;g<h;++g)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
269 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
270 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
271 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
272 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
273 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -281,336 +281,336 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
281 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
282 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
283 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
284 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var q=0;q<g.length;++q)g[q](c);return c.oids}},
285 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
286 -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};c.create=function(b,c,d,e){if(a.util.isArray(e)){for(var h=[],g=0;g<e.length;++g)void 0!==e[g]&&h.push(e[g]);e=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(e),value:e}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,g){void 0===g&&(g=!0);
287 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,r=d(b);if(b.length()<r){if(g)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+r,m;r=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<r){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===r-(b.read-
288 -x))++x,--r}catch(A){}b.read=x}if(l)if(l=[],void 0===r)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,g))}else for(x=b.length();0<r;)l.push(c.fromDer(b,g)),r-=x-b.length(),x=b.length();else{if(void 0===r){if(g)throw Error("Non-constructed ASN.1 object of indefinite length.");r=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<r;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(r)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
289 -e=b.tagClass|b.type,g=a.util.createBuffer();if(b.composed){b.constructed?e|=32:g.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&g.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)g.putInt16(b.value.charCodeAt(h));else g.putBytes(b.value);d.putByte(e);if(127>=g.length())d.putByte(g.length()&127);else{h=g.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(g);
290 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,e,h,g,q=2;q<b.length;++q){d=!0;e=[];h=parseInt(b[q],10);do g=h&127,h>>>=7,d||(g|=128),e.push(g),d=!1;while(0<h);for(d=e.length-1;0<=d;--d)c.putByte(e[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var e=0;0<b.length();)d=b.getByte(),e<<=7,d&128?e+=d&127:(c+="."+(e+d),e=0);
291 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,e=parseInt(a.substr(4,2),10),p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,e);b.setUTCHours(p,g,q,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
292 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,e=parseInt(a.substr(6,2),10),p=parseInt(a.substr(8,2),10),g=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),x=0,l=0,y=!1;"Z"===a.charAt(a.length-1)&&(y=!0);var R=a.length-5,z=a.charAt(R);if("+"===z||"-"===z)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===z&&(l*=-1),y=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
293 -10));y?(b.setUTCFullYear(c,d,e),b.setUTCHours(p,g,q,x),b.setTime(+b+l)):(b.setFullYear(c,d,e),b.setHours(p,g,q,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
284 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var r=0;r<e.length;++r)e[r](c);return c.oids}},
285 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
286 +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};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
287 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
288 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
289 +g=b.tagClass|b.type,e=a.util.createBuffer();if(b.composed){b.constructed?g|=32:e.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&e.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)e.putInt16(b.value.charCodeAt(h));else e.putBytes(b.value);d.putByte(g);if(127>=e.length())d.putByte(e.length()&127);else{h=e.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(e);
290 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,r=2;r<b.length;++r){d=!0;g=[];h=parseInt(b[r],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
291 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),r=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(r=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(g,e,r,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
292 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),r=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
293 +10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(g,e,r,x),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(g,e,r,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
294 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
295 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,e,g){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)g&&(b.tagClass!==d.tagClass&&g.push("["+d.name+'] Expected tag class "'+d.tagClass+
296 -'", got "'+b.tagClass+'"'),b.type!==d.type&&g.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var r=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[r]&&((h=c.validate(b.value[r],d.value[l],e,g))?++r:d.value[l].optional&&(h=!0)),!h&&g&&g.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
297 -b.value.length+'"');h&&e&&(d.capture&&(e[d.capture]=b.value),d.captureAsn1&&(e[d.captureAsn1]=b))}else g&&g.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var g=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,e){var k="";d=d||0;e=e||2;0<d&&(k+="\n");for(var h="",r=0;r<d*e;++r)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
295 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
296 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
297 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
298 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
299 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
300 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",r=0;r<b.value.length;++r)void 0!==b.value[r]&&(l+=1,B+=c.prettyPrint(b.value[r],d+1,e),r+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
301 -c.Type.OCTETSTRING?(g.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:g.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
302 -c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<g.length;++q)g[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
300 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,B+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
301 +c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
302 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var r=0;r<e.length;++r)e[r](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
303 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[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];m=[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];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
304 -Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var e,p,h,g,z,E,q,l=c.length();64<=l;){p=a.h0;h=a.h1;g=a.h2;z=a.h3;for(q=0;16>q;++q)b[q]=c.getInt32Le(),e=z^h&(g^z),e=p+e+k[q]+b[q],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;32>q;++q)e=g^z&(h^g),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;48>q;++q)e=h^g^z,e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;64>q;++q)e=g^(h|~z),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;a.h0=a.h0+p|0;a.h1=a.h1+h|0;a.h2=a.h2+g|0;a.h3=
305 -a.h3+z|0;l-=64}}var g=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=g;g.create=function(){h||c();var b=null,g=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);g=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
306 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],z=m.fullMessageLength.length-1;0<=z;--z)m.fullMessageLength[z]+=q[1],q[1]=q[0]+(m.fullMessageLength[z]/4294967296>>>0),m.fullMessageLength[z]>>>=0,q[0]=q[1]/4294967296>>>0;g.putBytes(c);d(b,k,g);(2048<g.read||0===g.length())&&g.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(g.bytes());c.putBytes(l.substr(0,
307 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,q=0,z=m.fullMessageLength.length-1;0<=z;--z)h=8*m.fullMessageLength[z]+q,q=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=
308 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
309 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,A,y,w,z=d.length();64<=z;){p=a.h0;g=a.h1;q=a.h2;l=a.h3;A=a.h4;for(w=0;16>w;++w)e=d.getInt32(),b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;20>w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;32>
310 -w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;40>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;60>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g&q|l&(g^q),e=(p<<5|p>>>27)+y+A+2400959708+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;80>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>
311 -27)+y+A+3395469782+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;a.h0=a.h0+p|0;a.h1=a.h1+g|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+A|0;z-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),e=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
312 -0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,e=0;e<c;++e)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var w=g.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
313 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],A=0;A<h.fullMessageLength.length;++A)w=8*h.fullMessageLength[A+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
314 -h4:b.h4};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var g=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
315 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,y,w,z,E,O,H,C,u,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
316 -for(;64>l;++l)e=b[l-2],e=(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10,p=b[l-15],p=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,b[l]=e+b[l-7]+p+b[l-16]|0;y=a.h0;w=a.h1;z=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;u=a.h7;for(l=0;64>l;++l)e=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),g=C^O&(H^C),p=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),q=y&w|z&(y^w),e=u+e+g+n[l]+b[l],p+=q,u=C,C=H,H=O,O=E+e|0,E=z,z=w,w=y,y=e+p|0;a.h0=a.h0+y|0;a.h1=a.h1+w|0;a.h2=a.h2+z|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+u|0;v-=
317 -64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.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,
318 -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],l=!0);var b=null,d=a.util.createBuffer(),e=Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,
319 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){r.messageLength=0;r.fullMessageLength=r.messageLength64=[];for(var c=r.messageLengthSize/4,e=0;e<c;++e)r.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return r}};r.start();r.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var x=g.length;r.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=r.fullMessageLength.length-
320 -1;0<=w;--w)r.fullMessageLength[w]+=x[1],x[1]=x[0]+(r.fullMessageLength[w]/4294967296>>>0),r.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return r};r.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,r.blockLength-(r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize&r.blockLength-1)));a.util.createBuffer();for(var w,x,A=8*r.fullMessageLength[0],y=0;y<r.fullMessageLength.length;++y)w=
321 -8*r.fullMessageLength[y+1],x=w/4294967296>>>0,A+=x,l.putInt32(A>>>0),A=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return r};var g=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
322 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
323 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,k,q,z,E,l,w,C,u,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)q=b[S-2],w=q[0],q=q[1],e=((w>>>19|q<<13)^(q>>>29|w<<3)^w>>>6)>>>0,p=((w<<13|q>>>19)^(q<<3|w>>>29)^(w<<26|q>>>6))>>>0,q=b[S-15],w=q[0],q=q[1],g=((w>>>1|q<<31)^(w>>>8|q<<24)^w>>>7)>>>0,k=((w<<31|q>>>1)^(w<<24|q>>>8)^(w<<25|q>>>7))>>>0,w=b[S-7],C=b[S-
324 -16],q=p+w[1]+k+C[1],b[S][0]=e+w[0]+g+C[0]+(q/4294967296>>>0)>>>0,b[S][1]=q>>>0;w=a[0][0];C=a[0][1];u=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)e=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,q=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,p=(ba^D&(J^ba))>>>0,z=(W^V&(aa^W))>>>0,g=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
325 -E=(w&u|v&(w^u))>>>0,l=(C&n|F&(C^n))>>>0,q=G+q+z+m[S][1]+b[S][1],e=I+e+p+m[S][0]+b[S][0]+(q/4294967296>>>0)>>>0,p=q>>>0,q=k+l,g=g+E+(q/4294967296>>>0)>>>0,k=q>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,q=L+p,D=Y+e+(q/4294967296>>>0)>>>0,V=q>>>0,Y=v,L=F,v=u,F=n,u=w,n=C,q=p+k,w=e+g+(q/4294967296>>>0)>>>0,C=q>>>0;q=a[0][1]+C;a[0][0]=a[0][0]+w+(q/4294967296>>>0)>>>0;a[0][1]=q>>>0;q=a[1][1]+n;a[1][0]=a[1][0]+u+(q/4294967296>>>0)>>>0;a[1][1]=q>>>0;q=a[2][1]+F;a[2][0]=a[2][0]+v+(q/4294967296>>>0)>>>0;a[2][1]=q>>>0;
326 -q=a[3][1]+L;a[3][0]=a[3][0]+Y+(q/4294967296>>>0)>>>0;a[3][1]=q>>>0;q=a[4][1]+V;a[4][0]=a[4][0]+D+(q/4294967296>>>0)>>>0;a[4][1]=q>>>0;q=a[5][1]+aa;a[5][0]=a[5][0]+J+(q/4294967296>>>0)>>>0;a[5][1]=q>>>0;q=a[6][1]+W;a[6][0]=a[6][0]+ba+(q/4294967296>>>0)>>>0;a[6][1]=q>>>0;q=a[7][1]+G;a[7][0]=a[7][0]+I+(q/4294967296>>>0)>>>0;a[7][1]=q>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var g=a.sha384=a.sha512.sha384=a.sha512.sha384||
327 -{};g.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=g;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
304 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var p,g,h,e,y,E,r,l=c.length();64<=l;){g=a.h0;h=a.h1;e=a.h2;y=a.h3;for(r=0;16>r;++r)b[r]=c.getInt32Le(),p=y^h&(e^y),p=g+p+k[r]+b[r],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;32>r;++r)p=e^y&(h^e),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;48>r;++r)p=h^e^y,p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;64>r;++r)p=e^(h|~y),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;a.h0=a.h0+g|0;a.h1=a.h1+h|0;a.h2=a.h2+e|0;a.h3=
305 +a.h3+y|0;l-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
306 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var r=c.length;m.messageLength+=r;for(var r=[r/4294967296>>>0,r>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=r[1],r[1]=r[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,r[0]=r[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
307 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,r=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+r,r=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
308 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
309 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;r=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;32>
310 +w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&r|l&(e^r),p=(g<<5|g>>>27)+A+z+2400959708+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>
311 +27)+A+z+3395469782+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+r|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
312 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
313 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
314 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
315 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,A,w,y,E,O,H,C,q,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
316 +for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=p+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;q=a.h7;for(l=0;64>l;++l)p=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),e=C^O&(H^C),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),r=A&w|y&(A^w),p=q+p+e+n[l]+b[l],g+=r,q=C,C=H,H=O,O=E+p|0,E=y,y=w,w=A,A=p+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+q|0;v-=
317 +64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.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,
318 +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],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
319 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
320 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
321 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
322 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
323 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,k,r,y,E,l,w,C,q,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)r=b[S-2],w=r[0],r=r[1],p=((w>>>19|r<<13)^(r>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|r>>>19)^(r<<3|w>>>29)^(w<<26|r>>>6))>>>0,r=b[S-15],w=r[0],r=r[1],e=((w>>>1|r<<31)^(w>>>8|r<<24)^w>>>7)>>>0,k=((w<<31|r>>>1)^(w<<24|r>>>8)^(w<<25|r>>>7))>>>0,w=b[S-7],C=b[S-
324 +16],r=g+w[1]+k+C[1],b[S][0]=p+w[0]+e+C[0]+(r/4294967296>>>0)>>>0,b[S][1]=r>>>0;w=a[0][0];C=a[0][1];q=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)p=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,r=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(J^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
325 +E=(w&q|v&(w^q))>>>0,l=(C&n|F&(C^n))>>>0,r=G+r+y+m[S][1]+b[S][1],p=I+p+g+m[S][0]+b[S][0]+(r/4294967296>>>0)>>>0,g=r>>>0,r=k+l,e=e+E+(r/4294967296>>>0)>>>0,k=r>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,r=L+g,D=Y+p+(r/4294967296>>>0)>>>0,V=r>>>0,Y=v,L=F,v=q,F=n,q=w,n=C,r=g+k,w=p+e+(r/4294967296>>>0)>>>0,C=r>>>0;r=a[0][1]+C;a[0][0]=a[0][0]+w+(r/4294967296>>>0)>>>0;a[0][1]=r>>>0;r=a[1][1]+n;a[1][0]=a[1][0]+q+(r/4294967296>>>0)>>>0;a[1][1]=r>>>0;r=a[2][1]+F;a[2][0]=a[2][0]+v+(r/4294967296>>>0)>>>0;a[2][1]=r>>>0;
326 +r=a[3][1]+L;a[3][0]=a[3][0]+Y+(r/4294967296>>>0)>>>0;a[3][1]=r>>>0;r=a[4][1]+V;a[4][0]=a[4][0]+D+(r/4294967296>>>0)>>>0;a[4][1]=r>>>0;r=a[5][1]+aa;a[5][0]=a[5][0]+J+(r/4294967296>>>0)>>>0;a[5][1]=r>>>0;r=a[6][1]+W;a[6][0]=a[6][0]+ba+(r/4294967296>>>0)>>>0;a[6][1]=r>>>0;r=a[7][1]+G;a[7][0]=a[7][0]+I+(r/4294967296>>>0)>>>0;a[7][1]=r>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
327 +{};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
328 3609767458],[1899447441,602891725],[3049323471,3964484399],[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],
329 [1555081692,3175218132],[1996064986,2198950837],[2554220882,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,
330 106217008],[3516065817,3606008344],[3600352804,1432725776],[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],
331 [3515267271,566280711],[3940187606,3454069534],[4118630271,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]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
332 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,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,
333 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],e=null,g=a.util.createBuffer(),x=Array(80),A=0;80>A;++A)x[A]=Array(2);var y={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){y.messageLength=
334 -0;y.fullMessageLength=y.messageLength128=[];for(var b=y.messageLengthSize/4,c=0;c<b;++c)y.fullMessageLength.push(0);g=a.util.createBuffer();e=Array(d.length);for(c=0;c<d.length;++c)e[c]=d[c].slice(0);return y}};y.start();y.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;y.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=y.fullMessageLength.length-1;0<=k;--k)y.fullMessageLength[k]+=h[1],h[1]=h[0]+(y.fullMessageLength[k]/4294967296>>>0),y.fullMessageLength[k]>>>=0,h[0]=
335 -h[1]/4294967296>>>0;g.putBytes(b);c(e,x,g);(2048<g.read||0===g.length())&&g.compact();return y};y.digest=function(){var d=a.util.createBuffer();d.putBytes(g.bytes());d.putBytes(l.substr(0,y.blockLength-(y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize&y.blockLength-1)));a.util.createBuffer();for(var z,k,m=8*y.fullMessageLength[0],r=0;r<y.fullMessageLength.length;++r)z=8*y.fullMessageLength[r+1],k=z/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=z;z=Array(e.length);for(r=0;r<e.length;++r)z[r]=
336 -e[r].slice(0);c(z,x,d);d=a.util.createBuffer();k="SHA-512"===b?z.length:"SHA-384"===b?z.length-2:z.length-4;for(r=0;r<k;++r)d.putInt32(z[r][0]),r===k-1&&"SHA-512/224"===b||d.putInt32(z[r][1]);return d};return y};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
337 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
338 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md}},l=a;a=function(b,
339 -c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,g={start:function(g,m){if(null!==g)if("string"===typeof g)if(g=g.toLowerCase(),g in a.md.algorithms)b=
340 -a.md.algorithms[g].create();else throw Error('Unknown hash algorithm "'+g+'"');else b=g;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
341 -d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};g.digest=g.getMac;return g}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
342 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<g.length;++q)g[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],e=function(a,
343 -b){return" "+b},p=0;p<a.values.length;++p)d.push(a.values[p].replace(/^(\S+\r\n)/,e));b+=d.join(",")+"\r\n";d=0;a=-1;for(p=0;p<b.length;++p,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=p-a-1,a=-1,++p;else if(" "===b[p]||"\t"===b[p]||","===b[p])a=p;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var e="-----BEGIN "+b.type+"-----\r\n",g;b.procType&&(g={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
344 -e+=c(g));b.contentDomain&&(g={name:"Content-Domain",values:[b.contentDomain]},e+=c(g));b.dekInfo&&(g={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&g.values.push(b.dekInfo.parameters),e+=c(g));if(b.headers)for(g=0;g<b.headers.length;++g)e+=c(b.headers[g]);b.procType&&(e+="\r\n");e+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return e+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
345 -e=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,g=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var q={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(q);if(h[2]){for(var l=h[2].split(g),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var A=l[x];if(!/\s/.test(A[0]))break;h+=A;B=x}if(h=h.match(e)){for(var x={name:h[1],values:[]},A=h[2].split(","),y=0;y<A.length;++y)x.values.push(A[y].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
346 -"Content-Domain"!==x.name)if(q.dekInfo||"DEK-Info"!==x.name)q.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:A[0],parameters:A[1]||null}}else q.contentDomain=A[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
347 -q.procType={version:A[0],type:A[1]}}}++B}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
348 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
349 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,e){var p=32===a.length?3:9;e=3===p?e?[30,-2,-2]:[0,32,2]:e?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=b[0],q=b[1];b=(g>>>4^q)&252645135;q^=b;g^=b<<4;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(g>>>1^q)&1431655765;for(var q=q^b,g=g^b<<1,g=g<<1|g>>>31,q=q<<1|q>>>31,H=0;H<p;H+=3){for(var C=e[H+1],u=e[H+2],T=e[H];T!=C;T+=u){var P=q^a[T],F=(q>>>4|q<<28)^a[T+1];b=g;
350 -g=q;q=b^(n[P>>>24&63]|k[P>>>16&63]|r[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=g;g=q;q=b}g=g>>>1|g<<31;q=q>>>1|q<<31;b=(g>>>1^q)&1431655765;q^=b;g^=b<<1;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(g>>>4^q)&252645135;c[0]=g^b<<4;c[1]=q^b}function g(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var g=
351 -null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;e.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return g({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return g({key:a,
333 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
334 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
335 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
336 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
337 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
338 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md}},l=a;a=function(b,
339 +c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
340 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
341 +d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
342 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var r=0;r<e.length;++r)e[r](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
343 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
344 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
345 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var r={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(r);if(h[2]){for(var l=h[2].split(e),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;B=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(r.procType)if(r.contentDomain||
346 +"Content-Domain"!==x.name)if(r.dekInfo||"DEK-Info"!==x.name)r.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');r.dekInfo={algorithm:z[0],parameters:z[1]||null}}else r.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
347 +r.procType={version:z[0],type:z[1]}}}++B}if("ENCRYPTED"===r.procType&&!r.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
348 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
349 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,g){var p=32===a.length?3:9;g=3===p?g?[30,-2,-2]:[0,32,2]:g?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],r=b[1];b=(e>>>4^r)&252645135;r^=b;e^=b<<4;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(e>>>1^r)&1431655765;for(var r=r^b,e=e^b<<1,e=e<<1|e>>>31,r=r<<1|r>>>31,H=0;H<p;H+=3){for(var C=g[H+1],q=g[H+2],T=g[H];T!=C;T+=q){var P=r^a[T],F=(r>>>4|r<<28)^a[T+1];b=e;
350 +e=r;r=b^(n[P>>>24&63]|k[P>>>16&63]|u[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=e;e=r;r=b}e=e>>>1|e<<31;r=r>>>1|r<<31;b=(e>>>1^r)&1431655765;r^=b;e^=b<<1;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(e>>>4^r)&252645135;c[0]=e^b<<4;c[1]=r^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
351 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
352 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
353 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[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],
354 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],r=[0,268435456,8,268435464,0,268435456,
353 +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],
354 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],r=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
355 8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],F=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],B=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],L=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
356 1,C=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],K=0,D,W=0;W<n;W++){var I=b.getInt32(),G=b.getInt32();D=(I>>>4^G)&252645135;G^=D;I^=D<<4;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>2^G)&858993459;G^=D;I^=D<<2;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=(G>>>8^I)&16711935;I^=D;G^=D<<8;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=I<<8|G>>>20&240;for(var I=G<<24|G<<8&16711680|G>>>8&65280|G>>>24&240,G=D,S=0;S<v.length;++S){v[S]?(I=I<<2|I>>>26,G=G<<2|G>>>26):(I=I<<1|I>>>27,G=G<<1|G>>>27);
357 -var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|e[I>>>20&15]|g[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|q[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|r[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
357 +var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|g[I>>>20&15]|e[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|r[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|u[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
358 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[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,
359 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,
360 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[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,
361 8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[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],h=[256,34078976,34078720,1107296512,
362 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,
363 -524288,0,1074266112,34078976,1073742080],r=[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,
363 +524288,0,1074266112,34078976,1073742080],u=[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,
364 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[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,
365 67108866,67110912,2048,2097154],B=[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,
366 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<g.length;++q)g[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,
367 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,g;e&&!a.disableNativeCode&&(g=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,q){function l(){if(N>A)return q(null,z);n.start(null,
368 -null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();u=2;B()}function B(){if(u<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++u,a.util.setImmediate(B);z+=N<A?E:E.substr(0,y);++N;l()}"function"===typeof h&&(q=h,h=null);if(e&&!a.disableNativeCode&&g.pbkdf2&&(null===h||"object"!==typeof h)&&(4<g.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),q?4===g.pbkdf2Sync.length?g.pbkdf2(b,
369 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):g.pbkdf2(b,c,d,k,h,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===g.pbkdf2Sync.length?g.pbkdf2Sync(b,c,d,k).toString("binary"):g.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
370 -if(q)return q(b);throw b;}var A=Math.ceil(k/x),y=k-(A-1)*x,n=a.hmac.create();n.start(h,b);var z="",E,O,H;if(!q){for(var N=1;N<=A;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var u=2;u<=d;++u)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;z+=N<A?E:E.substr(0,y)}return z}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
371 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
372 -"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
373 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function g(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
374 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)e.putInt32(k[h])}catch(z){if(!("undefined"!==typeof QuotaExceededError&&z instanceof QuotaExceededError))throw z;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
375 -e.putByte(String.fromCharCode(k&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),q=0;32>q;++q)h[q]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(g(k.key,h(k.seed)));k.seed=z(g(k.key,k.seed));
376 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,q=k.plugin.formatKey,z=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var z=c(k.key,
377 -k.seed);k.generated+=z.length;q.putBytes(z);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,g(a))}catch(c){b(c)}},k.seedFileSync=g);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
366 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var r=0;r<e.length;++r)e[r](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
367 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},g="undefined"!==typeof process&&process.versions&&process.versions.node,e;g&&!a.disableNativeCode&&(e=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,r){function l(){if(N>z)return r(null,y);n.start(null,
368 +null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();q=2;B()}function B(){if(q<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++q,a.util.setImmediate(B);y+=N<z?E:E.substr(0,A);++N;l()}"function"===typeof h&&(r=h,h=null);if(g&&!a.disableNativeCode&&e.pbkdf2&&(null===h||"object"!==typeof h)&&(4<e.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),r?4===e.pbkdf2Sync.length?e.pbkdf2(b,
369 +c,d,k,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):e.pbkdf2(b,c,d,k,h,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):4===e.pbkdf2Sync.length?e.pbkdf2Sync(b,c,d,k).toString("binary"):e.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
370 +if(r)return r(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,n=a.hmac.create();n.start(h,b);var y="",E,O,H;if(!r){for(var N=1;N<=z;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var q=2;q<=d;++q)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;y+=N<z?E:E.substr(0,A)}return y}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
371 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
372 +"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,g=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(g=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
373 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function e(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var g=
374 +a.util.createBuffer();if(c)for(;g.length()<b;){var h=Math.max(1,Math.min(b-g.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)g.putInt32(k[h])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(g.length()<b)for(c=Math.floor(65536*Math.random());g.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
375 +g.putByte(String.fromCharCode(k&255));return g.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),r=0;32>r;++r)h[r]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function g(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(g)});l=e(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=r(e(k.key,h(k.seed)));k.seed=y(e(k.key,k.seed));
376 +a.util.setImmediate(g)}if(!d)return k.generateSync(b);var e=k.plugin.cipher,h=k.plugin.increment,r=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;g()};k.generateSync=function(b){var c=k.plugin.cipher,g=k.plugin.increment,e=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var r=a.util.createBuffer();r.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
377 +k.seed);k.generated+=y.length;r.putBytes(y);k.key=e(c(k.key,g(k.seed)));k.seed=h(c(k.key,k.seed))}return r.getBytes(b)};g?(k.seedFile=function(a,b){g.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return g.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,e(a))}catch(c){b(c)}},k.seedFileSync=e);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
378 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
379 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<g.length;++q)g[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
380 -0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},g=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
381 -b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,g,!1);l.putInt32(g[0]);l.putInt32(g[1]);l.putInt32(g[2]);l.putInt32(g[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
382 -process.versions.node,h=null;if("undefined"!==typeof window){var r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(h=function(a){return r.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
383 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<g.length;++q)g[q](c);
384 -return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
379 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var r=0;r<e.length;++r)e[r](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
380 +0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
381 +b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
382 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
383 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var r=0;r<e.length;++r)e[r](c);
384 +return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
385 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,
386 -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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
387 -1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var g=function(b,c,g){var k=!1,h=null,q=null,l=null,n,x,A,y,v=[];b=a.rc2.expandKey(b,c);for(A=0;64>A;A++)v.push(b.getInt16Le());g?(n=function(a){for(A=0;4>A;A++){a[A]+=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);var b=a[A],c=d[A];a[A]=b<<c&65535|(b&65535)>>16-c;y++}},x=function(a){for(A=0;4>A;A++)a[A]+=v[a[(A+3)%4]&63]}):(n=function(a){for(A=3;0<=A;A--){var b=a[A],c=d[A];a[A]=
388 -(b&65535)>>c|b<<16-c&65535;a[A]-=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);y--}},x=function(a){for(A=3;0<=A;A--)a[A]-=v[a[(A+3)%4]&63]});var z=null;return z={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();q=c||new a.util.createBuffer;l=b;z.output=q},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(A=0;4>A;A++){var c=h.getInt16Le();null!==l&&(g?c^=l.getInt16Le():l.putInt16Le(c));
389 -b.push(c&65535)}y=g?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(A=0;4>A;A++)null!==l&&(g?l.putInt16Le(b[A]):b[A]^=l.getInt16Le()),q.putInt16Le(b[A])}},finish:function(a){var b=!0;if(g)if(a)b=a(8,h,!g);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,z.update());!g&&(b=0===h.length())&&(a?b=a(8,q,!g):(a=q.length(),c=q.at(a-1),c>a?b=!1:q.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
390 -a.rc2.createEncryptionCipher=function(a,b){return g(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return g(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
391 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
392 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function g(a,b,c,d,e,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+e;e=Math.floor(h/67108864);c.data[d++]=h&67108863}return e}function l(a,b,c,d,e,p){var g=b&32767;for(b>>=15;0<=--p;){var h=this.data[a]&32767,z=this.data[a++]>>15,k=b*h+z*g,h=g*h+((k&32767)<<15)+c.data[d]+(e&1073741823);e=(h>>>30)+(k>>>15)+b*z+(e>>>30);c.data[d++]=h&1073741823}return e}function n(a,b,
393 -c,d,e,g){var p=b&16383;for(b>>=14;0<=--g;){var h=this.data[a]&16383,z=this.data[a++]>>14,k=b*h+z*p,h=p*h+((k&16383)<<14)+c.data[d]+e;e=(h>>28)+(k>>14)+b*z;c.data[d++]=h&268435455}return e}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function r(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
394 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function A(a,b){return a^b}function y(a,b){return a&~b}function R(){}function z(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
395 -navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=g,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],u;H=48;for(u=0;9>=u;++u)N[H++]=u;H=97;for(u=10;36>u;++u)N[H++]=u;H=65;for(u=10;36>u;++u)N[H++]=u;r.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};r.prototype.revert=function(a){return a};r.prototype.reduce=
396 -function(a){a.divRemTo(this.m,null,a)};r.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};r.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
386 +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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var g=b,e=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=e;128>n;n++)g.putByte(c[g.at(n-
387 +1)+g.at(n-e)&255]);g.setAt(128-l,c[g.at(128-l)&h]);for(n=127-l;0<=n;n--)g.setAt(n,c[g.at(n+1)^g.at(n+l)]);return g};var e=function(b,c,e){var k=!1,h=null,r=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
388 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();r=c||new a.util.createBuffer;l=b;y.output=r},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
389 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),r.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,r,!e):(a=r.length(),c=r.at(a-1),c>a?b=!1:r.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
390 +a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
391 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
392 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,g,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+g;g=Math.floor(h/67108864);c.data[d++]=h&67108863}return g}function l(a,b,c,d,g,e){var p=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,y=this.data[a++]>>15,k=b*h+y*p,h=p*h+((k&32767)<<15)+c.data[d]+(g&1073741823);g=(h>>>30)+(k>>>15)+b*y+(g>>>30);c.data[d++]=h&1073741823}return g}function n(a,b,
393 +c,d,g,e){var p=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,y=this.data[a++]>>14,k=b*h+y*p,h=p*h+((k&16383)<<14)+c.data[d]+g;g=(h>>28)+(k>>14)+b*y;c.data[d++]=h&268435455}return g}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
394 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
395 +navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=e,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],q;H=48;for(q=0;9>=q;++q)N[H++]=q;H=97;for(q=10;36>q;++q)N[H++]=q;H=65;for(q=10;36>q;++q)N[H++]=q;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
396 +function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
397 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
398 -c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var e=a.length,p=!1,g=0;0<=--e;){var h=8==d?a[e]&255:m(a,e);0>h?"-"==a.charAt(e)&&(p=!0):(p=!1,0==g?this.data[this.t++]=h:g+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-g)-1)<<g,this.data[this.t++]=
399 -h>>this.DB-g):this.data[this.t-1]|=h<<g,g+=d,g>=this.DB&&(g-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<g&&(this.data[this.t-1]|=(1<<this.DB-g)-1<<g));this.clamp();p&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
400 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,e=(1<<d)-1,g=Math.floor(a/this.DB),p=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+g+1]=this.data[h]>>d|p,p=(this.data[h]&e)<<c;for(h=g-1;0<=h;--h)b.data[h]=0;b.data[g]=p;b.t=this.t+g+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,e=this.DB-d,g=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var p=
401 -c+1;p<this.t;++p)b.data[p-c-1]|=(this.data[p]&g)<<e,b.data[p-c]=this.data[p]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&g)<<e);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
402 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),e=a.abs(),g=d.t;for(b.t=g+e.t;0<=--g;)b.data[g]=0;for(g=0;g<e.t;++g)b.data[g+d.t]=d.am(0,e.data[g],b,g,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
403 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,g){var p=a.abs();if(!(0>=p.t)){var z=this.abs();if(z.t<p.t)null!=b&&b.fromInt(0),null!=g&&this.copyTo(g);else{null==g&&(g=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),z.lShiftTo(l,g)):(p.copyTo(k),z.copyTo(g));p=k.t;z=k.data[p-1];if(0!=z){var E=z*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),u=this.FV/E,E=(1<<this.F1)/E,y=1<<this.F2,r=g.t,x=r-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=g.compareTo(w)&&
404 -(g.data[g.t++]=1,g.subTo(w,g));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=g.data[--r]==z?this.DM:Math.floor(g.data[r]*u+(g.data[r-1]+y)*E);if((g.data[r]+=k.am(0,O,g,x,0,p))<O)for(k.dlShiftTo(x,w),g.subTo(w,g);g.data[r]<--O;)g.subTo(w,g)}null!=b&&(g.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));g.t=p;g.clamp();0<l&&g.rShiftTo(l,g);0>m&&c.ZERO.subTo(g,g)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
405 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var g=d(),p=d(),z=b.convert(this),k=h(a)-1;for(z.copyTo(g);0<=--k;)if(b.sqrTo(g,p),0<(a&1<<k))b.mulTo(p,z,g);else var m=g,g=p,p=m;return b.revert(g)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
398 +c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var g=a.length,e=!1,p=0;0<=--g;){var h=8==d?a[g]&255:m(a,g);0>h?"-"==a.charAt(g)&&(e=!0):(e=!1,0==p?this.data[this.t++]=h:p+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-p)-1)<<p,this.data[this.t++]=
399 +h>>this.DB-p):this.data[this.t-1]|=h<<p,p+=d,p>=this.DB&&(p-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<p&&(this.data[this.t-1]|=(1<<this.DB-p)-1<<p));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
400 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,g=(1<<d)-1,p=Math.floor(a/this.DB),e=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+p+1]=this.data[h]>>d|e,e=(this.data[h]&g)<<c;for(h=p-1;0<=h;--h)b.data[h]=0;b.data[p]=e;b.t=this.t+p+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,g=this.DB-d,p=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var e=
401 +c+1;e<this.t;++e)b.data[e-c-1]|=(this.data[e]&p)<<g,b.data[e-c]=this.data[e]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&p)<<g);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,g=Math.min(a.t,this.t);c<g;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
402 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),g=a.abs(),e=d.t;for(b.t=e+g.t;0<=--e;)b.data[e]=0;for(e=0;e<g.t;++e)b.data[e+d.t]=d.am(0,g.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
403 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,e){var p=a.abs();if(!(0>=p.t)){var y=this.abs();if(y.t<p.t)null!=b&&b.fromInt(0),null!=e&&this.copyTo(e);else{null==e&&(e=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),y.lShiftTo(l,e)):(p.copyTo(k),y.copyTo(e));p=k.t;y=k.data[p-1];if(0!=y){var E=y*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),q=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=e.t,x=u-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=e.compareTo(w)&&
404 +(e.data[e.t++]=1,e.subTo(w,e));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=e.data[--u]==y?this.DM:Math.floor(e.data[u]*q+(e.data[u-1]+A)*E);if((e.data[u]+=k.am(0,O,e,x,0,p))<O)for(k.dlShiftTo(x,w),e.subTo(w,e);e.data[u]<--O;)e.subTo(w,e)}null!=b&&(e.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));e.t=p;e.clamp();0<l&&e.rShiftTo(l,e);0>m&&c.ZERO.subTo(e,e)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
405 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var e=d(),p=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(e);0<=--k;)if(b.sqrTo(e,p),0<(a&1<<k))b.mulTo(p,y,e);else var l=e,e=p,p=l;return b.revert(e)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
406 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 b=(1<<a)-1,c,d=!1,e="",g=this.t,p=this.DB-g*this.DB%a;if(0<g--)for(p<this.DB&&0<(c=this.data[g]>>p)&&(d=!0,e="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=g;)p<a?(c=(this.data[g]&(1<<p)-1)<<a-p,c|=this.data[--g]>>(p+=this.DB-a)):(c=this.data[g]>>(p-=a)&b,0>=p&&(p+=this.DB,--g)),0<c&&(d=!0),d&&(e+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?e:"0"};c.prototype.negate=function(){var a=
407 d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
408 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new r(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=z;R.prototype.revert=z;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
408 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
409 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)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var T=[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,
410 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],P=67108864/T[T.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
411 -b),c=k(b),g=d(),p=d(),h="";for(this.divRemTo(c,g,p);0<g.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,g.divRemTo(c,g,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,z=0;z<a.length;++z){var k=m(a,z);0>k?"-"==a.charAt(z)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
411 +b),c=k(b),e=d(),p=d(),h="";for(this.divRemTo(c,e,p);0<e.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,e.divRemTo(c,e,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
412 this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var e=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<e?d[0]&(1<<e)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,e,g=Math.min(a.t,this.t);for(d=
413 0;d<g;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){e=a.s&this.DM;for(d=g;d<this.t;++d)c.data[d]=b(this.data[d],e);c.t=this.t}else{e=this.s&this.DM;for(d=g;d<a.t;++d)c.data[d]=b(e,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
414 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
415 0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var e;for(e=c.t-this.t;d<e;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(e=Math.min(a.t,b);d<e;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
416 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var z=1;z++<d&&0!=
416 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var y=1;y++<d&&0!=
417 p.compareTo(b);)if(p=p.modPowInt(2,this),0==p.compareTo(c.ONE))return!1;if(0!=p.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.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]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
418 function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,e=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[e++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==e&&
419 -(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,A,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
420 -y,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
419 +(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
420 +A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
421 0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,e=0;0!=d;)d&=d-1,++e;a+=e}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
422 -y)};c.prototype.flipBit=function(a){return this.changeBit(a,A)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
423 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),g,p=k(1),z;if(0>=c)return p;g=18>c?1:48>c?3:144>c?4:768>c?5:6;z=8>c?new r(b):b.isEven()?new E(b):new v(b);var m=[],l=3,q=g-1,u=(1<<g)-1;m[1]=z.convert(this);if(1<g)for(c=d(),z.sqrTo(m[1],c);l<=u;)m[l]=d(),z.mulTo(c,m[l-2],m[l]),l+=2;for(var y=a.t-1,x,w=!0,O=d(),c=h(a.data[y])-1;0<=y;){c>=q?x=a.data[y]>>c-q&u:(x=(a.data[y]&(1<<c+1)-1)<<q-c,0<y&&(x|=a.data[y-1]>>this.DB+c-q));for(l=g;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--y);
424 -if(w)m[x].copyTo(p),w=!1;else{for(;1<l;)z.sqrTo(p,O),z.sqrTo(O,p),l-=2;0<l?z.sqrTo(p,O):(l=p,p=O,O=l);z.mulTo(O,m[x],p)}for(;0<=y&&0==(a.data[y]&1<<c);)z.sqrTo(p,O),l=p,p=O,O=l,0>--c&&(c=this.DB-1,--y)}return z.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),g=k(1),p=k(0),h=k(0),z=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(g.isEven()&&p.isEven()||(g.addTo(this,g),p.subTo(a,p)),g.rShiftTo(1,
425 -g)):p.isEven()||p.subTo(a,p),p.rShiftTo(1,p);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&z.isEven()||(h.addTo(this,h),z.subTo(a,z)),h.rShiftTo(1,h)):z.isEven()||z.subTo(a,z),z.rShiftTo(1,z);0<=d.compareTo(e)?(d.subTo(e,d),b&&g.subTo(h,g),p.subTo(z,p)):(e.subTo(d,e),b&&h.subTo(g,h),z.subTo(p,z))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=z.compareTo(a))return z.subtract(a);if(0>z.signum())z.addTo(a,z);else return z;return 0>z.signum()?z.add(a):z};c.prototype.pow=function(a){return this.exp(a,
422 +A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
423 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),e,p=k(1),y;if(0>=c)return p;e=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var l=[],m=3,r=e-1,q=(1<<e)-1;l[1]=y.convert(this);if(1<e)for(c=d(),y.sqrTo(l[1],c);m<=q;)l[m]=d(),y.mulTo(c,l[m-2],l[m]),m+=2;for(var A=a.t-1,x,w=!0,O=d(),c=h(a.data[A])-1;0<=A;){c>=r?x=a.data[A]>>c-r&q:(x=(a.data[A]&(1<<c+1)-1)<<r-c,0<A&&(x|=a.data[A-1]>>this.DB+c-r));for(m=e;0==(x&1);)x>>=1,--m;0>(c-=m)&&(c+=this.DB,--A);
424 +if(w)l[x].copyTo(p),w=!1;else{for(;1<m;)y.sqrTo(p,O),y.sqrTo(O,p),m-=2;0<m?y.sqrTo(p,O):(m=p,p=O,O=m);y.mulTo(O,l[x],p)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(p,O),m=p,p=O,O=m,0>--c&&(c=this.DB-1,--A)}return y.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),p=k(1),g=k(0),h=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(p.isEven()&&g.isEven()||(p.addTo(this,p),g.subTo(a,g)),p.rShiftTo(1,
425 +p)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&y.isEven()||(h.addTo(this,h),y.subTo(a,y)),h.rShiftTo(1,h)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(e)?(d.subTo(e,d),b&&p.subTo(h,p),g.subTo(y,g)):(e.subTo(d,e),b&&h.subTo(p,h),y.subTo(g,y))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
426 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
427 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
428 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<g.length;++l)g[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
427 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
428 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<e.length;++l)e[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
429 0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var l=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+l);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
430 v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
431 v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
432 2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
433 -0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs1}},
434 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?g(a,b,p,h):d(a,b,p,h)}function d(b,c,g,k){var m=l(b,c),z=0,q=n(m.bitLength());"millerRabinTests"in
435 -g&&(q=g.millerRabinTests);var r=10;"maxBlockTime"in g&&(r=g.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(q))return k(null,m);m.dAddOffset(h[z++%8],0)}while(0>r||+new Date-v<r);a.util.setImmediate(function(){d(b,c,g,k)})}function g(b,c,h,m){function q(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}z.bitLength()>b&&(z=l(b,c));h=z.toString(16);e.target.postMessage({hex:h,workLoad:r});
436 -z.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var z=l(b,c),E=h.workers,r=h.workLoad||100,n=30*r/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;q()});q()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(r).byteValue(),0);return c}
437 -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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],r=new k(null);r.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
438 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
439 -0;l<g.length;++l)g[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
433 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
434 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?e(a,b,p,h):d(a,b,p,h)}function d(b,c,e,k){var m=l(b,c),y=0,r=n(m.bitLength());"millerRabinTests"in
435 +e&&(r=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(r))return k(null,m);m.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,m){function r(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}y.bitLength()>b&&(y=l(b,c));h=y.toString(16);e.target.postMessage({hex:h,workLoad:u});
436 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;r()});r()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
437 +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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
438 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
439 +0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
440 Error("Message is too long for PKCS#1 v1.5 padding."),g.length=b.length,g.max=d-11,g;g.putByte(0);g.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var h=0;h<d;++h)g.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),h=0;h<d;++h)e=l.charCodeAt(h),0===e?++k:g.putByte(e);d=k}g.putByte(0);g.putBytes(b);return g}function d(b,c,e,g){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var h=b.getByte(),k=b.getByte();if(0!==h||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
441 -typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function g(b,c,d){function e(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
442 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var g=b.p;b.p=b.q;b.q=g}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,e()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,e()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
443 -(g=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,g,b.p,b.q,g.mod(b.p1),g.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);e()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
444 -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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,r=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
441 +typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
442 +b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,r,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
443 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var r={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(r.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
444 +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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
445 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},B={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
446 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
447 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
448 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},A=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
449 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},y=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
448 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
449 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
450 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
451 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
452 -b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,g,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
453 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,g).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,g):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
452 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
453 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,e):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
454 c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:g,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},g=+new Date,p,k=0;null===a.keys&&
455 -(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(r[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
455 +(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
456 null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(p=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,p,a.p,a.q,
457 p.mod(a.p1),p.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});p=+new Date;k+=p-g;g=p}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
458 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var e=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(e,0),e.keys;g(e,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,g){var l={n:b,e:g,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
458 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var g=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(g,0),g.keys;e(g,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
459 b,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+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
460 -l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,g,k,l,m,q,r){var x={n:b,e:c,d:g,p:k,q:l,dP:m,dQ:q,qInv:r,decrypt:function(b,c,g){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,g)}};else if(-1!==["RAW","NONE",
461 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:y},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
460 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,l,m,r,u){var x={n:b,e:c,d:e,p:k,q:l,dP:m,dQ:r,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
461 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
462 [k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,B,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
463 -c.errors=d,c;var e,g,l,q,y,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();y=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
464 -16),new m(e,16),new m(g,16),new m(l,16),new m(q,16),new m(y,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
465 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,A,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
463 +c.errors=d,c;var e,g,l,r,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();r=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
464 +16),new m(e,16),new m(g,16),new m(l,16),new m(r,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
465 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
466 c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
467 -!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||
468 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<g.length;++l)g[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
469 -b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var g=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encryptionOid"},
470 -{name:"AlgorithmIdentifier.parameters",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
471 -tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:g.Class.UNIVERSAL,
472 -type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"salt"},
473 -{name:"pkcs-12PbeParams.iterations",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var e=a.random.getBytesSync(d.saltSize),h=d.count,k=g.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var z,q;switch(d.algorithm){case "aes128":z=m=16;d=n["aes128-CBC"];q=a.aes.createEncryptionCipher;break;case "aes192":m=24;
474 -z=16;d=n["aes192-CBC"];q=a.aes.createEncryptionCipher;break;case "aes256":m=32;z=16;d=n["aes256-CBC"];q=a.aes.createEncryptionCipher;break;case "des":z=m=8;d=n.desCBC;q=a.des.createEncryptionCipher;break;default:throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;}var v=a.pkcs5.pbkdf2(c,e,h,m);c=a.random.getBytesSync(z);h=q(v);h.start(c);h.update(g.toDer(b));h.finish();b=h.output.getBytes();e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,
475 -g.Type.OID,!1,g.oidToDer(n.pkcs5PBES2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n.pkcs5PBKDF2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(d).getBytes()),g.create(g.Class.UNIVERSAL,
476 -g.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(e),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(g.toDer(b)),h.finish(),b=h.output.getBytes(),e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,
477 -!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]);else throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[e,g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,e={},h=[];if(!g.validate(b,m,e,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=g.derToOid(e.encryptionOid);
478 -h=l.pbe.getCipher(h,e.encryptionParams,c);e=a.util.createBuffer(e.encryptedData);h.update(e);h.finish()&&(d=g.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:g.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
479 -b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return g.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var e,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
480 -h=24;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
481 -e.substr(0,8),h);c=k(c);c.start(e);c.update(g.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(e).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,e=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==e.type&&"PRIVATE KEY"!==e.type&&"RSA PRIVATE KEY"!==e.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".'),
482 -d.headerType=d,d;if(e.procType&&"ENCRYPTED"===e.procType.type){var h,k;switch(e.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
483 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+e.dekInfo.algorithm+'".'),d.algorithm=e.dekInfo.algorithm,d;}var m=a.util.hexToBytes(e.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(e.body));if(k.finish())d=k.output.getBytes();else return d}else d=
484 -e.body;d="ENCRYPTED PRIVATE KEY"===e.type?l.decryptPrivateKeyInfo(g.fromDer(d),c):g.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,q=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var u=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,q);
485 -var C=q*Math.ceil(u/q);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%u));C=q*Math.ceil(b/q);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<q;l++)D.putByte(C.at(l%m));var Y=Math.ceil(u/q)+Math.ceil(b/q),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(q)),
467 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
468 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
469 +b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
470 +{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"}]},k={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",
471 +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,
472 +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"}]}]},h={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"},
473 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var g=a.random.getBytesSync(d.saltSize),h=d.count,k=e.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,r;switch(d.algorithm){case "aes128":y=m=16;d=n["aes128-CBC"];r=a.aes.createEncryptionCipher;break;case "aes192":m=24;
474 +y=16;d=n["aes192-CBC"];r=a.aes.createEncryptionCipher;break;case "aes256":m=32;y=16;d=n["aes256-CBC"];r=a.aes.createEncryptionCipher;break;case "des":y=m=8;d=n.desCBC;r=a.des.createEncryptionCipher;break;default:throw g=Error("Cannot encrypt private key. Unknown encryption algorithm."),g.algorithm=d.algorithm,g;}var v=a.pkcs5.pbkdf2(c,g,h,m);c=a.random.getBytesSync(y);h=r(v);h.start(c);h.update(e.toDer(b));h.finish();b=h.output.getBytes();g=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
475 +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,
476 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(g),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(e.toDer(b)),h.finish(),b=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,
477 +!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,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,g={},h=[];if(!e.validate(b,m,g,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=e.derToOid(g.encryptionOid);
478 +h=l.pbe.getCipher(h,g.encryptionParams,c);g=a.util.createBuffer(g.encryptedData);h.update(g);h.finish()&&(d=e.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
479 +b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var g,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
480 +h=24;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
481 +g.substr(0,8),h);c=k(c);c.start(g);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(g).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,g=a.pem.decode(b)[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".'),
482 +d.headerType=d,d;if(g.procType&&"ENCRYPTED"===g.procType.type){var h,k;switch(g.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
483 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+g.dekInfo.algorithm+'".'),d.algorithm=g.dekInfo.algorithm,d;}var m=a.util.hexToBytes(g.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(g.body));if(k.finish())d=k.output.getBytes();else return d}else d=
484 +g.body;d="ENCRYPTED PRIVATE KEY"===g.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,r=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var q=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,r);
485 +var C=r*Math.ceil(q/r);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%q));C=r*Math.ceil(b/r);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<r;l++)D.putByte(C.at(l%m));var Y=Math.ceil(q/r)+Math.ceil(b/r),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(r)),
486 V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);L.putBuffer(ea)}v=L;n.putBuffer(C)}n.truncate(n.length()-g);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
487 -"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var e={};b=[];if(!g.validate(c,k,e,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=g.derToOid(e.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=g.derToOid(e.encOid);if(b!==l.oids["aes128-CBC"]&&
488 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=e.kdfSalt;var m=a.util.createBuffer(e.kdfIterationCount),m=m.getInt(m.length()<<3),q;switch(l.oids[b]){case "aes128-CBC":q=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":q=24;h=a.aes.createDecryptionCipher;break;
489 -case "aes256-CBC":q=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":q=24;h=a.des.createDecryptionCipher;break;case "desCBC":q=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,q);e=e.encIv;h=h(b);h.start(e);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var e={},k=[];if(!g.validate(c,h,e,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(e.salt),e=a.util.createBuffer(e.iterations),
490 -e=e.getInt(e.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,e,m);d=l.pbe.generatePkcs12Key(d,k,2,e,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
491 -typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
492 -0;l<g.length;++l)g[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
493 -a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var g={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
487 +"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var g={};b=[];if(!e.validate(c,k,g,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=e.derToOid(g.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=e.derToOid(g.encOid);if(b!==l.oids["aes128-CBC"]&&
488 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=g.kdfSalt;var m=a.util.createBuffer(g.kdfIterationCount),m=m.getInt(m.length()<<3),r;switch(l.oids[b]){case "aes128-CBC":r=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":r=24;h=a.aes.createDecryptionCipher;break;
489 +case "aes256-CBC":r=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":r=24;h=a.des.createDecryptionCipher;break;case "desCBC":r=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,r);g=g.encIv;h=h(b);h.start(g);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
490 +g=g.getInt(g.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,g,m);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
491 +typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
492 +0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
493 +a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
494 tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",
495 -tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(g)};d.encryptedDataValidator={name:"EncryptedData",
496 -tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(g)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
495 +tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(e)};d.encryptedDataValidator={name:"EncryptedData",
496 +tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(e)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
497 captureAsn1:"digestAlgorithms"},a,{name:"SignedData.Certificates",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,capture:"signerInfos",optional:!0,value:[{name:"SignerInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:c.Class.UNIVERSAL,
498 type:c.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
499 value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,
500 constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]}]}]};d.recipientInfoValidator={name:"RecipientInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,
501 constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
502 -value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
503 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
504 -["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var g=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());g.putBuffer(b.digest())}g.truncate(g.length()-d);return g.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
505 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
506 -Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
507 -{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
508 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,g=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,x=Math.ceil(v/8),A=b.digest().getBytes();
509 -if(x<g+m+2)throw Error("Message is too long to encrypt.");var y;y=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(A);n.putBytes(y);c.start();c.update(n.getBytes());A=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-g-2);n.putByte(1);n.putBytes(y);var R=n.getBytes(),z=x-g-1,E=d.generate(A,z);y="";for(n=0;n<z;n++)y+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;y=String.fromCharCode(y.charCodeAt(0)&~v)+y.substr(1);
510 -return y+A+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<g+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-g-1,v=k.substr(0,n);k=k.substr(n,g);var y=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&y))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),z="";for(q=0;q<n;q++)z+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
511 -z=String.fromCharCode(z.charCodeAt(0)&~y)+z.substr(1);l=l-g-m-2;for(q=0;q<l;q++)if(0!==z.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==z.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=z.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,
512 -module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
502 +value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
503 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
504 +["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var e=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());e.putBuffer(b.digest())}e.truncate(e.length()-d);return e.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
505 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
506 +Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
507 +{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
508 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,r){var n,v=r-1,x=Math.ceil(v/8),z=b.digest().getBytes();
509 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
510 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var r;r=l-1;l=Math.ceil(r/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-r&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(r=0;r<n;r++)y+=String.fromCharCode(v.charCodeAt(r)^R.charCodeAt(r));
511 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(r=0;r<l;r++)if(0!==y.charCodeAt(r))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
512 +module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
513 ["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
514 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function g(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
515 -v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===r.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
514 +var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
515 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
516 typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
517 (e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
518 -"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in r?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
518 +"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
519 d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
520 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
521 -d.extension=b,d;return b}function n(a,b){switch(a){case r["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
521 +d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
522 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
523 !1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
524 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},r=h.oids,v={};v.CN=r.commonName;v.commonName="CN";v.C=r.countryName;v.countryName="C";v.L=r.localityName;v.localityName="L";v.ST=r.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=r.organizationName;v.organizationName="O";v.OU=r.organizationalUnitName;v.organizationalUnitName="OU";v.E=r.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
524 +h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
525 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
526 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
527 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
528 {name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},B,{name:"Certificate.TBSCertificate.issuerUniqueID",
529 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
530 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
531 -{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},A={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
531 +{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
532 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
533 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
534 -tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},y={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
534 +tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
535 tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},B,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
536 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
537 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in r&&(g.name=r[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
538 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in r&&(p.name=r[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===r.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==r["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:r.sha1},mgf:{algorithmOid:r.mgf1,hash:{algorithmOid:r.sha1}},
539 -saltLength:20});c={};a=[];if(!k.validate(b,A,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
537 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
538 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
539 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
540 b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
541 return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
542 body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
543 break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
544 c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
545 -null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){g([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){g(a);
546 -b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){g(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
547 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
548 -e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in r)switch(r[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
549 -e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case r.sha1WithRSAEncryption:l=void 0;break;case r["RSASSA-PSS"]:d=r[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=r[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
550 -e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=r[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
551 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=r.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
552 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,x,e,l))throw e=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),e.errors=l,e;if("string"!==typeof e.certSignature){for(var l="\x00",m=0;m<e.certSignature.length;++m)l+=k.toDer(e.certSignature[m]).getBytes();e.certSignature=l}var l=k.derToOid(e.publicKeyOid),y=h.createCertificate();y.version=e.certVersion?e.certVersion.charCodeAt(0):
553 -0;m=a.util.createBuffer(e.certSerialNumber);y.serialNumber=m.toHex();y.signatureOid=a.asn1.derToOid(e.certSignatureOid);y.signatureParameters=R(y.signatureOid,e.certSignatureParams,!0);y.siginfo.algorithmOid=a.asn1.derToOid(e.certinfoSignatureOid);y.siginfo.parameters=R(y.siginfo.algorithmOid,e.certinfoSignatureParams,!1);m=a.util.createBuffer(e.certSignature);++m.read;y.signature=m.getBytes();m=[];void 0!==e.certValidity1UTCTime&&m.push(k.utcTimeToDate(e.certValidity1UTCTime));void 0!==e.certValidity2GeneralizedTime&&
554 -m.push(k.generalizedTimeToDate(e.certValidity2GeneralizedTime));void 0!==e.certValidity3UTCTime&&m.push(k.utcTimeToDate(e.certValidity3UTCTime));void 0!==e.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(e.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
555 -y.validity.notBefore=m[0];y.validity.notAfter=m[1];y.tbsCertificate=e.tbsCertificate;if(d){y.md=null;if(y.signatureOid in r)switch(l=r[y.signatureOid],l){case "sha1WithRSAEncryption":y.md=a.md.sha1.create();break;case "md5WithRSAEncryption":y.md=a.md.md5.create();break;case "sha256WithRSAEncryption":y.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":y.md=a.md.sha512.create();break;case "RSASSA-PSS":y.md=a.md.sha256.create()}if(null===y.md)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
556 -e.signatureOid=y.signatureOid,e;m=k.toDer(y.tbsCertificate);y.md.update(m.getBytes())}m=a.md.sha1.create();y.issuer.getField=function(a){return c(y.issuer,a)};y.issuer.addField=function(a){g([a]);y.issuer.attributes.push(a)};y.issuer.attributes=h.RDNAttributesAsArray(e.certIssuer,m);e.certIssuerUniqueId&&(y.issuer.uniqueId=e.certIssuerUniqueId);y.issuer.hash=m.digest().toHex();m=a.md.sha1.create();y.subject.getField=function(a){return c(y.subject,a)};y.subject.addField=function(a){g([a]);y.subject.attributes.push(a)};
557 -y.subject.attributes=h.RDNAttributesAsArray(e.certSubject,m);e.certSubjectUniqueId&&(y.subject.uniqueId=e.certSubjectUniqueId);y.subject.hash=m.digest().toHex();y.extensions=e.certExtensions?h.certificateExtensionsFromAsn1(e.certExtensions):[];l===h.oids.rsaEncryption&&(y.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo));return y};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
558 -return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in r)if(c.name=r[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
545 +null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
546 +b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
547 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
548 +e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
549 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
550 +e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
551 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
552 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),q=h.createCertificate();q.version=g.certVersion?g.certVersion.charCodeAt(0):
553 +0;m=a.util.createBuffer(g.certSerialNumber);q.serialNumber=m.toHex();q.signatureOid=a.asn1.derToOid(g.certSignatureOid);q.signatureParameters=R(q.signatureOid,g.certSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;q.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
554 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
555 +q.validity.notBefore=m[0];q.validity.notAfter=m[1];q.tbsCertificate=g.tbsCertificate;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===q.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
556 +g.signatureOid=q.signatureOid,g;m=k.toDer(q.tbsCertificate);q.md.update(m.getBytes())}m=a.md.sha1.create();q.issuer.getField=function(a){return c(q.issuer,a)};q.issuer.addField=function(a){e([a]);q.issuer.attributes.push(a)};q.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(q.issuer.uniqueId=g.certIssuerUniqueId);q.issuer.hash=m.digest().toHex();m=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};
557 +q.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(q.subject.uniqueId=g.certSubjectUniqueId);q.subject.hash=m.digest().toHex();q.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return q};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
558 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
559 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
560 -k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in r?c[r[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
561 -g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,y,e,l))throw e=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),e.errors=l,e;if("string"!==typeof e.csrSignature){for(var l=
562 -"\x00",m=0;m<e.csrSignature.length;++m)l+=k.toDer(e.csrSignature[m]).getBytes();e.csrSignature=l}l=k.derToOid(e.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var u=h.createCertificationRequest();u.version=e.csrVersion?e.csrVersion.charCodeAt(0):0;u.signatureOid=a.asn1.derToOid(e.csrSignatureOid);u.signatureParameters=R(u.signatureOid,e.csrSignatureParams,!0);u.siginfo.algorithmOid=a.asn1.derToOid(e.csrSignatureOid);u.siginfo.parameters=R(u.siginfo.algorithmOid,
563 -e.csrSignatureParams,!1);l=a.util.createBuffer(e.csrSignature);++l.read;u.signature=l.getBytes();u.certificationRequestInfo=e.certificationRequestInfo;if(d){u.md=null;if(u.signatureOid in r)switch(l=r[u.signatureOid],l){case "sha1WithRSAEncryption":u.md=a.md.sha1.create();break;case "md5WithRSAEncryption":u.md=a.md.md5.create();break;case "sha256WithRSAEncryption":u.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":u.md=a.md.sha512.create();break;case "RSASSA-PSS":u.md=a.md.sha256.create()}if(null===
564 -u.md)throw e=Error("Could not compute certification request digest. Unknown signature OID."),e.signatureOid=u.signatureOid,e;l=k.toDer(u.certificationRequestInfo);u.md.update(l.getBytes())}l=a.md.sha1.create();u.subject.getField=function(a){return c(u.subject,a)};u.subject.addField=function(a){g([a]);u.subject.attributes.push(a)};u.subject.attributes=h.RDNAttributesAsArray(e.certificationRequestInfoSubject,l);u.subject.hash=l.digest().toHex();u.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo);
565 -u.getAttribute=function(a){return c(u,a)};u.addAttribute=function(a){g([a]);u.attributes.push(a)};u.attributes=h.CRIAttributesAsArray(e.certificationRequestInfoAttributes||[]);return u};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
566 -null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){g([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){g(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){g(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
567 -e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in r)switch(r[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
568 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case r["RSASSA-PSS"]:c=r[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=r[b.signatureParameters.mgf.algorithmOid];
569 -if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=r[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
560 +k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
561 +g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
562 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var q=h.createCertificationRequest();q.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;q.signatureOid=a.asn1.derToOid(g.csrSignatureOid);q.signatureParameters=R(q.signatureOid,g.csrSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,
563 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;q.signature=l.getBytes();q.certificationRequestInfo=g.certificationRequestInfo;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===
564 +q.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=q.signatureOid,g;l=k.toDer(q.certificationRequestInfo);q.md.update(l.getBytes())}l=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};q.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);q.subject.hash=l.digest().toHex();q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
565 +q.getAttribute=function(a){return c(q,a)};q.addAttribute=function(a){e([a]);q.attributes.push(a)};q.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return q};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
566 +null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
567 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
568 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
569 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
570 h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
571 k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
572 !1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
573 return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
574 return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
575 -h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return g.certs[b.hash]||
576 -null}var g={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in g.certs?(c=g.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):g.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
577 -for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)g.addCertificate(b[l]);return g};h.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"};
578 -h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var q=c.shift(),y=null,r=!1;if(g<q.validity.notBefore||g>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:g};if(null===k){y=c[0]||b.getIssuer(q);null===y&&q.isIssuer(q)&&(r=!0,y=q);if(y){var n=y;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){y=n.shift();
579 -try{x=y.verify(q)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||y&&!r||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&y&&!q.isIssuer(y)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<q.extensions.length;++x){var w=q.extensions[x];!w.critical||w.name in n||(k=
580 -{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||y&&!r)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
581 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
582 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
583 -c.defined.x509=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
584 -[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function g(b,c,h,q){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
585 -for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],r,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},u=null,u=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(u.tagClass!==m.Class.UNIVERSAL||u.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");u=d(u).value;break;case k.oids.encryptedData:var A=q,x={},B=[];if(!m.validate(u,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
586 -b.errors=B,b;u=m.derToOid(x.contentType);if(u!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=u,b;u=m.derToOid(x.encAlgorithm);u=k.pbe.getCipher(u,x.encParameter,A);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);u.update(x);if(!u.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");u=u.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
587 -l(u,h,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var q,r,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
588 -k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:q=A;r=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
589 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(x,q,g,h))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=h,a;r()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
590 -a.pkcs12||{},r={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
591 -r,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
575 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
576 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
577 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.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"};
578 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var r=c.shift(),A=null,u=!1;if(g<r.validity.notBefore||g>r.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:r.validity.notBefore,notAfter:r.validity.notAfter,now:g};if(null===k){A=c[0]||b.getIssuer(r);null===A&&r.isIssuer(r)&&(u=!0,A=r);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
579 +try{x=A.verify(r)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(r)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&A&&!r.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<r.extensions.length;++x){var w=r.extensions[x];!w.critical||w.name in n||(k=
580 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=r.getExtension("basicConstraints"),r=r.getExtension("keyUsage"),null!==r&&(r.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
581 +null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==r&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));r=null===k?!0:k.error;l=d?d(r,m,e):r;if(!0===l)k=null;else{!0===r&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
582 +if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
583 +c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
584 +[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,r){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
585 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},q=null,q=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(q.tagClass!==m.Class.UNIVERSAL||q.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");q=d(q).value;break;case k.oids.encryptedData:var z=r,x={},B=[];if(!m.validate(q,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
586 +b.errors=B,b;q=m.derToOid(x.contentType);if(q!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=q,b;q=m.derToOid(x.encAlgorithm);q=k.pbe.getCipher(q,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);q.update(x);if(!q.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");q=q.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
587 +l(q,h,r);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var r,u,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
588 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:r=z;u=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
589 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==r&&!m.validate(x,r,g,h))throw a=Error("Cannot read PKCS#12 "+r.name),a.errors=h,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
590 +a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
591 +u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
592 tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},B={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
593 value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
594 -capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},A={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
595 -h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var r={};if(!m.validate(b,v,r,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:r.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
596 -(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==r.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=r.version.charCodeAt(0),l;if(m.derToOid(r.contentType)!==k.oids.data)throw l=
597 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(r.contentType),l;b=r.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(r.mac){var w=null,A=0,u=m.derToOid(r.macAlgorithm);switch(u){case k.oids.sha1:w=a.md.sha1.create();A=20;break;case k.oids.sha256:w=a.md.sha256.create();A=32;break;case k.oids.sha384:w=a.md.sha384.create();A=48;break;case k.oids.sha512:w=a.md.sha512.create();
598 -A=64;break;case k.oids.md5:w=a.md.md5.create(),A=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+u);var u=new a.util.ByteBuffer(r.macSalt),B="macIterations"in r?parseInt(a.util.bytesToHex(r.macIterations),16):1,A=h.generateKey(n,u,3,B,A,w),u=a.hmac.create();u.start(w,A);u.update(b.value);if(u.getMac().getBytes()!==r.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}g(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
599 -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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(q)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);q=[];null!==
600 -g&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
601 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));g=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],n=0;n<q.length;++n){c=q[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
602 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
594 +capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
595 +h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
596 +(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
597 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var w=null,z=0,q=m.derToOid(u.macAlgorithm);switch(q){case k.oids.sha1:w=a.md.sha1.create();z=20;break;case k.oids.sha256:w=a.md.sha256.create();z=32;break;case k.oids.sha384:w=a.md.sha384.create();z=48;break;case k.oids.sha512:w=a.md.sha512.create();
598 +z=64;break;case k.oids.md5:w=a.md.md5.create(),z=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+q);var q=new a.util.ByteBuffer(u.macSalt),B="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,z=h.generateKey(n,q,3,B,z,w),q=a.hmac.create();q.start(w,z);q.update(b.value);if(q.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
599 +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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var r=a.util.isArray(c)?c[0]:c;"string"===typeof r&&(r=k.certificateFromPem(r));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(r)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);r=[];null!==
600 +g&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
601 +0<r.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,r));g=[];r=[];null!==c&&(r=a.util.isArray(c)?c:[c]);for(var u=[],n=0;n<r.length;++n){c=r[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
602 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);u.push(c)}0<u.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,u),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
603 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
604 [m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var v;e.useMac&&(g=a.md.sha1.create(),v=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,v,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),v=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
605 !0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,v.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
606 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
607 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
608 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var g=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
609 -g.headerType=b.type;throw g;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,g){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:g})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
610 -typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
606 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
607 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
608 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
609 +e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
610 +typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
611 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var g=a.util.createBuffer(),h=b.length>>1,l=h+(b.length&1),k=b.substr(0,l),l=b.substr(h,l);b=a.util.createBuffer();h=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);h.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
612 -for(var q=0;q<m;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
613 -a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},g=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
612 +for(var r=0;r<m;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(r=0;r<c;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
613 +a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
614 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
615 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
616 certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};m.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};m.CipherSuites={};m.getCipherSuite=function(a){var b=null,c;for(c in m.CipherSuites){var d=m.CipherSuites[c];if(d.id[0]===a.charCodeAt(0)&&d.id[1]===a.charCodeAt(1)){b=d;break}}return b};
@@ -621,41 +621,41 @@ send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protoco
621 b.session.compressionMethod=g?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.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,
622 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
623 (a.expect=B,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
624 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:z,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
624 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
625 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
626 !1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
627 -l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:z:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:z)):b.error(b,{message:e?"No server certificate provided.":
628 -"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=r;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
627 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
628 +"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
629 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
630 try{var g=b.session.sp;g.pre_master_secret=d.decrypt(c);var h=b.session.clientHelloVersion;if(h.major!==g.pre_master_secret.charCodeAt(0)||h.minor!==g.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){g.pre_master_secret=a.random.getBytes(48)}b.expect=O;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
631 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
632 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(g){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=O;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
633 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
634 -return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=y;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
634 +return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
635 data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=B;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
636 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:H;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var g=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
637 e.putBuffer(b.session.sha1.digest());var h=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,h?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(g);b.session.sha1.update(g);if(b.session.resuming&&h||!b.session.resuming&&!h)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
638 -data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?A:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
638 +data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?z:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
639 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
640 "Bad certificate.";break;case m.Alert.Description.unsupported_certificate:d="Unsupported certificate.";break;case m.Alert.Description.certificate_revoked:d="Certificate revoked.";break;case m.Alert.Description.certificate_expired:d="Certificate expired.";break;case m.Alert.Description.certificate_unknown:d="Certificate unknown.";break;case m.Alert.Description.illegal_parameter:d="Illegal parameter.";break;case m.Alert.Description.unknown_ca:d="Unknown certificate authority.";break;case m.Alert.Description.access_denied:d=
641 "Access denied.";break;case m.Alert.Description.decode_error:d="Decode error.";break;case m.Alert.Description.decrypt_error:d="Decrypt error.";break;case m.Alert.Description.export_restriction:d="Export restriction.";break;case m.Alert.Description.protocol_version:d="Unsupported protocol version.";break;case m.Alert.Description.insufficient_security:d="Insufficient security.";break;case m.Alert.Description.internal_error:d="Internal error.";break;case m.Alert.Description.user_canceled:d="User canceled.";
642 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt24();if(g>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var h=d.bytes(g+
643 4);d.read+=4;e in J[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(h),b.session.sha1.update(h)),J[b.entity][b.expect][e](b,c,g)):
644 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt16(),d=d.getBytes(g);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||g>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
645 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,r=3,v=4,B=5,x=6,A=7,y=8,R=1,z=2,E=3,O=4,H=5,N=6,u=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];ea[m.ConnectionEnd.server]=[[u,P,F,u,L],[u,
646 -P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[u,u,m.handleServerHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,P,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,L,u,u,u,u,u,u],
647 -[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];J[m.ConnectionEnd.server]=[[u,m.handleClientHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,P,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleClientKeyExchange,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleCertificateVerify,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,
648 -u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
645 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,B=5,x=6,z=7,A=8,R=1,y=2,E=3,O=4,H=5,N=6,q=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];ea[m.ConnectionEnd.server]=[[q,P,F,q,L],[q,
646 +P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[q,q,m.handleServerHello,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,P,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,L,q,q,q,q,q,q],
647 +[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q]];J[m.ConnectionEnd.server]=[[q,m.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,P,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.handleClientKeyExchange,q,q,q,q],[q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,m.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,
648 +q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[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]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
649 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};g&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
650 cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
651 a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
652 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=g;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
652 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
653 }return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
654 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
655 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
654 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var r=a.util.createBuffer();
655 +n(r,2,k);n(l,2,r);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
656 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var g=
657 -null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(q.bytes(),!1));
658 -var y=a.util.createBuffer();n(y,3,q);e.putBuffer(y)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
657 +null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var r=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(r.bytes(),!1));
658 +var u=a.util.createBuffer();n(u,3,r);e.putBuffer(u)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(q){return b.error(b,{message:"Could not send certificate list.",cause:q,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
659 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
660 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(g){b.error(b,{message:"Could not get private key.",cause:g,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
661 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var g=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(g))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -677,199 +677,199 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_versio
677 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_message}})),c.record.ready=!0));c=b}if(!h.fail&&null!==h.record&&h.record.ready)if(b=h.record,d=b.type-m.ContentType.change_cipher_spec,e=ea[h.entity][h.expect],d in e)e[d](h,b);else m.handleUnexpected(h,b)}return c};h.prepare=function(b){m.queue(h,m.createRecord(h,{type:m.ContentType.application_data,data:a.util.createBuffer(b)}));return m.flush(h)};h.prepareHeartbeatRequest=function(b,c){b instanceof a.util.ByteBuffer&&
678 (b=b.bytes());"undefined"===typeof c&&(c=b.length);h.expectedHeartbeatPayload=b;m.queue(h,m.createRecord(h,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_request,b,c)}));return m.flush(h)};h.close=function(a){if(!h.fail&&h.sessionCache&&h.session){var b={id:h.session.id,version:h.session.version,sp:h.session.sp};b.sp.keys=null;h.sessionCache.setSession(b.id,b)}if(h.open){h.open=!1;h.input.clear();if(h.isConnected||h.handshaking)h.isConnected=h.handshaking=!1,
679 m.queue(h,m.createAlert(h,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(h);h.closed(h)}h.reset(a)};return h};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
680 -return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<g.length;++l)g[l](c);return c.tls}},
681 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,g,l){g=g.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
682 -g?l.keys.server_write_key:l.keys.client_write_key),iv:g?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",g?l.keys.client_write_key:l.keys.server_write_key),iv:g?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var e=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
683 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(g)&&(b.fragment=k.output,b.length=b.fragment.length(),e=!0);return e}function g(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
684 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,q=a.random.getBytesSync(g),y=e.output.length();y>=g?(b.fragment=e.output.getBytes(y-g),q=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
685 -b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;y=a.hmac.create();y.start("SHA1",e);y.update(q);q=y.digest().getBytes();y.start(null,null);y.update(g);g=y.digest().getBytes();return q===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
680 +return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
681 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
682 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
683 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
684 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,r=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),r=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
685 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(r);r=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return r===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
686 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
687 -20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<g.length;++l)g[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
688 -typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
689 -a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
690 -function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<g.length;++l)g[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
691 -(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<q;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var g=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(g.getBytesSync(h)),
692 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));h-=q.length;0<h&&(q=a.util.fillString(String.fromCharCode(0),h)+q);h=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:h,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
693 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<g.length;++l)g[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
694 -"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],g=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var g=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):g<=c[m.level].index&&
687 +20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
688 +typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
689 +a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
690 +function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
691 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,r=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<r;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),r;do r=(new d(a.util.bytesToHex(e.getBytesSync(h)),
692 +16)).mod(c.n);while(r.equals(d.ZERO));r=a.util.hexToBytes(r.toString(16));h-=r.length;0<h&&(r=a.util.fillString(String.fromCharCode(0),h)+r);h=c.encrypt(r,"NONE");r=b.generate(r,l);return{encapsulation:h,key:r}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
693 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
694 +"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
695 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
696 a.log.logMessage({timestamp:new Date,level:b,category:c,message:d,arguments:e})}})(n[l]);a.log.makeLogger=function(b){b={flags:0,f:b};a.log.setLevel(b,"none");return b};a.log.setLevel=function(b,c){var d=!1;if(b&&!(b.flags&a.log.LEVEL_LOCKED))for(var e=0;e<a.log.levels.length;++e)if(c==a.log.levels[e]){b.level=c;d=!0;break}return d};a.log.lock=function(b,c){b.flags="undefined"===typeof c||c?b.flags|a.log.LEVEL_LOCKED:b.flags&~a.log.LEVEL_LOCKED};a.log.addLogger=function(a){d.push(a)};if("undefined"!==
697 -typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},g=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else g=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};g=a.log.makeLogger(g);a.log.setLevel(g,"debug");a.log.addLogger(g)}else console={log:function(){}};
698 -null!==g&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(g,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(g));a.log.consoleLogger=g}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
699 -c.defined.log=!0;for(var l=0;l<g.length;++l)g[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!r.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
700 -b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:r.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
701 -r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.encryptedContent.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]),r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function g(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
702 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.digestAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(r.create(r.Class.UNIVERSAL,
703 -r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.signatureAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]));c.value.push(r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=r.create(r.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
704 -r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?r.utcTimeToDate(e):r.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?r.create(r.Class.UNIVERSAL,r.Type.UTCTIME,!1,r.dateToUtcTime(e)):
705 -r.create(r.Class.UNIVERSAL,r.Type.GENERALIZEDTIME,!1,r.dateToGeneralizedTime(e))}return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[c])])}function m(b){return[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,
706 -r.Type.OCTETSTRING,!1,b.parameter.getBytes())]),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!r.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(r.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
707 -0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:r.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
697 +typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},e=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else e=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};e=a.log.makeLogger(e);a.log.setLevel(e,"debug");a.log.addLogger(e)}else console={log:function(){}};
698 +null!==e&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(e,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(e));a.log.consoleLogger=e}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
699 +c.defined.log=!0;for(var l=0;l<e.length;++l)e[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!u.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
700 +b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:u.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
701 +u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.encryptedContent.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]),u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function e(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
702 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.digestAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(u.create(u.Class.UNIVERSAL,
703 +u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.signatureAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]));c.value.push(u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=u.create(u.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
704 +u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?u.utcTimeToDate(e):u.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?u.create(u.Class.UNIVERSAL,u.Type.UTCTIME,!1,u.dateToUtcTime(e)):
705 +u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
706 +u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
707 +0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
708 c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
709 -break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var r=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
710 -b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=r.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:r.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!r.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=r.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
709 +break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
710 +b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
711 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
712 -c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
713 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.signerInfos));return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),
712 +c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
713 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
714 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
715 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
716 -signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(r.create(r.Class.CONTEXT_SPECIFIC,
717 -0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(g).getBytes()),r.create(r.Class.UNIVERSAL,
718 -r.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=r.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=r.toDer(d);h.getByte();r.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
719 -}else{e.authenticatedAttributesAsn1=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=r.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
715 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var r=c[m];if(!l&&r.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&r.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
716 +signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
717 +0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
718 +u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
719 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var r=e.authenticatedAttributes[m];r.type===a.pki.oids.messageDigest?r.value=c[e.digestAlgorithm].digest():r.type!==a.pki.oids.signingTime||r.value||(r.value=k);h.value.push(n(r));e.authenticatedAttributesAsn1.value.push(n(r))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
720 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
721 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,
722 -!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,g(b.recipients)),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
721 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
722 +!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
723 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
724 }h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
725 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
726 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
727 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
728 -Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function g(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
729 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=g(w.bytes()),b.truncate(b.length()-
730 -x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(g("\x00\x00\x00\x00",l)),x.putBuffer(g("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=g("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
731 -h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,g){g=g||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+g};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
732 -function(b,g){g=g||{};var l=g.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===g.encoding)return l=l.toHex(),g.delimiter?l.match(/.{2}/g).join(g.delimiter):l;if("binary"===g.encoding)return l.getBytes();if(g.encoding)throw Error('Unknown encoding "'+g.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
733 -(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<g.length;++l)g[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
734 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var g={};a.debug.set("forge.task","queues",g);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
727 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
728 +Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
729 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
730 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
731 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
732 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
733 +(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
734 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
735 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
736 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
737 -this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",g)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
737 +this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
738 (c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
739 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
740 this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
741 a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
742 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in g?0===g[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):g[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(g[b.type].shift(),0===g[b.type].length?delete g[b.type]:g[b.type][0].start()):a.log.error("forge.task",
743 -"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in g?g[a.type].push(b):(g[b.type]=[b],m(b))};a.task.cancel=function(a){a in g&&(g[a]=[g[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
744 -a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<g.length;++l)g[l](c);return c.task}},
745 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
746 -return}var g,v=function(a,b){b.exports=function(b){var c=g.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){g="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
742 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
743 +"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
744 +a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
745 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
746 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
747 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});
748 -function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var g=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),g=g.substring(0,g.length-24),v=0;v<c.length;v++)if(g===c[v].DERKey||g==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
749 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),g=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(g,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
750 -var e=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,e,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,g){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,g)}
751 -function amtcert_createCertificate(b,c,a,d,g){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
752 -value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==g?g={name:"extKeyUsage",serverAuth:!0}:g.name="extKeyUsage",
753 -n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},g,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
754 -function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,g=b.length;d<g;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
748 +function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),e=e.substring(0,e.length-24),v=0;v<c.length;v++)if(e===c[v].DERKey||e==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
749 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),r=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(r).getBytes();
750 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
751 +function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
752 +value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
753 +n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
754 +function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,e=b.length;d<e;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
755 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
756 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
757 -require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var g="";a.on("data",function(a){null!=g&&(g+=a.toString("binary"));5E5<g.length&&(g=null)});a.on("end",function(){certUrlCache[b]={data:btoa(g),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,g)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
758 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,e,k,m,q){var r=a[b++];q={};var u=0,B=0;if(0==r){if(2==h.bpp)for(e=0;e<m;e++)n(a[b++]+(a[b++]<<8),e);else for(e=0;e<m;e++)v(a[b++],e);g(h.spare,c,d)}else if(1==r)h.graymode?(r=a[b++],h.lowcolor&&(r<<=4),h.canvas.fillStyle="rgb("+r+","+r+","+r+")"):(r=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(r&224)+","+((r&28)<<3)+","+D((r&3)<<6):(r>>8&248)+","+(r>>3&252)+","+
759 -((r&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,e,k);else if(1<r&&17>r){k=4;B=15;if(2==h.bpp){for(e=0;e<r;e++)q[e]=a[b++]+(a[b++]<<8);2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)n(q[r>>e&B],u++)}else{for(e=0;e<r;e++)q[e]=a[b++];2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)v(q[r>>e&B],u++)}g(h.spare,c,d)}else if(128==r){if(2==h.bpp)for(;u<m&&b<a.byteLength;){r=a[b++]+(a[b++]<<8);B=1;do B+=e=a[b++];while(255==e);if(0==
760 -h.rotation)p(r,u,B),u+=B;else for(;0<=--B;)n(r,u++)}else for(;u<m&&b<a.byteLength;){r=a[b++];B=1;do B+=e=a[b++];while(255==e);if(0==h.rotation)l(r,u,B),u+=B;else for(;0<=--B;)v(r,u++)}g(h.spare,c,d)}else if(129<r){if(2==h.bpp)for(e=0;e<r-128;e++)q[e]=a[b++]+(a[b++]<<8);else for(e=0;e<r-128;e++)q[e]=a[b++];for(;u<m&&b<a.byteLength;){B=1;e=a[b++];r=q[e%128];if(127<e){do B+=e=a[b++];while(255==e)}if(0==h.rotation)2==h.bpp?p(r,u,B):l(r,u,B),u+=B;else if(2==h.bpp)for(;0<=--B;)n(r,u++);else for(;0<=--B;)v(r,
761 -u++)}g(h.spare,c,d)}}function g(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
757 +require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
758 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,r){var u=a[b++];r={};var q=0,B=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
759 +((u&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;B=15;if(2==h.bpp){for(g=0;g<u;g++)r[g]=a[b++]+(a[b++]<<8);2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(r[u>>g&B],q++)}else{for(g=0;g<u;g++)r[g]=a[b++];2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(r[u>>g&B],q++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;q<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);B=1;do B+=g=a[b++];while(255==g);if(0==
760 +h.rotation)p(u,q,B),q+=B;else for(;0<=--B;)n(u,q++)}else for(;q<m&&b<a.byteLength;){u=a[b++];B=1;do B+=g=a[b++];while(255==g);if(0==h.rotation)l(u,q,B),q+=B;else for(;0<=--B;)v(u,q++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)r[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)r[g]=a[b++];for(;q<m&&b<a.byteLength;){B=1;g=a[b++];u=r[g%128];if(127<g){do B+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?p(u,q,B):l(u,q,B),q+=B;else if(2==h.bpp)for(;0<=--B;)n(u,q++);else for(;0<=--B;)v(u,
761 +q++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
762 h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
763 b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
764 -1]=e,h.spare.data[b+2]=a,b+=4}function q(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function e(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
765 -2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):r[c.code];
766 -null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
767 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
768 -0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
769 -h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var e=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)e=12,h.state=1,h.parent&&delete h.parent.connectTime,
770 -h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)e=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){e=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;e=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
764 +1]=e,h.spare.data[b+2]=a,b+=4}function r(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
765 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];null!=c&&h.sendkey(c,
766 +a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);173==c&&(d=45);186==c&&
767 +(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=0;h.spareh2=0;
768 +h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=h.rwidth=
769 +h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
770 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
771 h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
772 0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
773 -50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);e=4;break;case 2:e=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)e=0;else if(b=l.getUint32(4)+8,c.byteLength<b)e=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
773 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
774 0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
775 -h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}e=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),e=l.getUint16(4),q=l.getUint16(6),p=e*q,r=l.getUint32(8);if(17>r){if(1>e||64<e||1>q||
776 -64<q)return console.log("Invalid tile size ("+e+","+q+"), disconnecting."),h.Stop();if(h.sparew!=e||h.spareh!=q){h.sparew=h.sparew2=e;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=e;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==r){h.canvas.canvas.width=h.rwidth=h.width=e;h.canvas.canvas.height=h.rheight=
777 -h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));e=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==r){r=12;e=12+p*h.bpp;if(h.acc.byteLength<e)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(r,!0),w),r+=2;else for(w=0;w<p;w++)v(h.acc[r++],w);g(h.spare,b,c)}else if(16==r){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
778 -16+w)break;r=16;if(5<w&&0==h.acc[r]&&l.getUint16(r+1,!0)==w-5)d(h.acc,r+5,b,c,e,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(r,r+w-0)))),0<l.length){for(var r=l,N=new Uint8Array(r.length),u=0,C=r.length;u<C;++u)N[u]=r.charCodeAt(u);d(N,0,b,c,e,q,p,l.length)}else console.log("Invalid deflate data");e=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==e)break;h.acc=e!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(e)):
775 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),r=l.getUint16(6),p=g*r,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>r||
776 +64<r)return console.log("Invalid tile size ("+g+","+r+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=r){h.sparew=h.sparew2=g;h.spareh=h.spareh2=r;if(1==h.rotation||3==h.rotation)h.sparew2=r,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
777 +h.height=r;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
778 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,r,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,N=new Uint8Array(u.length),q=0,C=u.length;q<C;++q)N[q]=u.charCodeAt(q);d(N,0,b,c,g,r,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
779 null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
780 function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
781 -h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,C(0,0),w(0,0));h.width=h.canvas.canvas.width;
782 -h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var r={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
782 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
783 NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
784 F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
785 h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
786 h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var K=!1,B=!1;h.GrabMouseInput=function(){if(1!=K){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;K=!0}};h.UnGrabMouseInput=function(){if(0!=K){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;K=!1}};h.GrabKeyInput=function(){1!=B&&(document.onkeyup=
787 h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,B=!0)};h.UnGrabKeyInput=function(){0!=B&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,B=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
788 0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){h.ReverseMouseWheel&&(b*=-1);var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/
789 -Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,g=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-g[0])*d;h.my=(event.pageY-g[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=q(h.mx,h.my),h.my=e(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
789 +Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=r(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
790 h.mNagleTimer=null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=
791 -0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;
792 -a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,g="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?g:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");
793 -a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&
794 -a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var g=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<g&&0!=a.State)for(a.PendingOperations.push([g,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];
795 -if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&
796 -255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),g=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),n=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,n,b,e,g,n,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);
797 -a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();
798 -if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,e=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,
799 -4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),e=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+
800 -q+" Y="+e);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,e);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,e);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,
801 -4));break;case 11:c=0;q={};e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<e)for(c=((b.charCodeAt(6+2*e)&255)<<8)+(b.charCodeAt(7+2*e)&255),n=0;n<e;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,
802 -4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);g=v[b];d&&(a.CanvasId.style.cursor=g)}return w+D}}};a.MouseButton=
803 -{NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,
804 -Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?
805 -d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,
806 -a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,
807 -67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,g;for(g in a.TouchArray)g==b?e=c:1==a.TouchArray[g].f?(e=65542,a.TouchArray[g].f=3):e=2==a.TouchArray[g].f?262144:131078,d+=String.fromCharCode(g)+a.intToStr(e)+a.shortToStr(a.TouchArray[g].x)+a.shortToStr(a.TouchArray[g].y),2==a.TouchArray[g].f&&
808 -delete a.TouchArray[g];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,g=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-g[0])*e,d=(c.pageY-
809 -g[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var n=g=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?g=a.MouseButton.LEFT:2==c.which?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT:c.button&&(0==c.button?g=a.MouseButton.LEFT:1==c.button?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?n=-120*c.detail:c.wheelDelta&&(n=3*c.wheelDelta));var v="",v=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,
810 -a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,n/256&255,n&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?g:2*g&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(v),a.Alternate=1):a.Alternate=0:a.send(v)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",
811 -b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,
812 -a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&
813 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&
814 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&
815 -(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&
816 -a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};
817 -a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,g=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]=
818 -{x:e,y:g});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
819 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<
820 -b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/
821 -a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=
822 -a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
823 -null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=
824 -null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;
825 -if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||
826 -3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,
827 -0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};
828 -a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;
829 -d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var g=new FileReader,v=!1,n=[];g.readAsBinaryString?g.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:g.readAsBinaryString(new Blob([n.shift()]))}:g.readAsArrayBuffer&&(g.onloadend=function(a){d.xxOnSocketData(a.target.result);
830 -0==n.length?v=!1:g.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(g.readAsBinaryString)v=!0,g.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,g.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=
831 -function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=
832 -a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");
833 -d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(u[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<
834 -b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){y[m][D]=a;A[m][D]=(e<<6)+(C<<12)+q}function g(){for(var a=(e<<6)+(C<<12)+q,b=D;b<l.width;b++)y[m][b]=" ",A[m][b]=a}function v(a){for(var b=(e<<6)+(C<<12)+q,c=0;c<l.width;c++)y[a][c]=" ",A[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)y[b]=y[b+a],A[b]=A[b+a];for(b=E[1]-a+1;b<=
835 -E[1];b++)for(y[b]=[],A[b]=[],a=0;a<l.width;a++)y[b][a]=" ",A[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,e=7,C=0,w=!0,D=0,m=0,k=0,h=0,r=0,K=[],B=0,x=0,A=[],y=[],R=!1,z=!0,E,O=!1,H=[],
836 -N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){y[c]=[];A[c]=[];for(var d=0;d<l.width;d++)y[c][d]=" ",A[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=
837 -decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(r){case 0:switch(n){case 27:r=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":r=2;break;case "(":r=4;break;case ")":r=5;break;case "]":r=6;break;case "=":O=!0;r=0;break;case ">":O=!1;r=0;break;case "7":k=D;h=m;r=0;break;case "8":D=k;m=h;r=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var u=0;u<l.width;u++)y[n][u]=y[n-1][u],A[n][u]=A[n-1][u];for(n=
838 -E[0]+1-1;n>E[0]-1;n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;r=0;break;default:console.log("unknown terminal short code",p),r=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,u=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(z=!1);break;case "h":25==n[0]&&(z=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==u&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==
839 -u&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==u&&(0==n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==u&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==u&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==u&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==u&&(p=n[0]);for(J=D;J<l.width-p;J++)y[m][J]=y[m][J+p],A[m][J]=A[m][J+p];for(J=l.width-p;J<l.width;J++)y[m][J]=" ",A[m][J]=448;break;case "L":J=1;1==u&&(J=n[0]);0==J&&(J=1);
840 -for(n=E[1];n>=m+J;n--)y[n]=y[n-J],A[n]=A[n-J];for(n=m;n<m+J;n++)for(y[n]=[],A[n]=[],p=0;p<l.width;p++)y[n][p]=" ",A[n][p]=448;break;case "J":if(1==u&&2==n[0])l.TermClear((C<<12)+(e<<6)),m=D=0,H=[];else if(0==u||1==u&&0==n[0])for(g(),J=m+1;J<l.height;J++)v(J);else if(1==u&&1==n[0])for(g(),J=0;J<m-1;J++)v(J);break;case "H":2==u?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<u;J++)n[J]&&0!=n[J]?1==n[J]?
841 -8>e&&(e+=8):2==n[J]||22==n[J]?8<=e&&(e-=8):7==n[J]?q=2:27==n[J]?q=0:30<=n[J]&&37>=n[J]?(p=8<=e,e=n[J]-30,p&&8>=e&&(e+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?e=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,e=7,q=0);break;case "K":if(0!=u&&(1!=u||n[0]&&0!=n[0])){if(1==u)if(1==n[0])for(n=(e<<6)+(C<<12)+q,u=0;u<D;u++)y[m][u]=" ",A[m][u]=n;else 2==n[0]&&v(m)}else g();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==u&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-
842 -1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=E[1]);break;case "S":p=1;1==u&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "M":p=1;1==u&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "T":p=1;1==u&&(p=n[0]);for(n=E[1];n>E[0]+
843 -p;n--)for(u=0;u<l.width;u++)y[n][u]=y[n-p][u],A[n][u]=A[n-p][u];for(n=E[0]+p;n>E[0];n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "X":p=1;J=D;R=m;for(1==u&&(p=n[0]);0<p&&R<l.height;)y[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}r=0}break;case 4:r=0;break;case 5:r=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(u=parseInt(n[0]),(0==u||2==u)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,
844 -l.title=n[1]);r=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var u=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
845 -9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,
846 -9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)y[b][c]=" ",A[b][c]=a;H=[]};l.TermResetScreen=function(){q=0;e=7;C=0;w=z=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);
847 -N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};
848 -l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,
849 -79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,
850 -91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;
851 -var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
852 -a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=A[b][h],D==h&&m==b&&z&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=y[b][h],d){case "&":a+="&amp;";
791 +0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=
792 +700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
793 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
794 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
795 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
796 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
797 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
798 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,r=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
799 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),r=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+r+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
800 +a.ProcessPictureMsg(c,r,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(r,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;r={};g=((b.charCodeAt(4)&255)<<8)+
801 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);r[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,r,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
802 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
803 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
804 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&
805 +7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==
806 +a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&
807 +a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+
808 +a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
809 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
810 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
811 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
812 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
813 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
814 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
815 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
816 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
817 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
818 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
819 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
820 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
821 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
822 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
823 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
824 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
825 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
826 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
827 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
828 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
829 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
830 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
831 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
832 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
833 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(q[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
834 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(C<<12)+r}function e(){for(var a=(g<<6)+(C<<12)+r,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(C<<12)+r,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
835 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),r=0,g=7,C=0,w=!0,D=0,m=0,k=0,h=0,u=0,K=[],B=0,x=0,z=[],A=[],R=!1,y=!0,E,O=!1,H=[],N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
836 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=
837 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":O=!0;u=0;break;case ">":O=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var q=0;q<l.width;q++)A[n][q]=A[n-1][q],z[n][q]=z[n-1][q];for(n=E[0]+1-1;n>E[0]-1;n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;u=0;break;
838 +default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,q=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==q&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==q&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==q&&(0==
839 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==q&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==q&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==q&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==q&&(p=n[0]);for(J=D;J<l.width-p;J++)A[m][J]=A[m][J+p],z[m][J]=z[m][J+p];for(J=l.width-p;J<l.width;J++)A[m][J]=" ",z[m][J]=448;break;case "L":J=1;1==q&&(J=n[0]);0==J&&(J=1);for(n=E[1];n>=m+J;n--)A[n]=A[n-J],z[n]=z[n-J];for(n=m;n<m+J;n++)for(A[n]=[],
840 +z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==q&&2==n[0])l.TermClear((C<<12)+(g<<6)),m=D=0,H=[];else if(0==q||1==q&&0==n[0])for(e(),J=m+1;J<l.height;J++)v(J);else if(1==q&&1==n[0])for(e(),J=0;J<m-1;J++)v(J);break;case "H":2==q?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<q;J++)n[J]&&0!=n[J]?1==n[J]?8>g&&(g+=8):2==n[J]||22==n[J]?8<=g&&(g-=8):7==n[J]?r=2:27==n[J]?r=0:30<=n[J]&&
841 +37>=n[J]?(p=8<=g,g=n[J]-30,p&&8>=g&&(g+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?g=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,g=7,r=0);break;case "K":if(0!=q&&(1!=q||n[0]&&0!=n[0])){if(1==q)if(1==n[0])for(n=(g<<6)+(C<<12)+r,q=0;q<D;q++)A[m][q]=" ",z[m][q]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==q&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
842 +E[1]);break;case "S":p=1;1==q&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "M":p=1;1==q&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "T":p=1;1==q&&(p=n[0]);for(n=E[1];n>E[0]+p;n--)for(q=0;q<l.width;q++)A[n][q]=A[n-p][q],z[n][q]=z[n-p][q];for(n=
843 +E[0]+p;n>E[0];n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "X":p=1;J=D;R=m;for(1==q&&(p=n[0]);0<p&&R<l.height;)A[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(q=parseInt(n[0]),(0==q||2==q)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=
844 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var q=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
845 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
846 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;H=[]};l.TermResetScreen=function(){r=0;g=7;C=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
847 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
848 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
849 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
850 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
851 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
852 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
853 break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<H.length&&(H=H.slice(H.length-800));c=H.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
854 l.Init();return l},ZLIB=ZLIB||{};
855 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
856 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
857 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,x,A,B,D,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=A=1;15>=p;p++)if(A<<=1,A-=M[p],0>A)return-1;if(0<A&&(0==
858 -b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(q=0;q<n;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=r,fa=K,ga=ca=0,U=-1}q=D=0;p=d;S=c;n=w;x=0;W=-1;B=1<<w;I=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[q]<U?G.val=e[q]:e[q]>U?(G.op=fa[ga+e[q]],G.val=Z[ca+e[q]]):G.op=96;A=1<<p-x;d=C=1<<n;do C-=A,m[S+(D>>>x)+C]=G;while(0!=C);for(A=1<<p-1;D&A;)A>>>=1;
859 -0!=A?(D&=A-1,D+=A):D=0;q++;if(0==--M[p]){if(p==v)break;p=g[l+e[q]]}if(p>w&&(D&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(A=1<<n;n+x<v;){A-=M[n+x];if(0>=A)break;n++;A<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=D&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=D&&(m[S+D]={op:64,bits:p-x,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function g(){var a;this.total=this.check=
857 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,r,v,w,x,z,D,B,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(r=0;r<n;r++)M[g[l+r]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
858 +b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(r=0;r<n;r++)0!=g[l+r]&&(e[x[g[l+r]]++]=r);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=u,fa=K,ga=ca=0,U=-1}r=B=0;p=d;S=c;n=w;x=0;W=-1;D=1<<w;I=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[r]<U?G.val=e[r]:e[r]>U?(G.op=fa[ga+e[r]],G.val=Z[ca+e[r]]):G.op=96;z=1<<p-x;d=C=1<<n;do C-=z,m[S+(B>>>x)+C]=G;while(0!=C);for(z=1<<p-1;B&z;)z>>>=1;
859 +0!=z?(B&=z-1,B+=z):B=0;r++;if(0==--M[p]){if(p==v)break;p=g[l+e[r]]}if(p>w&&(B&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(z=1<<n;n+x<v;){z-=M[n+x];if(0>=z)break;n++;z<<=1}D+=1<<n;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:p-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
860 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
861 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function e(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function C(a,b){return a.hold&
862 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
861 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function r(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!r(a))return!1;return!0}function C(a,b){return a.hold&
862 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
863 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
864 -e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new g;ZLIB.inflateReset(b,
865 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,g,h,k,r,u=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);g={};n(a,g);h=g.have;k=g.left;
866 -P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!e(g,16))break a;if(d.wrap&2&&35615==g.hold){d.check=a.checksum_function(0,null,0,0);v(a,g.hold);p(g);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(g,8)<<8)+(g.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(g,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(g,4);u=C(g,4)+8;if(0==d.wbits)d.wbits=u;else if(u>d.wbits){a.msg="invalid window size";d.mode=
867 -29;break}d.dmax=1<<u;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=g.hold&512?9:11;p(g);break;case 1:if(!e(g,16))break a;d.flags=g.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=g.hold>>>8&1);d.flags&512&&v(a,g.hold);p(g);d.mode=2;case 2:if(!e(g,32))break a;null!==d.head&&(d.head.time=g.hold);d.flags&512&&(r=g.hold,a.state.check=a.checksum_function(a.state.check,
868 -[r&255,r>>>8&255,r>>>16&255,r>>>24&255],0,4));p(g);d.mode=3;case 3:if(!e(g,16))break a;null!==d.head&&(d.head.xflags=g.hold&255,d.head.os=g.hold>>>8);d.flags&512&&v(a,g.hold);p(g);d.mode=4;case 4:if(d.flags&1024){if(!e(g,16))break a;d.length=g.hold;null!==d.head&&(d.head.extra_len=g.hold);d.flags&512&&v(a,g.hold);p(g);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(r=d.length,r>g.have&&(r=g.have),r&&(null!==d.head&&null!==d.head.extra&&(u=d.head.extra_len-
869 -d.length,d.head.extra+=a.input_data.substring(g.next,g.next+(u+r>d.head.extra_max?d.head.extra_max-u:r))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r)),g.have-=r,g.next+=r,d.length-=r),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==g.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");r=0;do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=u,d.length++)}while(r<g.have);d.flags&
870 -512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==g.have)break a;r=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=u,d.length++)}while(r<g.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=
871 -r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!e(g,16))break a;if(g.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(g)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!e(g,32))break a;a.adler=d.check=m(g.hold);p(g);d.mode=10;case 10:if(0==d.havedict)return l(g),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
872 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(g);d.mode=26;break}if(!e(g,3))break a;d.last=C(g,1);w(g,1);switch(C(g,2)){case 0:d.mode=13;break;case 1:r=d;u=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
864 +e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
865 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,q=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
866 +P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);q=C(e,4)+8;if(0==d.wbits)d.wbits=q;else if(q>d.wbits){a.msg="invalid window size";d.mode=
867 +29;break}d.dmax=1<<q;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
868 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(q=d.head.extra_len-
869 +d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(q+u>d.head.extra_max?d.head.extra_max-q:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=q,d.length++)}while(u<e.have);d.flags&
870 +512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=q,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
871 +u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
872 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=C(e,1);w(e,1);switch(C(e,2)){case 0:d.mode=13;break;case 1:u=d;q=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
873 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
874 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
875 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -892,28 +892,28 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
892 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
893 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
894 {op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
895 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);r.lencode=0;r.distcode=512;for(u=0;512>u;u++)r.codes[u]=B[u];for(u=0;32>u;u++)r.codes[u+512]=x[u];r.lenbits=9;r.distbits=5;
896 -d.mode=19;if(c==ZLIB.Z_TREES){w(g,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(g,2);break;case 13:D(g);if(!e(g,32))break a;if((g.hold&65535)!=(g.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=g.hold&65535;p(g);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(r=d.length){r>g.have&&(r=g.have);r>g.left&&(r=g.left);if(0==r)break a;a.output_data+=a.input_data.substring(g.next,g.next+r);a.next_out+=r;g.have-=
897 -r;g.next+=r;g.left-=r;d.length-=r;break}d.mode=11;break;case 16:if(!e(g,14))break a;d.nlen=C(g,5)+257;w(g,5);d.ndist=C(g,5)+1;w(g,5);d.ncode=C(g,4)+4;w(g,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!e(g,3))break a;r=C(g,3);d.lens[A[d.have++]]=r;w(g,3)}for(;19>d.have;)d.lens[A[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
898 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(16>r.val)w(g,r.bits),d.lens[d.have++]=r.val;else{if(16==r.val){if(!e(g,r.bits+2))break a;w(g,r.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}u=d.lens[d.have-1];r=3+C(g,2);w(g,2)}else if(17==r.val){if(!e(g,r.bits+3))break a;w(g,r.bits);u=0;r=3+C(g,3);w(g,3)}else{if(!e(g,r.bits+7))break a;w(g,r.bits);u=0;r=11+C(g,7);w(g,7)}if(d.have+r>d.nlen+d.ndist){a.msg=
899 -"invalid bit length repeat";d.mode=29;break}for(;r--;)d.lens[d.have++]=u}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=g.have&&258<=g.left){l(g);r=a;var F=K=u=void 0,Y=void 0,L=void 0,
900 -ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,u=r.state,K=r.input_data,F=r.next_in,Y=F+r.avail_in-5,L=r.next_out,ea=L-(k-r.avail_out),V=L+(r.avail_out-257),J=u.wsize,aa=u.whave,ba=u.wnext,W=u.window,I=u.hold,G=u.bits,S=u.codes,Z=u.lencode,ca=u.distcode,fa=(1<<u.lenbits)-1,ga=(1<<u.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
901 -G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)r.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
902 -u.sane){r.msg="invalid distance too far back";u.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,r.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)r.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);r.output_data+=r.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),X-=3;X&&(r.output_data+=r.output_data.charAt(U++),
903 -1<X&&(r.output_data+=r.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{r.msg="invalid distance code";u.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?u.mode=11:(r.msg="invalid literal/length code",u.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;r.next_in=F;r.next_out=L;r.avail_in=F<Y?5+(Y-F):5-(F-Y);r.avail_out=L<V?257+(V-L):257-(L-V);u.hold=I;u.bits=G;n(a,g);11==d.mode&&(d.back=-1);
904 -break}for(d.back=0;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(r.op&&0==(r.op&240)){for(u=r;;){r=d.codes[d.lencode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;d.length=r.val;if(0==r.op){d.mode=25;break}if(r.op&32){d.back=-1;d.mode=11;break}if(r.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=r.op&15;d.mode=21;case 21:if(d.extra){if(!e(g,d.extra))break a;
905 -d.length+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){r=d.codes[d.distcode+C(g,d.distbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(0==(r.op&240)){for(u=r;;){r=d.codes[d.distcode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;if(r.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=r.val;d.extra=r.op&15;d.mode=23;case 23:if(d.extra){if(!e(g,d.extra))break a;
906 -d.offset+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==g.left)break a;r=k-g.left;if(d.offset>r){r=d.offset-r;if(r>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}r>d.wnext?(r-=d.wnext,u=d.wsize-r):u=d.wnext-r;K=-1;r>d.length&&(r=d.length)}else u=-1,K=a.next_out-d.offset,r=d.length;r>g.left&&(r=g.left);g.left-=r;d.length-=r;if(0<=u)a.output_data+=d.window.substring(u,u+r),a.next_out+=r;else{a.next_out+=r;do a.output_data+=a.output_data.charAt(K++);while(--r)}0==
907 -d.length&&(d.mode=20);break;case 25:if(0==g.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;g.left--;d.mode=20;break;case 26:if(d.wrap){if(!e(g,32))break a;k-=g.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=g.left;if((d.flags?g.hold:m(g.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(g)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!e(g,32))break a;if(g.hold!=(d.total&4294967295)){a.msg="incorrect length check";
908 -d.mode=29;break}p(g)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(g);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))g=a.state,r=a.output_data.length,null===g.window&&(g.window=""),0==g.wsize&&(g.wsize=1<<g.wbits),g.window=r>=g.wsize?a.output_data.substring(r-g.wsize):g.whave+r<g.wsize?g.window+a.output_data:g.window.substring(g.whave-(g.wsize-r))+a.output_data,g.whave=g.window.length,
909 -g.wnext=g.whave<g.wsize?g.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
895 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(q=0;512>q;q++)u.codes[q]=B[q];for(q=0;32>q;q++)u.codes[q+512]=x[q];u.lenbits=9;u.distbits=5;
896 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
897 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=C(e,5)+257;w(e,5);d.ndist=C(e,5)+1;w(e,5);d.ncode=C(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=C(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
898 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}q=d.lens[d.have-1];u=3+C(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);q=0;u=3+C(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);q=0;u=11+C(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
899 +"invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=q}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var F=K=q=void 0,Y=void 0,L=void 0,
900 +ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,q=u.state,K=u.input_data,F=u.next_in,Y=F+u.avail_in-5,L=u.next_out,ea=L-(k-u.avail_out),V=L+(u.avail_out-257),J=q.wsize,aa=q.whave,ba=q.wnext,W=q.window,I=q.hold,G=q.bits,S=q.codes,Z=q.lencode,ca=q.distcode,fa=(1<<q.lenbits)-1,ga=(1<<q.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
901 +G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)u.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
902 +q.sane){u.msg="invalid distance too far back";q.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)u.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);u.output_data+=u.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),X-=3;X&&(u.output_data+=u.output_data.charAt(U++),
903 +1<X&&(u.output_data+=u.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{u.msg="invalid distance code";q.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?q.mode=11:(u.msg="invalid literal/length code",q.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;u.next_in=F;u.next_out=L;u.avail_in=F<Y?5+(Y-F):5-(F-Y);u.avail_out=L<V?257+(V-L):257-(L-V);q.hold=I;q.bits=G;n(a,e);11==d.mode&&(d.back=-1);
904 +break}for(d.back=0;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(u.op&&0==(u.op&240)){for(q=u;;){u=d.codes[d.lencode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
905 +d.length+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+C(e,d.distbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(0==(u.op&240)){for(q=u;;){u=d.codes[d.distcode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
906 +d.offset+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,q=d.wsize-u):q=d.wnext-u;K=-1;u>d.length&&(u=d.length)}else q=-1,K=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=q)a.output_data+=d.window.substring(q,q+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(K++);while(--u)}0==
907 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
908 +d.mode=29;break}p(e)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
909 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
910 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
911 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
912 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
913 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
914 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;a%=65521;n%=65521}return a|n<<16}function c(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b[c],65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),
915 a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b[c++],n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=
916 -a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,g,v){return"string"===typeof d?b(a,d,g,v):c(a,d,g,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
916 +a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,e,v){return"string"===typeof d?b(a,d,e,v):c(a,d,e,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
917 65521);131042<=v&&(v-=131042);65521<=v&&(v-=65521);return c|v<<16}})();"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-crc32.js");
918 (function(){function b(a,b){var c,n=0;for(c=0;b;)b&1&&(c^=a[n]),b>>=1,n++;return c}function c(a,c){var v;for(v=0;32>v;v++)a[v]=b(c,c[v])}var a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,
919 3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,
@@ -922,32 +922,32 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
922 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
923 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
924 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
925 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,g,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^g}})();
926 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),g=b.webkitRequestFileSystem,v=b.requestFileSystem||g||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
927 -b.chrome?c():setTimeout(c,500)},q=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(g){n(g)}}},e=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},C=function(n,m,k){k||(n=e(n));var h=this;k=n.type;var r=!1,w,B,x=function(){q(h,["writestart","progress","write","writeend"])},A=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
928 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(r||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},y=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},z;h.readyState=h.INIT;m||(m="download");if(a)w=
929 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(z=n.slice||n.webkitSlice,n=z.call(n,0,n.size,"application/octet-stream"),r=!0);g&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||g)B=b;v?(l+=n.size,v(b.TEMPORARY,l,y(function(a){a.root.getDirectory("saved",C,y(function(a){var b=function(){a.getFile(m,C,y(function(a){a.createWriter(y(function(b){b.onwriteend=
930 -function(b){B.location.href=a.toURL();h.readyState=h.DONE;q(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&A()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),A)}),A)};a.getFile(m,{create:!1},y(function(a){a.remove();b()}),y(function(a){a.code===a.NOT_FOUND_ERR?b():A()}))}),A)}),A)):A()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
931 -b,c){c||(a=e(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
925 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,r;if(0>=v)return a;p=Array(32);r=Array(32);r[0]=3988292384;for(n=l=1;32>n;n++)r[n]=l,l<<=1;c(p,r);c(r,p);do{c(p,r);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(r,p);v&1&&(a=b(r,a));v>>=1}while(0!=v);return a^e}})();
926 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
927 +b.chrome?c():setTimeout(c,500)},r=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(g){n(g)}}},g=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},C=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){r(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
928 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
929 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",C,A(function(a){var b=function(){a.getFile(m,C,A(function(a){a.createWriter(A(function(b){b.onwriteend=
930 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;r(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
931 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;r(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
932 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
933 -var version="0.9.3",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
933 +var version="0.9.7",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
934 null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Bezig met laden...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetAuth NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
935 StatusStrs=["Losgekoppeld","Verbinden...","Opstelling...","Verbonden"],t,t2,rsepass=null;
936 -function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
937 -applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
938 -haltEvent,!1);document.addEventListener("dragleave",haltEvent,!1);document.addEventListener("drop",documentFileSelectHandler,!1);Q("p16").addEventListener("dragover",haltEvent,!1);Q("p16").addEventListener("dragleave",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",
939 -p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
936 +function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(23).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
937 +urlvars.kvmenc&&(c=parseInt(urlvars.kvmenc),"number"==typeof c&&(desktopsettings.encflags=c));urlvars.kvmdec&&(c=parseInt(urlvars.kvmdec),"number"==typeof c&&(desktopsettings.decimationMode=c));applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(34).value=terminalEmulations[terminal.m.terminalEmulation];Q(31).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",
938 +haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);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",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);
939 +document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
940 function documentFileSelectHandler(b){haltEvent(b);for(var c=!0,a=0;a<b.dataTransfer.files.length;a++)0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".img")&&0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".iso")&&(c=!1);1==c&&null!=b.dataTransfer&&0<currentView&&100>currentView&&(1==b.dataTransfer.files.length||2==b.dataTransfer.files.length)?(a=c=null,b.dataTransfer.files[0].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[0]),b.dataTransfer.files[0].name.toLowerCase().endsWith(".img")&&
941 (c=b.dataTransfer.files[0]),2==b.dataTransfer.files.length&&(b.dataTransfer.files[1].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[1]),b.dataTransfer.files[1].name.toLowerCase().endsWith(".img")&&(c=b.dataTransfer.files[1])),null==c&&null==a||iderStart3(c,a,1)):null!=b.dataTransfer&&1==b.dataTransfer.files.length&&(c=b.dataTransfer.files[0].name.toLowerCase(),21==currentView&&UploadToStorage(b.dataTransfer.files[0],c))}
942 function connectButtonfunction(){wsstack&&0!=wsstack.socketState?disconnect():meshcentral2credCallback()}function connectButtonfunctionEx(){currentMeshNode=parent.getCurrentNode();connect(currentMeshNode._id,16992,null,null,0);Q("xconnectbutton1").value="verbinding verbreken"}function getCurrentMeshNode(){return currentMeshNode}function setConnectionState(b){QE("xconnectbutton1",b);0==b&&disconnect()}function setFrameHeight(b){}function setAuthCallback(b){meshcentral2credCallback=b}
943 function setUrlVar(b,c){urlvars||(urlvars={});urlvars[b]=c}function cleanup(){c3.value="Start Capture";terminal.m.capture&&delete terminal.m.capture;terminal.Stop();desktop.disconnectCode=0;desktop.Stop()}
944 -function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
945 -function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
946 -function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
947 -function connect(b,c,a,d,g,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,g);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(28,"");QH(39,"");amtversion=amtversionmin=amtFirstPull=
948 -0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(21,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(49,"");
949 -QH(50,LoadingHtml);xxCertificates=null;QH(51,LoadingHtml);QH(24,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(52,LoadingHtml);QH(54,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
950 -!1;QH(53,LoadingHtml);QE(43,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(48,!1),Q(48).checked=!0);QE(44,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
944 +function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
945 +function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
946 +function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
947 +function connect(b,c,a,d,e,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,e);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(29,"");QH(40,"");amtversion=amtversionmin=amtFirstPull=
948 +0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(22,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(50,"");
949 +QH(51,LoadingHtml);xxCertificates=null;QH(52,LoadingHtml);QH(25,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(53,LoadingHtml);QH(55,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
950 +!1;QH(54,LoadingHtml);QE(44,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(49,!1),Q(49).checked=!0);QE(45,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
951 function disconnect(){null!=desktopPollTimer&&(clearInterval(desktopPollTimer),desktopPollTimer=null);fullscreen&&deskToggleFull();iderStop();StopDefenseStatsTimer();dialogclose(0);amtstack&&(amtstack.onProcessChanged=null,amtstack.CancelAllQueries(999),amtstack=null);cleanup();wsstack=null;delete amtstack;onProcessChanged(0,1);go(101);Q("xconnectbutton1").value="Aansluiten";QH(5,"Losgekoppeld");go(100)}
952 function onProcessChanged(b,c){QS(3).width=100*b/c+"%";0==b&&refreshButtons(!0);0==b&&amtstack&&(0<amtversion&&0==(amtFirstPull&64)?(amtFirstPull|=64,PullPowerPolicy(),subscriptionsFilters=null,PullEventSubscriptions(),PullWatchdog(),5<amtversion&&(PullCertificates(),PullRemoteAccess())):0==(amtFirstPull&1)?PullHardware():0==(amtFirstPull&16)?PullEventLog():0==(amtFirstPull&32)&&PullAuditLog())}
953 function checkAmtVersion(b){var c=b.split(".");b=parseInt(c[0]);var a=parseInt(c[1]),c=parseInt(c[2]),c=1E3*a+c,d=0;5>=b||12<=b?d=1:6==b&&2061<=c?d=1:7==b&&1091<=c?d=1:8==b&&1071<=c?d=1:9==b?5>a&&1041<=c?d=1:5061<=c&&(d=1):10==b&&55<=c?d=1:11==b&&(5>a&&25<=c?d=1:6027<=c&&(d=1));return 0==d}
@@ -956,34 +956,35 @@ function processSystemVersion(b,c,a,d){if(200==d||400==d){if(200==d){amtlogicale
956 1==urlvars.sol&&(go(13),connectTerminal())}else errcheck(d,b)}var refreshButtonsState=!0;function refreshButtons(b){if(refreshButtonsState!=b){refreshButtonsState=b;for(var c=0,a=document.getElementsByTagName("input");c<a.length;c++)"refreshbtn"==a[c].name&&(a[c].disabled=!b)}}
957 function PullPowerState(){amtstack&&0==amtstack.GetPendingActions()&&amtsysstate&&amtsysstate.CIM_ServiceAvailableToElement&&amtstack.Enum("CIM_ServiceAvailableToElement",function(b,c,a,d){200==d&&(amtsysstate.CIM_ServiceAvailableToElement.responses=a,9<amtversion&&null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?
958 amtstack.Get("IPS_PowerManagementService",function(a,b,c,d){200==d&&(amtsysstate.IPS_PowerManagementService.response=c.Body,updateSystemStatus())}):updateSystemStatus())})}
959 -function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c=["CIM_ServiceAvailableToElement","*AMT_GeneralSettings","AMT_EthernetPortSettings","*AMT_RedirectionService","CIM_ElementSettingData"];5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");15<amtversion&&1==amtstack.wsman.comm.xtls&&
960 -c.push("*CIM_BootService");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
959 +function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c="CIM_ServiceAvailableToElement *AMT_GeneralSettings AMT_EthernetPortSettings *AMT_RedirectionService CIM_ElementSettingData *AMT_BootCapabilities".split(" ");5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");
960 +15<amtversion&&c.push("*CIM_BootService");2<amtversion&&c.push("*AMT_8021XProfile");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
961 function processSystemStatus(b,c,a,d){if(void 0==a.IPS_ScreenConfigurationService||400==a.IPS_ScreenConfigurationService.status)a.IPS_ScreenConfigurationService=null;if(void 0==a.IPS_KVMRedirectionSettingData||400==a.IPS_KVMRedirectionSettingData.status)a.IPS_KVMRedirectionSettingData=null;if(void 0==a.CIM_KVMRedirectionSAP||400==a.CIM_KVMRedirectionSAP.status)a.CIM_KVMRedirectionSAP=null;if(void 0==a.IPS_OptInService||400==a.IPS_OptInService.status)a.IPS_OptInService=null;void 0!=a.AMT_RedirectionService&&
962 -200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var g in a)null!=a[g]&&a[g].status>d&&(d=a[g].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"Synchroniseer klok",3,syncClockEx,"Intel AMT-klok synchroniseren met deze computer?")}
962 +200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var e in a)null!=a[e]&&a[e].status>d&&(d=a[e].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"Synchroniseer klok",3,syncClockEx,"Intel AMT-klok synchroniseren met deze computer?")}
963 function syncClockEx(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(b,c,a,d){200!=d?messagebox("","Kan tijd niet instellen, status ="+d):0!=a.Body.ReturnValue?messagebox("","Kan tijd niet instellen, fout: "+a.Body.ReturnValueStr):(b=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(a.Body.Ta0,b,b,function(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}))})}var DMTFPowerStates=";;Zet aan;Lichte slaap;Diepe slaap;Power cycle (Soft uit);Uit - Moeilijk;Slaapstand (zacht);Zacht uit;Power cycle (Off-hard);Reset hoofdbus;Diagnostische onderbreking (NMI);Niet toepasbaar;Uit - Zacht sierlijk;Uit - Hard sierlijk;Hoofdbus reset sierlijk;Power cycle (Off - Soft gracieus);Power cycle (Off - Hard gracieus);Diagnostische onderbreking (INIT)".split(";");
964 -function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),g="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Onbekend</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Zet aan"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
965 -3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", Ingeplugd",", Op batterij"][v.PowerSource]);d+=TableEntry("Kracht",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Geen</i>":EscapeHtml(c);d+=TableEntry("Naam & domein",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?d+=
964 +function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Onbekend</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Zet aan"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
965 +3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(29,n),QH(40,n));v.PowerSource&&(n+=[", Ingeplugd",", Op batterij"][v.PowerSource]);d+=TableEntry("Kracht",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Geen</i>":EscapeHtml(c);d+=TableEntry("Naam & domein",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?d+=
966 TableEntry("Systeem-ID",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("Systeem-ID",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" geactiveerd in Admin Control Mode (ACM)",4==l.ProvisioningMode&&(n=" geactiveerd in Client Control Mode (CCM)",b=9));d+=TableEntry("Intel&reg; ME","v"+
967 -getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
968 -q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),e=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),e=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
969 -p&&(g+=", Omleidingspoort");q&&(g+=", Serieel via LAN");n&&(g+=", IDE-omleiding");e&&(g+=", KVM");""==g&&(g=" Geen");d+=TableEntry("Actieve functies",addLinkConditional(g.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,g="Primair beeldscherm",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(g=["Primair beeldscherm","Secundair beeldscherm",
970 -"3e scherm"][n.DefaultScreen]),g='<span title="'+format("De standaard externe weergave is {0}",g.toLowerCase())+'">'+g+"</span>",1==n.Is5900PortEnabled&&(g+=", Poort 5900 ingeschakeld"),1==n.OptInPolicy&&(g+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"seconden opt-in":"tweede opt-in")),g+=","+n.SessionTimeout+" minuut"+(0<n.SessionTimeout?"s":"")+" sessie-time-out",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&
971 -1))&&(g+=", Blanking toegestaan"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Extern bureaublad",addLinkConditional(g,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!e);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(g="Onbekende staat",p=amtsysstate.IPS_OptInService.response.OptInRequired,
972 -0==p&&(g="Niet verplicht"),1==p&&(g="Alleen vereist voor KVM"),4294967295==p&&(g="Altijd vereist"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(g=addLinkConditional(g,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Toestemming van de gebruiker",g));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(g={0:"Onbekend",1:"Andere",2:"Ingeschakeld",3:"Gehandicapt",4:"Afsluiten",5:"Niet toepasbaar",6:"Ingeschakeld maar offline",
973 -7:"In Test",8:"Uitgesteld",9:"Rustig",10:"Beginnend",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(g[32768]="OCR & RPE Disabled",g[32769]="OCR Enabled, RPE Disabled"),n=g[amtsysstate.CIM_BootService.response.EnabledState]?g[amtsysstate.CIM_BootService.response.EnabledState]:"Onbekend",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var g=
974 -amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)if(g[C].SettingData&&1==g[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==g[C].SettingData.ReferenceParameters.ResourceURI)for(p=g[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("Energiebeleid",addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',
975 -xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Datum Tijd",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));g=AddRefreshButton("PullSystemStatus()")+" ";g+=AddButton("Stroomacties ...","showPowerActionDlg()")+" ";g+=AddButton("Staat opslaan ...","saveEntireAmtState()")+" ";d+=TableEnd(g);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
976 -QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" Het wijzigen van netwerkinstellingen kan ertoe leiden dat deze pagina niet meer beschikbaar is.");d=d+"<br><h2>Algemene instellingen</h2>"+TableStart();g="";"<i>Geen</i>"!=c&&(1==v.SharedFQDN&&(g=", gedeeld met OS"),0==v.SharedFQDN&&(g=", verschillend van OS"));d+=TableEntry("Naam & domein",addLinkConditional(c+g,"showEditNameDlg(1)",
967 +getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(28,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(39,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
968 +r=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
969 +p&&(e+=", Omleidingspoort");r&&(e+=", Serieel via LAN");n&&(e+=", IDE-omleiding");g&&(e+=", KVM");""==e&&(e=" Geen");d+=TableEntry("Actieve functies",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Primair beeldscherm",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Primair beeldscherm","Secundair beeldscherm",
970 +"3e scherm"][n.DefaultScreen]),e='<span title="'+format("De standaard externe weergave is {0}",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+=", Poort 5900 ingeschakeld"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"seconden opt-in":"tweede opt-in")),e+=","+n.SessionTimeout+" minuut"+(0<n.SessionTimeout?"s":"")+" sessie-time-out",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&
971 +1))&&(e+=", Blanking toegestaan"),QV(46,n),Q(47).checked=!1):QV(46,!1),d+=TableEntry("Extern bureaublad",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(26,!p||!r);QV(27,xxAccountAdminName);QV(37,!p||!g);QV(38,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="Onbekende staat",p=amtsysstate.IPS_OptInService.response.OptInRequired,
972 +0==p&&(e="Niet verplicht"),1==p&&(e="Alleen vereist voor KVM"),4294967295==p&&(e="Altijd vereist"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Toestemming van de gebruiker",e));null!=amtsysstate.AMT_BootCapabilities.response.PlatformErase&&0<amtsysstate.AMT_BootCapabilities.response.PlatformErase&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"Onbekend",
973 +1:"Andere",2:"Ingeschakeld",3:"Gehandicapt",4:"Afsluiten",5:"Niet toepasbaar",6:"Ingeschakeld maar offline",7:"In Test",8:"Uitgesteld",9:"Rustig",10:"Beginnend",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:"Onbekend",d+=TableEntry("Boot Features",addLinkConditional(n,
974 +"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)if(e[C].SettingData&&1==e[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[C].SettingData.ReferenceParameters.ResourceURI)for(p=e[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,r=0;r<AmtSystemPowerSchemes.length;r++)AmtSystemPowerSchemes[r].SchemeGUID==p&&(d+=TableEntry("Energiebeleid",addLinkConditional(AmtSystemPowerSchemes[r].Description.split(":")[1],
975 +'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Datum Tijd",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("Stroomacties ...","showPowerActionDlg()")+" ";e+=AddButton("Staat opslaan ...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
976 +QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" Het wijzigen van netwerkinstellingen kan ertoe leiden dat deze pagina niet meer beschikbaar is.");d=d+"<br><h2>Algemene instellingen</h2>"+TableStart();e="";"<i>Geen</i>"!=c&&(1==v.SharedFQDN&&(e=", gedeeld met OS"),0==v.SharedFQDN&&(e=", verschillend van OS"));d+=TableEntry("Naam & domein",addLinkConditional(c+e,"showEditNameDlg(1)",
977 xxAccountAdminName));c="Gehandicapt";1==v.DDNSUpdateEnabled?c="Elk ingeschakeld"+v.DDNSPeriodicUpdateInterval+" minuten, TTL is"+v.DDNSTTL+" minuten":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Update door DHCP-server");d+=TableEntry("Dynamische DNS",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==
978 -a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Draadloze interface":"Bekabelde interface")+"</h2>";d+=TableStart();d+=TableEntry("Linkstatus",1==c.LinkIsUp?"Link is up":"Link is verbroken");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);g=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&g.push("S0 / AC"),14==c.LinkPolicy[C]&&g.push("Sx / AC"),16==c.LinkPolicy[C]&&g.push("S0 / DC"),224==c.LinkPolicy[C]&&g.push("Sx / DC");0==g.length&&g.push("");d+=TableEntry("Linkbeleid",
979 -addLinkConditional(0==g.length?"Niet beschikbaar":"Beschikbaar in: "+g.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("Mac adres",c.MACAddress));amtwirelessif==a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("Staat",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("Radio State",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+
980 -", SSID: "+(s?s:"<i>Geen</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"Ingeschakeld":"Gehandicapt","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&
981 -1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"Ingeschakeld":"Gehandicapt","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Reageer op ping",
982 -addLinkConditional(["Gehandicapt","ICMP-reactie","RMCP-reactie","ICMP & RMCP-reactie"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),g=1==c.DHCPEnabled?"Automatisch met DHCP-server":"Statisch IP-adres",1==c.IpSyncEnabled&&(g+=", IP sync with OS"),d+=TableEntry("IPv4-status",addLinkConditional(g,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("IPv4-adres",isIpAddress(c.IPAddress,"Geen"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4-gateway / masker",
983 -c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Geen")));g=c.PrimaryDNS;isIpAddress(g)&&(c.SecondaryDNS&&(g+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4-domeinnaamserver",g));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="Gehandicapt",w,g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)g[C].SettingData&&g[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==g[C].IsCurrent);
984 -1==w&&(p=(g=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Ingeschakelde, automatische en handmatige adressen":"Ingeschakeld, automatische adressen");d+=TableEntry("IPv6-status",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&
985 -(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("IPv6-adres",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6-adres","Geen");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6 standaardrouter",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(g=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(g+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6-domeinnaamserver",g))}}d+=TableEnd()}}1!=urlvars.kvmonly&&
986 -0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
978 +a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Draadloze interface":"Bekabelde interface")+"</h2>";d+=TableStart();d+=TableEntry("Linkstatus",1==c.LinkIsUp?"Link is up":"Link is verbroken");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);e=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&e.push("S0 / AC"),14==c.LinkPolicy[C]&&e.push("Sx / AC"),16==c.LinkPolicy[C]&&e.push("S0 / DC"),224==c.LinkPolicy[C]&&e.push("Sx / DC");0==e.length&&e.push("");d+=TableEntry("Linkbeleid",
979 +addLinkConditional(0==e.length?"Niet beschikbaar":"Beschikbaar in: "+e.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("Mac adres",c.MACAddress));amtwirelessif==a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("Staat",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("Radio State",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+
980 +", SSID: "+(s?s:"<i>Geen</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"Ingeschakeld":"Gehandicapt","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&
981 +1==amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"Ingeschakeld":"Gehandicapt","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Reageer op ping",
982 +addLinkConditional(["Gehandicapt","ICMP-reactie","RMCP-reactie","ICMP & RMCP-reactie"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-FAST/TLS".split(" "),p="Gehandicapt",amtsysstate.AMT_8021XProfile.responses.Body.Enabled&&(p="Ingeschakeld,"+e[amtsysstate.AMT_8021XProfile.responses.Body.AuthenticationProtocol]),d+=TableEntry("802.1x",addLinkConditional(p,
983 +"editNetAuthProfile()",xxAccountAdminName)),e=1==c.DHCPEnabled?"Automatisch met DHCP-server":"Statisch IP-adres",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("IPv4-status",addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("IPv4-adres",isIpAddress(c.IPAddress,"Geen"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4-gateway / masker",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Geen")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),
984 +d+=TableEntry("IPv4-domeinnaamserver",e));if(5<amtversion&&200==amtsysstate.IPS_IPv6PortSettings.status){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="Gehandicapt",w,e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)e[C].SettingData&&e[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[C].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?
985 +"Ingeschakelde, automatische en handmatige adressen":"Ingeschakeld, automatische adressen");d+=TableEntry("IPv6-status",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("IPv6-adres",addLink(ipv6addr,"showIPv6AddrDlg("+
986 +a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6-adres","Geen");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6 standaardrouter",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6-domeinnaamserver",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&
987 +4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
988 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
989 "")+">Available in S0/DC - Powered on & on battery</label><br>";a+="<label><input type=checkbox id=d11p4 value=224 "+(0<=c.LinkPolicy.indexOf(224)?"checked":"")+">Available in Sx/DC - Sleeping & on battery</label><br>";setDialogMode(11,"Linkbeleid",3,showLinkPolicyDlgEx,a,b)}}
990 function showLinkPolicyDlgEx(b,c){var a=Clone(amtsysstate.AMT_EthernetPortSettings.responses[c]);a.DHCPEnabled&&(delete a.IPAddress,delete a.SubnetMask,delete a.DefaultGateway,delete a.PrimaryDNS,delete a.SecondaryDNS);a.LinkPolicy=[];Q("d11p1").checked&&a.LinkPolicy.push(1);Q("d11p2").checked&&a.LinkPolicy.push(14);Q("d11p3").checked&&a.LinkPolicy.push(16);Q("d11p4").checked&&a.LinkPolicy.push(224);amtstack.Put("AMT_EthernetPortSettings",a,showLinkPolicyDlgExDone,0,1,a)}
@@ -992,30 +993,30 @@ function showAuthCsme(){if(!xxdialogMode){var b;b="<div style=margin-top:8px>Int
993 for(var c in amtstack.amtauth.Certificates){var a=amtstack.amtauth.Certificates[c];b+="<tr><td style=width:32px;vertical-align:top><img src=images-commander/cert1.png height=32 width=32 />";b+="<td style=padding-bottom:6px><b>"+EscapeHtml(a.subject.getField("CN").value)+(!0===a.xTrusted?", <span style=color:#080>Vertrouwd</span>":"")+"</b><br />";a.subject.getField("OU")&&(b+=EscapeHtml(a.subject.getField("OU").value)+"<br />");b+=amtstack.amtauth.CertificatesDer[c].length+" bytes,<a style=cursor:pointer;color:blue onclick=downloadAuthCert("+
994 c+")>Downloaden</a>";a.xCrl&&(b+="<br />CRL "+a.xCrl.length+" bytes,<a style=cursor:pointer;color:blue onclick=downloadCertCrl("+c+")>Downloaden</a>")}setDialogMode(11,"Authentic CSME",1,null,b+"</table><div>")}}function downloadCertCrl(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.Certificates[b].xCrl),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".crl")}
995 function downloadAuthCert(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.CertificatesDer[b]),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".cer")}var IntelAmtEntireState,IntelAmtEntireStateCalls;
995 -function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c30.value="amtstate"+b+".json";setDialogMode(19,"Bewaar de volledige Intel&reg; AMT-status",3,saveEntireAmtStateOk)}}
996 -function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(60,"Fetching entire state, please wait...");setDialogMode(1,"Bewaar de volledige Intel&reg; AMT-status",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
997 -function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c30.value))}
996 +function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c55.value="amtstate"+b+".json";setDialogMode(19,"Bewaar de volledige Intel&reg; AMT-status",3,saveEntireAmtStateOk)}}
997 +function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(61,"Fetching entire state, please wait...");setDialogMode(1,"Bewaar de volledige Intel&reg; AMT-status",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
998 +function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c55.value))}
999 function showDesktopSettingsDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_KVMRedirectionSettingData.response,c;c="<div style=text-align:left><div style=height:26px;margin-top:4px><select id=subddisplay style=float:right;width:200px><option value=0>Primair beeldscherm</option><option value=1>Secundair beeldscherm</option>";9<amtversion&&(c+="<option value=2>3e scherm</option>");c+='</select><div style=padding-top:4px>Standaardweergave</div></div><div style=height:26px;margin-top:4px><input id=subsessiontimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>Sessietime-out (minuten)</div></div>';
1000 1==b.OptInPolicy&&(c+='<div style=height:26px;margin-top:4px><input id=suboptintimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>Time-out voor aanmelding (seconden)</div></div>');c+="<div style=height:26px;margin-top:4px><select id=subdlegacy style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>Uitgeschakeld, aanbevolen</option><option value=1>Ingeschakelde, oude KVM-kijkers</option></select><div style=padding-top:4px>Poort 5900</div></div>";
1001 c+="<div style=height:26px;margin-top:4px id=subspassx><input id=subspass type=password autocomplete=off style=float:right;width:200px maxlength=8 onkeyup=showDesktopSettingsDlgUpdate()><div style=padding-top:4px>5900 wachtwoord (8 tekens)</div></div>";9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(c+='<div style=height:26px;margin-top:4px><select id=subsb style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>Gehandicapt</option><option value=1>Ingeschakeld</option></select><div style=padding-top:4px title="Deze functie wordt niet vaak ondersteund">Scherm leegmaken</div></div>');
1002 c+="</div>";setDialogMode(11,"Instellingen voor extern bureaublad",3,showDesktopSettingsDlgOk,c);Q("subddisplay").value=b.DefaultScreen;Q("subsessiontimeout").value=b.SessionTimeout;1==b.OptInPolicy&&(Q("suboptintimeout").value=b.OptInPolicyTimeout);Q("subdlegacy").value=1==b.Is5900PortEnabled?1:0;9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(Q("subsb").value=amtsysstate.IPS_ScreenConfigurationService.response.EnabledState);showDesktopSettingsDlgUpdate()}}
1002 -function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c54",b)}
1003 +function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c106",b)}
1004 function showDesktopSettingsDlgOk(){var b=Clone(amtsysstate.IPS_KVMRedirectionSettingData.response);b.DefaultScreen=Q("subddisplay").value;b.SessionTimeout=Q("subsessiontimeout").value;b.Is5900PortEnabled=1==Q("subdlegacy").value;1==b.OptInPolicy&&(b.OptInPolicyTimeout=Q("suboptintimeout").value);1==b.Is5900PortEnabled&&(b.RFBPassword=Q("subspass").value);amtstack.Put("IPS_KVMRedirectionSettingData",b,showDesktopSettingsDlgOk2);b=Clone(amtsysstate.IPS_ScreenConfigurationService.response);b.EnabledState=
1005 parseInt(Q("subsb").value);amtstack.Put("IPS_ScreenConfigurationService",b,showDesktopSettingsDlgOk3)}function showDesktopSettingsDlgOk2(b,c,a,d){200==d?PullSystemStatus():messagebox("Instellingen voor extern bureaublad",format("Fout {0}, kan geen waarden instellen.",d))}
1006 function showDesktopSettingsDlgOk3(b,c,a,d){200!=d?messagebox("Fout",format("Schermblindering kon niet worden ingesteld, blanco wordt mogelijk niet ondersteund op dit systeem ({0}).",d)):amtstack.Get("IPS_ScreenConfigurationService",function(a,b,c,d){200==d&&(amtsysstate.IPS_ScreenConfigurationService.response=c.Body,updateSystemStatus())},0,1)}
1007 function PullEventLog(b){1==b&&xxdialogMode||(amtFirstPull|=16,amtstack.Enum("AMT_MessageLog",processMessageLog0),amtstack.GetMessageLog(processMessageLog1))}var processMessageLog0responses=null;
1008 function processMessageLog0(b,c,a,d){200==d&&(d&&QV("go6",!0),a&&(processMessageLog0responses=a),b="",c="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>",null!=processMessageLog0responses&&(b=1==processMessageLog0responses[0].IsFrozen?AddButton("Un-freeze Log","FreezeLog(0)"):AddButton("Logboek bevriezen","FreezeLog(1)")),c+=TableEnd('<div style=float:right><input id=eventFilter placeholder="Filter" style=margin:4px onkeyup=eventFilter()>&nbsp;</div><div>&nbsp;'+
1009 AddRefreshButton("PullEventLog(1)")+AddButton("Logboek opschonen","ClearLog()")+AddButton("Opslaan...","SaveEventLog()")+b),QH(17,c+"<br>"))}function SaveEventLog(){xxdialogMode||null==eventmessages||SaveJsonFile("IntelAmtEventlog","events","Intel AMT Event Log",eventmessages)}var eventmessages=null;
1009 -function processMessageLog1(b,c){eventmessages=c;var a,d=0,g;g="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>Bron</b><td class=r1><b>Omschrijving</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);g+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1010 -a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}g+=TableEnd(0==d?"&nbsp;":"");QH(18,g+"<br>");processMessageLog0()}
1011 -function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(60,"Gebeurtenislogboek wissen?"),setDialogMode(1,"Logboek",3,ClearLogEx))}function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("Logboek","Kan niet wissen, fout: "+d):PullEventLog()})}
1012 -function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("Tijd",c.Time.toLocaleString());a+=addHtmlValue("Bron",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("Omschrijving",c.Desc);a+=MoreStart();a+=addHtmlValue("Apparaatadres",c.DeviceAddress);a+=addHtmlValue("Entiteit",c.Entity);a+=addHtmlValue("Entiteitsinstantie",c.EntityInstance);var d="",g;for(g in c.EventData)0<d.length&&(d+=","),d+=c.EventData[g];a+=addHtmlValue("Gegevens",
1010 +function processMessageLog1(b,c){eventmessages=c;var a,d=0,e;e="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>Bron</b><td class=r1><b>Omschrijving</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);e+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1011 +a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}e+=TableEnd(0==d?"&nbsp;":"");QH(18,e+"<br>");processMessageLog0()}
1012 +function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(61,"Gebeurtenislogboek wissen?"),setDialogMode(1,"Logboek",3,ClearLogEx))}function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("Logboek","Kan niet wissen, fout: "+d):PullEventLog()})}
1013 +function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("Tijd",c.Time.toLocaleString());a+=addHtmlValue("Bron",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("Omschrijving",c.Desc);a+=MoreStart();a+=addHtmlValue("Apparaatadres",c.DeviceAddress);a+=addHtmlValue("Entiteit",c.Entity);a+=addHtmlValue("Entiteitsinstantie",c.EntityInstance);var d="",e;for(e in c.EventData)0<d.length&&(d+=","),d+=c.EventData[e];a+=addHtmlValue("Gegevens",
1014 d);a+=addHtmlValue("Offset",c.EventOffset);a+=addHtmlValue("Sensortype",c.EventSensorType);a+=addHtmlValue("Ernst",c.EventSeverity);a+=addHtmlValue("Bron Type",c.EventSourceType);a+=addHtmlValue("Type",c.EventType);a+=addHtmlValue("Sensor nummer",c.SensorNumber);a+=MoreEnd();a+="</div>";messagebox(format("Event # {0} Details",b+1),a)}}
1015 function eventFilter(){var b=Q("eventFilter").value.toLowerCase(),c;for(c in eventmessages)QV("xamtevent"+c,""==b||0<=eventmessages[c].Desc.toLowerCase().indexOf(b)||0<=eventmessages[c].EntityStr.toLowerCase().indexOf(b))}var subscriptionsFilters=null,subscriptionsListeners=null;
1016 function PullEventSubscriptions(){null==subscriptionsFilters&&amtstack.Enum("CIM_FilterCollection",processEventSubscriptions0);amtstack.BatchEnum(null,["CIM_ListenerDestination","CIM_FilterCollectionSubscription"],processEventSubscriptions1)}function processEventSubscriptions0(b,c,a,d){408!=d&&400!=d&&(d&&errcheck(d,b)||(subscriptionsFilters=a))}
1016 -function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Beheer evenementabonnees.<br><br>";for(var g in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[g].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[g],
1017 -b+='<div class=itemBar onclick="showSubscriptionDetails('+g+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>Geen abonnementen gevonden.</i></div><br>");g="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(g+=AddButton("Nieuw abonnement","newSubscriptionButton()"));b+="<br><td class=r1>"+
1018 -TableEnd(g+"</div>");QH(56,b)}}var subscriptionDeliveryModes={2:"Duwen",3:"Duw met ACK",4:"Evenementen",5:"Trekken"};
1017 +function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Beheer evenementabonnees.<br><br>";for(var e in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[e].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[e],
1018 +b+='<div class=itemBar onclick="showSubscriptionDetails('+e+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>Geen abonnementen gevonden.</i></div><br>");e="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(e+=AddButton("Nieuw abonnement","newSubscriptionButton()"));b+="<br><td class=r1>"+
1019 +TableEnd(e+"</div>");QH(57,b)}}var subscriptionDeliveryModes={2:"Duwen",3:"Duw met ACK",4:"Evenementen",5:"Trekken"};
1020 function showSubscriptionDetails(b){if(!xxdialogMode){var c=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[b].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),a=subscriptionsListeners.CIM_ListenerDestination.responses[b],d;d="<div style=text-align:left>"+addHtmlValue("Bestemming",a.Destination);d+=addHtmlValue("Filter",c);d+=addHtmlValue("Bezorgingsmodus",subscriptionDeliveryModes[a.DeliveryMode]);setDialogMode(11,"Abonnement"+(b+1),xxAccountAdminName?
1021 5:1,deleteSubscriptionButton,d+"</div>",b)}}
1022 function deleteSubscriptionButton(b,c){2==b&&amtstack.UnSubscribe("CIM_FilterCollectionSubscription",PullEventSubscriptions,null,1,{Filter:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_FilterCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+subscriptionsListeners.CIM_FilterCollectionSubscription.responses[c].Filter.ReferenceParameters.SelectorSet.Selector.Value+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference>",
@@ -1023,91 +1024,91 @@ Handler:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/a
1024 function newSubscriptionButton(){if(!xxdialogMode&&null!=subscriptionsFilters){var b;b="<div style=height:26px;margin-top:4px><select id=subtype style=float:right;width:260px><option value=Push>Duwen</option><option value=PushWithAck>Duw met ACK</option></select><div style=padding-top:4px>Type</div></div><div style=height:26px;margin-top:4px><select id=subfilter style=float:right;width:260px>";for(var c in subscriptionsFilters)b+='<option value="'+subscriptionsFilters[c].InstanceID+'">'+subscriptionsFilters[c].CollectionName.substring(13)+
1025 "</option>";b+="</select><div style=padding-top:4px>Filter</div></div>";b+='<div style=height:26px;margin-top:4px><input id=suburl style=float:right;width:260px maxlength=253 onkeyup=newSubscriptionUpdate() value="http://"><div style=padding-top:4px>URL</div></div>';b+="<div style=height:26px;margin-top:4px><select id=subauth style=float:right;width:260px onchange=newSubscriptionUpdate()><option value=0>Geen</option><option value=1>Verteren</option></select><div style=padding-top:4px>Verificatie</div></div>";
1026 b+="<div style=height:26px;margin-top:4px id=subxuser><input id=subuser style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>Gebruikersnaam</div></div>";b+="<div style=height:26px;margin-top:4px id=subxpass><input id=subpass style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>Wachtwoord</div></div>";b+="<div style=height:26px;margin-top:4px><input id=subargs style=float:right;width:260px maxlength=128><div style=padding-top:4px>Argumenten</div></div>";
1026 -setDialogMode(11,"Event-abonnement toevoegen",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c54",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1027 +setDialogMode(11,"Event-abonnement toevoegen",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c106",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1028 function newSubscriptionButtonOk(){var b=0==Q("subuser").value.length?void 0:Q("subuser").value,c=0==Q("subpass").value.length?void 0:Q("subpass").value;amtstack.Subscribe("CIM_FilterCollection",Q("subtype").value,Q("suburl").value,newSubscriptionButtonOk2,null,1,{InstanceID:Q("subfilter").value},0<Q("subargs").value.length?Q("subargs").value:null,b,c)}function newSubscriptionButtonOk2(b,c,a,d){200==d&&PullEventSubscriptions()}
1029 function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AMT_AuditLog",processAuditLog0))}var auditLog=null,auditLogEnabledStates="Onbekend;Andere;Ingeschakeld;Gehandicapt;Afsluiten;Niet toepasbaar;Ingeschakeld maar offline;In Test;Uitgesteld;Rustig;Beginnend".split(";");
1029 -function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Gehandicapt":"Ingeschakeld",c&2&&(b+=", Op slot"),c&4&&(b+=", Bijna vol"),c&8&&(b+=", Vol"),c&16&&(b+=", Geen sleutel"),c="<h1>Instellingen auditlogboek</h1>"+TableStart(),c+=TableEntry("Staat",b),c+=TableEntry("Opslag",a[0].CurrentNumberOfRecords+" record (s),"+a[0].PercentageFree+"% vrij"),c+=TableEntry("Overschrijf beleid",2==a[0].OverwritePolicy?"Verpakt wanneer vol":"Overschrijft nooit"),c+=TableEnd(),QH(49,
1030 -c),amtstack.GetAuditLog(processAuditLog1))}
1031 -function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filter" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Opslaan...","SaveAuditLog()")+AddButton("Logboek opschonen","ClearAuditLog()"))+"<br>");if(0==c.length)d="Geen controlelogboekgebeurtenissen gevonden.";else{var g=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Tijd</b><td class=r1 style=width:260px><b>Initiator</b><td class=r1><b>Action</b>";
1032 -for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;g++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1033 -minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==g?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Intel AMT-auditlogboek",auditLog)}
1034 -function ClearAuditLog(b){QH(60,"Auditlogboek wissen?");setDialogMode(1,"Auditlogboek",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1030 +function processAuditLog0(b,c,a,d){200==d&&a&&0<a.length&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Gehandicapt":"Ingeschakeld",c&2&&(b+=", Op slot"),c&4&&(b+=", Bijna vol"),c&8&&(b+=", Vol"),c&16&&(b+=", Geen sleutel"),c="<h1>Instellingen auditlogboek</h1>"+TableStart(),c+=TableEntry("Staat",b),c+=TableEntry("Opslag",a[0].CurrentNumberOfRecords+" record (s),"+a[0].PercentageFree+"% vrij"),c+=TableEntry("Overschrijf beleid",2==a[0].OverwritePolicy?"Verpakt wanneer vol":"Overschrijft nooit"),c+=TableEnd(),
1031 +QH(50,c),amtstack.GetAuditLog(processAuditLog1))}
1032 +function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filter" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Opslaan...","SaveAuditLog()")+AddButton("Logboek opschonen","ClearAuditLog()"))+"<br>");if(0==c.length)d="Geen controlelogboekgebeurtenissen gevonden.";else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Tijd</b><td class=r1 style=width:260px><b>Initiator</b><td class=r1><b>Action</b>";
1033 +for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1034 +minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(51,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Intel AMT-auditlogboek",auditLog)}
1035 +function ClearAuditLog(b){QH(61,"Auditlogboek wissen?");setDialogMode(1,"Auditlogboek",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1036 function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("Auditlogboek","Fout: "+d)}
1036 -function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Tijd",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Initiator",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Adres",a.NetAddress));d+=addHtmlValue("Toepassing",a.AuditApp);d+=addHtmlValue("Evenement",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Uitgebreide gegevens",a.ExStr);else if(0<a.Ex.length){var g="";for(c in a.Ex)0<g.length&&(g+=","),g+=a.Ex.charCodeAt(c);""!=g&&
1037 -(d+=addHtmlValue("Gegevenswaarden",g));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("Gegevensreeks",a.Ex.substring(2)))}messagebox("Auditgebeurtenis #"+(b+1)+" Details",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1037 +function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Tijd",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Initiator",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Adres",a.NetAddress));d+=addHtmlValue("Toepassing",a.AuditApp);d+=addHtmlValue("Evenement",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Uitgebreide gegevens",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=","),e+=a.Ex.charCodeAt(c);""!=e&&
1038 +(d+=addHtmlValue("Gegevenswaarden",e));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("Gegevensreeks",a.Ex.substring(2)))}messagebox("Auditgebeurtenis #"+(b+1)+" Details",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1039 function PullCertificates(){amtstack.BatchEnum(null,["AMT_PublicKeyCertificate","AMT_PublicPrivateKeyPair","AMT_TLSSettingData","AMT_TLSCredentialContext"],processCerts1)}
1039 -function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var g in xxCertificates)xxCertificates[g].InstanceID==b&&(xxTlsCurrentCert=
1040 -g)}for(g in xxCertificates)xxCertificates[g].TrustedRootCertficate=1==xxCertificates[g].TrustedRootCertficate,xxCertificates[g].X509Certificate=window.atob(xxCertificates[g].X509Certificate),xxCertificates[g].XIssuer=parseCertName(xxCertificates[g].Issuer),xxCertificates[g].XSubject=parseCertName(xxCertificates[g].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1040 +function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var e in xxCertificates)xxCertificates[e].InstanceID==b&&(xxTlsCurrentCert=
1041 +e)}for(e in xxCertificates)xxCertificates[e].TrustedRootCertficate=1==xxCertificates[e].TrustedRootCertficate,xxCertificates[e].X509Certificate=window.atob(xxCertificates[e].X509Certificate),xxCertificates[e].XIssuer=parseCertName(xxCertificates[e].Issuer),xxCertificates[e].XSubject=parseCertName(xxCertificates[e].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1042 function parseCertName(b){var c={},a=b.split(","),d;for(d in a)b=a[d].indexOf("="),c[a[d].substring(0,b)]=a[d].substring(b+1);return c}
1043 function getTlsSecurityState(b){if(0==xxTlsSettings[b].Enabled)return"Gehandicapt";var c=(1==xxTlsSettings[b].MutualAuthentication?"Wederzijdse verificatie TLS":"TLS voor serververificatie")+(1==xxTlsSettings[b].AcceptNonSecureConnections?" en niet-TLS":"");1==xxTlsSettings[b].MutualAuthentication&&xxTlsSettings[b].TrustedCN&&(b=MakeToArray(xxTlsSettings[b].TrustedCN),0<b.length&&(c+=", "+(1<b.length?"Trusted names":"Trusted name")+": "+b.join(", ")+"."));return c}
1044 function updateCertificates(){if(null!=xxCertificates){var b="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,c=1-b,a=TableStart(),a=a+TableEntry("Externe TLS-beveiliging",addLinkConditional(getTlsSecurityState(c),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEntry("Lokale TLS-beveiliging",addLinkConditional(getTlsSecurityState(b),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEnd(),a=a+("<br>"+TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Beheer Intel&reg; AMT-certificaten voor deze computer.<br><br>");
1045 if(0==xxCertificates.length&&0==xxCertPrivateKeys.length)a+="<div style=padding-left:15px><br><i>Geen certificaten gevonden.</i></div><br>";else{for(var d in xxCertificates)b="",xxCertificates[d].TrustedRootCertficate&&(b=", Trusted Root"),xxCertificates[d].XPrivateKey&&(b=", Prive sleutel"),d==xxTlsCurrentCert&&(b+=", TLS cert"),a+="<div class=itemBar onclick=showCertDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(xxCertificates[d].XSubject.CN)+"</b><i>"+b+"</i></div></div>";for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||
1045 -(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>Niet-toegewezen priv\u00e9sleutelpaar #"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("Certificaat toevoegen ...","addCertButton()")+AddButton("Certificaat afgeven ...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(51,a)}}
1046 +(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>Niet-toegewezen priv\u00e9sleutelpaar #"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("Certificaat toevoegen ...","addCertButton()")+AddButton("Certificaat afgeven ...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(52,a)}}
1047 function showKeyPairDetails(b){setDialogMode(11,"Sleutelpaar #"+b,5,function(c){2==c&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertPrivateKeys[b].InstanceID},PullCertificates,0,1)},"Dit is een openbaar / priv\u00e9-certificaatsleutelpaar dat niet bij certificaten hoort. Deze invoer moet tijdelijk zijn.")}var xxCertSubjectNames={CN:"Gemeenschappelijke naam",O:"Organisatie",OU:"Organisatie-eenheid",S:"Staat / provincie",ST:"Staat / provincie",L:"Plaats",C:"Land",SN:"Achternaam",GN:"Gegeven naam"};
1048 function showCertDetails(b){if(!xxdialogMode){var c=xxCertificates[b],a;a="<br>"+addHtmlValue("Certificaat",c.X509Certificate.length+" bytes,<a style=cursor:pointer;color:blue onclick=downloadCert("+b+")>Downloaden</a>");a+=addHtmlValue("Vertrouwde root",c.TrustedRootCertficate?"Ja":"Nee");0==c.TrustedRootCertficate&&c.XPrivateKey&&(a+=addHtmlValue("Prive sleutel","Cadeau"));a+='<br><div style="border-bottom:1px solid gray"><i>Certificaatonderwerp</i></div><br>';for(var d in c.XSubject)c.XSubject[d]&&
1049 (a+=addHtmlValue(xxCertSubjectNames[d]?xxCertSubjectNames[d]:d,EscapeHtml(c.XSubject[d])));a+='<br><div style="border-bottom:1px solid gray"><i>Certificaat van uitgever</i></div><br>';for(d in c.XIssuer)c.XIssuer[d]&&(a+=addHtmlValue(xxCertSubjectNames[d]?xxCertSubjectNames[d]:d,EscapeHtml(c.XIssuer[d])));setDialogMode(11,"Certificaat -"+EscapeHtml(c.XSubject.CN),5,function(a){2==a&&(xxCertificates[b].XPrivateKey&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertificates[b].XPrivateKey.InstanceID},
1050 function(){},0,1),amtstack.Delete("AMT_PublicKeyCertificate",xxCertificates[b],certificateRemoved,0,1))},a)}}function downloadCert(b){saveAs(data2blob(xxCertificates[b].X509Certificate),xxCertificates[b].XSubject.CN+".cer")}function cert_FileSelectHandler(b){haltEvent(b);1==b.dataTransfer.files.length&&(b.dataTransfer.files[0].name.toLowerCase().endsWith(".p12")?issueCertButton(b.dataTransfer.files):addCertButton(b.dataTransfer.files))}var xxDragDropCertFiles=null;
1051 function addCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen onchange=addCertButtonUpdate() type=file style=float:right;width:260px accept=".cer,.pem">',xxDragDropCertFiles&&(b='<input style=float:right;width:260px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b="<div style=height:10px></div>"+("<div style=height:26px;margin-top:4px>"+b+"<div style=padding-top:4px>Certificaatbestand</div></div>")+"<div style=height:26px;margin-top:4px><select id=certtype style=float:right;width:260px><option value=1>Trusted Root Certificate</option><option value=0>Kettingcertificaat</option></select><div style=padding-top:4px>Certificaattype</div></div>",
1051 -setDialogMode(11,"Certificaat toevoegen",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c54",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1052 +setDialogMode(11,"Certificaat toevoegen",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c106",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1053 function addCertButtonOk2(b){b=b.target.result;var c=b.indexOf("-----BEGIN CERTIFICATE-----");0<=c?(b=b.substring(c+27),c=b.indexOf("-----END CERTIFICATE-----"),0<=c&&(b=b.substring(0,c)),b=b.replace(/\r\n/g,"")):b=btoa(b);1==getSelectElement("certtype").value?amtstack.AMT_PublicKeyManagementService_AddTrustedRootCertificate(b,certificateAdded):amtstack.AMT_PublicKeyManagementService_AddCertificate(b,certificateAdded)}
1054 function issueCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen type=file style=float:right;width:230px onchange=issueCertButtonUpdate() accept=".p12">',xxDragDropCertFiles&&(b='<input style=float:right;width:230px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b=""+("<div styleheight:26px;margin-top:14px>"+b+"<div style=padding-top:4px>Certificate file</div></div>")+"<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certopenpass type=password autocomplete=off style=float:right;width:230px><div style=padding-top:4px>Certificaat wachtwoord</div></div>",
1055 b+='<br><div style="border-bottom:1px solid gray"><i>Intel&reg; AMT-certificaat</i></div>',b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certcn style=float:right;width:230px><div style=padding-top:4px>Gemeenschappelijke naam</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certo style=float:right;width:230px><div style=padding-top:4px>Organisatie</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certst style=float:right;width:230px><div style=padding-top:4px>Staat / provincie</div></div>",
1056 b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certc style=float:right;width:230px><div style=padding-top:4px>Land</div></div>",b+='<div>Certificaatgebruik</div><ul 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">',b+="<li><label><input type=checkbox id=d11_cu4 checked>TLS-server (HTTPS)</label></li>",b+="<li><label><input type=checkbox id=d11_cu5>TLS-client (HTTPS)</label></li>",
1057 b+="<li><label><input type=checkbox id=d11_cu6>E-mailbeveiliging</label></li>",b+="<li><label><input type=checkbox id=d11_cu7>Code ondertekening</label></li>",b+="<li><label><input type=checkbox id=d11_cu8>Tijdstempel</label></li>",b+="</ul>",setDialogMode(11,"Certificaat afgeven",3,issueCertButtonOk,b),issueCertButtonUpdate())}
1057 -function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c54",c)}
1058 +function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c106",c)}
1059 function issueCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length?(b=new FileReader,b.onload=issueCertButtonOk2,b.readAsBinaryString(c[0])):issueCertButtonOk3(null)}function issueCertButtonOk2(b){0==amtcert_loadP12File(b.target.result,Q("certopenpass").value,issueCertButtonOk3)&&messagebox("Certificaat afgeven","Kan certificaat niet decoderen / decoderen.")}
1060 function issueCertButtonOk3(b,c,a){xxCaPrivateKey=b;xxCaSubjectAttributes=c;amtstack.AMT_PublicKeyManagementService_GenerateKeyPair(0,2048,GenerateKeyPairResponse)}
1061 function GenerateKeyPairResponse(b,c,a,d){200!=d?messagebox("Certificaat afgeven","Kan sleutelpaar niet genereren. Toestand: "+d):0!=a.Body.ReturnValue?messagebox("Certificaat afgeven","Kan sleutelpaar niet genereren,"+a.Body.ReturnValueStr):amtstack.Enum("AMT_PublicPrivateKeyPair",GenerateKeyPairResponse2,a.Body.KeyPair.ReferenceParameters.SelectorSet.Selector.Value)}
1061 -function GenerateKeyPairResponse2(b,c,a,d,g){if(200!=d)messagebox("Certificaat afgeven","Kan sleutelpaar niet genereren. Toestand: "+d);else{b=null;for(var v in a)a[v].InstanceID==g&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};g={CN:"Niet-vertrouwd basiscertificaat"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in g={},xxCaSubjectAttributes)g[xxCaSubjectAttributes[v].shortName]=
1062 -xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,g,v);null==v?messagebox("Certificaat afgeven","Kan certificaat niet ondertekenen."):(v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,
1062 +function GenerateKeyPairResponse2(b,c,a,d,e){if(200!=d)messagebox("Certificaat afgeven","Kan sleutelpaar niet genereren. Toestand: "+d);else{b=null;for(var v in a)a[v].InstanceID==e&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};e={CN:"Niet-vertrouwd basiscertificaat"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in e={},xxCaSubjectAttributes)e[xxCaSubjectAttributes[v].shortName]=
1063 +xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,e,v);null==v?messagebox("Certificaat afgeven","Kan certificaat niet ondertekenen."):(v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,
1064 v.length-25),GenerateKeyPairResponse4))}}function GenerateKeyPairResponse4(b,c,a,d){200!=d?messagebox("Certificaat afgeven","Kan sleutelpaar niet genereren. Toestand: "+d):PullCertificates()}function certificateAdded(b,c,a,d){200!=d||0!=a.Body.ReturnValue?messagebox("Certificaat toevoegen","Kan certificaat, fout niet toevoegen"+(200!=d?d:a.Body.ReturnValueStr)):PullCertificates()}
1065 function certificateRemoved(b,c,a,d){200!=d?messagebox("Certificaat verwijderen","Kan certificaat, fout niet verwijderen"+d):PullCertificates()}function getInputElement(b){var c=document.getElementsByTagName("input");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}function getSelectElement(b){var c=document.getElementsByTagName("select");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}
1065 -function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>Geen certificaat, TLS uitgeschakeld</option>";for(var c in xxCertificates)0!=xxCertificates[c].TrustedRootCertficate||!xxCertificates[c].XPrivateKey||null!=xxTlsCurrentCert&&xxTlsCurrentCert!=c||(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>Certificaat</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1066 +function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>Geen certificaat, TLS uitgeschakeld</option>";for(var c in xxCertificates)0==xxCertificates[c].TrustedRootCertficate&&xxCertificates[c].XPrivateKey&&(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>Certificaat</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1067 b+="<option value=2>Mutual-auth TLS only</option><option value=3>Mutual-auth, non-TLS allowed</option>";b+='</select><div style=padding-top:4px>Security</div></div><div style=height:26px id=d11rcn title="Door komma\'s gescheiden lijst met algemene namen van certificaten die op afstand verbinding kunnen maken."><input id=d11_rcn style=float:right;width:260px onkeyup=showSetTlsSecurityDlgUpdate() placeholder="naam1, naam2"><div style=padding-top:4px>Externe CN\'s</div></div>';setDialogMode(11,"TLS-instellingen",
1068 3,showSetTlsSecurityDlgOk,b);if(0==xxTLSCredentialContext.length||0==xxTlsSettings[0].Enabled||0==xxTlsSettings[1].Enabled)getSelectElement("tlscert").value=-1;else for(c in b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value,xxCertificates)xxCertificates[c].InstanceID==b&&(getSelectElement("tlscert").value=c);c=1-("Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1);getSelectElement("tlsremote").value=(1==xxTlsSettings[c].MutualAuthentication?
1068 -2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c54",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1069 +2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c106",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1070 function showSetTlsSecurityDlgOk(){var b=getSelectElement("tlscert").value,c=getSelectElement("tlsremote").value,a=Clone(xxTlsSettings);setTlsSecurityPendingCalls=0;setTlsSecurityDeleteCredentialContext=null;if(-1!=b){if(0<xxTLSCredentialContext.length){var d=Clone(xxTLSCredentialContext[0]);d.ElementInContext.ReferenceParameters.SelectorSet.Selector.Value=xxCertificates[b].InstanceID;amtstack.Put("AMT_TLSCredentialContext",d,setTlsSecurityResponse,0,1)}else amtstack.Create("AMT_TLSCredentialContext",
1071 {ElementInContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[b].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",ElementProvidingContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_TLSProtocolEndpointCollection")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters>'},
1071 -setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,g=1-d;a[g].Enabled=-1!=b;a[g].MutualAuthentication=2<=c;a[g].AcceptNonSecureConnections=1==c%2;a[g].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1072 +setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,e=1-d;a[e].Enabled=-1!=b;a[e].MutualAuthentication=2<=c;a[e].AcceptNonSecureConnections=1==c%2;a[e].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1073 b,c,d){200!=d?messagebox("","Kan tijd niet instellen, status ="+d):0!=c.Body.ReturnValue?messagebox("","Kan tijd niet instellen, fout: "+c.Body.ReturnValueStr):(a=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(c.Body.Ta0,a,a,function(){setTlsSecurityResponse()}))}));setTlsSecurityPendingCalls+=2;amtstack.Put("AMT_TLSSettingData",a[0],setTlsSecurityResponse,0,1,a[0]);amtstack.Put("AMT_TLSSettingData",a[1],setTlsSecurityResponse,0,1,a[1]);statusbox("TLS-instellingen",
1074 "Nieuwe beveiligingsinstellingen toepassen ...")}function splitDomains(b){b=b.split(",");if(0!=b.length){for(var c in b)if(b[c]=b[c].trim(),0<=b[c].indexOf(" ")||0==b[c].length)return;if(!(4<b.length))return b}}
1075 function setTlsSecurityResponse(b,c,a,d){if(b){if(200!=d){messagebox("","Kan TLS-beveiliging niet instellen, status ="+d);return}if(a.Body.ReturnValueStr&&!methodcheck(a))return}0==--setTlsSecurityPendingCalls&&amtstack.AMT_SetupAndConfigurationService_CommitChanges(null,setTlsSecurityResponse2)}
1076 function setTlsSecurityResponse2(b,c,a,d){200!=d?messagebox("","Kan TLS-beveiliging niet instellen, status ="+d):0!=a.Body.ReturnValue?messagebox("","Kan TLS-beveiliging niet instellen, fout: "+a.Body.ReturnValueStr):setTimeout(setTlsSecurityResponse3,2E3)}
1077 function setTlsSecurityResponse3(){null!=setTlsSecurityDeleteCredentialContext&&amtstack.Delete("AMT_TLSCredentialContext",setTlsSecurityDeleteCredentialContext,function(){});PullCertificates();setDialogMode();amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}var xxWatchdog=null;
1078 function PullWatchdog(){amtstack.BatchEnum(null,["*AMT_AgentPresenceCapabilities","AMT_AgentPresenceWatchdog","AMT_AgentPresenceWatchdogAction","AMT_StateTransitionCondition","CIM_ConcreteDependency"],PullWatchdogResponse)}
1078 -function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var g in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[g],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1079 +function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var e in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[e],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1080 "@Name","PolicyConditionName").Value,d=getItem(xxWatchdog.AMT_AgentPresenceWatchdog.responses,"DeviceID",d),a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,"PolicyConditionName",a),d.transitions||(d.transitions=[]),d.transitions.push(a)),c&&"AMT_StateTransitionCondition"==c.Value&&(a=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyConditionName").Value,b=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyActionName").Value,a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,
1081 "PolicyConditionName",a),b=getItem(xxWatchdog.AMT_AgentPresenceWatchdogAction.responses,"PolicyActionName",b),a.actions||(a.actions=[]),a.actions.push(b));updateWatchdog();QV("go19",!0)}}var watchdogEnabledStates="Onbekend;Andere;Ingeschakeld;Gehandicapt;Afsluiten;Niet toepasbaar;Ingeschakeld maar offline;In Test;Uitgesteld;Rustig;Beginnend".split(";"),watchdogMonitoredEntity="Onbekend;Andere;Besturingssysteem;Besturingssysteem opstartproces;Besturingssysteem afsluiten;Firmware-opstartproces;BIOS-opstartproces;Toepassing;Serviceprocessor".split(";");
1082 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("Maximale waakhonden",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" waakhonden");b+=TableEntry("Maximaal totaal aantal acties",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" acties");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Beheer Intel&reg; AMT-agentwaakhonden.<br><br>";if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||
1083 0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>Geen waakhond voor aanwezigheid van agenten gevonden.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="Actie toevoegen ..." onclick=addWatchdogAction(event,'+
1083 -c+")>";a.transitions&&(b+='<input type=button style=float:right value="Acties verwijderen ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",g;for(g in a.transitions){var v=a.transitions[g];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : Te loggen gebeurtenis")}""!=d&&(b+="<div style=padding:12px>"+
1084 -d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Watchdog toevoegen ...","AddWatchdog()"));b+="<br>";QH(54,b)}}function getWatchdogTransitionStr(b){if(31==b)return"Elke staat";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1084 +c+")>";a.transitions&&(b+='<input type=button style=float:right value="Acties verwijderen ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : Te loggen gebeurtenis")}""!=d&&(b+="<div style=padding:12px>"+
1085 +d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Watchdog toevoegen ...","AddWatchdog()"));b+="<br>";QH(55,b)}}function getWatchdogTransitionStr(b){if(31==b)return"Elke staat";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1086 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("Omschrijving",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("Gecontroleerde entiteit",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("Huidige toestand",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("Ingeschakelde staat",watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("Opstartinterval",
1087 b.StartupInterval+" seconde (n)");c+=addHtmlValue("Time-outinterval",b.TimeoutInterval+" seconde (n)");setDialogMode(11,format("Waakhond {0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
1088 function AddWatchdog(){var b;b="<div style=height:26px;margin-top:4px><input id=wgname style=float:right;width:240px maxlength=16 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Naam</div></div>"+('<div style=height:26px;margin-top:4px><input id=wgguid style=float:right;width:240px maxlength=36 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px title="Genereer willekeurige DeviceID">'+addLink("Apparaat ID","GenerateWatchdogGuid()")+"</div></div>");b+="<div style=height:26px;margin-top:4px><input id=wgstart style=float:right;width:240px maxlength=8 placeholder=3600 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Opstarten (seconden)</div></div>";
1089 b+="<div style=height:26px;margin-top:4px><input id=wgtimeout style=float:right;width:240px maxlength=8 placeholder=60 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Time-out (seconden)</div></div>";setDialogMode(11,"Watchdog toevoegen",3,AddWatchdogOk,b);AddWatchdogUpdate()}function GenerateWatchdogGuid(){var b,c="";for(b=0;16>b;b++)c+=String.fromCharCode(random(255));Q("wgguid").value=guidToStr(rstr2hex(c));AddWatchdogUpdate()}
1089 -function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var g=a.charCodeAt(d);45!=g&&(48<=g&&57>=g||97<=g&&102>=g?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1090 +function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var e=a.charCodeAt(d);45!=e&&(48<=e&&57>=e||97<=e&&102>=e?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1091 function AddWatchdogOk(){var b=Q("wgtimeout").value,c=Q("wgstart").value;""==b&&(b=60);""==c&&(c=3600);b={CreationClassName:0,DeviceID:btoa(hex2rstr(guidToStr(Q("wgguid").value.replace(/-/g,"")).replace(/-/g,""))),StartupInterval:c,SystemCreationClassName:0,SystemName:0,TimeoutInterval:b,MonitoredEntityDescription:Q("wgname").value};amtstack.Create("AMT_AgentPresenceWatchdog",b,AddWatchdogOk2)}
1092 function AddWatchdogOk2(b,c,a,d){200!=d?messagebox("Waakhond","Kan watchdog niet toevoegen, fout #"+d):PullWatchdog()}
1093 function addWatchdogAction(b,c){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d;d="<table><td style=width:180px>Van<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsa"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";d+="<td>Naar<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsb"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";setDialogMode(11,"Watchdog-actie toevoegen",
1094 3,addWatchdogActionOk,d+"</table><br>Actie ondernemen<br><input id=wgsevent type=checkbox checked onclick=addWatchdogActionUpdate()>Schrijf naar gebeurtenislogboek<br />",a);addWatchdogActionUpdate();haltEvent(b)}function addWatchdogActionUpdate(){var b=0,c=0,a;for(a in amtstack.WatchdogCurrentStates)1==Q("wgsa"+a).checked&&(b+=parseInt(a)),1==Q("wgsb"+a).checked&&(c+=parseInt(a));QE("dlgOkButton",0<b&&0<c&&1==Q("wgsevent").checked)}
1094 -function addWatchdogActionOk(b,c){var a=0,d=0,g;for(g in amtstack.WatchdogCurrentStates)1==Q("wgsa"+g).checked&&(a+=parseInt(g)),1==Q("wgsb"+g).checked&&(d+=parseInt(g));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Watchdog-actie","Kan watchdog-actie niet toevoegen, fout #"+d):PullWatchdog()}
1095 +function addWatchdogActionOk(b,c){var a=0,d=0,e;for(e in amtstack.WatchdogCurrentStates)1==Q("wgsa"+e).checked&&(a+=parseInt(e)),1==Q("wgsb"+e).checked&&(d+=parseInt(e));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Watchdog-actie","Kan watchdog-actie niet toevoegen, fout #"+d):PullWatchdog()}
1096 function deleteWatchdogActions(b,c){setDialogMode(11,"Verwijder Watchdog-acties",3,deleteWatchdogActionsOk,"Alle acties voor deze waakhond verwijderen?",xxWatchdog.AMT_AgentPresenceWatchdog.responses[c]);haltEvent(b)}function deleteWatchdogActionsOk(b,c){amtstack.AMT_AgentPresenceWatchdog_DeleteAllActions(deleteWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
1097 function deleteWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Watchdog-actie","Kan watchdog-acties niet verwijderen, fout #"+d):PullWatchdog()}
1098 var xxSystemDefense=null,xxSystemDefenceLinkedPolicy={},xxUpdatingDefenseStats=!1,xxFilterStatistics=[{},{}],xxFilterStatisticsTimer=null,xxFilterStatisticsTimerActive=!1,xxSystemDefenceFilterEthernetTypes={2048:"Alle IP-pakketten",2054:"Alle ARP-pakketten"},xxSystemDefenceFilterIPTypes={4:"IPv4",6:"IPv6"},xxSystemDefenceFilterDesc={0:"Sta toe, graaf",1:"Laten vallen, tellen",2:"Tarieflimiet",3:"Toestaan",4:"Laten vallen"},xxSystemDefenceFilters={HdrProtocolID:1,HdrDestAddress:2,HdrDestMask:2,HdrSrcAddress:2,
1099 HdrSrcMask:2,HdrSrcPortStart:1,HdrSrcPortEnd:1,HdrDestPortStart:1,HdrDestPortEnd:1,HdrSrcAddressEndOfRange:2,"HdrDestAddressEndOfRange ":2,TCPFlagsOn:3,TCPFlagsOff:3};function PullSystemDefense(){amtFirstPull|=4;amtstack.BatchEnum(null,["AMT_SystemDefensePolicy","AMT_NetworkPortSystemDefensePolicy","AMT_Hdr8021Filter","AMT_IPHeadersFilter","AMT_NetworkFilter"],PullSystemDefenseResponse)}
1100 function PullSystemDefenseResponse(b,c,a,d){200==d&&(xxSystemDefense=a,updateSystemDefense(),QV("go18",!0),urlvars.norefresh&&UpdateDefenseStats())}
1101 function updateSystemDefense(){if(null!=xxSystemDefense){var b="";xxSystemDefenceLinkedPolicy={};for(var c in xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses){var a=xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses[c],d=+getItem(a.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value.substring(27),a=getItem(xxSystemDefense.AMT_SystemDefensePolicy.responses,"InstanceID",a.Dependent.ReferenceParameters.SelectorSet.Selector.Value);xxSystemDefenceLinkedPolicy[d]=
1101 -a}b+=TableStart();c="<i>Geen</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("Standaard bekabeld beleid",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],g;for(g in a)d=a[g],d=1==d?d+" pakket":d+" pakketten",b+=TableEntry((0==c?"Bedrade":"Draadloze")+g,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>Beheer Intel&reg; AMT-systeembeschermingsbeleid.<br><br>";if(0==xxSystemDefense.AMT_SystemDefensePolicy.responses.length)b+=
1102 +a}b+=TableStart();c="<i>Geen</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("Standaard bekabeld beleid",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],e;for(e in a)d=a[e],d=1==d?d+" pakket":d+" pakketten",b+=TableEntry((0==c?"Bedrade":"Draadloze")+e,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>Beheer Intel&reg; AMT-systeembeschermingsbeleid.<br><br>";if(0==xxSystemDefense.AMT_SystemDefensePolicy.responses.length)b+=
1103 "<div style=padding-left:15px><i>Geen systeembeschermingsbeleid gevonden.</i></div><br>";else for(c in xxSystemDefense.AMT_SystemDefensePolicy.responses)a=xxSystemDefense.AMT_SystemDefensePolicy.responses[c],d="",a.FilterCreationHandles&&(a.FilterCreationHandles=MakeToArray(a.FilterCreationHandles),d=a.FilterCreationHandles.length,d=", "+d+" filter"+(1<d?"s":"")),b+="<div class=itemBar onclick=showPolicyDetails("+c+")><div style=padding-top:3px><b>"+EscapeHtml(a.PolicyName)+"</b>"+d+"</div></div>";
1104 b+="<tr><td class=r1 style=padding-left:15px><br>Beheer Intel&reg; AMT-systeembeschermingsfilters.<br><br>";if(0==xxSystemDefense.AMT_Hdr8021Filter.responses.length&&0==xxSystemDefense.AMT_IPHeadersFilter.responses.length)b+="<div style=padding-left:15px><i>Geen systeembeschermingsfilters gevonden.</i></div><br>";else{for(c in xxSystemDefense.AMT_Hdr8021Filter.responses)a=xxSystemDefense.AMT_Hdr8021Filter.responses[c],(d=xxSystemDefenceFilterEthernetTypes[a.HdrProtocolID8021])||(d="Geheel Ethernet-protocol"+
1105 a.HdrProtocolID8021),d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile],2==a.FilterProfile&&(d+=" Bij"+a.FilterProfileData+" pakket / sec"),1==a.ActionEventOnMatch&&(d+=", Evenement op wedstrijd"),b+="<div class=itemBar onclick=showFilterDetails(0,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>";for(c in xxSystemDefense.AMT_IPHeadersFilter.responses){a=xxSystemDefense.AMT_IPHeadersFilter.responses[c];(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||
1105 -(d="Geheel Ethernet-protocol"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" Bij"+a.FilterProfileData+" pakket / sec");1==a.ActionEventOnMatch&&(d+=", Evenement op wedstrijd");var v=0;for(g in xxSystemDefenceFilters)a[g]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+
1106 -TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("Filter toevoegen ...","AddDefenseFilter()")+AddButton("Beleid toevoegen ...","AddDefensePolicy()"));QH(53,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}
1106 +(d="Geheel Ethernet-protocol"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" Bij"+a.FilterProfileData+" pakket / sec");1==a.ActionEventOnMatch&&(d+=", Evenement op wedstrijd");var v=0;for(e in xxSystemDefenceFilters)a[e]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+
1107 +TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("Filter toevoegen ...","AddDefenseFilter()")+AddButton("Beleid toevoegen ...","AddDefensePolicy()"));QH(54,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}
1108 function StopDefenseStatsTimer(){null!=xxFilterStatisticsTimer&&(clearInterval(xxFilterStatisticsTimer),xxFilterStatisticsTimer=null);xxFilterStatisticsTimerActive=!1}
1109 function UpdateDefenseStats(b){if(b||1!=xxFilterStatisticsTimerActive)xxFilterStatisticsTimerActive=!0,b=b?b:0,xxSystemDefenceLinkedPolicy[b]?amtstack.AMT_SystemDefensePolicy_UpdateStatistics('<a:Address></a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+b+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",!1,UpdateDefenseStats2,b,0,{InstanceID:xxSystemDefenceLinkedPolicy[b].InstanceID}):
1109 -(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,g){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,g):StopDefenseStatsTimer()}
1110 -function UpdateDefenseStats3(b,c,a,d,g){b=0;if(200==d){xxFilterStatistics[g]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[g][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1110 +(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,e){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,e):StopDefenseStatsTimer()}
1111 +function UpdateDefenseStats3(b,c,a,d,e){b=0;if(200==d){xxFilterStatistics[e]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[e][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1112 function changeDefaultPolicy(b){if(!xxdialogMode){var c;c="<div style=height:26px;margin-top:4px><select id=policySelection style=float:right;width:266px><option value=-1>Geen";for(var a in xxSystemDefense.AMT_SystemDefensePolicy.responses)c+="<option value="+a+(xxSystemDefenceLinkedPolicy[b]&&xxSystemDefense.AMT_SystemDefensePolicy.responses[a].InstanceID==xxSystemDefenceLinkedPolicy[b].InstanceID?" selected":"")+">"+xxSystemDefense.AMT_SystemDefensePolicy.responses[a].PolicyName;setDialogMode(11,
1113 "Standaard systeembeschermingsbeleid",3,changeDefaultPolicyOk,c+"</select><div style=padding-top:4px>Standaardbeleid</div></div>",b)}}
1114 function changeDefaultPolicyOk(b,c){var a=Q("policySelection").value,d=xxSystemDefenceLinkedPolicy[c];d&&amtstack.Delete("AMT_NetworkPortSystemDefensePolicy",'<w:SelectorSet><w:Selector Name="Antecedent"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">CIM_EthernetPort</w:Selector><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+c+
@@ -1120,115 +1121,135 @@ function AddDefenseFilter(){if(!xxdialogMode){var b;b="<div style=height:26px;ma
1121 b+="<div style=height:26px;margin-top:4px id=filterdatadiv><input id=filterdata style=float:right;width:260px maxlength=8 onkeyup=AddDefenseFilterUpdate()><div style=padding-top:4px>Pakketten / seconde</div></div>";b+="<div style=height:26px;margin-top:4px><select id=filteraction style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=false>Niets doen<option value=1>Evenement op wedstrijd</select><div style=padding-top:4px>Logboek</div></div>";setDialogMode(11,"Voeg System Defense Filter toe",
1122 3,AddDefenseFilterOk,b);AddDefenseFilterUpdate()}}
1123 function AddDefenseFilterOk(){if(1>=Q("filtertype").value){var b=0==Q("filtertype").value?2048:2054,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrProtocolID8021:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value};2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_Hdr8021Filter",c,AddDefenseFilterOk2)}else{var b=2==Q("filtertype").value?
1123 -4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var g=a[d].indexOf("="),v=a[d].substring(0,g),g=a[d].substring(g+1),n=xxSystemDefenceFilters[v];n||(v="Hdr"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(g=g.split("."),4==g.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(g[0]),
1124 -parseInt(g[1]),parseInt(g[2]),parseInt(g[3]))))):c[v]=g)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c54",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1124 +4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var e=a[d].indexOf("="),v=a[d].substring(0,e),e=a[d].substring(e+1),n=xxSystemDefenceFilters[v];n||(v="Hdr"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(e=e.split("."),4==e.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(e[0]),
1125 +parseInt(e[1]),parseInt(e[2]),parseInt(e[3]))))):c[v]=e)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c106",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1126 function AddDefenseFilterOk2(b,c,a,d){200!=d?messagebox("Voeg System Defense Filter toe","Kan filter niet toevoegen, fout #"+d):PullSystemDefense()}
1126 -function showFilterDetails(b,c){if(!xxdialogMode){var a,d,g,v;0==b?(v="AMT_Hdr8021Filter",g="Ethernet-verkeer",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="Geheel Ethernet-protocol"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",g="IP-verkeer",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="Alle IP-protocol"+d.HdrIPVersion));var n;n=""+addHtmlValue("Naam",EscapeHtml(d.Name));n+=addHtmlValue("Type",g);n+=
1127 -addHtmlValue("Overeenkomend verkeer",a);n+=addHtmlValue("Richting",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,g=d[l],b=xxSystemDefenceFilters[l],2==b&&4==g.length&&(g=hex2rstr(g),g=g.charCodeAt(0)+"."+g.charCodeAt(1)+"."+g.charCodeAt(2)+"."+g.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("Filter"+a,g));n+=addHtmlValue("Evenement op wedstrijd",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,"Ethernet-filter #"+
1127 +function showFilterDetails(b,c){if(!xxdialogMode){var a,d,e,v;0==b?(v="AMT_Hdr8021Filter",e="Ethernet-verkeer",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="Geheel Ethernet-protocol"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",e="IP-verkeer",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="Alle IP-protocol"+d.HdrIPVersion));var n;n=""+addHtmlValue("Naam",EscapeHtml(d.Name));n+=addHtmlValue("Type",e);n+=
1128 +addHtmlValue("Overeenkomend verkeer",a);n+=addHtmlValue("Richting",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,e=d[l],b=xxSystemDefenceFilters[l],2==b&&4==e.length&&(e=hex2rstr(e),e=e.charCodeAt(0)+"."+e.charCodeAt(1)+"."+e.charCodeAt(2)+"."+e.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("Filter"+a,e));n+=addHtmlValue("Evenement op wedstrijd",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,"Ethernet-filter #"+
1129 d.InstanceID,5,showFilterDetailsOk,n,[v,d])}}function showFilterDetailsOk(b,c){2==b&&amtstack.Delete(c[0],c[1],deleteDefenseFilter)}function deleteDefenseFilter(b,c,a,d){200!=d?messagebox("Filter verwijderen","Kan filter niet verwijderen, zorg ervoor dat het niet in gebruik is."):PullSystemDefense()}var xxAddDefensePolicyFilters;
1130 function AddDefensePolicy(){if(!xxdialogMode){xxAddDefensePolicyFilters=[];var b;b='<div style=height:26px;margin-top:4px><input id=policyname title="<policy name>:<policy precedence number>" style=float:right;width:260px maxlength=16 onkeyup=AddDefensePolicyUpdate()><div style=padding-top:4px>Naam</div></div><div style=height:26px;margin-top:4px><select id=policytx title="Standaardactie die moet worden ondernomen voor uitgaand verkeer" style=float:right;width:133px><option value=0>Allow<option value=1>Laten vallen<option value=2>Sta toe, graaf<option value=3>Laten vallen, tellen<option value=4>Toestaan, tellen, evenement<option value=5>Laten vallen, tellen, evenement</select><select id=policyrx style=float:right;width:133px title="Standaardactie voor inkomend verkeer"><option value=0>Toestaan<option value=1>Laten vallen<option value=2>Sta toe, graaf<option value=3>Laten vallen, tellen<option value=4>Toestaan, tellen, evenement<option value=5>Laten vallen, tellen, evenement</select><div style=padding-top:4px>Standaard TX / RX</div></div>';b+=
1131 "<div id=policyFilters></div>";if(0<xxSystemDefense.AMT_Hdr8021Filter.responses.length||0<xxSystemDefense.AMT_IPHeadersFilter.responses.length){b+="<div style=height:26px;margin-top:4px><div style=float:right><select id=xfilter style=width:186px>";for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];b+="<option value="+a.InstanceID+">"+a.Name}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],
1132 b+="<option value="+a.InstanceID+">"+a.Name;b+="</select><input id=addFilterButton type=button value=Add style=width:80px onclick=addFilterButton()></div><div style=padding-top:4px>Filter toevoegen</div></div>"}setDialogMode(11,"Voeg systeembeschermingsbeleid toe",3,AddDefensePolicyOk,b);AddDefensePolicyUpdate()}}function addFilterButton(){0<=xxAddDefensePolicyFilters.indexOf(Q("xfilter").value)||(xxAddDefensePolicyFilters.push(Q("xfilter").value),AddDefensePolicyUpdate())}
1133 function removeFilterButton(b){xxAddDefensePolicyFilters.splice(b,1);AddDefensePolicyUpdate()}
1133 -function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c54",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>Dit beleid bevat geen filters.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Verwijderen","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+GetFilterById(xxAddDefensePolicyFilters[c]).Name+
1134 +function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c106",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>Dit beleid bevat geen filters.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Verwijderen","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+GetFilterById(xxAddDefensePolicyFilters[c]).Name+
1135 "</b></div></div>";QH("policyFilters",b)}}function GetFilterById(b){for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];if(a.InstanceID==b)return a}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)if(a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],a.InstanceID==b)return a}
1136 function AddDefensePolicyOk(){var b=Q("policytx").value,c=Q("policyrx").value,a=0,d=Q("policyname").value.split(":");2==d.length&&(a=parseInt(d[1]));b={"InstanceID ":0,PolicyName:d[0],PolicyPrecedence:a,TxDefaultCount:1<b,TxDefaultDrop:1==b%2,TxDefaultMatchEvent:3<b,RxDefaultCount:1<c,RxDefaultDrop:1==c%2,RxDefaultMatchEvent:3<c};0<xxAddDefensePolicyFilters.length&&(b.FilterCreationHandles=xxAddDefensePolicyFilters);amtstack.Create("AMT_SystemDefensePolicy",b,AddDefensePolicyOk2)}
1137 function AddDefensePolicyOk2(b,c,a,d){200!=d?messagebox("Voeg systeembeschermingsbeleid toe","Kan beleid niet toevoegen, fout #"+d):PullSystemDefense()}
1138 function showPolicyDetails(b){if(!xxdialogMode){var c=xxSystemDefense.AMT_SystemDefensePolicy.responses[b],a;a=""+addHtmlValue("Naam",EscapeHtml(c.PolicyName));0!=c.PolicyPrecedence&&(a+=addHtmlValue("Voorrang",c.PolicyPrecedence));var d=1==c.TxDefaultDrop?"Laten vallen":"Toestaan";1==c.TxDefaultCount&&(d+=", Graaf");1==c.TxDefaultMatchEvent&&(d+=", Evenement");a+=addHtmlValue("Standaard TX-actie",d);d=1==c.RxDefaultDrop?"Drop":"Allow";1==c.RxDefaultCount&&(d+=", Count");1==c.RxDefaultMatchEvent&&
1139 (d+=", Event");a+=addHtmlValue("Standaard RX-actie",d);if(c.FilterCreationHandles)for(b in c.FilterCreationHandles)a+=addHtmlValue("Filter #"+(+b+1),GetFilterById(c.FilterCreationHandles[b]).Name);setDialogMode(11,format("Het beleid #",c.InstanceID.substring(20)),5,showPolicyDetailsOk,a,c)}}function showPolicyDetailsOk(b,c){2==b&&amtstack.Delete("AMT_SystemDefensePolicy",c,deleteDefensePolicy)}
1139 -function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("Beleid verwijderen","Kan het beleid niet verwijderen, zorg ervoor dat het niet in gebruik is."):PullSystemDefense()}var xxWireless;function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService *AMT_BootCapabilities".split(" "),processWireless)}function wifiRefresh(){xxdialogMode||PullWireless()}
1140 -var xxWifiState={3:"Gehandicapt",32768:"Ingeschakeld in S0",32769:"Ingeschakeld in S0, Sx / AC"},xxRadioState={2:"Aan, verbonden",3:"Uit",6:"Aan, niet verbonden"},xxWifiAuthenticationMethod={1:"Andere",2:"Open",3:"Gedeelde sleutel",4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE"},xxWifiEncryptionMethod={1:"Andere",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"Geen"};function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1141 -function showWirelessInfo(){if(xxWireless){var b,c,a="",d,g;if(xxWireless.CIM_WiFiPortCapabilities.response){g="<br><h2>Draadloze profielen</h2>"+TableStart2();g+="<tr><td class=r2 style=padding-left:15px><br>Draadloze profielen die Intel&reg; AMT zal gebruiken voor netwerkconnectiviteit.<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b&&(g+="<div class=itemBar onclick=showWifiDetails("+
1142 -c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+" &nbsp; ",xxAccountAdminName&&(g+=AddButton2("Verwijderen",'wifiRemoveButton("'+c+'")')),g+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>",a++);0==a&&(g+="<i>Geen draadloze profielen aanwezig</i><br>");g+="<br><td class=r2>";g=xxAccountAdminName?g+TableEnd(AddButton("Nieuw profiel","showWifiNewProfile()")):g+
1143 -TableEnd("");QH(20,g+"<br>")}}}function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"Draadloze status",3,wifiStateDlg,b)}}
1140 +function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("Beleid verwijderen","Kan het beleid niet verwijderen, zorg ervoor dat het niet in gebruik is."):PullSystemDefense()}var xxWireless;function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService CIM_IEEE8021xSettings".split(" "),processWireless)}function wifiRefresh(){xxdialogMode||PullWireless()}
1141 +var xxWifiState={3:"Gehandicapt",32768:"Ingeschakeld in S0",32769:"Ingeschakeld in S0, Sx / AC"},xxRadioState={2:"Aan, verbonden",3:"Uit",6:"Aan, niet verbonden"},xxWifiAuthenticationMethod={1:"Andere",2:"Open",3:"Gedeelde sleutel",4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE IEEE 802.1x",32769:"WPA3 OWE IEEE 802.1x"},xxWifiEncryptionMethod={1:"Andere",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"Geen"};
1142 +function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1143 +function showWirelessInfo(){if(xxWireless){var b,c,a="",d,e;if(xxWireless.CIM_WiFiPortCapabilities.response){e="<br><h2>Draadloze profielen</h2>"+TableStart2();e+="<tr><td class=r2 style=padding-left:15px><br>Draadloze profielen die Intel&reg; AMT zal gebruiken voor netwerkconnectiviteit.<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)if(d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b){var v="",n=null,l="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");
1144 +if(xxWireless.CIM_IEEE8021xSettings.responses)for(var p in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[p].ElementName==d.ElementName&&(n=xxWireless.CIM_IEEE8021xSettings.responses[p]);n&&(v=", "+l[n.AuthenticationProtocol]);e+="<div class=itemBar onclick=showWifiDetails("+c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+v+" &nbsp; ";xxAccountAdminName&&
1145 +(e+=AddButton2("Verwijderen",'wifiRemoveButton("'+c+'")'));e+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>";a++}0==a&&(e+="<i>Geen draadloze profielen aanwezig</i><br>");e+="<br><td class=r2>";e=xxAccountAdminName?e+TableEnd(AddButton("Nieuw profiel","showWifiNewProfile()")):e+TableEnd("");QH(20,e+"<br>")}}}
1146 +function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"Draadloze status",3,wifiStateDlg,b)}}
1147 function wifiStateDlg(){amtstack.CIM_WiFiPort_RequestStateChange(document.querySelector("input[name=d11]:checked").value,null,function(){amtstack.Get("CIM_WiFiPort",function(b,c,a,d){200==d&&(xxWireless.CIM_WiFiPort.response=a.Body,showWirelessInfo())})})}
1148 function showWifiSyncDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d11 id=wl0 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">Gehandicapt</label><br>");b+="<label><input type=radio name=d11 id=wl0 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">Ingeschakeld</label><br>";setDialogMode(11,"Local Profile Sync",3,showWifiSyncDlgEx,b)}}
1146 -function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,g){200==g&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1149 +function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,e){200==e&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1150 function showUefiWifiCoExDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d12 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Disabled</label><br>");b+="<label><input type=radio name=d12 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Enabled</label><br>";setDialogMode(11,"UEFI Wifi CoEx Profile Sharing",3,UefiWifiCoExDlg,b)}}
1148 -function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,g){200==g&&PullWireless()})}
1149 -function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("Profielnaam",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",b.SSID);c+=addHtmlValue("Verificatie",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("Versleuteling",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("Prioriteit",b.Priority);messagebox("Draadloos profiel",c+"</div>")}}
1150 -function wifiRemoveButton(b){xxdialogMode||(QH(60,format('Draadloos profiel "{0}" verwijderen?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"Draadloos profiel",3,function(){removeWifiButtonEx(b)}))}function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1151 -function removeWifiEntryResponse(b,c,a,d,g){methodcheck(a)||amtstack.Enum("CIM_WiFiEndpointSettings",function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c,showWirelessInfo())})}
1152 -function showWifiNewProfile(){if(!xxdialogMode){var b="";for(i=1;256>i;i++){var c=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==i&&(c=0);c&&(b+="<option value="+i+">"+i)}QH("c24",b);QV("c26",13<amtversion);c25.value=6;c27.value=4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"Voeg draadloos profiel toe",3,function(){addWifiProfile()});updateWifiDialog()}}
1153 -function addWifiProfile(){amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},{__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c27.value,SSID:c23.value,Priority:c24.value,
1154 -PSKPassPhrase:c28.value},null,null,null,removeWifiEntryResponse)}
1155 -function updateWifiDialog(){var b=!0,c=c25.value,a=c27.value;QV(66,4>c);QV(65,3<c);QV(64,3<c);QV(67,4>c);4>c&&(3==a||4==a)&&(c27.value=2);3<c&&(2==a||5==a)&&(c27.value=3);32768==c&&(c27.value=4);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);QE("c54",1==b&&0<c22.value.length&&0<c23.value.length&&7<c28.value.length&&
1156 -c28.value==c29.value)}function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1151 +function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,e){200==e&&PullWireless()})}
1152 +function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("Profielnaam",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",EscapeHtml(b.SSID));c+=addHtmlValue("Verificatie",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("Versleuteling",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("Prioriteit",b.Priority);var a=null,d="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");
1153 +if(xxWireless.CIM_IEEE8021xSettings.responses)for(var e in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[e].ElementName==b.ElementName&&(a=xxWireless.CIM_IEEE8021xSettings.responses[e]);a&&(c=c+'<div style="width:100%;border-bottom:1px solid #000;margin-bottom:5px;margin-top:5px">802.11x</div>'+addHtmlValue("Verificatie",d[a.AuthenticationProtocol]),a.Domain&&(c+=addHtmlValue("Domain",EscapeHtml(a.Domain))),a.Username&&(c+=addHtmlValue("Gebruikersnaam",EscapeHtml(a.Username))));
1154 +c+="</div>";messagebox("Draadloos profiel",c)}}function wifiRemoveButton(b){xxdialogMode||(QH(61,format('Draadloos profiel "{0}" verwijderen?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"Draadloos profiel",3,function(){removeWifiButtonEx(b)}))}function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1155 +function removeWifiEntryResponse(b,c,a,d,e){methodcheck(a)||amtstack.BatchEnum("",["CIM_WiFiEndpointSettings","CIM_IEEE8021xSettings"],function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c.CIM_WiFiEndpointSettings.responses,xxWireless.CIM_IEEE8021xSettings.responses=c.CIM_IEEE8021xSettings.responses,showWirelessInfo())})}
1156 +function showWifiNewProfile(){if(!xxdialogMode){for(var b="",c=1;256>c;c++){var a=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==c&&(a=0);a&&(b+="<option value="+c+">"+c)}QH("c24",b);var b="<option value=-1>"+EscapeHtml("Geen")+"</option>",a="<option value=-1>"+EscapeHtml("Geen")+"</option>",c;for(c in xxCertificates)xxCertificates[c].TrustedRootCertficate?a+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+
1157 +"</option>":xxCertificates[c].XPrivateKey&&(b+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+"</option>");QH("c50",b);QH("c52",a);c="<option value=32769>WPA3 OWE IEEE 802.1x</option><option value=32768>WPA3 SAE IEEE 802.1x</option>";c+="<option value=7>WPA2 IEEE 802.1x</option>";c+="<option value=5>WPA IEEE 802.1x</option>";c+="<option value=6>WPA2 PSK</option>";c+="<option value=4>WPA PSK</option>";QH("c25",c);c25.value=6;c26.value=
1158 +4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"Voeg draadloos profiel toe",3,function(){addWifiProfile()});updateWifiDialog()}}
1159 +function addWifiProfile(){var b,c,a,d={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c26.value,SSID:c23.value,Priority:c24.value};if(4==c25.value||6==c25.value)d.PSKPassPhrase=c28.value;if(5==c25.value||7==c25.value||32768==c25.value||
1160 +32769==c25.value)b={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_IEEE8021xSettings"),ElementName:"8021x-"+c22.value,InstanceID:"8021x-"+c22.value,ActiveInS0:1==Q("c54").value,AuthenticationProtocol:Q("c32").value},""!=Q("c44").value&&(b.RoamingIdentity=Q("c44").value),""!=Q("c34").value&&(b.ServerCertificateName=Q("c34").value,b.ServerCertificateNameComparison=Q("c36").value),
1161 +""!=Q("c40").value&&(b.Username=Q("c40").value),""!=Q("c42").value&&(b.Password=Q("c42").value),""!=Q("c38").value&&(b.Domain=Q("c38").value),3<Q("c32").value&&(b.ProtectedAccessCredential=Q("c46").value,b.PACPassword=Q("c48").value),0<=parseInt(Q("c50").value)&&(c='<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">'+
1162 +xxCertificates[parseInt(Q("c50").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>"),0<=parseInt(Q("c52").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">'+
1163 +xxCertificates[parseInt(Q("c52").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>");console.log("wifiepsettinginput",JSON.stringify(d,null,2));console.log("netAuthProfile",JSON.stringify(b,null,2));console.log("netAuthSettingsClientCert",c);console.log("netAuthSettingsServerCaCert",a);amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},d,b,c,a,removeWifiEntryResponse)}
1164 +function updateWifiDialog(){var b=!0,c=c25.value,a=c26.value;4>c&&(3==a||4==a)&&(c26.value=2);3<c&&(2==a||5==a)&&(c26.value=3);if(32768==c||32769==c)c26.value=4;QV("c27",4==c||6==c);QV("c30",5==c||7==c||32768==c||32769==c);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);0==c22.value.length&&0==c23.value.length&&(b=!1);4!=c&&6!=c||
1165 +!(8>c28.value.length||63<c28.value.length||c28.value!=c29.value)||(b=!1);QE("c106",b);updateNetAuthDialog()}function updateNetAuth2Dialog(){QV("c35",""!=Q("c33").value);QV("c45",3<Q("c32").value);QV("c47",3<Q("c32").value)}
1166 +function editNetAuthProfile(){if(!xxdialogMode){var b="<option value=-1>"+EscapeHtml("Geen")+"</option>",c="<option value=-1>"+EscapeHtml("Geen")+"</option>",a;for(a in xxCertificates)xxCertificates[a].TrustedRootCertficate?c+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>":xxCertificates[a].XPrivateKey&&(b+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>");QH("c98",b);QH("c100",c);b=amtsysstate.AMT_8021XProfile.responses.Body;
1167 +Q("c78").value=b.Enabled?1:0;Q("c102").value=b.ActiveInS0?1:0;Q("c104").value=b.PxeTimeout;if(b.Enabled){Q("c80").value=b.AuthenticationProtocol;Q("c92").value=b.RoamingIdentity?b.RoamingIdentity:"";Q("c82").value=b.ServerCertificateName?b.ServerCertificateName:"";Q("c84").value=b.ServerCertificateNameComparison?b.ServerCertificateNameComparison:0;Q("c88").value=b.Username?b.Username:
1168 +"";Q("c90").value=b.Password?b.Password:"";Q("c86").value=b.Domain?b.Domain:"";Q("c94").value=b.ProtectedAccessCredential?b.ProtectedAccessCredential:"";Q("c96").value=b.PACPassword?b.PACPassword:"";var d=c=-1;b.ServerCertificateIssuer&&(c=b.ServerCertificateIssuer.ReferenceParameters.SelectorSet.Selector.Value);b.ClientCertificate&&(d=b.ClientCertificate.ReferenceParameters.SelectorSet.Selector.Value);for(a in xxCertificates)xxCertificates[a].InstanceID==
1169 +c&&(Q("c100").value=a),xxCertificates[a].InstanceID==d&&(Q("c98").value=a)}setDialogMode(27,"802.1x Profile",3,function(){setNetAuthProfile()});updateNetAuthDialog()}}
1170 +function updateNetAuthDialog(){QV("c79",1==Q("c78").value);QV("c81",1==Q("c78").value);QV("c83",1==Q("c78").value&&""!=Q("c82").value);QV("c85",1==Q("c78").value);QV("c87",1==Q("c78").value);QV("c89",1==Q("c78").value);QV("c91",1==Q("c78").value);QV("c93",1==Q("c78").value&&
1171 +3<Q("c80").value);QV("c95",1==Q("c78").value&&3<Q("c80").value);QV("c97",1==Q("c78").value);QV("c99",1==Q("c78").value);QV("c101",1==Q("c78").value);QV("c103",1==Q("c78").value)}
1172 +function setNetAuthProfile(){var b=Clone(amtsysstate.AMT_8021XProfile.responses.Body);b.Enabled=1==Q("c78").value;b.Enabled&&(b.ActiveInS0=1==Q("c102").value,b.AuthenticationProtocol=Q("c80").value,""!=Q("c92").value?b.RoamingIdentity=Q("c92").value:delete b.RoamingIdentity,""!=Q("c82").value?(b.ServerCertificateName=Q("c82").value,b.ServerCertificateNameComparison=Q("c84").value):
1173 +(delete b.ServerCertificateName,delete b.ServerCertificateNameComparison),""!=Q("c88").value?b.Username=Q("c88").value:delete b.Username,""!=Q("c90").value?b.Password=Q("c90").value:delete b.Password,""!=Q("c86").value?b.Domain=Q("c86").value:delete b.Domain,3<Q("c80").value?(b.ProtectedAccessCredential=Q("c94").value,b.PACPassword=Q("c96").value):(delete b.ProtectedAccessCredential,delete b.PACPassword),
1174 +0<=parseInt(Q("c98").value)?b.ClientCertificate="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c98").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ClientCertificate,0<=parseInt(Q("c100").value)?b.ServerCertificateIssuer="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+
1175 +amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c100").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ServerCertificateIssuer,b.PxeTimeout=Q("c104").value);amtstack.Put("AMT_8021XProfile",b,setNetAuthProfileEx)}
1176 +function setNetAuthProfileEx(b,c,a,d){200==d?(amtsysstate.AMT_8021XProfile.responses.Body=amtsysstate.AMT_8021XProfile.response=a.Body,updateSystemStatus()):a.Header.WsmanError?messagebox("802.1x Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("802.1x Error","Error, Status = "+d)}
1177 +function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1178 var DMTFCPUStatus="Onbekend;Ingeschakeld;Uitgeschakeld door gebruiker;Uitgeschakeld door BIOS (POST-fout);Inactief;Andere".split(";"),DMTFMemType="Onbekend;Andere;DRAM;Synchrone DRAM;DRAM in cache opslaan;EDO;EDRAM;VRAM;SRAM;RAM;rom;Flash;EEPROM;FEPROM;EPROM;CDRAM;3DRAM;SDRAM;SGRAM;RDRAM;DDR;DDR-2;BRAM;FB-DIMM;DDR3;FBD2;DDR4;LPDDR;LPDDR2;LPDDR3;LPDDR4".split(";"),DMTFMemFormFactor=";Andere;Onbekend;SIMM;slokje;Chip;DIP;ZIP;Eigen kaart;DIMM;TSOP;Rij van chips;RIMM;SODIMM;SRIMM;FB-DIM".split(";"),DMTFProcFamilly=
1179 {191:"Intel&reg; Core &trade; 2 Duo-processor",192:"Intel&reg; Core &trade; 2 Solo-processor",193:"Intel&reg; Core &trade; 2 Extreme-processor",194:"Intel&reg; Core &trade; 2 Quad-processor",195:"Intel&reg; Core &trade; 2 Extreme mobiele processor",196:"Intel&reg; Core &trade; 2 Duo mobiele processor",197:"Intel&reg; Core &trade; 2 Solo mobiele processor",198:"Intel&reg; Core &trade; i7-processor",199:"Dual-core Intel&reg; Celeron&reg;-processor"},HardwareInventory;
1159 -function processHardware(b,c,a,d){if(200==d){var g;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("Opslaan...","SaveHardwareLog()")+" Hardware-informatie wordt verzameld tijdens het opstarten van het systeem.");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>Platform</h2>"+FullTable({Computermodel:c.Model,
1180 +function processHardware(b,c,a,d){if(200==d){var e;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("Opslaan...","SaveHardwareLog()")+" Hardware-informatie wordt verzameld tijdens het opstarten van het systeem.");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>Platform</h2>"+FullTable({Computermodel:c.Model,
1181 Fabrikant:c.Manufacturer,Versie:c.Version,Serienummer:c.SerialNumber,"Systeem-ID":guidToStr(a.CIM_SystemPackaging.responses[0].PlatformGUID).toLowerCase()},"");b+="<br><h2>Plint</h2>";b+=FullTable({Fabrikant:d.Manufacturer,Productnaam:d.Model,Versie:d.Version,Serienummer:d.SerialNumber,Itemtag:d.Tag,"Vervangbaar?":1==d.CanBeFRUed?"Yes":"No"},"");b+="<br><h2>BIOS</h2>";b+=FullTable({Verkoper:a.CIM_BIOSElement.response.Manufacturer,Versie:v,"Datum van publicatie":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",
1161 -{timeZone:"UTC"})},"");b+="<br>";for(g in a.CIM_Processor.responses)c=a.CIM_Processor.responses[g],d=a.CIM_Chip.responses[g],b+="<h2>Processor "+(parseInt(g)+1)+"</h2>",b+=FullTable({Fabrikant:trademarks(d.Manufacturer),Familie:DMTFProcFamilly[c.Family],Versie:trademarks(d.Version),"Maximale socketsnelheid":c.MaxClockSpeed+" MHz",Toestand:DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(g in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[g],b+="<h2>Geheugenmodule "+(+g+1)+"</h2>",b+=
1162 -FullTable({"Bank Label":c.BankLabel,Fabrikant:c.Manufacturer,Serienummer:c.SerialNumber,Grootte:parseInt(c.Capacity/1048576)+" MB",Vormfactor:DMTFMemFormFactor[c.FormFactor],Type:DMTFMemType[c.MemoryType],Itemtag:c.Tag,"Onderdeel nummer":c.PartNumber},"");b+="<br>";for(g in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[g],d=a.CIM_PhysicalPackage.responses[+g+1],b+="<h2>Opslag media "+(parseInt(g)+1)+"</h2>",b+=FullTable({Model:d.Model,Serienummer:""==d.SerialNumber?"Unknown":
1163 -d.SerialNumber,Grootte:parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" MB"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(g in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[g].PackageType&&(c=a.CIM_PhysicalPackage.responses[g]);null!=c&&(b+="<h2>Battery</h2>",g=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,Fabrikant:c.Manufacturer,"Manufacture date":g,Serienummer:c.SerialNumber,Type:"Andere;Onbekend;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],
1182 +{timeZone:"UTC"})},"");b+="<br>";for(e in a.CIM_Processor.responses)c=a.CIM_Processor.responses[e],d=a.CIM_Chip.responses[e],b+="<h2>Processor "+(parseInt(e)+1)+"</h2>",b+=FullTable({Fabrikant:trademarks(d.Manufacturer),Familie:DMTFProcFamilly[c.Family],Versie:trademarks(d.Version),"Maximale socketsnelheid":c.MaxClockSpeed+" MHz",Toestand:DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(e in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[e],b+="<h2>Geheugenmodule "+(+e+1)+"</h2>",b+=
1183 +FullTable({"Bank Label":c.BankLabel,Fabrikant:c.Manufacturer,Serienummer:c.SerialNumber,Grootte:parseInt(c.Capacity/1048576)+" MB",Vormfactor:DMTFMemFormFactor[c.FormFactor],Type:DMTFMemType[c.MemoryType],Itemtag:c.Tag,"Onderdeel nummer":c.PartNumber},"");b+="<br>";for(e in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[e],d=a.CIM_PhysicalPackage.responses[+e+1],b+="<h2>Opslag media "+(parseInt(e)+1)+"</h2>",b+=FullTable({Model:d.Model,Serienummer:""==d.SerialNumber?"Unknown":
1184 +d.SerialNumber,Grootte:parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" MB"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(e in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[e].PackageType&&(c=a.CIM_PhysicalPackage.responses[e]);null!=c&&(b+="<h2>Battery</h2>",e=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,Fabrikant:c.Manufacturer,"Manufacture date":e,Serienummer:c.SerialNumber,Type:"Andere;Onbekend;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],
1185 "Design capacity":a.CIM_Battery.response.DesignCapacity+" mWatt-hours","Design voltage":a.CIM_Battery.response.DesignVoltage+" mVolts"},c.OtherIdentifyingInfo&&(a["Other Info"]=c.OtherIdentifyingInfo),b+=FullTable(a,""))}b+="<br>";QH(16,b);updateSystemStatus()}}function SaveHardwareLog(){!xxdialogMode&&HardwareInventory&&SaveJsonFile("IntelAmtHardware","hardware","Informatie over Intel AMT-hardware",HardwareInventory)}var AmtSystemPowerSchemes=null;
1186 function PullPowerPolicy(){amtstack.Enum("AMT_SystemPowerScheme",powerPolicyResponse)}function powerPolicyResponse(b,c,a,d){AmtSystemPowerSchemes=a;updateSystemStatus()}
1187 function showPowerPolicyDlg(b){if(!xxdialogMode){for(var c="",a=0;a<AmtSystemPowerSchemes.length;a++)c+='<input type=radio name=powerpolicy value="'+AmtSystemPowerSchemes[a].InstanceID+'" '+(AmtSystemPowerSchemes[a].SchemeGUID==b?" checked":"")+">"+AmtSystemPowerSchemes[a].Description+"<br>";setDialogMode(11,"Intel&reg; AMT-energiebeleid",3,showPowerPolicyDlgOk,c)}}
1188 function showPowerPolicyDlgOk(){for(var b=null,c=0,a=document.getElementsByTagName("input");c<a.length;c++)"powerpolicy"==a[c].name&&a[c].checked&&(b=a[c].value);amtstack.AMT_SystemPowerScheme_SetPowerScheme(showPowerPolicyDlgOkDone,b)}function showPowerPolicyDlgOkDone(b,c,a,d){200==d&&PullSystemStatus()}var xxAccountAdminName,xxAccountRealmInfo,xxAccountEnabledInfo={},xxAccountFetch,showHiddenAccounts=!1;
1189 function PullUserInfo(){xxAccountFetch=1;delete xxAccountAdminName;xxAccountRealmInfo={};amtstack.AMT_AuthorizationService_GetAdminAclEntry(getAdminAclEntryResponse);amtstack.AMT_AuthorizationService_EnumerateUserAclEntries(1,enumerateUserAclEntriesResponse)}function getAdminAclEntryResponse(b,c,a,d){200==d&&(xxAccountRealmInfo[-1]={AccessPermission:999,DigestUsername:a.Body.Username,Realms:null},xxAccountAdminName=a.Body.Username,updateAccounts())}
1169 -function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var g in a.Body.Handles)b=a.Body.Handles[g],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1170 -function getUserAclEntryExResponse(b,c,a,d,g){xxAccountFetch--;200==d&&(a.Body.Handle=g,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[g]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,g){200==d&&(xxAccountEnabledInfo[g]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,g){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(g,getAclEnabledStateResponse,g))}
1171 -function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>Beheer de Intel&reg; AMT-gebruikersaccounts voor deze computer.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,g=!1,v=0;a.DigestUsername?(d=a.DigestUsername,g="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!g){var n="";if(999!=a.AccessPermission){2==
1172 -v&&(n+="Gehandicapt,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Rijken[c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="Accountant,");n=0<=a.Realms.indexOf(3)?n+"Beheerder":1==l?n+"1 rijk":n+(l+" rijken")}else n+="Beheerder",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!g&&xxAccountAdminName&&(b+=" "+AddButton2("Bewerk...",
1190 +function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var e in a.Body.Handles)b=a.Body.Handles[e],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1191 +function getUserAclEntryExResponse(b,c,a,d,e){xxAccountFetch--;200==d&&(a.Body.Handle=e,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[e]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,e){200==d&&(xxAccountEnabledInfo[e]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,e){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(e,getAclEnabledStateResponse,e))}
1192 +function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>Beheer de Intel&reg; AMT-gebruikersaccounts voor deze computer.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,e=!1,v=0;a.DigestUsername?(d=a.DigestUsername,e="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!e){var n="";if(999!=a.AccessPermission){2==
1193 +v&&(n+="Gehandicapt,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Rijken[c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="Accountant,");n=0<=a.Realms.indexOf(3)?n+"Beheerder":1==l?n+"1 rijk":n+(l+" rijken")}else n+="Beheerder",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!e&&xxAccountAdminName&&(b+=" "+AddButton2("Bewerk...",
1194 "changeAccountButton(event,"+a.Handle+")"));b+='</div><div style=padding-top:3px;width:330px;float:left;overflow-x:hidden title="'+d+'"><b>'+d+"</b></div><div style=padding-top:3px>"+n+"</div></div>"}}c='<div style=float:right;margin-right:8px><a title="Schakel verborgen accounts in" style=color:gray;cursor:pointer onclick=toggleAccountButton()>'+(showHiddenAccounts?"&#x25B2;":"&#x25BC;")+"</a></div><div>&nbsp;"+AddRefreshButton("xxAccountFetch=999;PullUserInfo()");xxAccountAdminName&&(c+=AddButton("Nieuw account",
1174 -"newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1195 +"newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(22,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1196 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"Bewerk account",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1197 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"Nieuw account",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1177 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,g=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Accountfout","Ongeldige parameters");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1178 -l,n,g,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,g,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}
1179 -function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Beheerder</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1180 -function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["Alleen lokaal","Alleen netwerk","Alles (lokaal en netwerk)"];
1181 -function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,g=c.DigestUsername;g||(g=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("Naam",g);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("Staat",1==xxAccountEnabledInfo[b].Enabled?"Ingeschakeld":"Gehandicapt"));if(g==xxAccountAdminName)a+=addHtmlValue("Toestemming","Beheerder");else{var a=a+addHtmlValue("Toestemming",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v="Beheerder",
1182 -0<=c.Realms.indexOf(20)&&(v+=", Auditor");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="Geen");a+=addHtmlValue("Rijken","")+"<b>"+v+"</b>"}messagebox("Account"+g,a+"</div>")}}
1183 -function wsmanQuery(){QH(24,"");var b=getSelectedOptions(Q(22)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(23,!1),c&&0<c.length&&amtstack.BatchEnum("Browser",c,browserResponse,null,!0))}
1184 -function browserResponse(b,c,a,d){QE(23,!0);b="";for(var g in a)c=a[g],b+="<h2>"+g+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(Leeg)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>Fout #"+c.status+"</div>"),b+="</div><br>";QH(24,b)}
1198 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Accountfout","Ongeldige parameters");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1199 +l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1200 +function updateRealms(b){QV(62,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Beheerder</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(63,c)}}
1201 +function updateAccountDialog(){var b=!0;if("none"!=Q(62).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c106",b)}var xxUserPermissions=["Alleen lokaal","Alleen netwerk","Alles (lokaal en netwerk)"];
1202 +function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,e=c.DigestUsername;e||(e=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("Naam",e);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("Staat",1==xxAccountEnabledInfo[b].Enabled?"Ingeschakeld":"Gehandicapt"));if(e==xxAccountAdminName)a+=addHtmlValue("Toestemming","Beheerder");else{var a=a+addHtmlValue("Toestemming",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v="Beheerder",
1203 +0<=c.Realms.indexOf(20)&&(v+=", Auditor");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="Geen");a+=addHtmlValue("Rijken","")+"<b>"+v+"</b>"}messagebox("Account"+e,a+"</div>")}}
1204 +function wsmanQuery(){QH(25,"");var b=getSelectedOptions(Q(23)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(24,!1),c&&0<c.length&&amtstack.BatchEnum("Browser",c,browserResponse,null,!0))}
1205 +function browserResponse(b,c,a,d){QE(24,!0);b="";for(var e in a)c=a[e],b+="<h2>"+e+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(Leeg)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>Fout #"+c.status+"</div>"),b+="</div><br>";QH(25,b)}
1206 function wsmanFilter(){var b=c0.value.toLowerCase(),c;for(c in AllWsman)QV("WSB-"+AllWsman[c],""==b||0<=AllWsman[c].toLowerCase().indexOf(b))}function connectTerminal(){terminal&&(0==terminal.State?(terminal.tlsv1only=amtstack.wsman.comm.tlsv1only,terminal.Start(currentMeshNode._id,16994,"*","*",0)):terminal.Stop())}
1186 -function onTerminalStateChange(b,c){c4.value=0==c?"Aansluiten":"verbinding verbreken";Q(29).textContent=StatusStrs[c];QE(34,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection of not supported.");
1187 -break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(31).value="100x30",terminal.m.Init(100,30)):(Q(31).value="80x25",terminal.m.Init(80,25))}
1188 -var terminalEmulations=["UTF8-terminal","Uitgebreide ASCII","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(33).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(32).value=["Intel (F10 = ESC + [OM)","Alternatief (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1189 -function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(30).value="LF",terminal.m.lineFeed="\n"):(Q(30).value="CR + LF",terminal.m.lineFeed="\r\n")}
1207 +function onTerminalStateChange(b,c){c4.value=0==c?"Aansluiten":"verbinding verbreken";Q(30).textContent=StatusStrs[c];QE(35,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection is not supported.");
1208 +break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(32).value="100x30",terminal.m.Init(100,30)):(Q(32).value="80x25",terminal.m.Init(80,25))}
1209 +var terminalEmulations=["UTF8-terminal","Uitgebreide ASCII","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(34).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(33).value=["Intel (F10 = ESC + [OM)","Alternatief (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1210 +function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(31).value="LF",terminal.m.lineFeed="\n"):(Q(31).value="CR + LF",terminal.m.lineFeed="\r\n")}
1211 function terminalCaptureToggle(b){if(!xxdialogMode)if(void 0==terminal.m.capture)terminal.m.capture="",c3.value="Stop Capture";else{if(0<terminal.m.capture.length){b="TerminalCapture";var c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);saveAs(data2blob(terminal.m.capture),b+".txt")}delete terminal.m.capture;
1212 c3.value="Start Capture"}}function terminal_FileSelectHandler(b){haltEvent(b);if(3==terminal.State&&null!=b.dataTransfer&&1==b.dataTransfer.files.length){var c=new FileReader;c.onload=terminal_onSetupBinRead;c.readAsText(b.dataTransfer.files[0])}}function terminal_onSetupBinRead(b){d3pastetextarea.value=b.target.result;setDialogMode(3,"Plakken",3,termPaste)}var desktopScreenInfo=null,desktopPollTimer=null,webRtcDesktop=null;
1213 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1214 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1194 -function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1195 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1215 +function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&(null==amtsysstate||null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&null!=amtsysstate.IPS_OptInService.response&&0!=amtsysstate.IPS_OptInService.response.OptInRequired)?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&
1216 +null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1217 0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1218 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("Datakanaal",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1219 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1220 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
1221 "\r\n"},webRtcDesktop.webrtc.oniceconnectionstatechange=function(){null==webRtcDesktop||null==webRtcDesktop.webrtc||"disconnected"!=webRtcDesktop.webrtc.iceConnectionState&&"failed"!=webRtcDesktop.webrtc.iceConnectionState||webRtcDesktopReset()},webRtcDesktop.webrtc.createOffer(function(a){webRtcDesktop.webrtcoffer=a;webRtcDesktop.webrtc.setLocalDescription(a,function(){},webRtcDesktopReset)},webRtcDesktopReset,{mandatory:{OfferToReceiveAudio:!1,OfferToReceiveVideo:!1}})):"answer"==a.action&&null!=
1201 -webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=
1202 -setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(42).innerHTML="")}
1222 +webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.m.ReverseMouseWheel=desktopsettings.reverseMouseWheel,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),
1223 +PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(43).innerHTML="")}
1224 function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(desktopScreenInfo=a.IPS_ScreenSettingData.responses.Body,desktopScreenInfo.KVMRSD=a.IPS_KVMRedirectionSettingData.responses.Body,UpdateDesktopDisplayInfo())}
1204 -function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1225 +function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(43).innerHTML=b+"&nbsp;":Q(43).innerHTML=""}
1226 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1206 -function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Aansluiten":"verbinding verbreken";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Extern bureaublad","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Extern bureaublad","The device indicated that this type of connection of not supported."):
1207 -5E4==b.disconnectCode?messagebox("Extern bureaublad","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("Extern bureaublad","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
1208 -break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1209 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Instellingen voor extern bureaublad",3,showDesktopSettingsChanged))}
1210 -function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1211 -1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1212 -function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1213 -15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1227 +function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Aansluiten":"verbinding verbreken";var d=3==c&&!urlvars.kvmviewonly;QE(44,d);QE("deskkeys",d);QE("DeskWD",d);QE(45,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Extern bureaublad","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Extern bureaublad","The device indicated that this type of connection is not supported."):
1228 +5E4==b.disconnectCode?messagebox("Extern bureaublad","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?a=null!=b.connectTime&&b.connectTime+5E3<Date.now():50002==b.disconnectCode&&messagebox("Extern bureaublad","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;case 3:12<=
1229 +amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1230 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(41).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Instellingen voor extern bureaublad",3,showDesktopSettingsChanged))}
1231 +function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.reverseMouseWheel=d7kvmrmw.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();
1232 +desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1233 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;d7kvmrmw.checked=desktopsettings.reverseMouseWheel;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",
1234 +12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1235 c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1215 -QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1216 -function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1217 -"8px"),center()))}function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"Externe toetsenbordinvoer",3,showDeskTypeEx,'<div>Voer tekst in en klik op OK om deze op afstand te typen met een Amerikaans Engels toetsenbord. Zorg ervoor dat u de externe cursor op de juiste positie plaatst voordat u doorgaat.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1236 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(44,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1237 +function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1!=urlvars.kvmonly&&disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(36,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding="8px"),center()))}
1238 +function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(45).blur(),setDialogMode(11,"Externe toetsenbordinvoer",3,showDeskTypeEx,'<div>Voer tekst in en klik op OK om deze op afstand te typen met een Amerikaans Engels toetsenbord. Zorg ervoor dat u de externe cursor op de juiste positie plaatst voordat u doorgaat.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1239 var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
1219 -function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(48).checked||desktop.m.sendcad()}
1240 +function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(49).checked||desktop.m.sendcad()}
1241 var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511,0]],2:[[65511,1],[65362,1],[65362,0],[65511,0]],3:[[65511,1],[108,1],[108,0],[65511,0]],4:[[65511,1],[109,1],[109,0],[65511,0]],5:[[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]],6:[[65470,1],[65470,0]],7:[[65471,1],[65471,0]],8:[[65472,1],[65472,0]],9:[[65473,1],[65473,0]],10:[[65474,1],[65474,0]],11:[[65475,1],[65475,0]],12:[[65476,1],[65476,0]],13:[[65477,1],[65477,0]],14:[[65478,1],[65478,0]],15:[[65479,
1221 -1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]]};
1222 -function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1242 +1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]],25:[[65293,1],[65293,0]]};
1243 +function deskSendKeys(){if(!Q(49).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1244 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1224 -function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1225 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1245 +function dmousedown(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1246 +function dmousemove(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1247 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1248 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1249 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1229 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Wortel</a>",g=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in g)""!=g[v]&&p24filetreelocation.push(g[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var g=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1230 -70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),e="";null!=l.d&&(e=new Date(l.d),e=e.getMonth()+1+"/"+e.getDate()+"/"+e.getFullYear()+" "+e.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1231 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(g+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+e+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1250 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Wortel</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,r;r=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1251 +70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1252 +encodeURIComponent(l.nx)+'")>'+r+"</a></span></div>":(w=r,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+r+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1253 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1254 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1255 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1238,8 +1259,8 @@ d)&&null!=p24clipboard&&0<p24clipboard.length)}}function p24getFileSelCount(b){f
1259 function p24createfolder(){setDialogMode(11,"Nieuwe map",3,p24createfolderEx,"<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% />");focusTextBox("p24renameinput");p24fileNameCheck()}function p24createfolderEx(){p24files.sendCtrlMsg(JSON.stringify({action:"mkdir",reqid:1,path:p24filetreelocation.join("/")+"/"+Q("p24renameinput").value}));p24folderup(999)}
1260 function p24deletefile(){var b=p24getFileSelCount();setDialogMode(11,"Verwijderen",3,p24deletefileEx,1<b?"Delete "+b+" selected items?":"Delete selected item?")}function p24deletefileEx(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);p24files.sendCtrlMsg(JSON.stringify({action:"rm",reqid:1,path:p24filetreelocation.join("/"),delfiles:b}));p24folderup(999)}
1261 function p24renamefile(){for(var b,c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&(b=p24filetree.dir[c[a].value].n);setDialogMode(11,"Hernoemen",3,p24renamefileEx,'<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% value="'+b+'" />',{action:"rename",path:p24filetreelocation.join("/"),oldname:b});focusTextBox("p24renameinput");p24fileNameCheck()}
1241 -function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c54",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1242 -function p24uploadFile(){setDialogMode(11,"Upload bestand",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c54",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1262 +function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c106",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1263 +function p24uploadFile(){setDialogMode(11,"Upload bestand",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c106",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1264 function p24copyFile(b){var c=document.getElementsByName("fd");p24clipboard=[];p24clipboardCut=b;p24clipboardFolder=p24targetpath;for(b=0;b<c.length;b++)c[b].checked&&"3"==c[b].attributes.file.value&&p24clipboard.push(p24filetree.dir[c[b].value].n);p24updateClipview()}
1265 function p24pasteFile(){var b="";null!=p24clipboard&&0<p24clipboard.length&&(b="Confim "+(0==p24clipboardCut?"copy":"move")+" of "+p24clipboard.length+" entrie"+(1<p24clipboard.length?"s":"")+" to this location?");setDialogMode(11,"Plakken",3,p24pasteFileEx,b)}
1266 function p24pasteFileEx(){p24files.sendCtrlMsg(JSON.stringify({action:0==p24clipboardCut?"copy":"move",reqid:1,scpath:p24clipboardFolder,dspath:p24targetpath,names:p24clipboard}));p24folderup(999);1==p24clipboardCut&&(p24clipboardFolder=p24clipboard=null,p24clipboardCut=0,p24updateClipview())}
@@ -1263,35 +1284,35 @@ else{var b=null,c=null;1==Q("floppyImageInput").files.length&&(b=Q("floppyImageI
1284 function iderStart3(b,c,a){iderStop();ider=CreateAmtRedirect(CreateAmtRemoteIder());ider.onStateChanged=onIderStateChange;ider.m.floppy=b;ider.m.cdrom=c;ider.m.iderStart=a;ider.m.sectorStats=iderSectorStats;ider.tlsv1only=amtstack.wsman.comm.tlsv1only;ider.Start(currentMeshNode._id,16994,"*","*",0);QV("IDERDiskMapButton",!0)}
1285 function iderStop(){ider&&(ider.m.Stop(),ider.onStateChanged=null,ider.m.onDialogPrompt=null,delete ider);iderTimer&&(clearInterval(iderTimer),delete iderTimer);iderToggleDiskMap(!1)}function onIderStateChange(b,c){QE("c2",3!=c);QE("c8",3!=c);QE("c1",3!=c);QE("c7",3!=c);QV(9,3==c);center();3==c?(urlvars.norefresh||(iderTimer=setInterval(onIderTimer,500)),onIderTimer()):iderTimer&&(clearInterval(iderTimer),delete iderTimer)}
1286 function onIderTimer(){ider.m.Update&&ider.m.Update();-1==ider.m.bytesFromAmt?iderStop():QH(10,"<b>"+(ider.m.server?"Server":"")+"IDE-R-sessie </b>, verbonden,"+ider.m.bytesFromAmt+" in,"+ider.m.bytesToAmt+" uit.")}var heatMapWidth=600,heatMapDividor={};
1266 -function iderSectorStats(b,c,a,d,g){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </b>, blokken zijn {0} bytes.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> Floppy </b>, blokken zijn {0} bytes.",512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;g/=c;if(0==b)v.height=6*(Math.floor(a/
1267 -(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+g;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1287 +function iderSectorStats(b,c,a,d,e){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </b>, blokken zijn {0} bytes.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> Floppy </b>, blokken zijn {0} bytes.",512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;e/=c;if(0==b)v.height=6*(Math.floor(a/
1288 +(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+e;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1289 function iderToggleDiskMap(b){var c="none"!=QS("iderHeatmap").display;null==b&&(b=!c);xxdialogMode&&(b=!1);QS("iderHeatmap").display=b?"":"none"}function onIderDialogPrompt(b,c,a){iderCodeBlock&&(document.body.removeChild(iderCodeBlock),delete iderCodeBlock);c.js&&(b=document.createElement("script"),b.text=c.js,iderCodeBlock=document.body.appendChild(b));setDialogMode(11,"Opslagomleiding",a?a:3,onIderDialogPromptOk,c.html)}
1290 function onIderDialogPromptOk(b){1==b?window.iderServerCall?ider.m.dialogPrompt(window.iderServerCall()):ider.m.dialogPrompt():iderStop()}function iderServerStart(){xxdialogMode||(iderStop(),ider=CreateAmtRemoteServerIder(),null!=ider&&(ider.onStateChanged=onIderStateChange,ider.m.sectorStats=iderSectorStats,ider.m.onDialogPrompt=onIderDialogPrompt,ider.tlsv1only=amtstack.wsman.comm.tlsv1only,ider.Start(currentMeshNode._id,16994,"*","*",0)))}
1291 var xxRemoteAccess=null,xxEnvironementDetection=null,xxCiraServers=null,xxUserInitiatedCira=null,xxUserInitiatedEnabledState={32768:"Gehandicapt",32769:"BIOS ingeschakeld",32770:"OS inschakelen",32771:"BIOS & OS ingeschakeld"},xxRemoteAccessCredentiaLinks=null,xxMPSUserPass=null,xxPolicies=null;
1292 function PullRemoteAccess(){var b="*AMT_EnvironmentDetectionSettingData AMT_ManagementPresenceRemoteSAP AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule *AMT_UserInitiatedConnectionService AMT_MPSUsernamePassword".split(" ");11<amtversion&&b.push("*IPS_HTTPProxyService","IPS_HTTPProxyAccessPoint");amtstack.BatchEnum(null,b,processRemote1)}
1272 -function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var g in a)200!=a[g].status&&(d=a[g].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1273 -MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(g in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[g],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1293 +function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var e in a)200!=a[e].status&&(d=a[e].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1294 +MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(e in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[e],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1295 "@Name","Name").Value)),b.MpsType=c.MpsType,c=getItem(c.PolicySet.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyRuleName").Value.split(" ")[0],xxPolicies[c].push(b);updateRemoteAccess()}}
1296 function updateRemoteAccess(){if(null!=xxEnvironementDetection){var b,c="Gehandicapt",a=xxRemoteAccess.IPS_HTTPProxyService&&xxRemoteAccess.IPS_HTTPProxyAccessPoint;xxEnvironementDetection.DetectionStrings&&0<xxEnvironementDetection.DetectionStrings.length&&(c="Ingeschakeld,"+xxEnvironementDetection.DetectionStrings.length+" "+(1<xxEnvironementDetection.DetectionStrings.length?"domains":"domain"));b=""+TableStart();b+=TableEntry("Omgevingsdetectie",addLink(c,"editEnvironmentDetection()"));b+=TableEntry("Opties voor gebruikersinitiatie",
1297 addLinkConditional(xxUserInitiatedEnabledState[xxUserInitiatedCira.EnabledState],"editUserInitiatedCira()",xxAccountAdminName));c="<i>Geen</i>";if(0<xxPolicies.User.length){var c="",d;for(d in xxPolicies.User)0<c.length&&(c+=", "),c+=xxPolicies.User[d].AccessInfo,1==xxPolicies.User[d].MpsType&&(c+=" (CILA)")}b+=TableEntry("Door gebruiker gestarte verbinding",addLinkConditional(c,'editMpsPolicy("User")',xxAccountAdminName));c="<i>Geen</i>";if(0<xxPolicies.Alert.length)for(d in c="",xxPolicies.Alert)0<
1277 -c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("Door waarschuwing ge\u00efnitieerde verbinding",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>Geen</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var g=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",
1278 -"Periodiek");if(g){var v=atob(g.ExtendedData);0==ReadInt(v,0)&&(c+=format(", elke {0} seconden",ReadInt(v,4)));1==ReadInt(v,0)&&(g=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+g+":"+v+" daily")}b+=TableEntry("Periodieke verbinding",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Beheer Intel&reg; AMT servers voor extern beheer.<br><br>";if(0==xxCiraServers.length)b+="<div style=padding-left:15px><br><i>Geen externe servers gevonden.</i></div><br>";
1298 +c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("Door waarschuwing ge\u00efnitieerde verbinding",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>Geen</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var e=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",
1299 +"Periodiek");if(e){var v=atob(e.ExtendedData);0==ReadInt(v,0)&&(c+=format(", elke {0} seconden",ReadInt(v,4)));1==ReadInt(v,0)&&(e=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+e+":"+v+" daily")}b+=TableEntry("Periodieke verbinding",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Beheer Intel&reg; AMT servers voor extern beheer.<br><br>";if(0==xxCiraServers.length)b+="<div style=padding-left:15px><br><i>Geen externe servers gevonden.</i></div><br>";
1300 else for(d in xxCiraServers)c=":"+xxCiraServers[d].Port,xxCiraServers[d].CN&&(c+=", "+xxCiraServers[d].CN),b+="<div class=itemBar onclick=showServerDetails("+d+")><div style=padding-top:3px><b>"+xxCiraServers[d].AccessInfo+"</b>"+EscapeHtml(c)+"</div></div>";if(a)if(b+="<br>Beheer HTTP-proxy's die worden gebruikt voor beheerverbindingen.<br><br>",c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses,0==c.length)b+="<div style=padding-left:15px><br><i>Geen proxy's geconfigureerd.</i></div><br>";else for(d in c)b+=
1280 -"<div class=itemBar onclick=showProxyDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(c[d].AccessInfo)+":"+c[d].Port+"</b> / "+EscapeHtml(c[d].NetworkDnsSuffix)+"</div></div>";d="";xxAccountAdminName&&(d=AddButton("Server toevoegen...","AddRemoteAccessServer()"),a&&(d+=AddButton("Proxy toevoegen ...","AddRemoteAccessProxy()")));b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+d);QH(52,b)}}var xxEditMpsPolicyType;
1281 -function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="Gebruiker gestart");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(Geen)",g;for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[g].Name?" selected":"")+">"+xxCiraServers[g].AccessInfo;
1282 -c+="</select><div>Primaire server</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Extern<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA - Intern</select><div>Primair MPS-type</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";c+="<option value=-1>(Geen)";for(g in xxCiraServers)c+=
1283 -"<option value="+g+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[g].Name?" selected":"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>Secundaire server</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Extern<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA - Intern</select><div>Secundair MPS-type</div></div>")}g=0;d&&(g=d.TunnelLifeTime);c+=
1284 -"<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+g+">";c+="<div>Tunnel levensduur (seconden)</div></div>";"Periodic"==b&&(a=0,g=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),g=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),g+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">Periodiek, tijdsinterval<option value=1"+(1==
1285 -a?" selected":"")+">Dagelijks, eenmaal per dag",c+="</select><div>Type trigger</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+g+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0} Verbinding",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1286 -function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c54",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1301 +"<div class=itemBar onclick=showProxyDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(c[d].AccessInfo)+":"+c[d].Port+"</b> / "+EscapeHtml(c[d].NetworkDnsSuffix)+"</div></div>";d="";xxAccountAdminName&&(d=AddButton("Server toevoegen...","AddRemoteAccessServer()"),a&&(d+=AddButton("Proxy toevoegen ...","AddRemoteAccessProxy()")));b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+d);QH(53,b)}}var xxEditMpsPolicyType;
1302 +function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="Gebruiker gestart");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(Geen)",e;for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[e].Name?" selected":"")+">"+xxCiraServers[e].AccessInfo;
1303 +c+="</select><div>Primaire server</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Extern<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA - Intern</select><div>Primair MPS-type</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";c+="<option value=-1>(Geen)";for(e in xxCiraServers)c+=
1304 +"<option value="+e+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[e].Name?" selected":"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>Secundaire server</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Extern<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA - Intern</select><div>Secundair MPS-type</div></div>")}e=0;d&&(e=d.TunnelLifeTime);c+=
1305 +"<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+e+">";c+="<div>Tunnel levensduur (seconden)</div></div>";"Periodic"==b&&(a=0,e=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),e=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),e+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">Periodiek, tijdsinterval<option value=1"+(1==
1306 +a?" selected":"")+">Dagelijks, eenmaal per dag",c+="</select><div>Type trigger</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+e+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0} Verbinding",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1307 +function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c106",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1308 -1!=Q("d2server1").value),QH("ttypelabel",0==Q("d2ttype").value?"Triggerinterval (seconden)":"Tijd van de dag (UU: MM)"),QE("d2ttype",-1!=Q("d2server1").value));QE("d2lifetime",-1!=Q("d2server1").value);b&&(QE("d2server1cira",-1<Q("d2server1").value),1<xxCiraServers.length&&QE("d2server2cira",-1<Q("d2server1").value&&-1<Q("d2server2").value))}
1309 function editMpsPolicyOk(){var b=xxEditMpsPolicyType;"User"==b&&(b="User Initiated");getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",b)?amtstack.Delete("AMT_RemoteAccessPolicyRule",{PolicyRuleName:b},editMpsPolicyOk2):editMpsPolicyOk2()}
1289 -function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var g,v;0<=Q("d2server1").value&&(g='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1310 +function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var e,v;0<=Q("d2server1").value&&(e='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1311 xxCiraServers[Q("d2server1").value].Name+"</Selector></SelectorSet></ReferenceParameters>");0<=Q("d2server1").value&&1<xxCiraServers.length&&0<=Q("d2server2").value&&(v='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1291 -xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?g&&(0==Q("d2server1cira").value?d.push(g):n.push(g),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):g&&(d.push(g),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1312 +xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?e&&(0==Q("d2server1cira").value?d.push(e):n.push(e),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):e&&(d.push(e),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1313 function editEnvironmentDetection(b){1!=b&&(editEnvironmentDetectionTmp=xxEnvironementDetection.DetectionStrings?Clone(xxEnvironementDetection.DetectionStrings):[]);var c="";xxAccountAdminName&&(c+="Voer maximaal 5 domeinachtervoegsels in. Als de computer zich buiten deze domeinen bevindt, worden de lokale Intel&reg; AMT-poorten gesloten en zijn externe serververbindingen actief.<br><br>");0==editEnvironmentDetectionTmp.length&&(c+="<i>Geen intranetdomeinen, omgevingsdetectie uitgeschakeld.</i><br>");
1314 for(var a in editEnvironmentDetectionTmp)c+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Verwijderen","editEnvironmentDetectionRemove("+a+")")+'</div><div style=padding-top:3px;max-width:260px;overflow:hidden title="'+editEnvironmentDetectionTmp[a]+'"><b>'+editEnvironmentDetectionTmp[a]+"</b></div></div>";xxAccountAdminName&&5>editEnvironmentDetectionTmp.length&&(c+="<br><input id=edInput placeholder=intranet.org style=width:276px onkeyup=edInputChg() maxlength=63><input type=button id=edAdd value=Add style=width:80px;margin-left:5px onclick=editEnvironmentDetectionAdd()>");
1294 -1==b?QH(63,c):setDialogMode(11,"Omgevingsdetectie",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1315 +1==b?QH(64,c):setDialogMode(11,"Omgevingsdetectie",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1316 function editEnvironmentDetectionDlg2(b,c,a,d){200!=d?messagebox("Omgevingsdetectie",format("Kan server, status {0} niet toevoegen",d)):a.Body.ReturnValue&&0!=a.Body.ReturnValue?messagebox("Omgevingsdetectie",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}function edInputChg(){5>editEnvironmentDetectionTmp.length&&QE("edAdd",0<Q("edInput").value.length)}function editEnvironmentDetectionAdd(){editEnvironmentDetectionTmp.push(Q("edInput").value);editEnvironmentDetection(1)}
1317 function editEnvironmentDetectionRemove(b){editEnvironmentDetectionTmp.splice(b,1);editEnvironmentDetection(1)}function editUserInitiatedCira(){if(!xxdialogMode){var b="",c;for(c in xxUserInitiatedEnabledState)b+="<input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxUserInitiatedCira.EnabledState==c?"checked":"")+">"+xxUserInitiatedEnabledState[c]+"<br>";setDialogMode(11,"Door gebruiker gestarte tunnel",3,editUserInitiatedCiraDlg,b)}}
1318 function editUserInitiatedCiraDlg(){amtstack.AMT_UserInitiatedConnectionService_RequestStateChange(document.querySelector("input[name=d11]:checked").value,null,editUserInitiatedCiraDlg2)}function editUserInitiatedCiraDlg2(b,c,a,d){200==d&&amtstack.Get("AMT_UserInitiatedConnectionService",editUserInitiatedCiraDlg3,0,1)}function editUserInitiatedCiraDlg3(b,c,a,d){200==d&&(xxUserInitiatedCira=a.Body,updateRemoteAccess())}var xxShowServerDetailsHandle;
@@ -1303,7 +1324,7 @@ function showProxyDetails(b){var c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.respo
1324 function showProxyDetailsOk(b,c){var a=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses[c];2==b&&amtstack.Delete("IPS_HTTPProxyAccessPoint",{Name:a.Name},showProxyDetailsOk2)}function showProxyDetailsOk2(b,c,a,d){408==d?messagebox("HTTP-proxy verwijderen","Kan HTTP-proxy niet verwijderen, toegang geweigerd."):PullRemoteAccess()}
1325 function AddRemoteAccessProxy(){var b;b='<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessProxyUpdate()><option value=2>Hostnaam FQDN<option value=3>IPv4-adres<option value=4>IPv6-adres</select><div>Connectie 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>Haven</div></div>';b+=
1326 "<div style=height:26px><input id=d2domain style=float:right;width:200px maxlength=191 onkeyup=AddRemoteAccessProxyUpdate()><div>DNS-achtervoegsel</div></div>";setDialogMode(11,"Voeg HTTP-proxy toe",3,AddRemoteAccessProxyOk,b);AddRemoteAccessProxyUpdate()}
1306 -function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c54",b);QH("d2typespan",["","","FQDN / hostnaam","IPv4-adres","IPv6-adres"][Q("d2type").value])}function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
1327 +function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c106",b);QH("d2typespan",["","","FQDN / hostnaam","IPv4-adres","IPv6-adres"][Q("d2type").value])}function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
1328 function AddRemoteAccessProxyOk2(b,c,a,d){200!=d?messagebox("Voeg proxyserver toe","Kan proxy, status niet toevoegen"+d):0!=a.Body.ReturnValue?messagebox("Voeg proxyserver toe",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1329 function AddRemoteAccessServer(){var b=[],c;for(c in xxCertificates)xxCertificates[c].XPrivateKey&&b.push(xxCertificates[c]);var a;a="<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()><option value=201>Hostnaam FQDN<option value=3>IPv4-adres</select><div>Connectie type</div></div><div style=height:26px><input id=d2name style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div id=d2lname></div></div>";a+='<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 poort</div></div>';
1330 a+="<div style=height:26px id=d2ucn><input id=d2cn style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Server algemene naam</div></div>";a+="<div style=height:26px><select id=d2auth style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()>";0<b.length&&(a+="<option value=1>Certificaat");a+="<option value=2>Gebruikersnaam wachtwoord</select><div>Verificatietype</div></div>";a+="<span id=d2utype>";a+="<div style=height:26px><input id=d2user style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Gebruikersnaam</div></div>";
@@ -1313,82 +1334,85 @@ function AddRemoteAccessServerOk(){var b,c,a,d;1==Q("d2auth").value?b='<Address
1334 "</Selector></SelectorSet></ReferenceParameters>":(c=Q("d2user").value,a=Q("d2pass").value);0<Q("d2cn").value.length&&(d=Q("d2cn").value);amtstack.AMT_RemoteAccessService_AddMpServer(Q("d2name").value,Q("d2type").value,Q("d2port").value,Q("d2auth").value,b,c,a,d,AddRemoteAccessServerOk2)}
1335 function AddRemoteAccessServerOk2(b,c,a,d){200!=d?messagebox("Voeg internetserver toe",format("Kan server, status {0} niet toevoegen",d)):0!=a.Body.ReturnValue?messagebox("Voeg internetserver toe",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1336 function AddRemoteAccessServerUpdate(){var b=0!=Q("d2name").value.length;3==Q("d2type").value&&1==b&&(b=0!=Q("d2cn").value.length);2==Q("d2auth").value&&1==b&&(b=0!=Q("d2user").value.length&&passwordcheck(Q("d2pass").value));if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;if(-1!=Q("d2name").value.indexOf(":")||3==Q("d2type").value&&-1!=Q("d2cn").value.indexOf(":"))b=!1;QH("d2lname",201==Q("d2type").value?"Hostnaam":"IPv4-adres");QV("d2utype",2==Q("d2auth").value);QV("d2ucn",
1316 -3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c54",b)}
1337 +3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c106",b)}
1338 function showEditNameDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_GeneralSettings.response.HostName,a=amtsysstate.AMT_GeneralSettings.response.DomainName;null!=a&&0<a.length&&(c+="."+a);c='<br><div style=height:26px><input id=d11name value="'+c+'" style=float:right;width:200px><div>Naam & domein</div></div>';1==b&&(b=1==amtsysstate.AMT_GeneralSettings.response.SharedFQDN,c+="<div style=height:26px><select id=d11fqdn style=float:right;width:200px><option value=true "+(b?"selected":"")+'>Gedeeld, hetzelfde als OS<option value="false" '+
1339 (b?"":"selected")+">Toegewijd, anders dan besturingssysteem</select><div>Naam delen</div></div>");setDialogMode(11,"Computer naam",3,editNameDlgOk,c)}}function editNameDlgOk(){var b=Q("d11name").value,c=b.indexOf("."),a="";0<=c&&(a=b.substring(c+1),b=b.substring(0,c));c=Clone(amtsysstate.AMT_GeneralSettings.response);c.HostName=b;c.DomainName=a;Q("d11fqdn")&&(c.SharedFQDN=d11fqdn.value);amtstack.Put("AMT_GeneralSettings",c,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1319 -function computerNameGet(b,c,a,d){200==d&&(amtsysstate.AMT_GeneralSettings.response=a.Body,updateSystemStatus())}function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c36.value=c;c37.value=b.DDNSPeriodicUpdateInterval;c38.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"Dynamische DNS-client",3,showEditDnsDlgOk)}}
1320 -function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c36.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c36.value?!0:!1;2==c36.value&&(b.DDNSPeriodicUpdateInterval=c37.value,b.DDNSTTL=c38.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1321 -function showEditDnsDlgChange(){QE("c37",2==c36.value);QE("c38",2==c36.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"Intel&reg; AMT-functies",3,featuresDlgOk))}
1322 -function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,g){200!=g?messagebox("Fout","RedirectionService, RequestStateChange-fout"+g):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,g){200!=g?messagebox("Fout","KVMRedirectionSAP, RequestStateChange-fout"+
1323 -g):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("Fout","RedirectionService PUT-fout"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1324 -function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c49.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c50.checked=!c49.checked),c51.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c52.checked=!c51.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1340 +function computerNameGet(b,c,a,d){200==d&&(amtsysstate.AMT_GeneralSettings.response=a.Body,updateSystemStatus())}function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c61.value=c;c62.value=b.DDNSPeriodicUpdateInterval;c63.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"Dynamische DNS-client",3,showEditDnsDlgOk)}}
1341 +function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c61.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c61.value?!0:!1;2==c61.value&&(b.DDNSPeriodicUpdateInterval=c62.value,b.DDNSTTL=c63.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1342 +function showEditDnsDlgChange(){QE("c62",2==c61.value);QE("c63",2==c61.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"Intel&reg; AMT-functies",3,featuresDlgOk))}
1343 +function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,e){200!=e?messagebox("Fout","RedirectionService, RequestStateChange-fout"+e):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,e){200!=e?messagebox("Fout","KVMRedirectionSAP, RequestStateChange-fout"+
1344 +e):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("Fout","RedirectionService PUT-fout"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1345 +function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c74.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c75.checked=!c74.checked),c76.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c77.checked=!c76.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1346 function showEnableBootServiceDlgOk(){var b=32768+parseInt(document.querySelector("input[name=d26a]:checked").value);15<amtversion&&(b+=parseInt(document.querySelector("input[name=d26b]:checked").value));amtstack.CIM_BootService_RequestStateChange(b,null,showEnableBootServiceDlgResponse,b)}
1326 -function showEnableBootServiceDlgResponse(b,c,a,d,g){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,g),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1327 -function showEnableBootServiceDlgResponse2(b,c,a,d,g){200==d&&a.Body.EnabledState!=g&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"Toestemming van de gebruiker",3,consentDlgOk)}}
1347 +function showEnableBootServiceDlgResponse(b,c,a,d,e){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,e),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1348 +function showEnableBootServiceDlgResponse2(b,c,a,d,e){200==d&&a.Body.EnabledState!=e&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"Toestemming van de gebruiker",3,consentDlgOk)}}
1349 function consentDlgOk(){amtsysstate.IPS_OptInService.response.OptInRequired=document.querySelector("input[name=d10]:checked").value;amtstack.Put("IPS_OptInService",amtsysstate.IPS_OptInService.response,function(){amtstack.Get("IPS_OptInService",consentGet,0,1)},0,1)}function consentGet(b,c,a,d){200==d&&PullSystemStatus()}var ipv6addrtype="Koppel het lokale adres;Lokaal netwerkadres;Wereldwijd adres;Door gebruiker geconfigureerd;Niet toegestaan;DAD in uitvoering;Geldig;verouderd;voorkeur / verouderd;niet meer geldig;botsing;niet toegestaan".split(";");
1350 function showIPv6AddrDlg(b,c){if(!xxdialogMode){var a=TableStart();t=c.split(",");for(var d=0;d<t.length;d+=3)a+=TableEntry("<b>"+t[d]+"</b><br><span style=font-size:10px>"+ipv6addrtype[t[d+1]]+","+ipv6addrtype[+t[d+2]+5]+"</span>","");setDialogMode(11,0==b?"IPv6-adressen voor bedrade interface":"IPv6-adressen voor draadloze interface",1,null,a+TableEnd())}}
1330 -function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(69,0==b);QV(70,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 uitgeschakeld");QH("d21l1","IPv6 ingeschakeld, automatisch");QH("d21l2","IPv6 ingeschakeld, automatisch + handmatig adres");d21o0.checked=!c;d21o1.checked=c&&
1331 -!ipv6manual;d21o2.checked=c&&ipv6manual;c31.value=isIpAddress(a.IPv6Address,"");c33.value=isIpAddress(a.DefaultRouter,"");c34.value=isIpAddress(a.PrimaryDNS,"");c35.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"IPv6-ondersteuning voor bedrade interface":"IPv6-ondersteuning voor draadloze interface",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1332 -function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c31.value?"::":c31.value.toLocaleLowerCase(),a.DefaultRouter=""==c33.value?"::":c33.value.toLocaleLowerCase(),
1333 -a.PrimaryDNS=""==c34.value?"::":c34.value.toLocaleLowerCase(),a.SecondaryDNS=""==c35.value?"::":c35.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1334 -"CreationClassName").Value,g=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1335 -d+'</w:Selector><w:Selector Name="DeviceID">'+g+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1336 -b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",g=Clone(c[a]);g.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",g,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv6-ondersteuning",format("Kan IPv6-status niet instellen, fout {0}",d))}
1351 +function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(68,0==b);QV(69,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 uitgeschakeld");QH("d21l1","IPv6 ingeschakeld, automatisch");QH("d21l2","IPv6 ingeschakeld, automatisch + handmatig adres");d21o0.checked=!c;d21o1.checked=c&&
1352 +!ipv6manual;d21o2.checked=c&&ipv6manual;c56.value=isIpAddress(a.IPv6Address,"");c58.value=isIpAddress(a.DefaultRouter,"");c59.value=isIpAddress(a.PrimaryDNS,"");c60.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"IPv6-ondersteuning voor bedrade interface":"IPv6-ondersteuning voor draadloze interface",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1353 +function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c56.value?"::":c56.value.toLocaleLowerCase(),a.DefaultRouter=""==c58.value?"::":c58.value.toLocaleLowerCase(),
1354 +a.PrimaryDNS=""==c59.value?"::":c59.value.toLocaleLowerCase(),a.SecondaryDNS=""==c60.value?"::":c60.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1355 +"CreationClassName").Value,e=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1356 +d+'</w:Selector><w:Selector Name="DeviceID">'+e+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1357 +b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",e=Clone(c[a]);e.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",e,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv6-ondersteuning",format("Kan IPv6-status niet instellen, fout {0}",d))}
1358 function showPingActionDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,b=(1==b.PingResponseEnabled)+((1==b.RmcpPingResponseEnabled)<<1);d20a.checked=0==b;d20b.checked=1==b;d20c.checked=2==b;d20d.checked=3==b;setDialogMode(20,"Intel&reg; AMT Ping-reactie",3,showPingActionDlgOk)}}
1359 function showPingActionDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response),c=document.querySelector("input[name=d20]:checked").value;b.PingResponseEnabled=0!=(c&1);b.RmcpPingResponseEnabled=0!=(c&2);amtstack.Put("AMT_GeneralSettings",b,PullSystemStatus,0,1)}
1339 -function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(68,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(69,!0);QV(70,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","Automatische configuratie met DHCP-server");QH("d21l2","Statische configuratie met onderstaande IPv4-instellingen");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=!d21o1.checked;c31.value=isIpAddress(b.IPAddress,
1340 -"");c32.value=isIpAddress(b.SubnetMask,"");c33.value=isIpAddress(b.DefaultGateway,"");c34.value=isIpAddress(b.PrimaryDNS,"");c35.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"IPv4-instellingen",3,showIPSetupDlgOk)}}
1341 -function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6 ingeschakeld, automatisch + handmatig adres"==Q("d21l2").innerHTML&&2>c31.value.split(":").length&&(b=!1);QE("c54",b);c31.disabled=c32.disabled=c33.disabled=c34.disabled=c35.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1342 -function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c31.value,b.SubnetMask=c32.value,b.DefaultGateway=c33.value,""!=c34.value&&(b.PrimaryDNS=c34.value),""!=c35.value&&
1343 -(b.SecondaryDNS=c35.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv4-instellingen",format("Kan netwerkparameters niet instellen, fout {0}",d))}amtPowerBootCapabilities=null;function showPowerActionDlg(){xxdialogMode||(statusbox("Krachtige acties","Mogelijkheden controleren ..."),amtstack.Get("AMT_BootCapabilities",powerActionResponse00,0,1))}
1344 -function powerActionResponse00(b,c,a,d){if(200==d){b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(g){}amtPowerBootCapabilities=a.Body;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","Opstarten",2);b&1&&(addOption("d5actionSelect","Reset",10),addOption("d5actionSelect","Power cyclus",5),addOption("d5actionSelect","Stroomstoring",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect","Schakel diagnostisch in",300),b&1&&
1345 -addOption("d5actionSelect","Reset naar diagnose",301));9<amtversion&&b&1&&(addOption("d5actionSelect","OS Wake from Standby",500),addOption("d5actionSelect","OS energiebesparing",501),addOption("d5actionSelect","Soft-off",12),addOption("d5actionSelect","Zachte reset",14),addOption("d5actionSelect","Slaap",4),addOption("d5actionSelect","Slaapstand",7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&addOption("d5actionSelect","Schakel naar BIOS",100),b&1&&addOption("d5actionSelect","Reset naar BIOS",
1346 -101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","Schakel in op Secure Erase",104),b&1&&addOption("d5actionSelect","Reset naar Secure Erase",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",106),b&1&&addOption("d5actionSelect","Reset to Platform Erase",107));
1347 -b&1&&addOption("d5actionSelect","Reset naar IDE-R Floppy",200);b&2&&addOption("d5actionSelect","Schakel de IDE-R-diskette in",201);b&1&&addOption("d5actionSelect","Reset naar IDE-R CDROM",202);b&2&&addOption("d5actionSelect","Schakel in op IDE-R CDROM",203);b&1&&addOption("d5actionSelect","Reset naar PXE",400);b&2&&addOption("d5actionSelect","Schakel PXE in",401);addOption("d5actionSelect","Maatwerk actie ...",999);5<amtversion&&addOption("d5actionSelect","Toestemming van de gebruiker ...",998);setDialogMode(5,
1348 -"Krachtige acties",3,powerActionDlgCheck)}else messagebox("Krachtige actie",format("Kan systeemmogelijkheden niet krijgen, fout {0}",d))}
1349 -function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"Krachtactie voltooid."):QH(60,format("Power action error # {0}.",g));setDialogMode(1,"Krachtige actie",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Uitvoering van Intel&reg; Remote Secure Erase bevestigen?<br>Voer indien nodig Secure Erase-wachtwoord in.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Wachtwoord</div></div><br><div style=color:red><b> WAARSCHUWING: </b> Hierdoor worden gegevens op het externe systeem gewist.</div>",
1350 -rsepass=1,setDialogMode(11,"Krachtige acties",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1351 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> WAARSCHUWING: </b> Hierdoor worden gegevens op het externe systeem gewist.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");
1352 -d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password",
1353 -"<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Krachtige acties",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1354 -function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,g=[1,2,6,25,26,31],v;for(v in g)d&1<<g[v]&&Q("rpef"+g[v]).checked&&(a+=1<<g[v]);d=makeUefiBootParam(1,a,4);g=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),g++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),g++);platfromEraseTLV={tlv:btoa(d),tlvlen:g};c?(statusbox("Krachtige actie","Status controleren ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1360 +function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(67,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(68,!0);QV(69,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","Automatische configuratie met DHCP-server");QH("d21l2","Statische configuratie met onderstaande IPv4-instellingen");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=!d21o1.checked;c56.value=isIpAddress(b.IPAddress,
1361 +"");c57.value=isIpAddress(b.SubnetMask,"");c58.value=isIpAddress(b.DefaultGateway,"");c59.value=isIpAddress(b.PrimaryDNS,"");c60.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"IPv4-instellingen",3,showIPSetupDlgOk)}}
1362 +function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6 ingeschakeld, automatisch + handmatig adres"==Q("d21l2").innerHTML&&2>c56.value.split(":").length&&(b=!1);QE("c106",b);c56.disabled=c57.disabled=c58.disabled=c59.disabled=c60.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1363 +function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c56.value,b.SubnetMask=c57.value,b.DefaultGateway=c58.value,""!=c59.value&&(b.PrimaryDNS=c59.value),""!=c60.value&&
1364 +(b.SecondaryDNS=c60.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv4-instellingen",format("Kan netwerkparameters niet instellen, fout {0}",d))}amtPowerBootCapabilities=null;function showPowerActionDlg(){xxdialogMode||(statusbox("Krachtige acties","Mogelijkheden controleren ..."),amtstack.Get("AMT_BootCapabilities",powerActionResponse00,0,1))}
1365 +function showPowerActionDlg(){if(!xxdialogMode){var b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(c){}amtPowerBootCapabilities=amtsysstate.AMT_BootCapabilities.response;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","Opstarten",2);b&1&&(addOption("d5actionSelect","Reset",10),addOption("d5actionSelect","Power cyclus",5),addOption("d5actionSelect","Stroomstoring",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect",
1366 +"Schakel diagnostisch in",300),b&1&&addOption("d5actionSelect","Reset naar diagnose",301));9<amtversion&&b&1&&(addOption("d5actionSelect","OS Wake from Standby",500),addOption("d5actionSelect","OS energiebesparing",501),addOption("d5actionSelect","Soft-off",12),addOption("d5actionSelect","Zachte reset",14),addOption("d5actionSelect","Slaap",4),addOption("d5actionSelect","Slaapstand",7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&addOption("d5actionSelect","Schakel naar BIOS",100),b&1&&addOption("d5actionSelect",
1367 +"Reset naar BIOS",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","Schakel in op Secure Erase",104),b&1&&addOption("d5actionSelect","Reset naar Secure Erase",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",106),b&1&&addOption("d5actionSelect","Reset to Platform Erase",
1368 +107));b&1&&addOption("d5actionSelect","Reset naar IDE-R Floppy",200);b&2&&addOption("d5actionSelect","Schakel de IDE-R-diskette in",201);b&1&&addOption("d5actionSelect","Reset naar IDE-R CDROM",202);b&2&&addOption("d5actionSelect","Schakel in op IDE-R CDROM",203);b&1&&addOption("d5actionSelect","Reset naar PXE",400);b&2&&addOption("d5actionSelect","Schakel PXE in",401);addOption("d5actionSelect","Maatwerk actie ...",999);5<amtversion&&addOption("d5actionSelect","Toestemming van de gebruiker ...",
1369 +998);setDialogMode(5,"Krachtige acties",3,powerActionDlgCheck)}}
1370 +function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"Krachtactie voltooid."):QH(61,format("Power action error # {0}.",e));setDialogMode(1,"Krachtige actie",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Uitvoering van Intel&reg; Remote Secure Erase bevestigen?<br>Voer indien nodig Secure Erase-wachtwoord in.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Wachtwoord</div></div><br><div style=color:red><b> WAARSCHUWING: </b> Hierdoor worden gegevens op het externe systeem gewist.</div>",rsepass=
1371 +1,setDialogMode(11,"Krachtige acties",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1372 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> WAARSCHUWING: </b> Hierdoor worden gegevens op het externe systeem gewist.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&8&&a.push("<label><input id=rpef3 type=checkbox onchange=powerActionDlgRPEValidate()>Verify Storage Erase</label>");
1373 +d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&65536&&a.push("<label><input id=rpef16 type=checkbox onchange=powerActionDlgRPEValidate()>OEM Custom Action</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&
1374 +-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");0<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+
1375 +addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpeeomdata style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("OEM Data (HEX)","<input id=rpeoemdatax style=width:210px maxlength=256 type=input>")+"</div>";setDialogMode(11,"Krachtige acties",3,powerActionDlgRPEEx,c,b);QE("c106",!1)}
1376 +function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,3,6,16,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QV("rpeeomdata",b&65536);QE("c106",b)}var platfromEraseTLV=null;
1377 +function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,3,6,16,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);a&65536&&""!=Q("rpeoemdatax").value&&(d+=makeUefiBootParam(20,hex2rstr(Q("rpeoemdatax").value),null,11),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("Krachtige actie","Status controleren ..."),
1378 +amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1379 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("Krachtige actie","Status controleren ...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=!1);13!=currentView&&
1380 10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
1357 -function showAdvPowerDlg(){try{Q("c39").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1381 +function showAdvPowerDlg(){try{Q("c64").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1382 QV("ForceHDBootOption",1==amtPowerBootCapabilities.ForceHardDriveBoot);QV("ForcePXEBootOption",1==amtPowerBootCapabilities.ForcePXEBoot);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);QV("d24dSerialOverLan",1==amtPowerBootCapabilities.SOL);
1383 QV("d24dSecureErase",1==amtPowerBootCapabilities.SecureErase);QV("d24dPlatformErase",null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&0!=(amtsysstate.CIM_BootService.response.EnabledState&2));QV("d24dFirmwareReset",1==amtPowerBootCapabilities.ConfigurationDataReset);QV("d24dLockSleepButton",1==amtPowerBootCapabilities.SleepButtonLock);QV("d24dUserPasswordBypass",1==amtPowerBootCapabilities.UserPasswordBypass);
1360 -QV("c46",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c47",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c48",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);setDialogMode(24,"Aangepaste krachtactie",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}
1361 -function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c39").value&&600>Q("c39").value;QE("c41",!b);QE("c43",!b);QE("idd_d24IDERBootDevice",!b);QE("c45",!b);QE("idd_d24RSEPass",!b);QE("c54",!0)}
1362 -function showAdvPowerDlgOk(){var b=Q("c39").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"Krachtactie voltooid."):QH(60,format("Power action error # {0}.",g));setDialogMode(1,"Krachtige actie",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c39").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=Q("d24BiosSecureBoot").checked,
1363 -AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c43").value,AvdPowerDlg.FirmwareVerbosity=Q("c45").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c44").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked,AvdPowerDlg.LockSleepButton=Q("d24LockSleepButton").checked,
1384 +QV("c71",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c72",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c73",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);QH("c66",'<option value=0>None</option><option id="ForceDVDBootOption" value=1>Force CD/DVD Boot</option><option id="ForcePXEBootOption" value=2>Force PXE Boot</option><option id="ForceHDBootOption" value=3>Force Hard Disk Boot</option><option id="ForceDiagBootOption" value=4>Force Diagnostic Boot</option>');
1385 +setDialogMode(24,"Aangepaste krachtactie",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c64").value&&600>Q("c64").value;QE("c66",!b);QE("c68",!b);QE("idd_d24IDERBootDevice",!b);QE("c70",!b);QE("idd_d24RSEPass",!b);QE("c106",!0)}
1386 +function showAdvPowerDlgOk(){var b=Q("c64").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"Krachtactie voltooid."):QH(61,format("Power action error # {0}.",e));setDialogMode(1,"Krachtige actie",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c64").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=Q("d24BiosSecureBoot").checked,
1387 +AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c68").value,AvdPowerDlg.FirmwareVerbosity=Q("c70").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c69").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked,AvdPowerDlg.LockSleepButton=Q("d24LockSleepButton").checked,
1388 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,AvdPowerDlg.PlatformErase=Q("d24PlatformErase").checked,AvdPowerDlg.FirmwareReset=Q("d24FirmwareReset").checked,!0===AvdPowerDlg.SecureErase&&0<Q("d24rsepass").value.length&&(AvdPowerDlg.RSEPassword=
1389 Q("d24rsepass").value),!0===AvdPowerDlg.PlatformErase?powerActionDlgRPE(!0):(statusbox("Krachtige actie","Status controleren ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)))}
1366 -function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("Krachtige actie",format("Fout # {0}",d)):4294967295==a.Body.OptInRequired&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(d6ConsentText.value="",setDialogMode(6,"Toestemming van de gebruiker",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("Krachtige actie","Aanmelden starten ..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):connectDesktopConsent?
1367 -(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Toestemming van de gebruiker","Geen toestemming van de gebruiker nodig."):(statusbox("Krachtige actie","Opstartinstellingen ophalen ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1390 +function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("Krachtige actie",format("Fout # {0}",d)):(4294967295==a.Body.OptInRequired||connectDesktopConsent&&0!=a.Body.OptInRequired)&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(amtstack.IPS_OptInService_CancelOptIn(null),d6ConsentText.value="",setDialogMode(6,"Toestemming van de gebruiker",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("Krachtige actie","Aanmelden starten ..."),
1391 +amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Toestemming van de gebruiker","Geen toestemming van de gebruiker nodig."):(statusbox("Krachtige actie","Opstartinstellingen ophalen ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1392 function powerActionResponseC1(b,c,a,d){200!=d?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("Krachtige actie",format("Fout #",d)):0!=a.Body.ReturnValue?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("Fout met toestemming van gebruiker",a.Body.ReturnValueStr.replace(/_/g," ")):(d6ConsentText.value="",setDialogMode(6,"Toestemming van de gebruiker",11,powerActionSendConsent),checkConsentDisplay(),consentChanged(),amtstack.Enum("CIM_ServiceAvailableToElement",
1393 function(a,b,c,d){errcheck(d,a)||(amtsysstate.CIM_ServiceAvailableToElement.responses=c,updateSystemStatus(),null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState&&amtstack.RequestPowerStateChange(2,function(a,b,c,d){}))}))}
1370 -function powerActionSendConsent(b){0==b?amtstack.IPS_OptInService_CancelOptIn(function(){}):(statusbox("Krachtige actie","Gebruikers toestemming sturen ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1394 +function powerActionSendConsent(b){console.log("powerActionSendConsent",b);0==b?(amtstack.IPS_OptInService_CancelOptIn(function(){}),connectDesktopConsent=!1,desktop.Stop()):(statusbox("Krachtige actie","Gebruikers toestemming sturen ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1395 function powerActionResponseC2(b,c,a,d){200!=d?messagebox("Krachtige actie",format("Fout # {0}",d)):0!=a.Body.ReturnValue?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Toestemming van de gebruiker","Toestemming van gebruiker geslaagd."):(statusbox("Krachtige actie","Status controleren ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1372 -function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("Krachtige actie",format("Fout # {0}",d));else{b=d5actionSelect.value;var g=a.Body;g.ConfigurationDataReset=!1;delete g.WinREBootEnabled;delete g.UEFILocalPBABootEnabled;delete g.UEFIHTTPSBootEnabled;delete g.SecureBootControlEnabled;delete g.BootguardStatus;delete g.OptionsCleared;delete g.BIOSLastStatus;delete g.UefiBootParametersArray;delete g.RPEEnabled;999==b?(g.BIOSPause=AvdPowerDlg.BIOSPause,g.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1373 -g.BIOSSetup=AvdPowerDlg.BIOSSetup,g.BootMediaIndex=AvdPowerDlg.BootMediaIndex,g.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,g.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,g.IDERBootDevice=AvdPowerDlg.IDERBootDevice,g.LockKeyboard=AvdPowerDlg.LockKeyboard,g.LockPowerButton=AvdPowerDlg.LockPowerButton,g.LockResetButton=AvdPowerDlg.LockResetButton,g.LockSleepButton=AvdPowerDlg.LockSleepButton,g.ReflashBIOS=AvdPowerDlg.ReflashBIOS,g.UseIDER=AvdPowerDlg.UseIDER,g.UseSOL=AvdPowerDlg.UseSOL,
1374 -g.UseSafeMode=AvdPowerDlg.UseSafeMode,g.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=g.SecureErase&&(g.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==g.SecureErase&&AvdPowerDlg.RSEPassword&&(g.RSEPassword=AvdPowerDlg.RSEPassword)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1375 -0!=(amtPowerBootCapabilities.PlatformErase&1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(g.BIOSPause=!1,g.EnforceSecureBoot=!1,g.BIOSSetup=99<b&&104>b,g.BootMediaIndex=0,g.FirmwareVerbosity=0,g.ForcedProgressEvents=!1,g.IDERBootDevice=202==b||203==b?1:0,g.LockKeyboard=!1,g.LockPowerButton=!1,g.LockResetButton=!1,g.LockSleepButton=!1,g.ReflashBIOS=
1376 -!1,g.UseIDER=199<b&&300>b,g.UseSOL=13==currentView&&8!=b&&300>b,g.UseSafeMode=!1,g.UserPasswordBypass=!1,null!=g.SecureErase&&(g.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===g.SecureErase&&0<rsepass.length&&(g.RSEPassword=rsepass)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&
1377 -1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=!1),rsepass=null);console.log("Opstartactie: "+b);console.log("Opstartinstellingen instellen: "+ObjectToString2(g));statusbox("Krachtige actie","Opstartinstellingen instellen ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,b,c,d){200!=d?messagebox("Krachtige actie",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",
1378 -d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",g,powerActionResponse2,0,1)},0,1)}}
1379 -function powerActionResponse2(b,c,a,d,g){200!=d?messagebox("Krachtige actie",format("PUT AMT_BootSettingData, fout # {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("Krachtige actie","Volgende opstart instellen ..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1380 -function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c41.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c41.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c41").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1396 +function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("Krachtige actie",format("Fout # {0}",d));else{b=d5actionSelect.value;var e=a.Body;e.ConfigurationDataReset=!1;delete e.WinREBootEnabled;delete e.UEFILocalPBABootEnabled;delete e.UEFIHTTPSBootEnabled;delete e.SecureBootControlEnabled;delete e.BootguardStatus;delete e.OptionsCleared;delete e.BIOSLastStatus;delete e.UefiBootParametersArray;delete e.RPEEnabled;999==b?(e.BIOSPause=AvdPowerDlg.BIOSPause,e.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1397 +e.BIOSSetup=AvdPowerDlg.BIOSSetup,e.BootMediaIndex=AvdPowerDlg.BootMediaIndex,e.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,e.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,e.IDERBootDevice=AvdPowerDlg.IDERBootDevice,e.LockKeyboard=AvdPowerDlg.LockKeyboard,e.LockPowerButton=AvdPowerDlg.LockPowerButton,e.LockResetButton=AvdPowerDlg.LockResetButton,e.LockSleepButton=AvdPowerDlg.LockSleepButton,e.ReflashBIOS=AvdPowerDlg.ReflashBIOS,e.UseIDER=AvdPowerDlg.UseIDER,e.UseSOL=AvdPowerDlg.UseSOL,
1398 +e.UseSafeMode=AvdPowerDlg.UseSafeMode,e.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=e.SecureErase&&(e.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==e.SecureErase&&AvdPowerDlg.RSEPassword&&(e.RSEPassword=AvdPowerDlg.RSEPassword)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1399 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(e.BIOSPause=!1,e.EnforceSecureBoot=!1,e.BIOSSetup=99<b&&104>b,e.BootMediaIndex=0,e.FirmwareVerbosity=0,e.ForcedProgressEvents=!1,e.IDERBootDevice=202==b||203==b?1:0,e.LockKeyboard=!1,e.LockPowerButton=!1,e.LockResetButton=!1,e.LockSleepButton=
1400 +!1,e.ReflashBIOS=!1,e.UseIDER=199<b&&300>b,e.UseSOL=13==currentView&&8!=b&&300>b,e.UseSafeMode=!1,e.UserPasswordBypass=!1,null!=e.SecureErase&&(e.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===e.SecureErase&&0<rsepass.length&&(e.RSEPassword=rsepass)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&
1401 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=!1),rsepass=null);console.log("Opstartactie: "+b);console.log("Opstartinstellingen instellen: "+ObjectToString2(e));statusbox("Krachtige actie","Opstartinstellingen instellen ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,b,c,d){200!=d?messagebox("Krachtige actie",
1402 +format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",e,powerActionResponse2,0,1)},0,1)}}
1403 +function powerActionResponse2(b,c,a,d,e){200!=d?messagebox("Krachtige actie",format("PUT AMT_BootSettingData, fout # {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("Krachtige actie","Volgende opstart instellen ..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1404 +function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c66.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c66.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c66").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1405 c+"</Selector></SelectorSet></ReferenceParameters>",powerActionResponse3)}var targetPowerAction=0;
1382 -function powerActionResponse3(b,c,a,d){console.log("powerActionResponse3("+c+","+a+","+d+")");if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("Krachtige actie","Krachtactie uitvoeren ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==b&&(b=AvdPowerDlg.Action);
1383 -targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("Krachtige actie","Volgende opstartactieset.")}}function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"Krachtactie voltooid."),setDialogMode(1,"Krachtige actie",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}
1384 -function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c54",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1406 +function powerActionResponse3(b,c,a,d){if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("Krachtige actie","Krachtactie uitvoeren ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==b&&(b=AvdPowerDlg.Action);targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+
1407 +b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("Krachtige actie","Volgende opstartactieset.")}}function powerActionResponse4(b,c,a,d){200==d&&(QH(61,"Krachtactie voltooid."),setDialogMode(1,"Krachtige actie",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c106",6==d6ConsentText.value.length)}
1408 +function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1409 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1410 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1387 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var g=b[c].app?b[c].app:"";a[d][g]||(a[d][g]={});b[c].name&&(a[d][g][b[c].name]=b[c])}xxStorage.content=
1388 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Beheer Intel&reg; AMT-opslag voor deze computer.<br><br>";var v,n,g="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,e;for(e in b[c][p]){q++;if(c!=v||p!=n)""!=g&&(a+=g,g="<br>"),v=c,n=p,g=""!=c?g+EscapeHtml(c+" / "+p):g+
1389 -"Wortel";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+e+'"',g=g+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+e+'",'+C+")><div style=float:right>"),g=g+(" "+AddButton2("Downloaden","DownloadFromStorage("+C+',"'+e+'",event)')),g=g+("</div><div style=padding-top:3px><b>"+EscapeHtml(e)+"</b>, <i>"+b[c][p][e].size+" bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==q&&(wsstack.comm.PerformAjax("",
1390 -function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=g&&(a+=g);0==d&&(a+="<div style=padding-left:15px><br><i>Geen bestanden gevonden.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("Uploaden...","UploadToStorage()"):
1391 -""));QH(55,a)}else QH(55,"Kan opslaggegevens niet laden ...<br/>"+AddButton("Vernieuwen","PullStorage()"))}function showStorageDetails(b,c,a,d){if(!xxdialogMode){var g="",v=xxStorage.content[b][c][a];""!=b&&(g+=addHtmlValue("Verkoper",b));""!=c&&(g+=addHtmlValue("Toepassing",c));g+=addHtmlValue("Naam",a);g+=addHtmlValue("Grootte",v.size+" bytes");v.link&&(g+=addHtmlValue("Koppeling",v.link));setDialogMode(11,"Opslagitem",5,showStorageDetailsEx,g,d)}}
1411 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1412 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Beheer Intel&reg; AMT-opslag voor deze computer.<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var r=0,g;for(g in b[c][p]){r++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+" / "+p):e+
1413 +"Wortel";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+g+'",'+C+")><div style=float:right>"),e=e+(" "+AddButton2("Downloaden","DownloadFromStorage("+C+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][p][g].size+" bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==r&&(wsstack.comm.PerformAjax("",
1414 +function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>Geen bestanden gevonden.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("Uploaden...","UploadToStorage()"):
1415 +""));QH(56,a)}else QH(56,"Kan opslaggegevens niet laden ...<br/>"+AddButton("Vernieuwen","PullStorage()"))}function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("Verkoper",b));""!=c&&(e+=addHtmlValue("Toepassing",c));e+=addHtmlValue("Naam",a);e+=addHtmlValue("Grootte",v.size+" bytes");v.link&&(e+=addHtmlValue("Koppeling",v.link));setDialogMode(11,"Opslagitem",5,showStorageDetailsEx,e,d)}}
1416 function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}function storageDeleteResponse(b,c){200!=c?messagebox("Opslag",format("Kan bestand (ERR {0}) niet verwijderen, controleer of de computer is ingeschakeld.",c)):PullStorage()}function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}
1417 function DownloadFromStorageEx(b,c,a){200!=c||null==b?console.log(c,"Data = null"):saveAs(data2blob(b),a)}function OpenFromStorage(b,c){if(!xxdialogMode){haltEvent(c);var a=window.open("http://"+wsstack.comm.host+":"+wsstack.comm.port+"/amt-storage/"+b,"_blank","noopener,noreferrer");a.opener=null;a.focus()}}
1418 function PushToStorage(b,c,a){var d=null;7E3<c.length&&(d=[b,c.substring(7E3)],c=c.substring(0,7E3));wsstack.comm.PerformAjax(c,PushToStorageResponse,d,0,"/amt-storage/"+b+(1==a?"?append=":""),"PUT")}function PushToStorageResponse(b,c,a){200!=c?messagebox("Opslag",format("Kan bestand (ERR {0}) niet pushen, controleer of de computer is ingeschakeld.",c)):null!=a?PushToStorage(a[0],a[1],!0):PullStorage()}
@@ -1399,36 +1423,36 @@ a+="<datalist id=mstorageapplicationlist>";for(d in xxStorageApplications)a+='<o
1423 function UploadToStorageEx(b,c){if(c)d=new FileReader,d.onload=UploadToStorageEx2,d.filename=Q("mstoragefile").value,d.readAsBinaryString(c);else{var a=Q("mstoragefile");if(1==a.files.length){var d=new FileReader;d.onload=UploadToStorageEx2;d.filename=a.files[0].name;d.readAsBinaryString(a.files[0])}}}
1424 function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0].name:"");b=b.split(" ").join("");var c=b.split("-");3==c.length&&12>c[0].length&&12>c[1].length&&(Q("mstoragevendor").value=c[0],Q("mstorageapplication").value=c[1],b=c[2]);b=b.split("-").join("");b.endsWith(".gz")&&(b=b.substring(0,b.length-3));b.endsWith(".htm")||b.endsWith(".html")?Q("mstoragetype").value="text/html":b.endsWith(".txt")&&(Q("mstoragetype").value="text/plain");11<b.length&&(b=b.substring(0,11));Q("mstoragefilename").value=
1425 b}
1402 -function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var g=Q("mstoragetype").value;""==g&&(g="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1403 -"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+g+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1426 +function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1427 +"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1428 function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," dagen").replace("H"," uren").replace("M"," minuten");b=b.replace(" 1 dag"," 1 dag").replace(" 1 uur"," 1 uur").replace(" 1 minuut "," 1 minuut ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1405 -function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Beheer wekalarmen.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,g){if(200==g){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, wakker worden "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," Bij"),void 0!=d[c].Interval&&(a+=" en elk"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+=", verwijder wanneer u klaar bent"),
1406 -b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("Bewerk...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>Geen wekkeralarmen geregistreerd.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("Verwijder alle alarmen","RemoveAllAlarms()")+AddButton("Toevoegen",
1407 -"showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
1408 -function prepareAlarmOccurenceTemplate(b,c,a,d,g){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1409 -g+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"Verwijder alle wekalarmen",3,RemoveAllAlarmsEx,"Verwijderen van alle wekalarmen bevestigen?")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,g,v){0==--b&&PullAlarms()})}
1429 +function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Beheer wekalarmen.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, wakker worden "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," Bij"),void 0!=d[c].Interval&&(a+=" en elk"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+=", verwijder wanneer u klaar bent"),
1430 +b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("Bewerk...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>Geen wekkeralarmen geregistreerd.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton2("Verwijder alle alarmen","RemoveAllAlarms()",xxAlarms?
1431 +"":"disabled")+AddButton("Toevoegen","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(58,b)}},null,!0)}
1432 +function prepareAlarmOccurenceTemplate(b,c,a,d,e){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1433 +e+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"Verwijder alle wekalarmen",3,RemoveAllAlarmsEx,"Verwijderen van alle wekalarmen bevestigen?")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,e,v){0==--b&&PullAlarms()})}
1434 function showAddAlarm(b){if(!xxdialogMode){QE("d25alarm_name",!b);if(void 0!=b){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime);Q("d25alarm_name").value=c.ElementName;Q("d25alarm_sdate").value=a.getFullYear()+"-"+_fmttimepad(a.getMonth()+1)+"-"+_fmttimepad(a.getDate());Q("d25alarm_stime").value=a.getHours()+":"+_fmttimepad(a.getMinutes())+":"+_fmttimepad(a.getSeconds());if(c.Interval){var a=c.Interval.Interval.replace("P","").replace("T","").replace("D","D,").replace("H","H,").replace("M","M,").split(","),
1411 -d=[0,0,0],g;for(g in a){var v=a[g].length-1;"D"==a[g][v]&&(d[0]=parseInt(a[g].substring(0,v)));"H"==a[g][v]&&(d[1]=parseInt(a[g].substring(0,v)));"M"==a[g][v]&&(d[2]=parseInt(a[g].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1412 -Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"Voeg een nieuw alarm toe",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c54",b)}
1413 -function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),g=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],g[0],g[1],g[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",g=Q("d25alarm_interval").value.split("-");3!=g.length&&(g=[0,0,0]);var g=
1414 -"P"+g[0]+"DT"+g[1]+"H"+g[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,g,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("Alarm toevoegen",format("Alarm toevoegen mislukt. Status: {0}. <br/> Controleer of het alarm voor de toekomst is.",d)):0!=c.Body.ReturnValue?messagebox("Alarm toevoegen",format("Kan alarm niet toevoegen {0}. <br/> Controleer of het alarm voor de toekomst is.",c.Body.ReturnValueStr)):
1415 -PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+g+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("Alarm bewerken",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1435 +d=[0,0,0],e;for(e in a){var v=a[e].length-1;"D"==a[e][v]&&(d[0]=parseInt(a[e].substring(0,v)));"H"==a[e][v]&&(d[1]=parseInt(a[e].substring(0,v)));"M"==a[e][v]&&(d[2]=parseInt(a[e].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1436 +Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"Voeg een nieuw alarm toe",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c106",b)}
1437 +function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),e=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],e[0],e[1],e[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",e=Q("d25alarm_interval").value.split("-");3!=e.length&&(e=[0,0,0]);var e=
1438 +"P"+e[0]+"DT"+e[1]+"H"+e[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,e,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("Alarm toevoegen",format("Alarm toevoegen mislukt. Status: {0}. <br/> Controleer of het alarm voor de toekomst is.",d)):0!=c.Body.ReturnValue?messagebox("Alarm toevoegen",format("Kan alarm niet toevoegen {0}. <br/> Controleer of het alarm voor de toekomst is.",c.Body.ReturnValueStr)):
1439 +PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+e+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("Alarm bewerken",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1440 function showAlertDetails(b){if(!xxdialogMode){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime),a="<div style=text-align:left>"+addHtmlValue("Naam",c.ElementName)+addHtmlValue("Wakker worden",a.toLocaleString().replace(", "," at "));void 0!=c.Interval&&(a+=addHtmlValue("Intern",_fmtinterval(c.Interval.Interval)));a+=addHtmlValue("Na het ontwaken",1==c.DeleteOnCompletion?"Alarm verwijderen":"Houd alarm")+"</div>";messagebox(format("Alarm {0}",c.ElementName),a);setDialogMode(11,"Alarm"+c.ElementName,
1441 5,showAlertDetailsDelete,a,b)}}function showAlertDetailsDelete(b,c){2==b&&amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,b,c,v){PullAlarms()})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag;
1418 -function setDialogMode(b,c,a,d,g,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c54",!0);QV("c54",a&1);QV("c53",a&2);QV(58,a&2);QV("c55",a&4);c&&QH(59,c);for(c=1;27>c;c++)QV("dialog"+c,c==b);QV("dialog",b);g&&(11==b?QH(63,g):QH(60,g));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1442 +function setDialogMode(b,c,a,d,e,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c106",!0);QV("c106",a&1);QV("c105",a&2);QV(59,a&2);QV("c107",a&4);c&&QH(60,c);for(c=1;28>c;c++)QV("dialog"+c,c==b);QV("dialog",b);e&&(11==b?QH(64,e):QH(61,e));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1443 function dialogclose(b){var c=xxdialogFunc,a=xxdialogButtons,d=xxdialogTag;setDialogMode();(a&8||b)&&c&&c(b,d)}
1420 -function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(41).offsetWidth&&(QS("Desk")["max-width"]=Q(41).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1421 -"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(60,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(60,c);setDialogMode(1,b)}
1422 -function SaveJsonFile(b,c,a,d){var g="",v={},n=new Date;amtsysstate&&(g="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));g+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1423 -n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+g+".json")}var httpErrorTable={200:"OK",401:"Authenticatiefout",408:"Time-outfout",601:"WSMAN-parseerfout",602:"Kan HTTP-antwoordkop niet parseren",603:"Onverwachte HTTP-opsomming",604:"Onverwachte HTTP-pull-reactie",997:"Ongeldig verteringsrijk"};
1444 +function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(42).offsetWidth&&(QS("Desk")["max-width"]=Q(42).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1445 +"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(61,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(61,c);setDialogMode(1,b)}
1446 +function SaveJsonFile(b,c,a,d){var e="",v={},n=new Date;amtsysstate&&(e="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));e+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1447 +n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+e+".json")}var httpErrorTable={200:"OK",401:"Authenticatiefout",408:"Time-outfout",601:"WSMAN-parseerfout",602:"Kan HTTP-antwoordkop niet parseren",603:"Onverwachte HTTP-opsomming",604:"Onverwachte HTTP-pull-reactie",997:"Ongeldig verteringsrijk"};
1448 function errcheck(b,c){if(null==wsstack||amtstack!=c)return!0;200!=b&&9!=b&&(setDialogMode(),wsstack.comm.FailAllError=999,amtstack.CancelAllQueries(999),QH(5,httpErrorTable[b]?httpErrorTable[b]:format("Fout # {0}",b)),401==b&&QH(5,'Authenticatiefout<br /><br /><input type=button value="Set new credentials" onclick=meshcentral2credCallback(true)></input>'),go(100),QS(3).width=0);return 200!=b}
1449 function goiFrame(b,c,a){if(!xxdialogMode){go(c);if(1==b.shiftKey||0==Q(13).src.endsWith(a))Q(13).src=a;QV(14,!1);QV(12,!0)}}function go(b,c){if(!xxdialogMode||1==c){QV(12,!1);QV(14,!0);QV(4,100==b);QV(6,100>b);for(var a=0;80>a;a++){QV("p"+a,a==b);var d=QS("go"+a);d&&(d["background-color"]=a==b?"#abcae1":"");d&&(d["background-color"]=a==b?"gray":"")}currentView=b;center()}}
1426 -function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,g=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:g};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(g=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:g}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(g=parseInt(a[2]));return{host:a[0],http:d,redir:g}}
1450 +function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,e=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:e};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(e=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:e}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(e=parseInt(a[2]));return{host:a[0],http:d,redir:e}}
1451 function addLink(b,c){return"<a style=cursor:pointer;color:blue onclick='"+c+"'>&diams; "+b+"</a>"}function addLinkConditional(b,c,a){return a?addLink(b,c):b}function haltEvent(b){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1}function addOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;Q(b).add(d)}function addDisabledOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;d.disabled=1;Q(b).add(d)}
1428 -function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,g=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:g=1}return 4==c+a+d+g}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("Oproepfout",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}
1452 +function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,e=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:e=1}return 4==c+a+d+e}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("Oproepfout",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}
1453 function TableStart2(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><p><td>"}function TableEntry(b,c){return"<tr><td class=r1><p>"+b+"<td class=r1>"+c}function FullTable(b,c){var a=TableStart();for(i in b)i&&b[i]&&(a+=TableEntry(i,b[i]));return a+TableEnd(c)}function TableEnd(b){return"<tr><td colspan=2><p>"+(b?b:"")+"</table>"}function AddButton(b,c){return"<input type=button value='"+b+"' onclick='"+c+"' style=margin:4px>"}
1454 function AddButton2(b,c,a){return"<input type=button value='"+b+"' onclick='"+c+"' "+a+">"}function AddRefreshButton(b){return'<input type=button name=refreshbtn value="Vernieuwen" onclick=\'refreshButtons(false);'+b+"' style=margin:4px "+(0==refreshButtonsState?"disabled":"")+">"}function MoreStart(){return'<a style=cursor:pointer;color:blue id=morexxx1 onclick=QV("morexxx1",false);QV("morexxx2",true)>&#x25BC; More</a><div id=morexxx2 style=display:none><br><hr>'}
1431 -function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,g=b.options.length;d<g;d++)a=b.options[d],a.selected&&c.push(a.value);return c}function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}
1455 +function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,e=b.options.length;d<e;d++)a=b.options[d],a.selected&&c.push(a.value);return c}function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}
1456 function guidToStr(b){return b.substring(6,8)+b.substring(4,6)+b.substring(2,4)+b.substring(0,2)+"-"+b.substring(10,12)+b.substring(8,10)+"-"+b.substring(14,16)+b.substring(12,14)+"-"+b.substring(16,20)+"-"+b.substring(20)}function getUrlVars(){for(var b,c=[],a=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),d=0;d<a.length;d++)b=a[d].indexOf("="),0<b&&(c[a[d].substring(0,b)]=a[d].substring(b+1,a[d].length));return c}
1457 function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}
1458 function getDocHeight(){return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight&&0!=document.documentElement.clientHeight?document.documentElement.clientHeight:document.getElementsByTagName("body")[0].clientHeight}function addHtmlValue(b,c){return'<div style=height:20px><div style=float:right;width:220px;overflow:hidden><b title="'+c+'">'+c+"</b></div><div>"+b+"</div></div>"}
public/commander-pt.htm
+909 -888
@@ -1,8 +1,8 @@
1 -<!DOCTYPE html><html lang="pt" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Conectar 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>Desconectado</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>Status do sistema</a><p id=go14 class=nav1 onclick=go(14)><a>Área de trabalho remota</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>arquivos</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Informações hardware</a><p id=go6 class=nav1 onclick=go(6)><a>Registro de Eventos</a><p id=go15 class=nav1 onclick=go(15)><a>Log de auditoria</a><p id=go21 class=nav1 onclick=go(21)><a>Armazenamento</a><p id=go8 class=nav1 onclick=go(8)><a>Configurações de rede</a><p id=go17 class=nav1 onclick=go(17)><a>Configurações da Internet</a><p id=go16 class=nav1 onclick=go(16)><a>Configurações de segurança</a><p id=go19 class=nav1 onclick=go(19)><a>Presença de agente</a><p id=go18 class=nav1 onclick=go(18)><a>Defesa do sistema</a><p id=go11 class=nav1 onclick=go(11)><a>Contas de usuário</a><p id=go22 class=nav1 onclick=go(22)><a>Assinaturas</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go12 class=nav1 onclick=go(12)><a>Navegador WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Mapa de disco" onclick=iderToggleDiskMap()><input type=button value="Parar sessão do IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Os disquetes são blocos de 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, os blocos são 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>O firmware deste computador deve ser atualizado,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>por favor verifique aqui</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>Carregando...</h1></div><div id=p1 style=display:none><h1>Status do sistema</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Informações hardware</h1><span id=16></span></div><div id=p6 style=display:none><h1>Registro de Eventos</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Configurações de rede</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Contas de usuário</h1><span id=21></span></div><div id=p12 style=display:none><h1>Navegador WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><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=Inquerir style=margin:4px onclick=wsmanQuery()><input type=button value=Claro style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filtro style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminal serial sobre LAN</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Porta de redirecionamento Intel® AMT ou o recurso Serial-over-LAN está desativado<span id=26>, clique aqui para habilitá-lo.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>O computador remoto não está ligado, clique aqui para emitir um comando de energia.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Ações de poder ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Iniciar operação de montagem remota de disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Começar captura" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Conectar onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Desconectado.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Alterne o que a chave de retorno enviará" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Alternar tamanho do terminal" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Alterna o tipo de emulação de teclas F1 a F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii estendido" title="Alternar tipo de emulação de terminal" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Colar disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Área de trabalho remota</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Porta de redirecionamento Intel® AMT ou recurso KVM desativado<span id=37>, clique aqui para habilitá-lo.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>O computador remoto não está ligado, clique aqui para emitir um comando de energia.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Vire à esquerda" onclick=drotate(-1)>↺</div><div class=rb title="Vire à direita" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Alternar modo de tela cheia" onkeypress="return false" onkeydown="return false" value=Cheio onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Salvar uma captura de tela da área de trabalho remota" onkeypress="return false" onkeydown="return false" value="Salve ..." onclick=deskSaveImage() style=margin-right:3px><input type=button value=Definições... title="Editar configurações da área de trabalho remota" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Iniciar operação de montagem remota de disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Alterar o estado de energia da máquina remota" onkeypress="return false" onkeydown="return false" value="Ações de poder ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Conectar onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Desconectado.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Ganhar<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Vitória + Esquerda<option value=24>Vitória + Direita<option value=5>Shift + Vitória + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Tipo onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Tela em branco&nbsp;</span><span id=47><input id=48 type=checkbox>Apenas visualização&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Log de auditoria</h1><span id=50></span></div><div id=p16 style=display:none><h1>Configurações de segurança</h1><span id=51></span></div><div id=p17 style=display:none><h1>Configurações da Internet</h1><span id=52></span></div><div id=p18 style=display:none><h1>Defesa do sistema</h1><span id=53></span></div><div id=p19 style=display:none><h1>Presença de agente</h1><span id=54></span></div><div id=p21 style=display:none><h1>Armazenamento</h1><span id=55></span></div><div id=p22 style=display:none><h1>Assinaturas de Eventos</h1><span id=56></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>arquivos</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Acima>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Selecionar tudo" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Renomear onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Excluir onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nova pasta" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Envio onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Cortar onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value="cópia de" onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Colar onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Atualizar onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Classificar por nome<option value=2>Ordenar por tamanho<option value=3>Classificar por data<option value=4>Descender por nome<option value=5>Desça por tamanho<option value=6>Desça por data</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 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=60 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>Nome do usuário</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Senha*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirme a Senha</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Rede<option value=2>Qualquer</select><div>Permissão</div></div><div>Permissões concedidas</div><ul id=62 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>* Mínimo de 8 caracteres com maiúsculas, minúsculas, 0-9 e um dos! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Ação de poder</div></div><div><span style=color:red>Atenção:</span>Algumas ações de energia podem resultar em perda de dados e desconectar as sessões de redirecionamento da área de trabalho, do terminal ou do disco.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Código de consentimento</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Visor principal<option value=1>Visor secundário<option id=d6ThirdDisplay value=2 style=display:none>Terceira exibição</select><div>Exibição de consentimento</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Codificação de Imagem</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Desativado<option value=2>Automatic<option value=3>ativado</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Mostrar Cursor do Mouse Local</label><br><label><input type=checkbox id=d7showcad>Mostrar Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Taxa de quadros de limite</label><br><label><input type=checkbox id=d7noMouseRotate>Não gire o mouse</label><br></div><div>Outros ajustes</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualidade</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Dimensionamento</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=admin style=float:right;width:220px><div style=height:20px>Nome do usuário</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Senha</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Porta de redirecionamento</label><label id=c15 style=display:block><input type=checkbox id=c16>Área de trabalho remota KVM</label><label style=display:block><input type=checkbox id=c17>Redirecionamento de IDE<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Não requerido<br></label><label><input type=radio name=d10 id=c20 value=1>Necessário apenas para KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Sempre necessário<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo de 32 caracteres"><div title="Máximo de 32 caracteres">Nome do perfil</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo de 32 caracteres"><div title="Máximo de 32 caracteres">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Prioridade</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Autenticação</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Nenhum</select><div>Criptografia</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Comprimento entre 8 e 63 caracteres"><div title="Comprimento entre 8 e 63 caracteres">Senha*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Comprimento entre 8 e 63 caracteres"><div title="Comprimento entre 8 e 63 caracteres">Confirme a Senha</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Isso salvará todo o estado do Intel® AMT desta máquina em arquivo. As senhas não serão salvas, mas alguns dados confidenciais podem ser incluídos.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Desativado<br><input type=radio name=d20 id=d20b value=1>Resposta ICMP<br><input type=radio name=d20 id=d20c value=2>Resposta RMCP<br><input type=radio name=d20 id=d20d value=3>Resposta ICMP e RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Sincronização de endereço IP do sistema operacional</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>endereço de IP</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Marca de sub-rede</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Porta de entrada</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS primário</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternativo</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Desativado<option value=1>Desativado, atualização DHCP<option value=2>ativado</select><div>Cliente DNS dinâmico</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Intervalo de atualização (minutos)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (segundos)</div></div><div style=font-size:10px><br>O intervalo padrão é 1440 minutos, o TTL padrão é 900 segundos.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Energizar<option value=10>Redefinir<option value=5>Ciclo de energia<option value=8>Desligar<option id=d24p500 value=500>Despertar do sistema operacional em modo de espera<option id=d24p501 value=501>Economia de energia do SO<option value=999>Definir opções de inicialização</select><div>Comando Remoto</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pausa no BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Impor inicialização segura</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Configuração da BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forçar eventos de progresso</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Bloquear botão liga / desliga</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Bloquear botão de reset</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Bloquear botão de suspensão</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Bloquear teclado</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Ignorar a senha do BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS do Reflash</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Modo de segurança</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Use IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Apagar seguro Intel® remoto</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Configurações de inicialização</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Nenhum<option id=ForceDVDBootOption value=1>Forçar inicialização de CD / DVD<option id=ForcePXEBootOption value=2>Forçar inicialização PXE<option id=ForceHDBootOption value=3>Forçar inicialização do disco rígido<option id=ForceDiagBootOption value=4>Forçar inicialização de diagnóstico</select><div>Fonte de Inicialização</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Nenhum<option value=1>Índice 1<option value=2>Índice 2<option value=3>Índice 3<option value=3>Índice 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Inicializar em disquete<option value=1>Inicialize no CDROM</select><div>Dispositivo de inicialização IDER</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Sistema padrão<option id=c46 value=1>Quieto<option id=c47 value=2>Verbose<option id=c48 value=3>Tela em branco</select><div>Verbocidade</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>Senha do RSE</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>Nome do alarme</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>Data de vigília (ano-mês-dia)</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>Tempo de vigília (hora: min: seg)</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>Intervalo (dias-horas-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>Mantenha o alarme<option value=1>Excluir ao concluir</select></div><div style=padding-top:4px>Depois de acordar</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>ativado<br></label><label><input type=radio name=d26b id=c50 value=0>Desativado<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>ativado<br></label><label><input type=radio name=d26a id=c52 value=0>Desativado<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Cancelar style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value="Está bem" style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Excluir style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="pt" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Conectar 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>Desconectado</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>Status do sistema</a><p id=go14 class=nav1 onclick=go(14)><a>Área de trabalho remota</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>arquivos</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Informações hardware</a><p id=go6 class=nav1 onclick=go(6)><a>Registro de Eventos</a><p id=go15 class=nav1 onclick=go(15)><a>Log de auditoria</a><p id=go21 class=nav1 onclick=go(21)><a>Armazenamento</a><p id=go8 class=nav1 onclick=go(8)><a>Configurações de rede</a><p id=go17 class=nav1 onclick=go(17)><a>Configurações da Internet</a><p id=go16 class=nav1 onclick=go(16)><a>Configurações de segurança</a><p id=go19 class=nav1 onclick=go(19)><a>Presença de agente</a><p id=go18 class=nav1 onclick=go(18)><a>Defesa do sistema</a><p id=go11 class=nav1 onclick=go(11)><a>Contas de usuário</a><p id=go22 class=nav1 onclick=go(22)><a>Assinaturas</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go12 class=nav1 onclick=go(12)><a>Navegador WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Mapa de disco" onclick=iderToggleDiskMap()><input type=button value="Parar sessão do IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Os disquetes são blocos de 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, os blocos são 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>O firmware deste computador deve ser atualizado,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>por favor verifique aqui</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>Carregando...</h1></div><div id=p1 style=display:none><h1>Status do sistema</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Informações hardware</h1><span id=16></span></div><div id=p6 style=display:none><h1>Registro de Eventos</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Configurações de rede</h1><span id=19></span><span id=20></span><span id=21></span></div><div id=p11 style=display:none><h1>Contas de usuário</h1><span id=22></span></div><div id=p12 style=display:none><h1>Navegador WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=23 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=24 type=button value=Inquerir style=margin:4px onclick=wsmanQuery()><input type=button value=Claro style=margin:4px onclick="QH(25, '')"><input id=c0 placeholder=Filtro style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=25></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminal serial sobre LAN</h1><br><div id=26 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Porta de redirecionamento Intel® AMT ou o recurso Serial-over-LAN está desativado<span id=27>, clique aqui para habilitá-lo.</span></div></div><div id=28 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>O computador remoto não está ligado, clique aqui para emitir um comando de energia.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=29></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Ações de poder ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Iniciar operação de montagem remota de disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Começar captura" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Conectar onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=30>Desconectado.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Alterne o que a chave de retorno enviará" onclick="termToggleCr();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Alternar tamanho do terminal" onclick="termToggleSize();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Alterna o tipo de emulação de teclas F1 a F10" onclick="termToggleFx();Q(33).blur()"><input id=34 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii estendido" title="Alternar tipo de emulação de terminal" onclick="termToggleType();Q(34).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=35 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Colar disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=36><h1>Área de trabalho remota</h1><br></div><div id=37 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Porta de redirecionamento Intel® AMT ou recurso KVM desativado<span id=38>, clique aqui para habilitá-lo.</span></div></div><div id=39 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>O computador remoto não está ligado, clique aqui para emitir um comando de energia.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=40></span>&nbsp;<div class=rb title="Vire à esquerda" onclick=drotate(-1)>↺</div><div class=rb title="Vire à direita" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Alternar modo de tela cheia" onkeypress="return false" onkeydown="return false" value=Cheio onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Salvar uma captura de tela da área de trabalho remota" onkeypress="return false" onkeydown="return false" value="Salve ..." onclick=deskSaveImage() style=margin-right:3px><input type=button value=Definições... title="Editar configurações da área de trabalho remota" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Iniciar operação de montagem remota de disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Alterar o estado de energia da máquina remota" onkeypress="return false" onkeydown="return false" value="Ações de poder ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Conectar onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=41>Desconectado.</span></div><tr><td id=42 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onwheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=43 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Ganhar<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Vitória + Esquerda<option value=24>Vitória + Direita<option value=5>Shift + Vitória + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12<option value=25>Enter</select><input id=DeskWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=44 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=45 type=button value=Tipo onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=46><input id=47 type=checkbox>Tela em branco&nbsp;</span><span id=48><input id=49 type=checkbox>Apenas visualização&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=50></span><h1>Log de auditoria</h1><span id=51></span></div><div id=p16 style=display:none><h1>Configurações de segurança</h1><span id=52></span></div><div id=p17 style=display:none><h1>Configurações da Internet</h1><span id=53></span></div><div id=p18 style=display:none><h1>Defesa do sistema</h1><span id=54></span></div><div id=p19 style=display:none><h1>Presença de agente</h1><span id=55></span></div><div id=p21 style=display:none><h1>Armazenamento</h1><span id=56></span></div><div id=p22 style=display:none><h1>Assinaturas de Eventos</h1><span id=57></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=58></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>arquivos</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Acima>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Selecionar tudo" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Renomear onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Excluir onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nova pasta" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Envio onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Cortar onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value="cópia de" onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Colar onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Atualizar onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Classificar por nome<option value=2>Ordenar por tamanho<option value=3>Classificar por data<option value=4>Descender por nome<option value=5>Desça por tamanho<option value=6>Desça por data</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=59 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=60 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=61 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>Nome do usuário</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Senha*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirme a Senha</div></div><div id=62><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Rede<option value=2>Qualquer</select><div>Permissão</div></div><div>Permissões concedidas</div><ul id=63 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>* Mínimo de 8 caracteres com maiúsculas, minúsculas, 0-9 e um dos! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Ação de poder</div></div><div><span style=color:red>Atenção:</span>Algumas ações de energia podem resultar em perda de dados e desconectar as sessões de redirecionamento da área de trabalho, do terminal ou do disco.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Código de consentimento</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Visor principal<option value=1>Visor secundário<option id=d6ThirdDisplay value=2 style=display:none>Terceira exibição</select><div>Exibição de consentimento</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Codificação de Imagem</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Desativado<option value=2>Automatic<option value=3>ativado</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Mostrar Cursor do Mouse Local</label><br><label><input type=checkbox id=d7showcad>Mostrar Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Taxa de quadros de limite</label><br><label><input type=checkbox id=d7noMouseRotate>Não gire o mouse</label><br><label><input type=checkbox id=d7kvmrmw>Reverse Mouse Wheel</label><br></div><div>Outros ajustes</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualidade</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Dimensionamento</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=admin style=float:right;width:220px><div style=height:20px>Nome do usuário</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Senha</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Porta de redirecionamento</label><label id=c15 style=display:block><input type=checkbox id=c16>Área de trabalho remota KVM</label><label style=display:block><input type=checkbox id=c17>Redirecionamento de IDE<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Não requerido<br></label><label><input type=radio name=d10 id=c20 value=1>Necessário apenas para KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Sempre necessário<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=64></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo de 32 caracteres"><div title="Máximo de 32 caracteres">Nome do perfil</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo de 32 caracteres"><div title="Máximo de 32 caracteres">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Prioridade</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Autenticação</div></div><div style=height:26px><select id=c26 style=float:right;width:200px onclick=updateWifiDialog()><option id=65 value=4>CCMP-AES<option id=66 value=3>TKIP-RC4</select><div>Criptografia</div></div><div id=c27><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Comprimento entre 8 e 63 caracteres"><div title="Comprimento entre 8 e 63 caracteres">Senha*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Comprimento entre 8 e 63 caracteres"><div title="Comprimento entre 8 e 63 caracteres">Confirme a Senha</div></div></div><div id=c30 style=display:none><div id=c31 style=height:26px><select id=c32 style=float:right;width:200px onchange=updateNetAuth2Dialog(event)><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protocolo</div></div><div id=c33 style=height:26px><input id=c34 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Máximo de 32 caracteres"><div title="Máximo de 32 caracteres">Server Name</div></div><div id=c35 style=height:26px><select id=c36 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c37 style=height:26px><input id=c38 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c39 style=height:26px><input id=c40 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Nome do usuário</div></div><div id=c41 style=height:26px><input id=c42 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuth2Dialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Senha</div></div><div id=c43 style=height:26px><input id=c44 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuth2Dialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c45 style=height:26px><input id=c46 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c47 style=height:26px><input id=c48 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c49 style=height:26px><select id=c50 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Client Certificate</div></div><div id=c51 style=height:26px><select id=c52 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Server Issuer Cert</div></div><div id=c53 style=height:26px><select id=c54 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=1>ativado<option value=0>Desativado</select><div>Active in S0</div></div></div></div><div id=dialog19 style=margin:auto;margin:3px>Isso salvará todo o estado do Intel® AMT desta máquina em arquivo. As senhas não serão salvas, mas alguns dados confidenciais podem ser incluídos.<br><br><input id=c55 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Desativado<br><input type=radio name=d20 id=d20b value=1>Resposta ICMP<br><input type=radio name=d20 id=d20c value=2>Resposta RMCP<br><input type=radio name=d20 id=d20d value=3>Resposta ICMP e RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=67><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Sincronização de endereço IP do sistema operacional</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=68><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c56 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>endereço de IP</div></div><div style=height:26px id=69><input id=c57 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Marca de sub-rede</div></div><div style=height:26px><input id=c58 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Porta de entrada</div></div><div style=height:26px><input id=c59 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS primário</div></div><div style=height:26px><input id=c60 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternativo</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c61 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Desativado<option value=1>Desativado, atualização DHCP<option value=2>ativado</select><div>Cliente DNS dinâmico</div></div><div style=height:26px><input id=c62 style=float:right;width:200px><div>Intervalo de atualização (minutos)</div></div><div style=height:26px><input id=c63 style=float:right;width:200px><div>TTL (segundos)</div></div><div style=font-size:10px><br>O intervalo padrão é 1440 minutos, o TTL padrão é 900 segundos.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c64 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Energizar<option value=10>Redefinir<option value=5>Ciclo de energia<option value=8>Desligar<option id=d24p500 value=500>Despertar do sistema operacional em modo de espera<option id=d24p501 value=501>Economia de energia do SO<option value=999>Definir opções de inicialização</select><div>Comando Remoto</div></div><div style=height:80px><div id=c65 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pausa no BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Impor inicialização segura</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Configuração da BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forçar eventos de progresso</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Bloquear botão liga / desliga</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Bloquear botão de reset</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Bloquear botão de suspensão</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Bloquear teclado</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Ignorar a senha do BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS do Reflash</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Modo de segurança</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Use IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Apagar seguro Intel® remoto</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Configurações de inicialização</div></div><div style=height:26px><select id=c66 style=float:right;width:200px onchange=showAdvPowerDlgChange()></select><div>Fonte de Inicialização</div></div><div id=c67 style=height:26px><select id=c68 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Nenhum<option value=1>Índice 1<option value=2>Índice 2<option value=3>Índice 3<option value=3>Índice 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c69 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Inicializar em disquete<option value=1>Inicialize no CDROM</select><div>Dispositivo de inicialização IDER</div></div><div style=height:26px><select id=c70 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Sistema padrão<option id=c71 value=1>Quieto<option id=c72 value=2>Verbose<option id=c73 value=3>Tela em branco</select><div>Verbocidade</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>Senha do RSE</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>Nome do alarme</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>Data de vigília (ano-mês-dia)</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>Tempo de vigília (hora: min: seg)</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>Intervalo (dias-horas-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>Mantenha o alarme<option value=1>Excluir ao concluir</select></div><div style=padding-top:4px>Depois de acordar</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c74 value=2>ativado<br></label><label><input type=radio name=d26b id=c75 value=0>Desativado<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c76 value=1>ativado<br></label><label><input type=radio name=d26a id=c77 value=0>Desativado<br></label></div><div id=dialog27 style=margin:auto;margin:3px><br><div style=height:26px><select id=c78 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>Desativado<option value=1>ativado</select><div>ativado</div></div><div id=c79 style=height:26px><select id=c80 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protocolo</div></div><div id=c81 style=height:26px><input id=c82 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Máximo de 32 caracteres"><div title="Máximo de 32 caracteres">Server Name</div></div><div id=c83 style=height:26px><select id=c84 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c85 style=height:26px><input id=c86 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c87 style=height:26px><input id=c88 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Nome do usuário</div></div><div id=c89 style=height:26px><input id=c90 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuthDialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Senha</div></div><div id=c91 style=height:26px><input id=c92 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c93 style=height:26px><input id=c94 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c95 style=height:26px><input id=c96 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c97 style=height:26px><select id=c98 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Client Certificate</div></div><div id=c99 style=height:26px><select id=c100 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Server Issuer Cert</div></div><div id=c101 style=height:26px><select id=c102 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>ativado<option value=1>Desativado</select><div>Active in S0</div></div><div id=c103 style=height:26px><input id=c104 style=float:right;width:200px onkeyup=updateNetAuthDialog()><div>PXE Timeout</div></div></div></div><div style=padding:10px;margin-bottom:4px><input id=c105 type=button value=Cancelar style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c106 type=button value="Está bem" style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c107 type=button value=Excluir style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
5 -$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var g=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==g&&$jscomp.global.Object.defineProperty(b,d,g)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
5 +$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var e=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==e&&$jscomp.global.Object.defineProperty(b,d,e)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
6 String.prototype.endsWith||(String.prototype.endsWith=function(b){return-1!==this.indexOf(b,this.length-b.length)});function Q(b){return document.getElementById(b)}function QS(b){try{return Q(b).style}catch(c){}}function QE(b,c){try{Q(b).disabled=!c}catch(a){}}function QV(b,c){try{QS(b).display=c?"":"none"}catch(a){}}function QA(b,c){Q(b).innerHTML+=c}function QH(b,c){Q(b).innerHTML=c}function inputBoxFocus(b){Q(b).focus();var c=Q(b).value;Q(b).value="";Q(b).value=c}
7 function ReadShort(b,c){return(b.charCodeAt(c)<<8)+b.charCodeAt(c+1)}function ReadShortX(b,c){return(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}function ReadInt(b,c){return 16777216*b.charCodeAt(c)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadSInt(b,c){return(b.charCodeAt(c)<<24)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadIntX(b,c){return 16777216*b.charCodeAt(c+3)+(b.charCodeAt(c+2)<<16)+(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}
8 function ShortToStr(b){return String.fromCharCode(b>>8&255,b&255)}function ShortToStrX(b){return String.fromCharCode(b&255,b>>8&255)}function IntToStr(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}function IntToStrX(b){return String.fromCharCode(b&255,b>>8&255,b>>16&255,b>>24&255)}function MakeToArray(b){return b&&null!=b&&"object"!=typeof b?[b]:b}function SplitArray(b){return b.split(",")}function Clone(b){return JSON.parse(JSON.stringify(b))}
@@ -12,153 +12,153 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a,d){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(d?d:32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,u,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.floppyReady)return g.floppyReady=!0,g.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.cdromReady)return g.cdromReady=!0,g.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}g.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,u);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),g.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 -d=0;switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}g.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),u&1);return}g.SendCommandEndResponse(1,5,c,36,0);break;case 27:g.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==g.floppy||176==c&&null==g.cdrom)return g.SendCommandEndResponse(1,
18 -2,c,58,0),-1;g.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}g.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),u&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.floppy&&(d=(g.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.cdrom&&(d=(g.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);g.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),u&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,F,d);a(c,F,d,u);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);g.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return g.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?g.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -u&1):0==N&&(H?g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),u&1):g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),u&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=r;if(16==v||N&&16>v)H+=K;if(30==
22 -v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=A;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));g.SendDataToHost(c,!0,H,u&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");g.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=g.floppy?d=2:176==c&&null!=g.cdrom&&(d=2);g.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),u&1);break;case 76:g.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),g.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),g.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;F=0;160==c?null!=g.floppy&&(F=g.floppy.size>>9):null!=g.cdrom&&(F=g.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?y:R:z;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?q:l:D;break;case 26:176==c&&(H=e);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?g.SendCommandEndResponse(0,5,c,32,0):g.SendDataToHost(c,!0,H,u&1);break;case 81:g.SendDataToHost(c,!0,E,u&1);break;case 172:g.SendDataToHost(c,!0,O,u&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),g.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 -b,x,e){var c=null,y=0;160==a&&(c=g.floppy,null!=g.floppy&&(y=g.floppy.size>>9));176==a&&(c=g.cdrom,null!=g.cdrom&&(y=g.cdrom.size>>11));if(0>x||b+x>y)return g.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return g.SendCommandEndResponse(1,0,a,0,0),0;null!=c&&(g.sectorStats&&g.sectorStats(1,160==a?0:1,y,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==u?H.push({media:c,dev:a,lba:b,len:x,fr:e}):(u=c,T=a,P=b,F=x,d(e)))}function d(a){var b=F,x=P;F>g.iderinfo.readbfr&&(b=g.iderinfo.readbfr);F-=b;P+=b;var e=
26 -new FileReader;e.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));g.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(u=null,N?(g.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),u=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};e.readAsBinaryString?e.readAsBinaryString(u.slice(x,x+b)):e.readAsArrayBuffer(u.slice(x,x+b))}var g={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,q,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,q);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),q&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),q&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);e.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),q&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,F,d);a(c,F,d,q);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);e.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +q&1):0==N&&(H?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),q&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),q&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=u;if(16==v||N&&16>v)H+=K;if(30==
22 +v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=z;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));e.SendDataToHost(c,!0,H,q&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),q&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;F=0;160==c?null!=e.floppy&&(F=e.floppy.size>>9):null!=e.cdrom&&(F=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?A:R:y;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?r:l:D;break;case 26:176==c&&(H=g);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,H,q&1);break;case 81:e.SendDataToHost(c,!0,E,q&1);break;case 172:e.SendDataToHost(c,!0,O,q&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 +b,x,c){var g=null,p=0;160==a&&(g=e.floppy,null!=e.floppy&&(p=e.floppy.size>>9));176==a&&(g=e.cdrom,null!=e.cdrom&&(p=e.cdrom.size>>11));if(0>x||b+x>p)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,p,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==q?H.push({media:g,dev:a,lba:b,len:x,fr:c}):(q=g,T=a,P=b,F=x,d(c)))}function d(a){var b=F,x=P;F>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);F-=b;P+=b;var c=
26 +new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));e.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(q=null,N?(e.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),q=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(q.slice(x,x+b)):c.readAsArrayBuffer(q.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
27 iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,
28 -0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),e=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 -18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),r=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 -0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),A=String.fromCharCode(1,5,3,0),y=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),z=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);g.xxStateChange=function(a){b("IDER-StateChange",a);
31 -0==a&&g.Stop();3==a&&g.Start()};g.Start=function(){b("IDER-Start");b(g.floppy,g.cdrom);g.bytesToAmt=0;g.bytesFromAmt=0;g.inSequence=0;g.outSequence=0;H=[];g.SendCommand(64,ShortToStrX(g.rx_timeout)+ShortToStrX(g.tx_timeout)+ShortToStrX(g.heartbeat)+IntToStrX(g.version));g.sectorStats&&(g.sectorStats(0,0,g.floppy?g.floppy.size>>9:0),g.sectorStats(0,1,g.cdrom?g.cdrom.size>>11:0))};g.Stop=function(){b("IDER-Stop");g.parent.Stop()};g.ProcessData=function(a){g.bytesFromAmt+=a.length;g.acc+=a;null!=v&&
32 -v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",g.acc.length,rstr2hex(g.acc));;){a=g.ProcessDataEx();if(0==a)break;if(g.inSequence!=ReadIntX(g.acc,4)){b("ERROR: Out of sequence",g.inSequence,ReadIntX(g.acc,4));g.Stop();break}g.inSequence++;g.acc=g.acc.substring(a)}};g.SendCommand=function(a,x,e,c){null==x&&(x="");e=50<a&&1==e?2:0;c&&(e+=1);x=String.fromCharCode(a,0,0,e)+IntToStrX(g.outSequence++)+x;g.parent.xxSend(x);g.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 -"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};g.SendCommandEndResponse=function(a,b,x,e,c){a?g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,e,c),!0)};g.SendDataToHost=function(a,b,x,e){var c=e?0:x.length;1==b?g.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,e):g.SendCommand(84,
34 -String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,e)};g.SendGetDataFromHost=function(a,b){g.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};g.SendDisableEnableFeatures=function(a,b){null==b&&(b="");g.SendCommand(72,String.fromCharCode(a)+b)};g.ProcessDataEx=function(){if(8>g.acc.length)return 0;switch(g.acc.charCodeAt(0)){case 65:if(30>g.acc.length)break;var a=g.acc.charCodeAt(29);
35 -if(g.acc.length<30+a)break;g.iderinfo={};g.iderinfo.major=g.acc.charCodeAt(8);g.iderinfo.minor=g.acc.charCodeAt(9);g.iderinfo.fwmajor=g.acc.charCodeAt(10);g.iderinfo.fwminor=g.acc.charCodeAt(11);g.iderinfo.readbfr=ReadShortX(g.acc,16);g.iderinfo.writebfr=ReadShortX(g.acc,18);g.iderinfo.proto=g.acc.charCodeAt(21);g.iderinfo.iana=ReadIntX(g.acc,25);b(g.iderinfo);0!=g.iderinfo.proto&&(b("Unknown proto",g.iderinfo.proto),g.Stop());8192<g.iderinfo.readbfr&&(b("Illegal read buffer size",g.iderinfo.readbfr),
36 -g.Stop());8192<g.iderinfo.writebfr&&(b("Illegal write buffer size",g.iderinfo.writebfr),g.Stop());0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),g.Stop(),8;case 68:return g.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>g.acc.length)break;a=g.acc.charCodeAt(8);null===u?(g.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 -a));return 9;case 73:if(13>g.acc.length)break;var a=g.acc.charCodeAt(8),x=ReadIntX(g.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:g.enabled=x&2?!0:!1;b("IDER Status: "+g.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>g.acc.length)break;b("IDER: ABORT",g.acc.charCodeAt(8));
38 -return 11;case 75:return 8;case 80:if(28>g.acc.length)break;var a=g.acc.charCodeAt(14)&16?176:160,x=g.acc.charCodeAt(14),e=g.acc.substring(16,28),y=g.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(e),y,x);c(a,e,y,x);return 28;case 83:if(14>g.acc.length)break;a=ReadShortX(g.acc,9);if(g.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",g.acc[0]),g.Stop()}return 0};
39 -var H=[],N=!1,u=null,T,P,F;return g},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 -a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,g,v,n){b("SIDER-Start",a,d,g,v,n);c.host=a;c.port=d;c.user=g;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==g?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+g:"")+"&tls1only="+
41 -c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(g){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
28 +0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),r=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 +18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 +0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);
31 +0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;H=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&
32 +v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 +"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,
34 +String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);
35 +if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),
36 +e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===q?(e.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 +a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));
38 +return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),d=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),d,x);c(a,g,d,x);return 28;case 83:if(14>e.acc.length)break;a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};
39 +var H=[],N=!1,q=null,T,P,F;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 +a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+
41 +c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
42 b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);break;
43 -default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,g){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){e.socketState=2;e.socketParseState=0;e.socketAccumulator="";e.socketHeader=null;e.socketData="";
44 -for(i in e.pendingAjaxCall)e.sendRequest(e.pendingAjaxCall[i][0],e.pendingAjaxCall[i][3],e.pendingAjaxCall[i][4])}function p(a){var b=e.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(e.socketAccumulator=b+a;;){if(0==e.socketParseState){b=e.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;e.socketHeader=e.socketAccumulator.substring(0,b).split("\r\n");if(null==e.amtVersion)for(var c in e.socketHeader)0==e.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 -(e.amtVersion=e.socketHeader[c].substring(46));e.socketAccumulator=e.socketAccumulator.substring(b+4);e.socketParseState=1;e.socketData="";e.socketXHeader={Directive:e.socketHeader[0].split(" ")};for(c in e.socketHeader)0!=c&&(b=e.socketHeader[c].indexOf(":"),e.socketXHeader[e.socketHeader[c].substring(0,b).toLowerCase()]=e.socketHeader[c].substring(b+2))}if(1==e.socketParseState){b=-1;if(void 0==e.socketXHeader.connection||"close"!=e.socketXHeader.connection.toLowerCase()||void 0!=e.socketXHeader["transfer-encoding"]&&
46 -"chunked"==e.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=e.socketXHeader["content-length"]){b=parseInt(e.socketXHeader["content-length"]);if(e.socketAccumulator.length<b)break;a=e.socketAccumulator.substring(0,b);e.socketAccumulator=e.socketAccumulator.substring(b);e.socketData=a;b=0}else{var p=e.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(e.socketAccumulator.substring(0,p),16);if(isNaN(b)){e.websocket&&e.websocket.close();break}if(e.socketAccumulator.length<p+2+b+2)break;
47 -a=e.socketAccumulator.substring(p+2,p+2+b);e.socketAccumulator=e.socketAccumulator.substring(p+2+b+2);e.socketData+=a}else b=0;if(0==b){p=e.socketXHeader;b=e.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++e.authcounter){if(e.challengeParams=e.parseDigest(p["www-authenticate"]),null!=e.challengeParams.qop){b=e.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 -e.challengeParams.qop="auth-int":e.challengeParams.qop="auth"}}else p=e.pendingAjaxCall.shift(),e.authcounter=0,e.ActiveAjaxCount--,e.gotNextMessages(b,"success",{status:a},p),e.PerformNextAjax();e.socketParseState=0;e.socketHeader=null}}}}function q(a){0==e.inDataCount&&(e.tlsv1only=1-e.tlsv1only);e.socketState=0;null!=e.socket&&(e.socket.close(),e.socket=null);if(0<e.pendingAjaxCall.length){a=e.pendingAjaxCall.shift();var b=a[5];e.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var e={PendingAjax:[],
49 -ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};e.host=b;e.port=c;e.user=a;e.pass=d;e.tls=g;e.tlsv1only=0;e.inDataCount=0;e.amtVersion=null;e.digestRealmMatch=null;e.digestRealm=null;e.PerformAjax=function(a,b,c,p,d,h){e.ActiveAjaxCount<e.MaxActiveAjaxCount&&0==e.PendingAjax.length?e.PerformAjaxEx(a,b,c,d,h):1==p?e.PendingAjax.unshift([a,b,c,d,h]):e.PendingAjax.push([a,b,c,d,h])};e.PerformNextAjax=function(){if(!(e.ActiveAjaxCount>=
50 -e.MaxActiveAjaxCount||0==e.PendingAjax.length)){var a=e.PendingAjax.shift();e.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);e.PerformNextAjax()}};e.PerformAjaxEx=function(a,b,c,p,d){if(0!=e.FailAllError)e.gotNextMessagesError({status:e.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),e.ActiveAjaxCount++,e.PerformAjaxExNodeJS(a,b,c,p,d)};e.pendingAjaxCall=[];e.PerformAjaxExNodeJS=function(a,b,c,p,d){e.PerformAjaxExNodeJS2(a,
51 -b,c,p,d,5)};e.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=e.FailAllError?(e.ActiveAjaxCount--,999!=e.FailAllError&&e.gotNextMessages(null,"error",{status:0==e.FailAllError?408:e.FailAllError},[a,b,c,p,d]),e.PerformNextAjax()):(e.pendingAjaxCall.push([a,b,c,p,d,h]),0==e.socketState?e.xxConnectHttpSocket():2==e.socketState&&e.sendRequest(a,p,d))};e.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=e.challengeParams){e.digestRealm=e.challengeParams.realm;
52 -if(e.digestRealmMatch&&e.digestRealm!=e.digestRealmMatch){e.FailAllError=997;e.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(e.user+":"+e.challengeParams.realm+":"+e.pass)+":"+e.challengeParams.nonce+":"+n(e.noncecounter)+":"+d+":"+e.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==e.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+e.renderDigest({username:e.user,realm:e.challengeParams.realm,nonce:e.challengeParams.nonce,uri:b,qop:e.challengeParams.qop,
53 -response:c,nc:n(e.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+e.host+":"+e.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==e.socketState&&null!=e.socket&&e.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{e.socket.send(b.buffer)}catch(h){}}};e.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var e=b.trim().split("=");a[e[0]]=e[1].replace(RegExp('"',"g"),"");return a},{})};e.renderDigest=function(a){var b=
54 -[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,e){return b+","+("nc"==e||"qop"==e?e+"="+a[e]:e+'="'+a[e]+'"')},"").substring(1)};e.xxConnectHttpSocket=function(){e.inDataCount=0;e.socketState=1;e.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+e.host+"&port="+e.port+"&tls="+e.tls+"&tls1only="+e.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 -typeof d?"&serverauth=1&user="+a:""));e.socket.binaryType="arraybuffer";e.socket.onopen=l;e.socket.onmessage=p;e.socket.onclose=q};e.gotNextMessages=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](a,c.status,p[2])};e.gotNextMessagesError=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](e,null,{Header:{HttpError:a.status}},a.status,p[2])};e.CancelAllQueries=function(a){for(;0<e.PendingAjax.length;){var b=
56 -e.PendingAjax.shift();b[1](null,a,b[2])}null!=e.websocket&&(e.websocket.close(),e.websocket=null,e.socketState=0)};return e},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
43 +default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){g.socketState=2;g.socketParseState=0;g.socketAccumulator="";g.socketHeader=null;g.socketData="";
44 +for(i in g.pendingAjaxCall)g.sendRequest(g.pendingAjaxCall[i][0],g.pendingAjaxCall[i][3],g.pendingAjaxCall[i][4])}function p(a){var b=g.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(g.socketAccumulator=b+a;;){if(0==g.socketParseState){b=g.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;g.socketHeader=g.socketAccumulator.substring(0,b).split("\r\n");if(null==g.amtVersion)for(var c in g.socketHeader)0==g.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 +(g.amtVersion=g.socketHeader[c].substring(46));g.socketAccumulator=g.socketAccumulator.substring(b+4);g.socketParseState=1;g.socketData="";g.socketXHeader={Directive:g.socketHeader[0].split(" ")};for(c in g.socketHeader)0!=c&&(b=g.socketHeader[c].indexOf(":"),g.socketXHeader[g.socketHeader[c].substring(0,b).toLowerCase()]=g.socketHeader[c].substring(b+2))}if(1==g.socketParseState){b=-1;if(void 0==g.socketXHeader.connection||"close"!=g.socketXHeader.connection.toLowerCase()||void 0!=g.socketXHeader["transfer-encoding"]&&
46 +"chunked"==g.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=g.socketXHeader["content-length"]){b=parseInt(g.socketXHeader["content-length"]);if(g.socketAccumulator.length<b)break;a=g.socketAccumulator.substring(0,b);g.socketAccumulator=g.socketAccumulator.substring(b);g.socketData=a;b=0}else{var p=g.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(g.socketAccumulator.substring(0,p),16);if(isNaN(b)){g.websocket&&g.websocket.close();break}if(g.socketAccumulator.length<p+2+b+2)break;
47 +a=g.socketAccumulator.substring(p+2,p+2+b);g.socketAccumulator=g.socketAccumulator.substring(p+2+b+2);g.socketData+=a}else b=0;if(0==b){p=g.socketXHeader;b=g.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++g.authcounter){if(g.challengeParams=g.parseDigest(p["www-authenticate"]),null!=g.challengeParams.qop){b=g.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 +g.challengeParams.qop="auth-int":g.challengeParams.qop="auth"}}else p=g.pendingAjaxCall.shift(),g.authcounter=0,g.ActiveAjaxCount--,g.gotNextMessages(b,"success",{status:a},p),g.PerformNextAjax();g.socketParseState=0;g.socketHeader=null}}}}function r(a){0==g.inDataCount&&(g.tlsv1only=1-g.tlsv1only);g.socketState=0;null!=g.socket&&(g.socket.close(),g.socket=null);if(0<g.pendingAjaxCall.length){a=g.pendingAjaxCall.shift();var b=a[5];g.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var g={PendingAjax:[],
49 +ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};g.host=b;g.port=c;g.user=a;g.pass=d;g.tls=e;g.tlsv1only=0;g.inDataCount=0;g.amtVersion=null;g.digestRealmMatch=null;g.digestRealm=null;g.PerformAjax=function(a,b,c,p,d,h){g.ActiveAjaxCount<g.MaxActiveAjaxCount&&0==g.PendingAjax.length?g.PerformAjaxEx(a,b,c,d,h):1==p?g.PendingAjax.unshift([a,b,c,d,h]):g.PendingAjax.push([a,b,c,d,h])};g.PerformNextAjax=function(){if(!(g.ActiveAjaxCount>=
50 +g.MaxActiveAjaxCount||0==g.PendingAjax.length)){var a=g.PendingAjax.shift();g.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);g.PerformNextAjax()}};g.PerformAjaxEx=function(a,b,c,p,d){if(0!=g.FailAllError)g.gotNextMessagesError({status:g.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),g.ActiveAjaxCount++,g.PerformAjaxExNodeJS(a,b,c,p,d)};g.pendingAjaxCall=[];g.PerformAjaxExNodeJS=function(a,b,c,p,d){g.PerformAjaxExNodeJS2(a,
51 +b,c,p,d,5)};g.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=g.FailAllError?(g.ActiveAjaxCount--,999!=g.FailAllError&&g.gotNextMessages(null,"error",{status:0==g.FailAllError?408:g.FailAllError},[a,b,c,p,d]),g.PerformNextAjax()):(g.pendingAjaxCall.push([a,b,c,p,d,h]),0==g.socketState?g.xxConnectHttpSocket():2==g.socketState&&g.sendRequest(a,p,d))};g.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=g.challengeParams){g.digestRealm=g.challengeParams.realm;
52 +if(g.digestRealmMatch&&g.digestRealm!=g.digestRealmMatch){g.FailAllError=997;g.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(g.user+":"+g.challengeParams.realm+":"+g.pass)+":"+g.challengeParams.nonce+":"+n(g.noncecounter)+":"+d+":"+g.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==g.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+g.renderDigest({username:g.user,realm:g.challengeParams.realm,nonce:g.challengeParams.nonce,uri:b,qop:g.challengeParams.qop,
53 +response:c,nc:n(g.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+g.host+":"+g.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==g.socketState&&null!=g.socket&&g.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{g.socket.send(b.buffer)}catch(h){}}};g.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};g.renderDigest=function(a){var b=
54 +[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+","+("nc"==c||"qop"==c?c+"="+a[c]:c+'="'+a[c]+'"')},"").substring(1)};g.xxConnectHttpSocket=function(){g.inDataCount=0;g.socketState=1;g.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+g.host+"&port="+g.port+"&tls="+g.tls+"&tls1only="+g.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 +typeof d?"&serverauth=1&user="+a:""));g.socket.binaryType="arraybuffer";g.socket.onopen=l;g.socket.onmessage=p;g.socket.onclose=r};g.gotNextMessages=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](a,c.status,p[2])};g.gotNextMessagesError=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](g,null,{Header:{HttpError:a.status}},a.status,p[2])};g.CancelAllQueries=function(a){for(;0<g.PendingAjax.length;){var b=
56 +g.PendingAjax.shift();b[1](null,a,b[2])}null!=g.websocket&&(g.websocket.close(),g.websocket=null,g.socketState=0)};return g},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
57 function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;
58 d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?
59 d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,
60 0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):d.Stop(2);
61 -else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),e=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),q=q+(e+
62 -1),e=0,e=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(e=n[q],e=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),w="00000002:"+C+":"+e+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(q+=e.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 -p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(e.length)+e);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
61 +else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var r=0,p=n[r],l=a(new Uint8Array(n.buffer.slice(r+1,r+1+p))),r=r+(p+1),g=n[r],p=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),r=r+(g+
62 +1),g=0,g=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[r],g=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),w="00000002:"+C+":"+g+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));r=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(r+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(r)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 +p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
64 break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;
65 break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&
66 1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+
67 "/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=
68 --1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,g,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
68 +-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
69 b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b="",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";
70 var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";
71 -b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,g,v);q.PerformAjax=function(a,b,c,p,d){null==d&&(d="");q.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" '+
72 -d+"><Header><a:Action>"+a,function(a,c,e){var p=q.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(q,p.Header.ResourceURI,p,c,e)}else b(q,null,{Header:{HttpError:c}},601,e)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,h,g,l,B){var x="",A="";
73 -g="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 -B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",A='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=g&&(g="<a:ReferenceParameters><m:arg>"+g+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+
75 -"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+g+"</e:NotifyTo>"+A+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=
76 -function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 -q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=q.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var g in b)if(b.hasOwnProperty(g)&&0!==g.indexOf("__")&&0!==g.indexOf("@")&&null!=b[g]&&"function"!==typeof b[g])if("object"===typeof b[g]&&
78 -b[g].ReferenceParameters){a+="<r:"+g+"><a:Address>"+b[g].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[g].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[g].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+g+">"}else if(Array.isArray(b[g]))for(B=0;B<b[g].length;B++)a+=
79 -"<r:"+g+">"+b[g][B].toString()+"</r:"+g+">";else a+="<r:"+g+">"+b[g].toString()+"</r:"+g+">";b=a+("</r:"+h+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var h=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
80 -p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var g in b)a+="<g:"+g+">"+b[g]+"</g:"+g+">";q.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
81 -p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>",b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,
82 -h){var g="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])g+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else g+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,g,p,d,k,h)};q.ExecMethodXml=function(a,b,c,d,m,k,h){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
83 -p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>',
84 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var g=a.getElementsByTagName("Body")[0];g||(g=a.getElementsByTagName("a:Body")[0]);
86 -if(!g)return null;if(0<g.childNodes.length){k=g.childNodes[0].localName;var q=k.indexOf("_OUTPUT");-1!=q&&q==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(g.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",g,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
87 -function AmtStackCreateService(b){function c(){var a=e.GetPendingActions();C<a&&(C=a);null!=e.onProcessChanged&&w!=a&&(w=a,e.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,z,h,k){200!=z?(c(e,a,null,z,h),g(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?e.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,e,p,z){d(a,p,c,e,[],z,h,k)}):(c(e,a,null,603,h),g(1))}function d(a,b,p,h,z,E,k,m){if(200!=E)p(e,a,null,E,k),g(1);else if(null==b||"PullResponse"!=b.Header.Method)p(e,
88 -a,null,604,k),g(1);else{for(var r in b.Body.Items)if(b.Body.Items[r]instanceof Array)for(var q in b.Body.Items[r])"function"!=typeof b.Body.Items[r][q]&&z.push(b.Body.Items[r][q]);else"function"!=typeof b.Body.Items[r]&&z.push(b.Body.Items[r]);b.Body.EnumerationContext?e.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,e,A){d(a,e,p,c,z,A,k,1)}):(g(1),p(e,a,z,E,k),c())}}function g(a){e.ActiveEnumsCount-=a;e.ActiveEnumsCount>=e.MaxActiveEnumsCount||0==e.PendingEnums.length?c():(a=e.PendingEnums.shift(),
89 -e.Enum(a[0],a[1],a[2]),g(0))}function v(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]),function(b,c,p,d){null==p||200!=d?a.callback(e,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](e,null,d[2]);else e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,z){if(200!=d||"0"!=c.Body.ReturnValue)z[0](e,
90 -null,z[2]);else{var h,m,g;b=z[2];d=new Date;var r=c.Body.RecordArray;"string"===typeof r&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in r){a=null;try{a=window.atob(r[h])}catch(q){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){g={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),
91 -EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)g.EventData.push(a.charCodeAt(m));g.EntityStr=k[g.Entity];g.Desc=p(g.EventSensorType,g.EventOffset,g.EventData,g.Entity);g.EntityStr||(g.EntityStr="Unknown");b.push(g)}}if(1!=c.Body.NoMoreRecords)e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[z[0],b,z[2]]);else z[0](e,b,z[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Dados inv\u00e1lidos";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
92 -r[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
93 -64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
94 -a&&170==c[0])return"C\u00e3o de guarda do agente"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... alterado para"+e.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Intrus\u00e3o de caso";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Uma sess\u00e3o remota Serial Over LAN foi estabelecida.";if(1==c[2])return"Sess\u00e3o Remota Serial Over LAN conclu\u00edda. O controle do usu\u00e1rio foi restaurado.";if(2==c[2])return"Uma sess\u00e3o remota de redirecionamento de IDE foi estabelecida.";
71 +b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var r={NextMessageId:1,Address:"/wsman"};r.comm=CreateWsmanComm(b,c,a,d,e,v);r.PerformAjax=function(a,b,c,p,d){null==d&&(d="");r.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" '+
72 +d+"><Header><a:Action>"+a,function(a,c,g){var p=r.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(r,p.Header.ResourceURI,p,c,g)}else b(r,null,{Header:{HttpError:c}},601,g)},c,p)};r.CancelAllQueries=function(a){r.comm.CancelAllQueries(a)};r.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};r.ExecSubscribe=function(a,b,c,d,m,k,h,e,l,B){var x="",z="";
73 +e="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 +B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=e&&(e="<a:ReferenceParameters><m:arg>"+e+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+r.Address+
75 +"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+e+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";r.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};r.ExecUnSubscribe=
76 +function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";r.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};r.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 +r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=r.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var e in b)if(b.hasOwnProperty(e)&&0!==e.indexOf("__")&&0!==e.indexOf("@")&&null!=b[e]&&"function"!==typeof b[e])if("object"===typeof b[e]&&
78 +b[e].ReferenceParameters){a+="<r:"+e+"><a:Address>"+b[e].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[e].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[e].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+e+">"}else if(Array.isArray(b[e]))for(B=0;B<b[e].length;B++)a+=
79 +"<r:"+e+">"+b[e][B].toString()+"</r:"+e+">";else a+="<r:"+e+">"+b[e].toString()+"</r:"+e+">";b=a+("</r:"+h+">")}else b="";r.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};r.ExecCreate=function(a,b,c,d,m,k){var h=r.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
80 +p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";r.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};r.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
81 +p(b)+"</Header><Body /></Envelope>";r.PerformAjax(a,c,d,m)};r.ExecGet=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>",b,c,p)};r.ExecMethod=function(a,b,c,p,d,k,
82 +h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])e+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";r.ExecMethodXml(a,b,e,p,d,k,h)};r.ExecMethodXml=function(a,b,c,d,m,k,h){r.PerformAjax(a+"/"+b+"</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
83 +p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};r.ExecEnum=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>',
84 +b,c,p)};r.ExecPull=function(a,b,c,p,d){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 +c,p,d)};r.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var e=a.getElementsByTagName("Body")[0];e||(e=a.getElementsByTagName("a:Body")[0]);
86 +if(!e)return null;if(0<e.childNodes.length){k=e.childNodes[0].localName;var r=k.indexOf("_OUTPUT");-1!=r&&r==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(e.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",e,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return r};
87 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();C<a&&(C=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,g,p,y){d(a,p,c,g,[],y,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,p,h,y,E,k,m){if(200!=E)p(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(g,
88 +a,null,604,k),e(1);else{for(var u in b.Body.Items)if(b.Body.Items[u]instanceof Array)for(var r in b.Body.Items[u])"function"!=typeof b.Body.Items[u][r]&&y.push(b.Body.Items[u][r]);else"function"!=typeof b.Body.Items[u]&&y.push(b.Body.Items[u]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,p,c,y,z,k,1)}):(e(1),p(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
89 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
90 +null,y[2]);else{var h,m,e;b=y[2];d=new Date;var u=c.Body.RecordArray;"string"===typeof u&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in u){a=null;try{a=window.atob(u[h])}catch(r){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){e={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),
91 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)e.EventData.push(a.charCodeAt(m));e.EntityStr=k[e.Entity];e.Desc=p(e.EventSensorType,e.EventOffset,e.EventData,e.Entity);e.EntityStr||(e.EntityStr="Unknown");b.push(e)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Dados inv\u00e1lidos";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("One Click Recovery: {0}",
92 +u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("One Click Recovery: {0}",h[c[2]]):format("One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&64==c[1]){if(1==
93 +c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
94 +a&&170==c[0])return"C\u00e3o de guarda do agente"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... alterado para"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Intrus\u00e3o de caso";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Uma sess\u00e3o remota Serial Over LAN foi estabelecida.";if(1==c[2])return"Sess\u00e3o Remota Serial Over LAN conclu\u00edda. O controle do usu\u00e1rio foi restaurado.";if(2==c[2])return"Uma sess\u00e3o remota de redirecionamento de IDE foi estabelecida.";
95 if(3==c[2])return"Sess\u00e3o remota de redirecionamento de IDE conclu\u00edda. O controle do usu\u00e1rio foi restaurado."}if(36==a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="com fio"),4294967293==a?"Todos os filtros de pacotes recebidos foram correspondidos em"+b+" interface.":4294967292==a?"Todos os filtros de pacotes de sa\u00edda foram correspondidos em"+b+" interface.":4294967290==a?"O filtro de pacotes falsificados foi correspondido em"+b+" interface.":"Filtro"+
96 a+" foi combinado em"+b+" interface.";if(192==a)return 0==c[2]?"Pol\u00edtica de seguran\u00e7a invocada. Algum ou todo o tr\u00e1fego de rede (TX) foi interrompido.":2==c[2]?"Pol\u00edtica de seguran\u00e7a invocada. Algum ou todo o tr\u00e1fego de rede (RX) foi interrompido.":"Pol\u00edtica de seguran\u00e7a invocada.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"Solicita\u00e7\u00e3o do usu\u00e1rio para conex\u00e3o remota.";if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"Erro EAC: tentativa de obter postura enquanto o NAC no IntelTM AMT est\u00e1 desativado.";
97 if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"Erro HWA: erro geral"}return 6==a?"Falha na autentica\u00e7\u00e3o"+(c[1]+(c[2]<<8))+" vezes. O sistema pode estar sob ataque.":30==a?"Nenhuma m\u00eddia inicializ\u00e1vel":32==a?"Bloqueio do sistema operacional ou interrup\u00e7\u00e3o de energia":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"Falha na inicializa\u00e7\u00e3o do sistema":37==a?"Firmware do sistema iniciado (pelo menos uma CPU est\u00e1 sendo executada corretamente).":
98 -"Tipo de sensor desconhecido #"+a}function q(a,b,c,p,d){if(200!=p)d[0](e,[],p);else{var h,k,m=d[1],g=new Date,r;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);
99 -0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>Porta padr\u00e3o KVM</i>",h=5);r=ReadInt(a,h);b.Time=new Date(1E3*(r+60*g.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);r=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+r);h+=r;r=a.charCodeAt(h++);
100 -b.Ex=a.substring(h,h+r);b.ExStr=e.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)e.AMT_AuditLog_ReadRecords(m.length+1,q,[d[0],m]);else d[0](e,m,p)}}var e={};e.wsman=b;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 C=0,
101 -w=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,b,p,d,z,h,k,m,g,r){e.wsman.ExecSubscribe(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,y,A,z)},0,h,k,m,g,r);c()};e.UnSubscribe=function(a,b,p,d,z){e.wsman.ExecUnSubscribe(e.CompleteName(a),function(d,z,h,k){c();b(e,a,h,k,p)},0,d,z);c()};e.Get=function(a,b,p,d){e.wsman.ExecGet(e.CompleteName(a),function(d,
102 -h,k,m){c();b(e,a,k,m,p)},0,d);c()};e.Put=function(a,b,p,d,z,h){e.wsman.ExecPut(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z,h);c()};e.Create=function(a,b,p,d,z){e.wsman.ExecCreate(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Delete=function(a,b,p,d,z){e.wsman.ExecDelete(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Exec=function(a,b,p,d,z,h,k){e.wsman.ExecMethod(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),
103 -A,z)},0,h,k);c()};e.ExecWithXml=function(a,b,p,d,z,h,k){e.wsman.ExecMethodXml(e.CompleteName(a),b,execArgumentsToXml(p),function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.Enum=function(b,p,d,h){e.ActiveEnumsCount<e.MaxActiveEnumsCount?(e.ActiveEnumsCount++,e.wsman.ExecEnum(e.CompleteName(b),function(e,d,y,h,k){c();a(b,y,p,d,h,k)},d,h)):e.PendingEnums.push([b,p,d,h]);c()};e.BatchEnum=function(a,b,p,d,z,h){z={_pending:b.length};e.PendingBatchOperations+=b.length;for(var k in b){var m=
104 -b[k],g=e.Enum;"*"==m[0]&&(g=e.Get,m=m.substring(1));g(m,function(b,z,A,h,k){e.PendingBatchOperations--;c();k[2][z]={response:null==A?null:A.Body,responses:A,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(e,e,a,k[2],h,d))},[a,b,z,g==e.Get?"Get":"Enum"],h)}};e.BatchGet=function(a,b,p,e,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:e,pri:d});c()};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==a.indexOf("IPS_"))return e.pfx[2]+
105 -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,b){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>',
106 -null,null,b)};e.RequestOSPowerStateChange=function(a,b){e.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
107 -null,null,b)};e.SetBootConfigRole=function(a,b){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>',
108 -a,b)};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,b){e.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
109 -k,m,g){e.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,g)};e.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){e.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};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=
110 -function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){e.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};e.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA",
111 -"DeleteAllActions",{_method_dummy:a},b)};e.AMT_AuditLog_ClearLog=function(a){e.Exec("AMT_AuditLog","ClearLog",{},a)};e.AMT_AuditLog_RequestStateChange=function(a,b,c){e.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_AuditLog_ReadRecords=function(a,b,c){e.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};e.AMT_AuditLog_SetAuditLock=function(a,b,c,p){e.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};e.AMT_AuditLog_ExportAuditLogSignature=
112 -function(a,b){e.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};e.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){e.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule",
113 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){e.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};e.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){e.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};e.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService",
114 -"GetUserAclEntryEx",{Handle:a},b,c)};e.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){e.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};e.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){e.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};e.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
115 -{Username:a,DigestPassword:b},c)};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,b,c,p){e.Exec("AMT_AuthorizationService",
116 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};e.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){e.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};e.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_EndpointAccessControlService_GetPosture=function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};e.AMT_EndpointAccessControlService_GetPostureHash=
117 -function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};e.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){e.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};e.AMT_EndpointAccessControlService_GetEacOptions=function(a){e.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};e.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
118 -PostureHashAlgorithm:b},c)};e.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};e.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};e.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){e.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};e.AMT_GeneralSettings_AMTAuthenticate=
119 -function(a,b){e.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};e.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){e.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};e.AMT_KerberosSettingData_GetCredentialCacheState=function(a){e.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};e.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){e.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
120 -b)};e.AMT_MessageLog_CancelIteration=function(a,b){e.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};e.AMT_MessageLog_RequestStateChange=function(a,b,c){e.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_MessageLog_ClearLog=function(a){e.Exec("AMT_MessageLog","ClearLog",{},a)};e.AMT_MessageLog_GetRecords=function(a,b,c,p){e.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};e.AMT_MessageLog_GetRecord=function(a,
121 -b,c){e.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};e.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){e.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};e.AMT_MessageLog_PositionToFirstRecord=function(a,b){e.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};e.AMT_MessageLog_FreezeLog=function(a,b){e.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};e.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){e.Exec("AMT_PublicKeyManagementService",
122 -"AddCRL",{Url:a,SerialNumbers:b},c)};e.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){e.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};e.AMT_PublicKeyManagementService_AddCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddKey=
123 -function(a,b){e.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};e.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};e.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};e.AMT_PublicKeyManagementService_GenerateKeyPair=
124 -function(a,b,c){e.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};e.AMT_RedirectionService_RequestStateChange=function(a,b){e.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};e.AMT_RedirectionService_TerminateSession=function(a,b){e.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};e.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,g){e.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
125 -Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},g)};e.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){e.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};e.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){e.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){e.Exec("AMT_SetupAndConfigurationService",
126 -"CommitChanges",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_Unprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};e.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
127 -e.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};e.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){e.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};e.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){e.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){e.Exec("AMT_SetupAndConfigurationService",
128 -"GetProvisioningAuditRecord",{},a)};e.AMT_SetupAndConfigurationService_GetUuid=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};e.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){e.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};e.AMT_SystemDefensePolicy_GetTimeout=
129 -function(a){e.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};e.AMT_SystemDefensePolicy_SetTimeout=function(a,b){e.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};e.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){e.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};e.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){e.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};e.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
130 -function(a,b){e.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};e.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){e.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};e.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){e.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WebUIService_RequestStateChange=function(a,b,c){e.Exec("AMT_WebUIService",
131 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
132 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};e.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};e.CIM_Account_RequestStateChange=function(a,b,c){e.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
133 -c)};e.CIM_AccountManagementService_CreateAccount=function(a,b,c){e.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};e.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){e.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};e.CIM_BootService_SetBootConfigRole=function(a,b,c){e.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};e.CIM_BootService_RequestStateChange=function(a,b,c,p){e.Exec("CIM_BootService","RequestStateChange",
134 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};e.CIM_Card_ConnectorPower=function(a,b,c){e.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};e.CIM_Card_IsCompatible=function(a,b){e.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};e.CIM_Chassis_IsCompatible=function(a,b){e.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};e.CIM_Fan_SetSpeed=function(a,b){e.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};e.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){e.Exec("CIM_KVMRedirectionSAP",
135 -"RequestStateChange",{RequestedState:a},c)};e.CIM_MediaAccessDevice_LockMedia=function(a,b){e.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};e.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){e.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_MediaAccessDevice_Reset=function(a){e.Exec("CIM_MediaAccessDevice","Reset",{},a)};e.CIM_MediaAccessDevice_EnableDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};e.CIM_MediaAccessDevice_OnlineDevice=
136 -function(a,b){e.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};e.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};e.CIM_MediaAccessDevice_SaveProperties=function(a){e.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};e.CIM_MediaAccessDevice_RestoreProperties=function(a){e.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};e.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){e.Exec("CIM_MediaAccessDevice","RequestStateChange",
137 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_PhysicalFrame_IsCompatible=function(a,b){e.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};e.CIM_PhysicalPackage_IsCompatible=function(a,b){e.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};e.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){e.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.CIM_PowerSupply_SetPowerState=function(a,
138 -b,c){e.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_PowerSupply_Reset=function(a){e.Exec("CIM_PowerSupply","Reset",{},a)};e.CIM_PowerSupply_EnableDevice=function(a,b){e.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};e.CIM_PowerSupply_OnlineDevice=function(a,b){e.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};e.CIM_PowerSupply_QuiesceDevice=function(a,b){e.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};e.CIM_PowerSupply_SaveProperties=function(a){e.Exec("CIM_PowerSupply",
139 -"SaveProperties",{},a)};e.CIM_PowerSupply_RestoreProperties=function(a){e.Exec("CIM_PowerSupply","RestoreProperties",{},a)};e.CIM_PowerSupply_RequestStateChange=function(a,b,c){e.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Processor_SetPowerState=function(a,b,c){e.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Processor_Reset=function(a){e.Exec("CIM_Processor","Reset",{},a)};e.CIM_Processor_EnableDevice=function(a,b){e.Exec("CIM_Processor",
140 -"EnableDevice",{Enabled:a},b)};e.CIM_Processor_OnlineDevice=function(a,b){e.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};e.CIM_Processor_QuiesceDevice=function(a,b){e.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Processor_SaveProperties=function(a){e.Exec("CIM_Processor","SaveProperties",{},a)};e.CIM_Processor_RestoreProperties=function(a){e.Exec("CIM_Processor","RestoreProperties",{},a)};e.CIM_Processor_RequestStateChange=function(a,b,c){e.Exec("CIM_Processor","RequestStateChange",
141 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RecordLog_ClearLog=function(a){e.Exec("CIM_RecordLog","ClearLog",{},a)};e.CIM_RecordLog_RequestStateChange=function(a,b,c){e.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RedirectionService_RequestStateChange=function(a,b,c){e.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Sensor_SetPowerState=function(a,b,c){e.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
142 -c)};e.CIM_Sensor_Reset=function(a){e.Exec("CIM_Sensor","Reset",{},a)};e.CIM_Sensor_EnableDevice=function(a,b){e.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};e.CIM_Sensor_OnlineDevice=function(a,b){e.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};e.CIM_Sensor_QuiesceDevice=function(a,b){e.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Sensor_SaveProperties=function(a){e.Exec("CIM_Sensor","SaveProperties",{},a)};e.CIM_Sensor_RestoreProperties=function(a){e.Exec("CIM_Sensor","RestoreProperties",
143 -{},a)};e.CIM_Sensor_RequestStateChange=function(a,b,c){e.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_StatisticalData_ResetSelectedStats=function(a,b){e.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};e.CIM_Watchdog_KeepAlive=function(a){e.Exec("CIM_Watchdog","KeepAlive",{},a)};e.CIM_Watchdog_SetPowerState=function(a,b,c){e.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Watchdog_Reset=function(a){e.Exec("CIM_Watchdog",
144 -"Reset",{},a)};e.CIM_Watchdog_EnableDevice=function(a,b){e.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};e.CIM_Watchdog_OnlineDevice=function(a,b){e.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};e.CIM_Watchdog_QuiesceDevice=function(a,b){e.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};e.CIM_Watchdog_SaveProperties=function(a){e.Exec("CIM_Watchdog","SaveProperties",{},a)};e.CIM_Watchdog_RestoreProperties=function(a){e.Exec("CIM_Watchdog","RestoreProperties",{},a)};e.CIM_Watchdog_RequestStateChange=
145 -function(a,b,c){e.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_WiFiPort_SetPowerState=function(a,b,c){e.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_WiFiPort_Reset=function(a){e.Exec("CIM_WiFiPort","Reset",{},a)};e.CIM_WiFiPort_EnableDevice=function(a,b){e.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};e.CIM_WiFiPort_OnlineDevice=function(a,b){e.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};e.CIM_WiFiPort_QuiesceDevice=function(a,
146 -b){e.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};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,b,c){e.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){e.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
147 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};e.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};e.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){e.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},h)};e.IPS_HostBasedSetupService_UpgradeClientToAdmin=
148 -function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};e.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){e.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};e.IPS_KVMRedirectionSettingData_TerminateSession=function(a){e.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){e.Exec("IPS_KVMRedirectionSettingData",
149 -"DataChannelRead",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){e.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};e.IPS_OptInService_StartOptIn=function(a){e.Exec("IPS_OptInService","StartOptIn",{},a)};e.IPS_OptInService_CancelOptIn=function(a){e.Exec("IPS_OptInService","CancelOptIn",{},a)};e.IPS_OptInService_SendOptInCode=function(a,b){e.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};e.IPS_OptInService_StartService=function(a){e.Exec("IPS_OptInService",
150 -"StartService",{},a)};e.IPS_OptInService_StopService=function(a){e.Exec("IPS_OptInService","StopService",{},a)};e.IPS_OptInService_RequestStateChange=function(a,b,c){e.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){e.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.IPS_ProvisioningRecordLog_RequestStateChange=
151 -function(a,b,c){e.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_ProvisioningRecordLog_ClearLog=function(a,b){e.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};e.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){e.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};e.IPS_SecIOService_RequestStateChange=function(a,b,c){e.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
152 -TimeoutPeriod:b},c)};e.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){e.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};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",
153 -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",
154 -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",
155 -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",
156 -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,b){e.AMT_MessageLog_PositionToFirstRecord(n,
157 -[a,b,[]])};var D="N\u00e3o especificado. ; Nenhuma mem\u00f3ria do sistema est\u00e1 fisicamente instalada no sistema. ; Nenhuma mem\u00f3ria utiliz\u00e1vel do sistema, toda a mem\u00f3ria instalada sofreu uma falha irrecuper\u00e1vel. ; Falha irrecuper\u00e1vel no disco r\u00edgido / dispositivo ATAPI / IDE. ; Falha irrecuper\u00e1vel na placa do sistema. ; Disquete irrecuper\u00e1vel falha no subsistema. ; Falha irrecuper\u00e1vel no controlador de disco r\u00edgido. ; Falha irrecuper\u00e1vel no teclado PS / 2 ou USB. ; M\u00eddia de inicializa\u00e7\u00e3o remov\u00edvel n\u00e3o encontrada. ; Falha irrecuper\u00e1vel no controlador de v\u00eddeo. ; Nenhum dispositivo de v\u00eddeo detectado. ; Detectada corrup\u00e7\u00e3o de ROM de firmware (BIOS). ; Incompatibilidade de tens\u00e3o da CPU (processadores que compartilham a mesma fonte t\u00eam requisitos de tens\u00e3o incompat\u00edveis) ; Falha na correspond\u00eancia da velocidade da CPU".split(";"),
98 +"Tipo de sensor desconhecido #"+a}function r(a,b,c,p,d){if(200!=p)d[0](g,[],p);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);
99 +0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>Porta padr\u00e3o KVM</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);
100 +b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,r,[d[0],m]);else d[0](g,m,p)}}var g={};g.wsman=b;g.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/"];g.PendingEnums=[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var C=0,
101 +w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,p,d,y,h,k,m,e,u){g.wsman.ExecSubscribe(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,A,z,y)},0,h,k,m,e,u);c()};g.UnSubscribe=function(a,b,p,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,p)},0,d,y);c()};g.Get=function(a,b,p,d){g.wsman.ExecGet(g.CompleteName(a),function(d,
102 +h,k,m){c();b(g,a,k,m,p)},0,d);c()};g.Put=function(a,b,p,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,p,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,p,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,p,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),
103 +z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,p,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,p,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(g,d,A,h,k){c();a(b,A,p,d,h,k)},d,h)):g.PendingEnums.push([b,p,d,h]);c()};g.BatchEnum=function(a,b,p,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=
104 +b[k],e=g.Enum;"*"==m[0]&&(e=g.Get,m=m.substring(1));e(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(g,g,a,k[2],h,d))},[a,b,y,e==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,p,g,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:g,pri:d});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+
105 +a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.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>',
106 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
107 +null,null,b)};g.SetBootConfigRole=function(a,b){g.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>',
108 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
109 +k,m,e){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,e)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
110 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
111 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,p){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};g.AMT_AuditLog_ExportAuditLogSignature=
112 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule",
113 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
114 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
115 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){g.Exec("AMT_AuthorizationService",
116 +"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
117 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
118 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
119 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
120 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,p){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};g.AMT_MessageLog_GetRecord=function(a,
121 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
122 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
123 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
124 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,e){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
125 +Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},e)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
126 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
127 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
128 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
129 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
130 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
131 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){console.log(JSON.stringify({WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},null,2));g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=
132 +function(a,b,c,p,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},
133 +b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,
134 +Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,p){g.Exec("CIM_BootService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c,p,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan",
135 +"SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=
136 +function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",
137 +{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",
138 +{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply",
139 +"QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply","SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor",
140 +"Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor","EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=
141 +function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,
142 +b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=
143 +function(a){g.Exec("CIM_Sensor","RestoreProperties",{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},
144 +c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog","Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog",
145 +"RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",
146 +{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){g.Exec("IPS_HostBasedSetupService",
147 +"Setup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,
148 +DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=
149 +function(a){g.Exec("IPS_KVMRedirectionSettingData","DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};
150 +g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService","StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,
151 +Time:c,TimeoutPeriod:p},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=
152 +function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",
153 +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",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",
154 +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",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",
155 +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",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",
156 +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",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",
157 +4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,[a,b,[]])};var D="N\u00e3o especificado. ; Nenhuma mem\u00f3ria do sistema est\u00e1 fisicamente instalada no sistema. ; Nenhuma mem\u00f3ria utiliz\u00e1vel do sistema, toda a mem\u00f3ria instalada sofreu uma falha irrecuper\u00e1vel. ; Falha irrecuper\u00e1vel no disco r\u00edgido / dispositivo ATAPI / IDE. ; Falha irrecuper\u00e1vel na placa do sistema. ; Disquete irrecuper\u00e1vel falha no subsistema. ; Falha irrecuper\u00e1vel no controlador de disco r\u00edgido. ; Falha irrecuper\u00e1vel no teclado PS / 2 ou USB. ; M\u00eddia de inicializa\u00e7\u00e3o remov\u00edvel n\u00e3o encontrada. ; Falha irrecuper\u00e1vel no controlador de v\u00eddeo. ; Nenhum dispositivo de v\u00eddeo detectado. ; Detectada corrup\u00e7\u00e3o de ROM de firmware (BIOS). ; Incompatibilidade de tens\u00e3o da CPU (processadores que compartilham a mesma fonte t\u00eam requisitos de tens\u00e3o incompat\u00edveis) ; Falha na correspond\u00eancia da velocidade da CPU".split(";"),
158 m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS 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(";"),
159 k="N\u00e3o especificado ; Outros ; Desconhecido ; Processador ; Disco ; Perif\u00e9rico ; M\u00f3dulo de gerenciamento do sistema ; Placa do sistema ; M\u00f3dulo de mem\u00f3ria ; M\u00f3dulo do processador ; Fonte de alimenta\u00e7\u00e3o ; Fonte de alimenta\u00e7\u00e3o ; Adicione um cart\u00e3o ; Placa do painel frontal ; Placa do painel traseiro ; Placa do painel traseiro ; Placa do sistema de energia ; Placa de acionamento ; Painel traseiro da unidade ; Expans\u00e3o interna do sistema placa ; Outra placa de sistema ; Placa processadora ; Unidade de pot\u00eancia ; M\u00f3dulo de pot\u00eancia ; Placa de gerenciamento de energia ; Placa do painel traseiro do chassi ; Chassis do sistema ; Sub-chassi ; Outra placa do chassi ; Compartimento de unidades de disco ; Compartimento de perif\u00e9ricos ; Compartimento de dispositivos ; Compartimento de refrigera\u00e7\u00e3o ; Ventilador ; Unidade de refrigera\u00e7\u00e3o ; Interconex\u00e3o por cabo ; Dispositivo de mem\u00f3ria ; Software de gerenciamento do sistema ; BIOS ; Intel (r) ME ; Barramento do sistema ; Grupo ; Intel (r) ME ; Ambiente externo ; Bateria ; L\u00e2mina de processamento ; Interruptor de conectividade ; Interruptor de conectividade ; Processador / m\u00f3dulo de mem\u00f3ria ; M\u00f3dulo de E / S ; M\u00f3dulo de E / S do processador ; Firmware do controlador de gerenciamento ; Canal IPMI ; Barramento PCI ; Barramento PCI Express ; Barramento SCSI ; Barramento SATA / SAS ; Barramento frontal do processador".split(";");
160 -e.RealmNames=";; Redirecionamento ;; Ativo de hardware ; Controle remoto ; Armazenamento ; Gerenciador de eventos ; Administrador de armazenamento ; Presen\u00e7a local do agente ; Presen\u00e7a remota do agente ; Disjuntor ; Tempo de rede ; Informa\u00e7\u00f5es gerais ; Atualiza\u00e7\u00e3o de firmware ; EIT ; LocalUN ; Endpoint Access Control ; Endpoint Access Control Admin ; Leitor de log de eventos ; Log de auditoria ; Regi\u00e3o da ACL ;;; Sistema local".split(";");e.WatchdogCurrentStates=
161 -{1:"n\u00e3o foi iniciado",2:"Parado",4:"Corrida",8:"Expirado",16:"Suspenso"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),r=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
160 +g.RealmNames=";; Redirecionamento ;; Ativo de hardware ; Controle remoto ; Armazenamento ; Gerenciador de eventos ; Administrador de armazenamento ; Presen\u00e7a local do agente ; Presen\u00e7a remota do agente ; Disjuntor ; Tempo de rede ; Informa\u00e7\u00f5es gerais ; Atualiza\u00e7\u00e3o de firmware ; EIT ; LocalUN ; Endpoint Access Control ; Endpoint Access Control Admin ; Leitor de log de eventos ; Log de auditoria ; Regi\u00e3o da ACL ;;; Sistema local".split(";");g.WatchdogCurrentStates=
161 +{1:"n\u00e3o foi iniciado",2:"Parado",4:"Corrida",8:"Expirado",16:"Suspenso"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
162 K={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},B={16:"Admin de seguran\u00e7a",17:"RCO",18:"Gerenciador de redirecionamento",19:"Gerenciador de Atualiza\u00e7\u00e3o de Firmware",20:"Log de auditoria de seguran\u00e7a",21:"Hora da rede",22:"Administra\u00e7\u00e3o de rede",23:"Administra\u00e7\u00e3o de armazenamento",24:"Gerente de eventos",25:"Gerente do disjuntor",26:"Gerenciador de presen\u00e7a do agente",27:"Configura\u00e7\u00e3o sem fio",28:"EAC",29:"KVM",30:"Eventos de aceita\u00e7\u00e3o do usu\u00e1rio",
163 32:"Tela em branco",33:"Eventos Watchdog",1600:"Aprovisionamento iniciado",1601:"Aprovisionamento conclu\u00eddo",1602:"Entrada ACL adicionada",1603:"Entrada da ACL modificada",1604:"Entrada da ACL removida",1605:"Acesso ACL com credenciais inv\u00e1lidas",1606:"Estado de entrada da ACL",1607:"Estado do TLS alterado",1608:"Conjunto de certificados do servidor TLS",1609:"Remover certificado de servidor TLS",1610:"Adicionado certificado raiz confi\u00e1vel TLS",1611:"Certificado raiz confi\u00e1vel TLS removido",
164 1612:"Conjunto de chaves pr\u00e9-compartilhadas TLS",1613:"Configura\u00e7\u00f5es do Kerberos modificadas",1614:"Chave principal do Kerberos modificada",1615:"Redefini\u00e7\u00e3o de contadores de desgaste do flash",1616:"Pacote de energia modificado",1617:"Definir modo de autentica\u00e7\u00e3o de regi\u00e3o",1618:"Atualizar cliente para o modo de controle de administrador",1619:"Desprovisionamento iniciado",1700:"Power Up realizado",1701:"Desativa\u00e7\u00e3o realizada",1702:"Ciclo de energia realizado",
@@ -167,109 +167,109 @@ K={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},B={16:"Admin de seguran\u00e7a",17:"R
167 2200:"Conjunto de par\u00e2metros TCPIP",2201:"Conjunto de nomes de host",2202:"Conjunto de nomes de dom\u00ednio",2203:"Conjunto de par\u00e2metros da VLAN",2204:"Conjunto de Pol\u00edticas de Link",2205:"Conjunto de par\u00e2metros IPv6",2300:"Conjunto de atributos de armazenamento global",2301:"EACL de armazenamento modificado",2302:"FPACL de armazenamento modificado",2303:"Opera\u00e7\u00e3o de grava\u00e7\u00e3o de armazenamento",2400:"Alerta Inscrito",2401:"Alerta cancelado",2402:"Log de eventos limpo",
168 2403:"Log de eventos congelado",2500:"CB Filter Added",2501:"Filtro CB removido",2502:"CB Policy Added",2503:"Pol\u00edtica de CB removida",2504:"Conjunto de pol\u00edticas padr\u00e3o do CB",2505:"Conjunto de op\u00e7\u00f5es de CB Heuristics",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog Adicionado",2601:"C\u00e3o de guarda do agente removido",2602:"Conjunto de a\u00e7\u00f5es do agente de vigil\u00e2ncia",2700:"Wireless Profile Added",2701:"Perfil sem fio removido",2702:"Perfil sem fio atualizado",
169 2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",2800:"EAC Posture Signer SET",2801:"EAC ativado",2802:"EAC desativado",2803:"Estado da postura da EAC",2804:"Op\u00e7\u00f5es de conjunto de EAC",2900:"Ativa\u00e7\u00e3o KVM ativada",2901:"Desativa\u00e7\u00e3o da KVM desativada",2902:"Senha KVM alterada",2903:"Consentimento da KVM com \u00eaxito",2904:"Falha no consentimento da KVM",
170 -3E3:"Altera\u00e7\u00e3o da pol\u00edtica de aceita\u00e7\u00e3o",3001:"Enviar evento de c\u00f3digo de consentimento",3002:"Iniciar evento bloqueado de aceita\u00e7\u00e3o",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};e.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):
171 -null;if(1605==a)return["Acesso ME inv\u00e1lido","Acesso MEBx inv\u00e1lido"][b.charCodeAt(0)];if(1606==a){var c=["Desativado","ativado"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Controlo remoto"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?e.RealmNames[ReadInt(b,0)]+","+["NoAuth","Auth","Desativado"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","MEI local","WSMAN local","WSAMN remoto"][b.charCodeAt(0)]:
172 -1900==a?"De"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" para"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"De"+["Nenhum","KVM","Todos"][b.charCodeAt(0)]+" para"+["Nenhum","KVM","Todos"][b.charCodeAt(1)]:3001==a?["Sucesso","Falhou 3 vezes"][b.charCodeAt(0)]:null};e.GetAuditLog=function(a){e.AMT_AuditLog_ReadRecords(1,q,[a,[]])};
173 -return e}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
174 -function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",g=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+g+v+">"));return a+("</r:"+b+">")}
170 +3E3:"Altera\u00e7\u00e3o da pol\u00edtica de aceita\u00e7\u00e3o",3001:"Enviar evento de c\u00f3digo de consentimento",3002:"Iniciar evento bloqueado de aceita\u00e7\u00e3o",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):
171 +null;if(1605==a)return["Acesso ME inv\u00e1lido","Acesso MEBx inv\u00e1lido"][b.charCodeAt(0)];if(1606==a){var c=["Desativado","ativado"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Controlo remoto"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?g.RealmNames[ReadInt(b,0)]+","+["NoAuth","Auth","Desativado"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","MEI local","WSMAN local","WSAMN remoto"][b.charCodeAt(0)]:
172 +1900==a?"De"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" para"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"De"+["Nenhum","KVM","Todos"][b.charCodeAt(0)]+" para"+["Nenhum","KVM","Todos"][b.charCodeAt(1)]:3001==a?["Sucesso","Falhou 3 vezes"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,r,[a,[]])};
173 +return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
174 +function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">";if("string"==typeof c)a+=c;else for(var v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
175 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
176 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
177 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
178 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function g(a,b){var c,p,e,d,x,h,k,m,g,q=b&&b.split("/"),w=r.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){q=q.slice(0,q.length-1);a=a.split("/");x=a.length-1;r.nodeIdCompat&&A.test(a[x])&&(a[x]=a[x].replace(A,""));a=q.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
179 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((q||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(q)for(g=q.length;0<g;--g)if(e=w[q.slice(0,g).join("/")])if(e=e[p]){d=e;h=x;break}if(d)break;!k&&l&&l[p]&&(k=l[p],m=x)}!d&&k&&(d=k,h=m);d&&(c.splice(0,h,d),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return g(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
180 -a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function e(a){return function(){return r&&r.config&&r.config[a]||{}}}var C,w,D,m,k={},h={},r={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,A=/\.js$/;D=function(a,b){var c,d=q(a),e=d[0];a=d[1];e&&(e=g(e,b),c=p(e));e?a=c&&c.normalize?c.normalize(a,n(b)):g(a,b):(a=g(a,b),d=q(a),
181 -e=d[0],a=d[1],e&&(c=p(e)));return{f:e?e+"!"+a:a,n:a,pr:e,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:e(a)}}};C=function(a,b,c,e){var x,g,A,r,q=[];g=typeof c;var w;e=e||a;if("undefined"===g||"function"===g){b=!b.length&&c.length?["require","exports","module"]:b;for(r=0;r<b.length;r+=1)if(A=D(b[r],e),g=A.f,"require"===g)q[r]=m.require(a);else if("exports"===g)q[r]=m.exports(a),
182 -w=!0;else if("module"===g)x=q[r]=m.module(a);else if(B.call(k,g)||B.call(h,g)||B.call(K,g))q[r]=p(g);else if(A.p)A.p.load(A.n,v(e,!0),l(g),{}),q[r]=k[g];else throw Error(a+" missing "+g);b=c?c.apply(k[a],q):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,e,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){r=a;r.deps&&w(r.deps,r.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
183 -typeof c&&(c=e,e=x);e?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(e.isArrayBuffer(a)||e.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
184 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var e=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)e.nextTick=process.nextTick,e.setImmediate="function"===typeof setImmediate?setImmediate:e.nextTick;else if("function"===typeof setImmediate)e.setImmediate=setImmediate,e.nextTick=function(a){return setImmediate(a)};
185 -else{e.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];e.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
186 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var d=e.setImmediate;e.setImmediate=function(e){15<Date.now()-b?(b=Date.now(),d(e)):(a.push(e),1===a.length&&p.setAttribute("a",c=!c))}}e.nextTick=e.setImmediate}})();e.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};e.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};e.isArrayBufferView=function(a){return a&&
187 -e.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};e.ByteBuffer=c;e.ByteStringBuffer=c;e.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};e.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};e.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};e.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
188 -e.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};e.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};e.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(e.encodeUtf8(a))};e.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
189 -255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
190 -8&255))};e.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};e.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};e.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
191 -e.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};e.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};e.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
192 -16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};e.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24Le=
193 -function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};e.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};e.ByteStringBuffer.prototype.getSignedInt=
194 -function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};e.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
195 -a)};e.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};e.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};e.ByteStringBuffer.prototype.copy=function(){var a=e.createBuffer(this.data);a.read=this.read;return a};e.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};e.ByteStringBuffer.prototype.clear=
196 -function(){this.data="";this.read=0;return this};e.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};e.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.ByteStringBuffer.prototype.toString=function(){return e.decodeUtf8(this.bytes())};e.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
197 -0;this.growSize=b.growSize||1024;var c=e.isArrayBuffer(a),p=e.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};e.DataBuffer.prototype.length=function(){return this.write-this.read};e.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
198 -e.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),p=new Uint8Array(this.length()+b);p.set(c);this.data=new DataView(p.buffer);return this};e.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};e.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
199 -return this};e.DataBuffer.prototype.putBytes=function(a,b){if(e.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var d=new Uint8Array(this.data.buffer,this.write);d.set(c);this.write+=p;return this}if(e.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),d=new Uint8Array(this.data.buffer),d.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof e.DataBuffer||"object"===typeof a&&"number"===
200 -typeof a.read&&"number"===typeof a.write&&e.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),d=new Uint8Array(a.data.byteLength,this.write),d.set(c),this.write+=c.byteLength,this;a instanceof e.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.hex.decode(a,c,this.write),this;if("base64"===
201 -b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=e.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=e.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
202 -b);}throw Error("Invalid parameter: "+a);};e.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};e.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};e.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};e.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
203 -e.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};e.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};e.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};e.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
204 -a,!0);this.write+=4;return this};e.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};e.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};e.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};e.DataBuffer.prototype.getInt24=
205 -function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};e.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};e.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};e.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};e.DataBuffer.prototype.getInt32Le=function(){var a=
206 -this.data.getInt32(this.read,!0);this.read+=4;return a};e.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};e.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
207 -e.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};e.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};e.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};e.DataBuffer.prototype.copy=function(){return new e.DataBuffer(this)};e.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
208 -new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};e.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};e.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};e.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
209 -this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return e.binary.raw.encode(b);if("hex"===a)return e.binary.hex.encode(b);if("base64"===a)return e.binary.base64.encode(b);if("utf8"===a)return e.text.utf8.decode(b);if("utf16"===a)return e.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};e.createBuffer=function(a,b){void 0!==a&&"utf8"===
210 -(b||"raw")&&(a=e.encodeUtf8(a));return new e.ByteBuffer(a)};e.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};e.xorBytes=function(a,b,c){for(var p="",e="",d="",h=0,k=0;0<c;--c,++h)e=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(p+=d,d="",k=0),d+=String.fromCharCode(e),++k;return p+d};e.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};e.bytesToHex=
211 -function(a){return e.createBuffer(a).toHex()};e.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var d=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];e.encode64=function(a,b){for(var c="",p="",e,d,h,k=0;k<a.length;)e=
212 -a.charCodeAt(k++),d=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,b)+"\r\n",c=c.substr(b));return p+
213 -c};e.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,p,e,h,k=0;k<a.length;)c=d[a.charCodeAt(k++)-43],p=d[a.charCodeAt(k++)-43],e=d[a.charCodeAt(k++)-43],h=d[a.charCodeAt(k++)-43],b+=String.fromCharCode(c<<2|p>>4),64!==e&&(b+=String.fromCharCode((p&15)<<4|e>>2),64!==h&&(b+=String.fromCharCode((e&3)<<6|h)));return b};e.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};e.decodeUtf8=function(a){return decodeURIComponent(escape(a))};e.binary={raw:{},hex:{},base64:{}};
214 -e.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};e.binary.raw.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(a.length));for(var e=c=c||0,d=0;d<a.length;++d)p[e++]=a.charCodeAt(d);return b?e-c:p};e.binary.hex.encode=e.bytesToHex;e.binary.hex.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var e=0,d=c;a.length&1&&(e=1,p[d++]=parseInt(a[0],16));for(;e<a.length;e+=2)p[d++]=parseInt(a.substr(e,2),16);return b?d-c:p};e.binary.base64.encode=
215 -function(a,b){for(var c="",p="",e,d,h,k=0;k<a.byteLength;)e=a[k++],d=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,
216 -b)+"\r\n",c=c.substr(b));return p+c};e.binary.base64.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var e,h,k,m,g=0,r=c;g<a.length;)e=d[a.charCodeAt(g++)-43],h=d[a.charCodeAt(g++)-43],k=d[a.charCodeAt(g++)-43],m=d[a.charCodeAt(g++)-43],p[r++]=e<<2|h>>4,64!==k&&(p[r++]=(h&15)<<4|k>>2,64!==m&&(p[r++]=(k&3)<<6|m));return b?r-c:p.subarray(0,r)};e.text={utf8:{},utf16:{}};e.text.utf8.encode=function(a,b,c){a=e.encodeUtf8(a);
217 -var p=b;p||(p=new Uint8Array(a.length));for(var d=c=c||0,h=0;h<a.length;++h)p[d++]=a.charCodeAt(h);return b?d-c:p};e.text.utf8.decode=function(a){return e.decodeUtf8(String.fromCharCode.apply(null,a))};e.text.utf16.encode=function(a,b,c){var p=b;p||(p=new Uint8Array(2*a.length));for(var e=new Uint16Array(p.buffer),d=c=c||0,h=c,k=0;k<a.length;++k)e[h++]=a.charCodeAt(k),d+=2;return b?d-c:p};e.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};e.deflate=function(a,
218 -b,c){b=e.decode64(a.deflate(e.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};e.inflate=function(a,b,c){a=a.inflate(e.encode64(b)).rval;return null===a?null:e.decode64(a)};var g=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=e.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
219 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(e.decode64(c)));return c},m=function(a,b,c,p){var e=l(a,b);null===e&&(e={});e[c]=p;g(a,b,e)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var p=l(a,b);if(null!==p&&c in p){delete p[c];c=!0;for(var e in p){c=!1;break}c&&(p=null);g(a,b,p)}},r=function(a,b){g(a,b,null)},K=function(a,b,
220 -c){var p=null;"undefined"===typeof c&&(c=["web","flash"]);var e,d=!1,h=null,k;for(k in c){e=c[k];try{if("flash"===e||"both"===e){if(null===b[0])throw Error("Flash local storage not available.");p=a.apply(this,b);d="flash"===e}if("web"===e||"both"===e)b[0]=localStorage,p=a.apply(this,b),d=!0}catch(m){h=m}if(d)break}if(!d)throw h;return p};e.setItem=function(a,b,c,p,e){K(m,arguments,e)};e.getItem=function(a,b,c,p){return K(k,arguments,p)};e.removeItem=function(a,b,c,p){K(h,arguments,p)};e.clearItems=
221 -function(a,b,c){K(r,arguments,c)};e.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;e.getQueryVariables=function(a){var b=function(a){var b=
222 -{};a=a.split("&");for(var c=0;c<a.length;c++){var p=a[c].indexOf("="),e;0<p?(e=a[c].substring(0,p),p=a[c].substring(p+1)):(e=a[c],p=null);e in b||(b[e]=[]);e in Object.prototype||null===p||b[e].push(unescape(p))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};e.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
223 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:e.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};e.makeRequest=function(a){var b=e.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var p;"undefined"===typeof a?p=b.query:(p=b.query[a])&&"undefined"!==typeof c&&(p=p[c]);return p},getQueryLast:function(a,b){var p=c.getQuery(a);return p?p[p.length-1]:b}};return c};e.makeLink=function(a,
224 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};e.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var p=0,e=b.length;p<e;){var d=b[p++];if(p==e)a[d]=c;else{var h=d in a;if(!h||h&&"object"!==typeof a[d]||h&&null===a[d])a[d]={};a=a[d]}}};e.getPath=function(a,b,c){for(var p=0,e=b.length,d=!0;d&&p<e&&"object"===typeof a&&null!==a;){var h=b[p++];(d=h in a)&&(a=a[h])}return d?a:c};e.deletePath=function(a,b){if("object"===
225 -typeof a&&null!==a)for(var c=0,p=b.length;c<p;){var e=b[c++];if(c==p)delete a[e];else{if(!(e in a)||"object"!==typeof a[e]||null===a[e])break;a=a[e]}}};e.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};e.format=function(a){var b=/%./g,c,p,e=0,d=[];for(p=0;c=b.exec(a);)switch(p=a.substring(p,b.lastIndex-2),0<p.length&&d.push(p),p=b.lastIndex,c=c[0][1],c){case "s":case "o":e<arguments.length?d.push(arguments[e++ +1]):d.push("<?>");break;case "%":d.push("%");break;default:d.push("<#"+
226 -c+"?>")}d.push(a.substring(p));return d.join("")};e.formatNumber=function(a,b,c,p){var e=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;p=void 0===p?".":p;c=0>a?"-":"";var d=parseInt(a=Math.abs(+a||0).toFixed(e),10)+"",h=3<d.length?d.length%3:0;return c+(h?d.substr(0,h)+p:"")+d.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+p)+(e?b+Math.abs(a-d).toFixed(e).slice(2):"")};e.formatSize=function(a){return a=1073741824<=a?e.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?e.formatNumber(a/1048576,2,".","")+
227 -" MiB":1024<=a?e.formatNumber(a/1024,0)+" KiB":e.formatNumber(a,0)+" bytes"};e.bytesFromIP=function(a){return-1!==a.indexOf(".")?e.bytesFromIPv4(a):-1!==a.indexOf(":")?e.bytesFromIPv6(a):null};e.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=e.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};e.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
228 -2*(8-a.length+b),p=e.createBuffer(),d=0;8>d;++d)if(a[d]&&0!==a[d].length){var h=e.hexToBytes(a[d]);2>h.length&&p.putByte(0);p.putBytes(h)}else p.fillWithByte(0,c),c=0;return p.getBytes()};e.bytesToIP=function(a){return 4===a.length?e.bytesToIPv4(a):16===a.length?e.bytesToIPv6(a):null};e.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};e.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,d=0;d<a.length;d+=
229 -2){for(var h=e.bytesToHex(a[d]+a[d+1]);"0"===h[0]&&"0"!==h;)h=h.substr(1);if("0"===h){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(h)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};e.estimateCores=function(a,b){function c(a,k,m){if(0===k){var g=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);e.cores=
230 -Math.max(1,g);URL.revokeObjectURL(h);return b(null,e.cores)}p(m,function(b,p){a.push(d(m,p));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],e=0;e<a;++e){var z=new Worker(h);z.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(z)}for(e=0;e<a;++e)c[e].postMessage(e)}function d(a,b){for(var c=[],p=0;p<a;++p)for(var e=b[p],h=c[p]=[],z=0;z<a;++z)if(p!==z){var k=b[z];(e.st>k.st&&e.st<k.et||k.st>e.st&&k.st<e.et)&&h.push(z)}return c.reduce(function(a,
231 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in e&&!a.update)return b(null,e.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return e.cores=navigator.hardwareConcurrency,b(null,e.cores);if("undefined"===typeof Worker)return e.cores=1,b(null,e.cores);if("undefined"===typeof Blob)return e.cores=2,b(null,e.cores);var h=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
232 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var q=0;q<g.length;++q)g[q](c);
233 -return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
178 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,g,x,h,k,m,e,r=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){r=r.slice(0,r.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=r.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
179 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((r||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(r)for(e=r.length;0<e;--e)if(d=w[r.slice(0,e).join("/")])if(d=d[p]){g=d;h=x;break}if(g)break;!k&&l&&l[p]&&(k=l[p],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
180 +a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function r(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var C,w,D,m,k={},h={},u={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=r(a),g=d[0];a=d[1];g&&(g=e(g,b),c=p(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=r(a),
181 +g=d[0],a=d[1],g&&(c=p(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};C=function(a,b,c,g){var x,e,z,u,r=[];e=typeof c;var w;g=g||a;if("undefined"===e||"function"===e){b=!b.length&&c.length?["require","exports","module"]:b;for(u=0;u<b.length;u+=1)if(z=D(b[u],g),e=z.f,"require"===e)r[u]=m.require(a);else if("exports"===e)r[u]=m.exports(a),
182 +w=!0;else if("module"===e)x=r[u]=m.module(a);else if(B.call(k,e)||B.call(h,e)||B.call(K,e))r[u]=p(e);else if(z.p)z.p.load(z.n,v(g,!0),l(e),{}),r[u]=k[e];else throw Error(a+" missing "+e);b=c?c.apply(k[a],r):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
183 +typeof c&&(c=g,g=x);g?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(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(b){for(var p=
184 +0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.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)};
185 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
186 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}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&&
187 +d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
188 +d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
189 +255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
190 +8&255))};d.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};d.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};d.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
191 +d.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};d.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};d.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
192 +16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};d.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24Le=
193 +function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};d.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};d.ByteStringBuffer.prototype.getSignedInt=
194 +function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
195 +a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
196 +function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
197 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
198 +d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
199 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
200 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
201 +b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
202 +b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
203 +d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
204 +a,!0);this.write+=4;return this};d.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};d.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};d.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};d.DataBuffer.prototype.getInt24=
205 +function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};d.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};d.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};d.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};d.DataBuffer.prototype.getInt32Le=function(){var a=
206 +this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};d.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
207 +d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
208 +new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
209 +this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
210 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
211 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
212 +a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
213 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
214 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
215 +function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
216 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,u=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[u++]=p<<2|g>>4,64!==h&&(d[u++]=(g&15)<<4|h>>2,64!==k&&(d[u++]=(h&3)<<6|k));return b?u-c:d.subarray(0,u)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
217 +var p=b;p||(p=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)p[y++]=a.charCodeAt(h);return b?y-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
218 +b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
219 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},K=function(a,b,
220 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){K(m,arguments,p)};d.getItem=function(a,b,c,d){return K(k,arguments,d)};d.removeItem=function(a,b,c,d){K(h,arguments,d)};d.clearItems=
221 +function(a,b,c){K(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;d.getQueryVariables=function(a){var b=function(a){var b=
222 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
223 +0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
224 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
225 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
226 +c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
227 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
228 +2*(8-a.length+b),p=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&p.putByte(0);p.putBytes(k)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,h=0;h<a.length;h+=
229 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],e=b.length;m&&e===m.end+1?(m.end=e,m.end-m.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:e,end:e})}b.push(k)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,e){if(0===m){var u=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
230 +Math.max(1,u);URL.revokeObjectURL(k);return b(null,d.cores)}p(e,function(b,d){a.push(h(e,d));c(a,m-1,e)})}function p(a,b){for(var c=[],d=[],g=0;g<a;++g){var h=new Worker(k);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(g=0;g<a;++g)c[g].postMessage(g)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],g=c[d]=[],y=0;y<a;++y)if(d!==y){var k=b[y];(p.st>k.st&&p.st<k.et||k.st>p.st&&k.st<p.et)&&g.push(y)}return c.reduce(function(a,
231 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
232 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var r=0;r<e.length;++r)e[r](c);
233 +return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
234 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
235 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
236 this.mode.start(c)};c.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()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
237 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
238 -c.defined.cipher=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
239 -4<b.length){var d=b;b=a.util.createBuffer();for(var e=0;e<d.length;++e)b.putByte(d[e])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function g(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
237 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
238 +c.defined.cipher=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
239 +4<b.length){var d=b;b=a.util.createBuffer();for(var g=0;g<d.length;++g)b.putByte(d[g])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
240 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
241 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.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);
242 this._outBlock=Array(this._ints)};w.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=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
243 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
244 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
245 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32()^this._outBlock[d],b.putInt32(this._inBlock[d]);else{var e=(this.blockSize-p)%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]);
246 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
247 -p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32(),b.putInt32(this._inBlock[d]^this._outBlock[d]);else{var e=(this.blockSize-p)%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);
248 -if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
249 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)b.putInt32(a.getInt32()^this._outBlock[d]),this._inBlock[d]=this._outBlock[d];else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(d=0;d<this._ints;++d)this._partialOutput.putInt32(a.getInt32()^
250 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
251 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var g=0;g<
252 -this._ints;++g)b.putInt32(a.getInt32()^this._outBlock[g]);else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);0<q&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
245 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
246 +if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
247 +d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
248 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
249 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
250 +this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
251 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var e=0;e<
252 +this._ints;++e)b.putInt32(a.getInt32()^this._outBlock[e]);else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);0<r&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<r&&!c)return b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
253 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
254 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.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,
255 -this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(g(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=g(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
256 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var g=0;g<this._ints;++g)b.putInt32(this._outBlock[g]^=a.getInt32());this._cipherLength+=this.blockSize}else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();
257 -for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);if(0===q||c){c?(g=p%this.blockSize,this._cipherLength+=g,this._partialOutput.truncate(this.blockSize-g)):this._cipherLength+=this.blockSize;for(g=0;g<this._ints;++g)this._outBlock[g]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),
258 -this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
259 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var e=this._aDataLength.concat(g(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,e);e=[];this.cipher.encrypt(this._j0,e);for(var q=0;q<
260 -this._ints;++q)this.tag.putInt32(this._s[q]^e[q]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],p=b.slice(0),d=0;128>d;++d)a[d/32|0]&1<<31-d%32&&(c[0]^=p[0],c[1]^=p[1],c[2]^=p[2],c[3]^=p[3]),this.pow(p,p);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,p=3;0<p;--p)b[p]=a[p]>>>1|(a[p-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
261 -[0,0,0,0],c=0;32>c;++c){var p=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=p[0];b[1]^=p[1];b[2]^=p[2];b[3]^=p[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,p=4*c,c=16*c,d=Array(c),e=0;e<c;++e){var g=[0,0,0,0];g[e/p|0]=1<<b-1<<(p-1-e%p)*b;d[e]=this.generateSubHashTable(this.multiply(g,a),b)}return d};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
262 -p=c>>>1,d=Array(c);d[p]=a.slice(0);for(var e=p>>>1;0<e;)this.pow(d[2*e],d[e]=[]),e>>=1;for(e=2;e<p;){for(var g=1;g<e;++g){var q=d[e],w=d[g];d[e+g]=[q[0]^w[0],q[1]^w[1],q[2]^w[2],q[3]^w[3]]}e*=2}d[0]=[0,0,0,0];for(e=p+1;e<c;++e)g=d[e^p],d[e]=[a[0]^g[0],a[1]^g[1],a[2]^g[2],a[3]^g[3]];return d}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=
263 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
264 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);r=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,e,g,k,q,u,b=0;256>b;++b){q=p^p<<1^p<<2^p<<3^p<<4;q=q>>8^q&255^99;h[c]=q;r[q]=c;u=a[q];e=a[c];g=a[e];k=a[g];u^=u<<24^q<<16^q<<8^q;g=(e^g^k)<<24^(c^
265 -k)<<16^(c^g^k)<<8^c^e^k;for(var w=0;4>w;++w)B[w][c]=u,x[w][q]=g,u=u<<24|u>>>8,g=g<<24|g>>>8;0===c?c=p=1:(c=e^a[a[a[e^k]]],p^=a[a[p]])}}function g(a,b){for(var c=a.slice(0),p,d=1,e=c.length,m=k*(e+6+1),q=e;q<m;++q)p=c[q-1],0===q%e?(p=h[p>>>16&255]<<24^h[p>>>8&255]<<16^h[p&255]<<8^h[p>>>24]^K[d]<<24,d++):6<e&&4===q%e&&(p=h[p>>>24]<<24^h[p>>>16&255]<<16^h[p>>>8&255]<<8^h[p&255]),c[q]=c[q-e]^p;if(b){for(var d=x[0],e=x[1],r=x[2],w=x[3],l=c.slice(0),m=c.length,q=0,F=m-k;q<m;q+=k,F-=k)if(0===q||q===m-k)l[q]=
266 -c[F],l[q+1]=c[F+3],l[q+2]=c[F+2],l[q+3]=c[F+1];else for(var B=0;B<k;++B)p=c[F+B],l[q+(3&-B)]=d[h[p>>>24]]^e[h[p>>>16&255]]^r[h[p>>>8&255]]^w[h[p&255]];c=l}return c}function w(a,b,c,p){var d=a.length/4-1,e,g,k,m,q;p?(e=x[0],g=x[1],k=x[2],m=x[3],q=r):(e=B[0],g=B[1],k=B[2],m=B[3],q=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[p?3:1]^a[1];C=b[2]^a[2];b=b[p?1:3]^a[3];for(var n=3,v=1;v<d;++v)L=e[w>>>24]^g[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=e[l>>>24]^g[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=e[C>>>24]^
267 -g[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=e[b>>>24]^g[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=q[w>>>24]<<24^q[l>>>16&255]<<16^q[C>>>8&255]<<8^q[b&255]^a[++n];c[p?3:1]=q[l>>>24]<<24^q[C>>>16&255]<<16^q[b>>>8&255]<<8^q[w&255]^a[++n];c[2]=q[C>>>24]<<24^q[b>>>16&255]<<16^q[w>>>8&255]<<8^q[l&255]^a[++n];c[p?1:3]=q[b>>>24]<<24^q[w>>>16&255]<<16^q[l>>>8&255]<<8^q[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
268 -a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;e.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!1,mode:p});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!0,mode:p});a.start(b);return a};a.aes.createDecryptionCipher=
255 +this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
256 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var e=0;e<this._ints;++e)b.putInt32(this._outBlock[e]^=a.getInt32());this._cipherLength+=this.blockSize}else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();
257 +for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(0===r||c){c?(e=p%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<r&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),
258 +this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
259 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var u=0;u<
260 +this._ints;++u)this.tag.putInt32(this._s[u]^g[u]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
261 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),g=0;g<c;++g){var e=[0,0,0,0];e[g/d|0]=1<<b-1<<(d-1-g%d)*b;p[g]=this.generateSubHashTable(this.multiply(e,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
262 +d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(p[2*g],p[g]=[]),g>>=1;for(g=2;g<d;){for(var e=1;e<g;++e){var r=p[g],w=p[e];p[g+e]=[r[0]^w[0],r[1]^w[1],r[2]^w[2],r[3]^w[3]]}g*=2}p[0]=[0,0,0,0];for(g=d+1;g<c;++g)e=p[g^d],p[g]=[a[0]^e[0],a[1]^e[1],a[2]^e[2],a[3]^e[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=
263 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
264 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,g,e,k,r,q,b=0;256>b;++b){r=p^p<<1^p<<2^p<<3^p<<4;r=r>>8^r&255^99;h[c]=r;u[r]=c;q=a[r];g=a[c];e=a[g];k=a[e];q^=q<<24^r<<16^r<<8^r;e=(g^e^k)<<24^(c^
265 +k)<<16^(c^e^k)<<8^c^g^k;for(var w=0;4>w;++w)B[w][c]=q,x[w][r]=e,q=q<<24|q>>>8,e=e<<24|e>>>8;0===c?c=p=1:(c=g^a[a[a[g^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,g=c.length,m=k*(g+6+1),r=g;r<m;++r)d=c[r-1],0===r%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^K[p]<<24,p++):6<g&&4===r%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[r]=c[r-g]^d;if(b){for(var p=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),m=c.length,r=0,F=m-k;r<m;r+=k,F-=k)if(0===r||r===m-k)l[r]=
266 +c[F],l[r+1]=c[F+3],l[r+2]=c[F+2],l[r+3]=c[F+1];else for(var B=0;B<k;++B)d=c[F+B],l[r+(3&-B)]=p[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,g,e,k,m,r;d?(g=x[0],e=x[1],k=x[2],m=x[3],r=u):(g=B[0],e=B[1],k=B[2],m=B[3],r=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[d?3:1]^a[1];C=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)L=g[w>>>24]^e[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^e[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=g[C>>>24]^
267 +e[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^e[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=r[w>>>24]<<24^r[l>>>16&255]<<16^r[C>>>8&255]<<8^r[b&255]^a[++n];c[d?3:1]=r[l>>>24]<<24^r[C>>>16&255]<<16^r[b>>>8&255]<<8^r[w&255]^a[++n];c[2]=r[C>>>24]<<24^r[b>>>16&255]<<16^r[w>>>8&255]<<8^r[l&255]^a[++n];c[d?1:3]=r[b>>>24]<<24^r[w>>>16&255]<<16^r[l>>>8&255]<<8^r[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
268 +a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;g.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
269 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
270 -c;for(var c=a.util.createBuffer(),e=0;e<d.length;++e)c.putByte(d[e])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,e=0;e<h;++e)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=g(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return g(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
271 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,r,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
272 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
270 +c;for(var c=a.util.createBuffer(),g=0;g<d.length;++g)c.putByte(d[g])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,g=0;g<h;++g)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
271 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
272 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
273 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
274 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
275 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -283,336 +283,336 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
283 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
284 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
285 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
286 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var q=0;q<g.length;++q)g[q](c);return c.oids}},
287 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
288 -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};c.create=function(b,c,d,e){if(a.util.isArray(e)){for(var h=[],g=0;g<e.length;++g)void 0!==e[g]&&h.push(e[g]);e=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(e),value:e}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,g){void 0===g&&(g=!0);
289 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,r=d(b);if(b.length()<r){if(g)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+r,m;r=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<r){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===r-(b.read-
290 -x))++x,--r}catch(A){}b.read=x}if(l)if(l=[],void 0===r)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,g))}else for(x=b.length();0<r;)l.push(c.fromDer(b,g)),r-=x-b.length(),x=b.length();else{if(void 0===r){if(g)throw Error("Non-constructed ASN.1 object of indefinite length.");r=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<r;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(r)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
291 -e=b.tagClass|b.type,g=a.util.createBuffer();if(b.composed){b.constructed?e|=32:g.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&g.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)g.putInt16(b.value.charCodeAt(h));else g.putBytes(b.value);d.putByte(e);if(127>=g.length())d.putByte(g.length()&127);else{h=g.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(g);
292 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,e,h,g,q=2;q<b.length;++q){d=!0;e=[];h=parseInt(b[q],10);do g=h&127,h>>>=7,d||(g|=128),e.push(g),d=!1;while(0<h);for(d=e.length-1;0<=d;--d)c.putByte(e[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var e=0;0<b.length();)d=b.getByte(),e<<=7,d&128?e+=d&127:(c+="."+(e+d),e=0);
293 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,e=parseInt(a.substr(4,2),10),p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,e);b.setUTCHours(p,g,q,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
294 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,e=parseInt(a.substr(6,2),10),p=parseInt(a.substr(8,2),10),g=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),x=0,l=0,y=!1;"Z"===a.charAt(a.length-1)&&(y=!0);var R=a.length-5,z=a.charAt(R);if("+"===z||"-"===z)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===z&&(l*=-1),y=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
295 -10));y?(b.setUTCFullYear(c,d,e),b.setUTCHours(p,g,q,x),b.setTime(+b+l)):(b.setFullYear(c,d,e),b.setHours(p,g,q,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
286 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var r=0;r<e.length;++r)e[r](c);return c.oids}},
287 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
288 +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};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
289 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
290 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
291 +g=b.tagClass|b.type,e=a.util.createBuffer();if(b.composed){b.constructed?g|=32:e.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&e.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)e.putInt16(b.value.charCodeAt(h));else e.putBytes(b.value);d.putByte(g);if(127>=e.length())d.putByte(e.length()&127);else{h=e.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(e);
292 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,r=2;r<b.length;++r){d=!0;g=[];h=parseInt(b[r],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
293 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),r=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(r=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(g,e,r,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
294 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),r=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
295 +10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(g,e,r,x),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(g,e,r,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
296 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
297 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,e,g){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)g&&(b.tagClass!==d.tagClass&&g.push("["+d.name+'] Expected tag class "'+d.tagClass+
298 -'", got "'+b.tagClass+'"'),b.type!==d.type&&g.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var r=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[r]&&((h=c.validate(b.value[r],d.value[l],e,g))?++r:d.value[l].optional&&(h=!0)),!h&&g&&g.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
299 -b.value.length+'"');h&&e&&(d.capture&&(e[d.capture]=b.value),d.captureAsn1&&(e[d.captureAsn1]=b))}else g&&g.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var g=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,e){var k="";d=d||0;e=e||2;0<d&&(k+="\n");for(var h="",r=0;r<d*e;++r)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
297 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
298 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
299 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
300 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
301 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
302 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",r=0;r<b.value.length;++r)void 0!==b.value[r]&&(l+=1,B+=c.prettyPrint(b.value[r],d+1,e),r+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
303 -c.Type.OCTETSTRING?(g.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:g.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
304 -c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<g.length;++q)g[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
302 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,B+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
303 +c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
304 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var r=0;r<e.length;++r)e[r](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
305 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[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];m=[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];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
306 -Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var e,p,h,g,z,E,q,l=c.length();64<=l;){p=a.h0;h=a.h1;g=a.h2;z=a.h3;for(q=0;16>q;++q)b[q]=c.getInt32Le(),e=z^h&(g^z),e=p+e+k[q]+b[q],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;32>q;++q)e=g^z&(h^g),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;48>q;++q)e=h^g^z,e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;64>q;++q)e=g^(h|~z),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;a.h0=a.h0+p|0;a.h1=a.h1+h|0;a.h2=a.h2+g|0;a.h3=
307 -a.h3+z|0;l-=64}}var g=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=g;g.create=function(){h||c();var b=null,g=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);g=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
308 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],z=m.fullMessageLength.length-1;0<=z;--z)m.fullMessageLength[z]+=q[1],q[1]=q[0]+(m.fullMessageLength[z]/4294967296>>>0),m.fullMessageLength[z]>>>=0,q[0]=q[1]/4294967296>>>0;g.putBytes(c);d(b,k,g);(2048<g.read||0===g.length())&&g.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(g.bytes());c.putBytes(l.substr(0,
309 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,q=0,z=m.fullMessageLength.length-1;0<=z;--z)h=8*m.fullMessageLength[z]+q,q=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=
310 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
311 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,A,y,w,z=d.length();64<=z;){p=a.h0;g=a.h1;q=a.h2;l=a.h3;A=a.h4;for(w=0;16>w;++w)e=d.getInt32(),b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;20>w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;32>
312 -w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;40>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;60>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g&q|l&(g^q),e=(p<<5|p>>>27)+y+A+2400959708+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;80>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>
313 -27)+y+A+3395469782+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;a.h0=a.h0+p|0;a.h1=a.h1+g|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+A|0;z-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),e=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
314 -0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,e=0;e<c;++e)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var w=g.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
315 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],A=0;A<h.fullMessageLength.length;++A)w=8*h.fullMessageLength[A+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
316 -h4:b.h4};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var g=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
317 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,y,w,z,E,O,H,C,u,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
318 -for(;64>l;++l)e=b[l-2],e=(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10,p=b[l-15],p=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,b[l]=e+b[l-7]+p+b[l-16]|0;y=a.h0;w=a.h1;z=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;u=a.h7;for(l=0;64>l;++l)e=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),g=C^O&(H^C),p=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),q=y&w|z&(y^w),e=u+e+g+n[l]+b[l],p+=q,u=C,C=H,H=O,O=E+e|0,E=z,z=w,w=y,y=e+p|0;a.h0=a.h0+y|0;a.h1=a.h1+w|0;a.h2=a.h2+z|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+u|0;v-=
319 -64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.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,
320 -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],l=!0);var b=null,d=a.util.createBuffer(),e=Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,
321 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){r.messageLength=0;r.fullMessageLength=r.messageLength64=[];for(var c=r.messageLengthSize/4,e=0;e<c;++e)r.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return r}};r.start();r.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var x=g.length;r.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=r.fullMessageLength.length-
322 -1;0<=w;--w)r.fullMessageLength[w]+=x[1],x[1]=x[0]+(r.fullMessageLength[w]/4294967296>>>0),r.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return r};r.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,r.blockLength-(r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize&r.blockLength-1)));a.util.createBuffer();for(var w,x,A=8*r.fullMessageLength[0],y=0;y<r.fullMessageLength.length;++y)w=
323 -8*r.fullMessageLength[y+1],x=w/4294967296>>>0,A+=x,l.putInt32(A>>>0),A=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return r};var g=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
324 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
325 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,k,q,z,E,l,w,C,u,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)q=b[S-2],w=q[0],q=q[1],e=((w>>>19|q<<13)^(q>>>29|w<<3)^w>>>6)>>>0,p=((w<<13|q>>>19)^(q<<3|w>>>29)^(w<<26|q>>>6))>>>0,q=b[S-15],w=q[0],q=q[1],g=((w>>>1|q<<31)^(w>>>8|q<<24)^w>>>7)>>>0,k=((w<<31|q>>>1)^(w<<24|q>>>8)^(w<<25|q>>>7))>>>0,w=b[S-7],C=b[S-
326 -16],q=p+w[1]+k+C[1],b[S][0]=e+w[0]+g+C[0]+(q/4294967296>>>0)>>>0,b[S][1]=q>>>0;w=a[0][0];C=a[0][1];u=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)e=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,q=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,p=(ba^D&(J^ba))>>>0,z=(W^V&(aa^W))>>>0,g=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
327 -E=(w&u|v&(w^u))>>>0,l=(C&n|F&(C^n))>>>0,q=G+q+z+m[S][1]+b[S][1],e=I+e+p+m[S][0]+b[S][0]+(q/4294967296>>>0)>>>0,p=q>>>0,q=k+l,g=g+E+(q/4294967296>>>0)>>>0,k=q>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,q=L+p,D=Y+e+(q/4294967296>>>0)>>>0,V=q>>>0,Y=v,L=F,v=u,F=n,u=w,n=C,q=p+k,w=e+g+(q/4294967296>>>0)>>>0,C=q>>>0;q=a[0][1]+C;a[0][0]=a[0][0]+w+(q/4294967296>>>0)>>>0;a[0][1]=q>>>0;q=a[1][1]+n;a[1][0]=a[1][0]+u+(q/4294967296>>>0)>>>0;a[1][1]=q>>>0;q=a[2][1]+F;a[2][0]=a[2][0]+v+(q/4294967296>>>0)>>>0;a[2][1]=q>>>0;
328 -q=a[3][1]+L;a[3][0]=a[3][0]+Y+(q/4294967296>>>0)>>>0;a[3][1]=q>>>0;q=a[4][1]+V;a[4][0]=a[4][0]+D+(q/4294967296>>>0)>>>0;a[4][1]=q>>>0;q=a[5][1]+aa;a[5][0]=a[5][0]+J+(q/4294967296>>>0)>>>0;a[5][1]=q>>>0;q=a[6][1]+W;a[6][0]=a[6][0]+ba+(q/4294967296>>>0)>>>0;a[6][1]=q>>>0;q=a[7][1]+G;a[7][0]=a[7][0]+I+(q/4294967296>>>0)>>>0;a[7][1]=q>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var g=a.sha384=a.sha512.sha384=a.sha512.sha384||
329 -{};g.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=g;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
306 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var p,g,h,e,y,E,r,l=c.length();64<=l;){g=a.h0;h=a.h1;e=a.h2;y=a.h3;for(r=0;16>r;++r)b[r]=c.getInt32Le(),p=y^h&(e^y),p=g+p+k[r]+b[r],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;32>r;++r)p=e^y&(h^e),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;48>r;++r)p=h^e^y,p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;64>r;++r)p=e^(h|~y),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;a.h0=a.h0+g|0;a.h1=a.h1+h|0;a.h2=a.h2+e|0;a.h3=
307 +a.h3+y|0;l-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
308 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var r=c.length;m.messageLength+=r;for(var r=[r/4294967296>>>0,r>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=r[1],r[1]=r[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,r[0]=r[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
309 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,r=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+r,r=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
310 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
311 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;r=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;32>
312 +w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&r|l&(e^r),p=(g<<5|g>>>27)+A+z+2400959708+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>
313 +27)+A+z+3395469782+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+r|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
314 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
315 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
316 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
317 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,A,w,y,E,O,H,C,q,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
318 +for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=p+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;q=a.h7;for(l=0;64>l;++l)p=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),e=C^O&(H^C),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),r=A&w|y&(A^w),p=q+p+e+n[l]+b[l],g+=r,q=C,C=H,H=O,O=E+p|0,E=y,y=w,w=A,A=p+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+q|0;v-=
319 +64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.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,
320 +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],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
321 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
322 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
323 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
324 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
325 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,k,r,y,E,l,w,C,q,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)r=b[S-2],w=r[0],r=r[1],p=((w>>>19|r<<13)^(r>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|r>>>19)^(r<<3|w>>>29)^(w<<26|r>>>6))>>>0,r=b[S-15],w=r[0],r=r[1],e=((w>>>1|r<<31)^(w>>>8|r<<24)^w>>>7)>>>0,k=((w<<31|r>>>1)^(w<<24|r>>>8)^(w<<25|r>>>7))>>>0,w=b[S-7],C=b[S-
326 +16],r=g+w[1]+k+C[1],b[S][0]=p+w[0]+e+C[0]+(r/4294967296>>>0)>>>0,b[S][1]=r>>>0;w=a[0][0];C=a[0][1];q=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)p=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,r=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(J^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
327 +E=(w&q|v&(w^q))>>>0,l=(C&n|F&(C^n))>>>0,r=G+r+y+m[S][1]+b[S][1],p=I+p+g+m[S][0]+b[S][0]+(r/4294967296>>>0)>>>0,g=r>>>0,r=k+l,e=e+E+(r/4294967296>>>0)>>>0,k=r>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,r=L+g,D=Y+p+(r/4294967296>>>0)>>>0,V=r>>>0,Y=v,L=F,v=q,F=n,q=w,n=C,r=g+k,w=p+e+(r/4294967296>>>0)>>>0,C=r>>>0;r=a[0][1]+C;a[0][0]=a[0][0]+w+(r/4294967296>>>0)>>>0;a[0][1]=r>>>0;r=a[1][1]+n;a[1][0]=a[1][0]+q+(r/4294967296>>>0)>>>0;a[1][1]=r>>>0;r=a[2][1]+F;a[2][0]=a[2][0]+v+(r/4294967296>>>0)>>>0;a[2][1]=r>>>0;
328 +r=a[3][1]+L;a[3][0]=a[3][0]+Y+(r/4294967296>>>0)>>>0;a[3][1]=r>>>0;r=a[4][1]+V;a[4][0]=a[4][0]+D+(r/4294967296>>>0)>>>0;a[4][1]=r>>>0;r=a[5][1]+aa;a[5][0]=a[5][0]+J+(r/4294967296>>>0)>>>0;a[5][1]=r>>>0;r=a[6][1]+W;a[6][0]=a[6][0]+ba+(r/4294967296>>>0)>>>0;a[6][1]=r>>>0;r=a[7][1]+G;a[7][0]=a[7][0]+I+(r/4294967296>>>0)>>>0;a[7][1]=r>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
329 +{};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
330 3609767458],[1899447441,602891725],[3049323471,3964484399],[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],
331 [1555081692,3175218132],[1996064986,2198950837],[2554220882,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,
332 106217008],[3516065817,3606008344],[3600352804,1432725776],[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],
333 [3515267271,566280711],[3940187606,3454069534],[4118630271,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]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
334 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,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,
335 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],e=null,g=a.util.createBuffer(),x=Array(80),A=0;80>A;++A)x[A]=Array(2);var y={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){y.messageLength=
336 -0;y.fullMessageLength=y.messageLength128=[];for(var b=y.messageLengthSize/4,c=0;c<b;++c)y.fullMessageLength.push(0);g=a.util.createBuffer();e=Array(d.length);for(c=0;c<d.length;++c)e[c]=d[c].slice(0);return y}};y.start();y.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;y.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=y.fullMessageLength.length-1;0<=k;--k)y.fullMessageLength[k]+=h[1],h[1]=h[0]+(y.fullMessageLength[k]/4294967296>>>0),y.fullMessageLength[k]>>>=0,h[0]=
337 -h[1]/4294967296>>>0;g.putBytes(b);c(e,x,g);(2048<g.read||0===g.length())&&g.compact();return y};y.digest=function(){var d=a.util.createBuffer();d.putBytes(g.bytes());d.putBytes(l.substr(0,y.blockLength-(y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize&y.blockLength-1)));a.util.createBuffer();for(var z,k,m=8*y.fullMessageLength[0],r=0;r<y.fullMessageLength.length;++r)z=8*y.fullMessageLength[r+1],k=z/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=z;z=Array(e.length);for(r=0;r<e.length;++r)z[r]=
338 -e[r].slice(0);c(z,x,d);d=a.util.createBuffer();k="SHA-512"===b?z.length:"SHA-384"===b?z.length-2:z.length-4;for(r=0;r<k;++r)d.putInt32(z[r][0]),r===k-1&&"SHA-512/224"===b||d.putInt32(z[r][1]);return d};return y};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
339 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
340 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md}},l=a;a=function(b,
341 -c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,g={start:function(g,m){if(null!==g)if("string"===typeof g)if(g=g.toLowerCase(),g in a.md.algorithms)b=
342 -a.md.algorithms[g].create();else throw Error('Unknown hash algorithm "'+g+'"');else b=g;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
343 -d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};g.digest=g.getMac;return g}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
344 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<g.length;++q)g[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],e=function(a,
345 -b){return" "+b},p=0;p<a.values.length;++p)d.push(a.values[p].replace(/^(\S+\r\n)/,e));b+=d.join(",")+"\r\n";d=0;a=-1;for(p=0;p<b.length;++p,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=p-a-1,a=-1,++p;else if(" "===b[p]||"\t"===b[p]||","===b[p])a=p;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var e="-----BEGIN "+b.type+"-----\r\n",g;b.procType&&(g={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
346 -e+=c(g));b.contentDomain&&(g={name:"Content-Domain",values:[b.contentDomain]},e+=c(g));b.dekInfo&&(g={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&g.values.push(b.dekInfo.parameters),e+=c(g));if(b.headers)for(g=0;g<b.headers.length;++g)e+=c(b.headers[g]);b.procType&&(e+="\r\n");e+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return e+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
347 -e=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,g=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var q={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(q);if(h[2]){for(var l=h[2].split(g),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var A=l[x];if(!/\s/.test(A[0]))break;h+=A;B=x}if(h=h.match(e)){for(var x={name:h[1],values:[]},A=h[2].split(","),y=0;y<A.length;++y)x.values.push(A[y].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
348 -"Content-Domain"!==x.name)if(q.dekInfo||"DEK-Info"!==x.name)q.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:A[0],parameters:A[1]||null}}else q.contentDomain=A[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
349 -q.procType={version:A[0],type:A[1]}}}++B}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
350 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
351 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,e){var p=32===a.length?3:9;e=3===p?e?[30,-2,-2]:[0,32,2]:e?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=b[0],q=b[1];b=(g>>>4^q)&252645135;q^=b;g^=b<<4;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(g>>>1^q)&1431655765;for(var q=q^b,g=g^b<<1,g=g<<1|g>>>31,q=q<<1|q>>>31,H=0;H<p;H+=3){for(var C=e[H+1],u=e[H+2],T=e[H];T!=C;T+=u){var P=q^a[T],F=(q>>>4|q<<28)^a[T+1];b=g;
352 -g=q;q=b^(n[P>>>24&63]|k[P>>>16&63]|r[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=g;g=q;q=b}g=g>>>1|g<<31;q=q>>>1|q<<31;b=(g>>>1^q)&1431655765;q^=b;g^=b<<1;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(g>>>4^q)&252645135;c[0]=g^b<<4;c[1]=q^b}function g(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var g=
353 -null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;e.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return g({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return g({key:a,
335 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
336 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
337 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
338 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
339 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
340 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md}},l=a;a=function(b,
341 +c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
342 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
343 +d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
344 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var r=0;r<e.length;++r)e[r](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
345 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
346 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
347 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var r={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(r);if(h[2]){for(var l=h[2].split(e),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;B=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(r.procType)if(r.contentDomain||
348 +"Content-Domain"!==x.name)if(r.dekInfo||"DEK-Info"!==x.name)r.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');r.dekInfo={algorithm:z[0],parameters:z[1]||null}}else r.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
349 +r.procType={version:z[0],type:z[1]}}}++B}if("ENCRYPTED"===r.procType&&!r.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
350 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
351 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,g){var p=32===a.length?3:9;g=3===p?g?[30,-2,-2]:[0,32,2]:g?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],r=b[1];b=(e>>>4^r)&252645135;r^=b;e^=b<<4;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(e>>>1^r)&1431655765;for(var r=r^b,e=e^b<<1,e=e<<1|e>>>31,r=r<<1|r>>>31,H=0;H<p;H+=3){for(var C=g[H+1],q=g[H+2],T=g[H];T!=C;T+=q){var P=r^a[T],F=(r>>>4|r<<28)^a[T+1];b=e;
352 +e=r;r=b^(n[P>>>24&63]|k[P>>>16&63]|u[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=e;e=r;r=b}e=e>>>1|e<<31;r=r>>>1|r<<31;b=(e>>>1^r)&1431655765;r^=b;e^=b<<1;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(e>>>4^r)&252645135;c[0]=e^b<<4;c[1]=r^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
353 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
354 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
355 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[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],
356 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],r=[0,268435456,8,268435464,0,268435456,
355 +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],
356 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],r=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
357 8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],F=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],B=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],L=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
358 1,C=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],K=0,D,W=0;W<n;W++){var I=b.getInt32(),G=b.getInt32();D=(I>>>4^G)&252645135;G^=D;I^=D<<4;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>2^G)&858993459;G^=D;I^=D<<2;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=(G>>>8^I)&16711935;I^=D;G^=D<<8;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=I<<8|G>>>20&240;for(var I=G<<24|G<<8&16711680|G>>>8&65280|G>>>24&240,G=D,S=0;S<v.length;++S){v[S]?(I=I<<2|I>>>26,G=G<<2|G>>>26):(I=I<<1|I>>>27,G=G<<1|G>>>27);
359 -var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|e[I>>>20&15]|g[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|q[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|r[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
359 +var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|g[I>>>20&15]|e[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|r[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|u[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
360 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[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,
361 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,
362 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[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,
363 8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[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],h=[256,34078976,34078720,1107296512,
364 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,
365 -524288,0,1074266112,34078976,1073742080],r=[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,
365 +524288,0,1074266112,34078976,1073742080],u=[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,
366 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[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,
367 67108866,67110912,2048,2097154],B=[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,
368 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<g.length;++q)g[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,
369 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,g;e&&!a.disableNativeCode&&(g=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,q){function l(){if(N>A)return q(null,z);n.start(null,
370 -null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();u=2;B()}function B(){if(u<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++u,a.util.setImmediate(B);z+=N<A?E:E.substr(0,y);++N;l()}"function"===typeof h&&(q=h,h=null);if(e&&!a.disableNativeCode&&g.pbkdf2&&(null===h||"object"!==typeof h)&&(4<g.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),q?4===g.pbkdf2Sync.length?g.pbkdf2(b,
371 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):g.pbkdf2(b,c,d,k,h,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===g.pbkdf2Sync.length?g.pbkdf2Sync(b,c,d,k).toString("binary"):g.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
372 -if(q)return q(b);throw b;}var A=Math.ceil(k/x),y=k-(A-1)*x,n=a.hmac.create();n.start(h,b);var z="",E,O,H;if(!q){for(var N=1;N<=A;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var u=2;u<=d;++u)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;z+=N<A?E:E.substr(0,y)}return z}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
373 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
374 -"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
375 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function g(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
376 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)e.putInt32(k[h])}catch(z){if(!("undefined"!==typeof QuotaExceededError&&z instanceof QuotaExceededError))throw z;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
377 -e.putByte(String.fromCharCode(k&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),q=0;32>q;++q)h[q]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(g(k.key,h(k.seed)));k.seed=z(g(k.key,k.seed));
378 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,q=k.plugin.formatKey,z=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var z=c(k.key,
379 -k.seed);k.generated+=z.length;q.putBytes(z);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,g(a))}catch(c){b(c)}},k.seedFileSync=g);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
368 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var r=0;r<e.length;++r)e[r](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
369 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},g="undefined"!==typeof process&&process.versions&&process.versions.node,e;g&&!a.disableNativeCode&&(e=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,r){function l(){if(N>z)return r(null,y);n.start(null,
370 +null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();q=2;B()}function B(){if(q<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++q,a.util.setImmediate(B);y+=N<z?E:E.substr(0,A);++N;l()}"function"===typeof h&&(r=h,h=null);if(g&&!a.disableNativeCode&&e.pbkdf2&&(null===h||"object"!==typeof h)&&(4<e.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),r?4===e.pbkdf2Sync.length?e.pbkdf2(b,
371 +c,d,k,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):e.pbkdf2(b,c,d,k,h,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):4===e.pbkdf2Sync.length?e.pbkdf2Sync(b,c,d,k).toString("binary"):e.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
372 +if(r)return r(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,n=a.hmac.create();n.start(h,b);var y="",E,O,H;if(!r){for(var N=1;N<=z;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var q=2;q<=d;++q)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;y+=N<z?E:E.substr(0,A)}return y}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
373 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
374 +"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,g=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(g=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
375 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function e(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var g=
376 +a.util.createBuffer();if(c)for(;g.length()<b;){var h=Math.max(1,Math.min(b-g.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)g.putInt32(k[h])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(g.length()<b)for(c=Math.floor(65536*Math.random());g.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
377 +g.putByte(String.fromCharCode(k&255));return g.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),r=0;32>r;++r)h[r]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function g(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(g)});l=e(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=r(e(k.key,h(k.seed)));k.seed=y(e(k.key,k.seed));
378 +a.util.setImmediate(g)}if(!d)return k.generateSync(b);var e=k.plugin.cipher,h=k.plugin.increment,r=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;g()};k.generateSync=function(b){var c=k.plugin.cipher,g=k.plugin.increment,e=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var r=a.util.createBuffer();r.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
379 +k.seed);k.generated+=y.length;r.putBytes(y);k.key=e(c(k.key,g(k.seed)));k.seed=h(c(k.key,k.seed))}return r.getBytes(b)};g?(k.seedFile=function(a,b){g.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return g.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,e(a))}catch(c){b(c)}},k.seedFileSync=e);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
380 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
381 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<g.length;++q)g[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
382 -0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},g=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
383 -b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,g,!1);l.putInt32(g[0]);l.putInt32(g[1]);l.putInt32(g[2]);l.putInt32(g[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
384 -process.versions.node,h=null;if("undefined"!==typeof window){var r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(h=function(a){return r.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
385 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<g.length;++q)g[q](c);
386 -return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
381 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var r=0;r<e.length;++r)e[r](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
382 +0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
383 +b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
384 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
385 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var r=0;r<e.length;++r)e[r](c);
386 +return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
387 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,
388 -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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
389 -1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var g=function(b,c,g){var k=!1,h=null,q=null,l=null,n,x,A,y,v=[];b=a.rc2.expandKey(b,c);for(A=0;64>A;A++)v.push(b.getInt16Le());g?(n=function(a){for(A=0;4>A;A++){a[A]+=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);var b=a[A],c=d[A];a[A]=b<<c&65535|(b&65535)>>16-c;y++}},x=function(a){for(A=0;4>A;A++)a[A]+=v[a[(A+3)%4]&63]}):(n=function(a){for(A=3;0<=A;A--){var b=a[A],c=d[A];a[A]=
390 -(b&65535)>>c|b<<16-c&65535;a[A]-=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);y--}},x=function(a){for(A=3;0<=A;A--)a[A]-=v[a[(A+3)%4]&63]});var z=null;return z={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();q=c||new a.util.createBuffer;l=b;z.output=q},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(A=0;4>A;A++){var c=h.getInt16Le();null!==l&&(g?c^=l.getInt16Le():l.putInt16Le(c));
391 -b.push(c&65535)}y=g?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(A=0;4>A;A++)null!==l&&(g?l.putInt16Le(b[A]):b[A]^=l.getInt16Le()),q.putInt16Le(b[A])}},finish:function(a){var b=!0;if(g)if(a)b=a(8,h,!g);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,z.update());!g&&(b=0===h.length())&&(a?b=a(8,q,!g):(a=q.length(),c=q.at(a-1),c>a?b=!1:q.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
392 -a.rc2.createEncryptionCipher=function(a,b){return g(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return g(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
393 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
394 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function g(a,b,c,d,e,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+e;e=Math.floor(h/67108864);c.data[d++]=h&67108863}return e}function l(a,b,c,d,e,p){var g=b&32767;for(b>>=15;0<=--p;){var h=this.data[a]&32767,z=this.data[a++]>>15,k=b*h+z*g,h=g*h+((k&32767)<<15)+c.data[d]+(e&1073741823);e=(h>>>30)+(k>>>15)+b*z+(e>>>30);c.data[d++]=h&1073741823}return e}function n(a,b,
395 -c,d,e,g){var p=b&16383;for(b>>=14;0<=--g;){var h=this.data[a]&16383,z=this.data[a++]>>14,k=b*h+z*p,h=p*h+((k&16383)<<14)+c.data[d]+e;e=(h>>28)+(k>>14)+b*z;c.data[d++]=h&268435455}return e}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function r(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
396 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function A(a,b){return a^b}function y(a,b){return a&~b}function R(){}function z(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
397 -navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=g,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],u;H=48;for(u=0;9>=u;++u)N[H++]=u;H=97;for(u=10;36>u;++u)N[H++]=u;H=65;for(u=10;36>u;++u)N[H++]=u;r.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};r.prototype.revert=function(a){return a};r.prototype.reduce=
398 -function(a){a.divRemTo(this.m,null,a)};r.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};r.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
388 +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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var g=b,e=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=e;128>n;n++)g.putByte(c[g.at(n-
389 +1)+g.at(n-e)&255]);g.setAt(128-l,c[g.at(128-l)&h]);for(n=127-l;0<=n;n--)g.setAt(n,c[g.at(n+1)^g.at(n+l)]);return g};var e=function(b,c,e){var k=!1,h=null,r=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
390 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();r=c||new a.util.createBuffer;l=b;y.output=r},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
391 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),r.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,r,!e):(a=r.length(),c=r.at(a-1),c>a?b=!1:r.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
392 +a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
393 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
394 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,g,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+g;g=Math.floor(h/67108864);c.data[d++]=h&67108863}return g}function l(a,b,c,d,g,e){var p=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,y=this.data[a++]>>15,k=b*h+y*p,h=p*h+((k&32767)<<15)+c.data[d]+(g&1073741823);g=(h>>>30)+(k>>>15)+b*y+(g>>>30);c.data[d++]=h&1073741823}return g}function n(a,b,
395 +c,d,g,e){var p=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,y=this.data[a++]>>14,k=b*h+y*p,h=p*h+((k&16383)<<14)+c.data[d]+g;g=(h>>28)+(k>>14)+b*y;c.data[d++]=h&268435455}return g}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
396 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
397 +navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=e,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],q;H=48;for(q=0;9>=q;++q)N[H++]=q;H=97;for(q=10;36>q;++q)N[H++]=q;H=65;for(q=10;36>q;++q)N[H++]=q;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
398 +function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
399 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
400 -c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var e=a.length,p=!1,g=0;0<=--e;){var h=8==d?a[e]&255:m(a,e);0>h?"-"==a.charAt(e)&&(p=!0):(p=!1,0==g?this.data[this.t++]=h:g+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-g)-1)<<g,this.data[this.t++]=
401 -h>>this.DB-g):this.data[this.t-1]|=h<<g,g+=d,g>=this.DB&&(g-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<g&&(this.data[this.t-1]|=(1<<this.DB-g)-1<<g));this.clamp();p&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
402 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,e=(1<<d)-1,g=Math.floor(a/this.DB),p=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+g+1]=this.data[h]>>d|p,p=(this.data[h]&e)<<c;for(h=g-1;0<=h;--h)b.data[h]=0;b.data[g]=p;b.t=this.t+g+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,e=this.DB-d,g=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var p=
403 -c+1;p<this.t;++p)b.data[p-c-1]|=(this.data[p]&g)<<e,b.data[p-c]=this.data[p]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&g)<<e);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
404 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),e=a.abs(),g=d.t;for(b.t=g+e.t;0<=--g;)b.data[g]=0;for(g=0;g<e.t;++g)b.data[g+d.t]=d.am(0,e.data[g],b,g,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
405 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,g){var p=a.abs();if(!(0>=p.t)){var z=this.abs();if(z.t<p.t)null!=b&&b.fromInt(0),null!=g&&this.copyTo(g);else{null==g&&(g=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),z.lShiftTo(l,g)):(p.copyTo(k),z.copyTo(g));p=k.t;z=k.data[p-1];if(0!=z){var E=z*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),u=this.FV/E,E=(1<<this.F1)/E,y=1<<this.F2,r=g.t,x=r-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=g.compareTo(w)&&
406 -(g.data[g.t++]=1,g.subTo(w,g));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=g.data[--r]==z?this.DM:Math.floor(g.data[r]*u+(g.data[r-1]+y)*E);if((g.data[r]+=k.am(0,O,g,x,0,p))<O)for(k.dlShiftTo(x,w),g.subTo(w,g);g.data[r]<--O;)g.subTo(w,g)}null!=b&&(g.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));g.t=p;g.clamp();0<l&&g.rShiftTo(l,g);0>m&&c.ZERO.subTo(g,g)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
407 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var g=d(),p=d(),z=b.convert(this),k=h(a)-1;for(z.copyTo(g);0<=--k;)if(b.sqrTo(g,p),0<(a&1<<k))b.mulTo(p,z,g);else var m=g,g=p,p=m;return b.revert(g)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
400 +c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var g=a.length,e=!1,p=0;0<=--g;){var h=8==d?a[g]&255:m(a,g);0>h?"-"==a.charAt(g)&&(e=!0):(e=!1,0==p?this.data[this.t++]=h:p+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-p)-1)<<p,this.data[this.t++]=
401 +h>>this.DB-p):this.data[this.t-1]|=h<<p,p+=d,p>=this.DB&&(p-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<p&&(this.data[this.t-1]|=(1<<this.DB-p)-1<<p));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
402 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,g=(1<<d)-1,p=Math.floor(a/this.DB),e=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+p+1]=this.data[h]>>d|e,e=(this.data[h]&g)<<c;for(h=p-1;0<=h;--h)b.data[h]=0;b.data[p]=e;b.t=this.t+p+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,g=this.DB-d,p=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var e=
403 +c+1;e<this.t;++e)b.data[e-c-1]|=(this.data[e]&p)<<g,b.data[e-c]=this.data[e]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&p)<<g);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,g=Math.min(a.t,this.t);c<g;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
404 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),g=a.abs(),e=d.t;for(b.t=e+g.t;0<=--e;)b.data[e]=0;for(e=0;e<g.t;++e)b.data[e+d.t]=d.am(0,g.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
405 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,e){var p=a.abs();if(!(0>=p.t)){var y=this.abs();if(y.t<p.t)null!=b&&b.fromInt(0),null!=e&&this.copyTo(e);else{null==e&&(e=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),y.lShiftTo(l,e)):(p.copyTo(k),y.copyTo(e));p=k.t;y=k.data[p-1];if(0!=y){var E=y*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),q=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=e.t,x=u-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=e.compareTo(w)&&
406 +(e.data[e.t++]=1,e.subTo(w,e));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=e.data[--u]==y?this.DM:Math.floor(e.data[u]*q+(e.data[u-1]+A)*E);if((e.data[u]+=k.am(0,O,e,x,0,p))<O)for(k.dlShiftTo(x,w),e.subTo(w,e);e.data[u]<--O;)e.subTo(w,e)}null!=b&&(e.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));e.t=p;e.clamp();0<l&&e.rShiftTo(l,e);0>m&&c.ZERO.subTo(e,e)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
407 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var e=d(),p=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(e);0<=--k;)if(b.sqrTo(e,p),0<(a&1<<k))b.mulTo(p,y,e);else var l=e,e=p,p=l;return b.revert(e)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
408 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 b=(1<<a)-1,c,d=!1,e="",g=this.t,p=this.DB-g*this.DB%a;if(0<g--)for(p<this.DB&&0<(c=this.data[g]>>p)&&(d=!0,e="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=g;)p<a?(c=(this.data[g]&(1<<p)-1)<<a-p,c|=this.data[--g]>>(p+=this.DB-a)):(c=this.data[g]>>(p-=a)&b,0>=p&&(p+=this.DB,--g)),0<c&&(d=!0),d&&(e+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?e:"0"};c.prototype.negate=function(){var a=
409 d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
410 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new r(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=z;R.prototype.revert=z;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
410 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
411 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)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var T=[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,
412 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],P=67108864/T[T.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
413 -b),c=k(b),g=d(),p=d(),h="";for(this.divRemTo(c,g,p);0<g.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,g.divRemTo(c,g,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,z=0;z<a.length;++z){var k=m(a,z);0>k?"-"==a.charAt(z)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
413 +b),c=k(b),e=d(),p=d(),h="";for(this.divRemTo(c,e,p);0<e.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,e.divRemTo(c,e,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
414 this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var e=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<e?d[0]&(1<<e)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,e,g=Math.min(a.t,this.t);for(d=
415 0;d<g;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){e=a.s&this.DM;for(d=g;d<this.t;++d)c.data[d]=b(this.data[d],e);c.t=this.t}else{e=this.s&this.DM;for(d=g;d<a.t;++d)c.data[d]=b(e,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
416 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
417 0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var e;for(e=c.t-this.t;d<e;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(e=Math.min(a.t,b);d<e;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
418 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var z=1;z++<d&&0!=
418 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var y=1;y++<d&&0!=
419 p.compareTo(b);)if(p=p.modPowInt(2,this),0==p.compareTo(c.ONE))return!1;if(0!=p.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.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]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
420 function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,e=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[e++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==e&&
421 -(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,A,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
422 -y,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
421 +(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
422 +A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
423 0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,e=0;0!=d;)d&=d-1,++e;a+=e}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
424 -y)};c.prototype.flipBit=function(a){return this.changeBit(a,A)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
425 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),g,p=k(1),z;if(0>=c)return p;g=18>c?1:48>c?3:144>c?4:768>c?5:6;z=8>c?new r(b):b.isEven()?new E(b):new v(b);var m=[],l=3,q=g-1,u=(1<<g)-1;m[1]=z.convert(this);if(1<g)for(c=d(),z.sqrTo(m[1],c);l<=u;)m[l]=d(),z.mulTo(c,m[l-2],m[l]),l+=2;for(var y=a.t-1,x,w=!0,O=d(),c=h(a.data[y])-1;0<=y;){c>=q?x=a.data[y]>>c-q&u:(x=(a.data[y]&(1<<c+1)-1)<<q-c,0<y&&(x|=a.data[y-1]>>this.DB+c-q));for(l=g;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--y);
426 -if(w)m[x].copyTo(p),w=!1;else{for(;1<l;)z.sqrTo(p,O),z.sqrTo(O,p),l-=2;0<l?z.sqrTo(p,O):(l=p,p=O,O=l);z.mulTo(O,m[x],p)}for(;0<=y&&0==(a.data[y]&1<<c);)z.sqrTo(p,O),l=p,p=O,O=l,0>--c&&(c=this.DB-1,--y)}return z.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),g=k(1),p=k(0),h=k(0),z=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(g.isEven()&&p.isEven()||(g.addTo(this,g),p.subTo(a,p)),g.rShiftTo(1,
427 -g)):p.isEven()||p.subTo(a,p),p.rShiftTo(1,p);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&z.isEven()||(h.addTo(this,h),z.subTo(a,z)),h.rShiftTo(1,h)):z.isEven()||z.subTo(a,z),z.rShiftTo(1,z);0<=d.compareTo(e)?(d.subTo(e,d),b&&g.subTo(h,g),p.subTo(z,p)):(e.subTo(d,e),b&&h.subTo(g,h),z.subTo(p,z))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=z.compareTo(a))return z.subtract(a);if(0>z.signum())z.addTo(a,z);else return z;return 0>z.signum()?z.add(a):z};c.prototype.pow=function(a){return this.exp(a,
424 +A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
425 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),e,p=k(1),y;if(0>=c)return p;e=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var l=[],m=3,r=e-1,q=(1<<e)-1;l[1]=y.convert(this);if(1<e)for(c=d(),y.sqrTo(l[1],c);m<=q;)l[m]=d(),y.mulTo(c,l[m-2],l[m]),m+=2;for(var A=a.t-1,x,w=!0,O=d(),c=h(a.data[A])-1;0<=A;){c>=r?x=a.data[A]>>c-r&q:(x=(a.data[A]&(1<<c+1)-1)<<r-c,0<A&&(x|=a.data[A-1]>>this.DB+c-r));for(m=e;0==(x&1);)x>>=1,--m;0>(c-=m)&&(c+=this.DB,--A);
426 +if(w)l[x].copyTo(p),w=!1;else{for(;1<m;)y.sqrTo(p,O),y.sqrTo(O,p),m-=2;0<m?y.sqrTo(p,O):(m=p,p=O,O=m);y.mulTo(O,l[x],p)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(p,O),m=p,p=O,O=m,0>--c&&(c=this.DB-1,--A)}return y.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),p=k(1),g=k(0),h=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(p.isEven()&&g.isEven()||(p.addTo(this,p),g.subTo(a,g)),p.rShiftTo(1,
427 +p)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&y.isEven()||(h.addTo(this,h),y.subTo(a,y)),h.rShiftTo(1,h)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(e)?(d.subTo(e,d),b&&p.subTo(h,p),g.subTo(y,g)):(e.subTo(d,e),b&&h.subTo(p,h),y.subTo(g,y))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
428 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
429 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
430 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<g.length;++l)g[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
429 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
430 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<e.length;++l)e[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
431 0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var l=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+l);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
432 v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
433 v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
434 2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
435 -0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs1}},
436 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?g(a,b,p,h):d(a,b,p,h)}function d(b,c,g,k){var m=l(b,c),z=0,q=n(m.bitLength());"millerRabinTests"in
437 -g&&(q=g.millerRabinTests);var r=10;"maxBlockTime"in g&&(r=g.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(q))return k(null,m);m.dAddOffset(h[z++%8],0)}while(0>r||+new Date-v<r);a.util.setImmediate(function(){d(b,c,g,k)})}function g(b,c,h,m){function q(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}z.bitLength()>b&&(z=l(b,c));h=z.toString(16);e.target.postMessage({hex:h,workLoad:r});
438 -z.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var z=l(b,c),E=h.workers,r=h.workLoad||100,n=30*r/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;q()});q()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(r).byteValue(),0);return c}
439 -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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],r=new k(null);r.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
440 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
441 -0;l<g.length;++l)g[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
435 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
436 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?e(a,b,p,h):d(a,b,p,h)}function d(b,c,e,k){var m=l(b,c),y=0,r=n(m.bitLength());"millerRabinTests"in
437 +e&&(r=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(r))return k(null,m);m.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,m){function r(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}y.bitLength()>b&&(y=l(b,c));h=y.toString(16);e.target.postMessage({hex:h,workLoad:u});
438 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;r()});r()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
439 +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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
440 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
441 +0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
442 Error("Message is too long for PKCS#1 v1.5 padding."),g.length=b.length,g.max=d-11,g;g.putByte(0);g.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var h=0;h<d;++h)g.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),h=0;h<d;++h)e=l.charCodeAt(h),0===e?++k:g.putByte(e);d=k}g.putByte(0);g.putBytes(b);return g}function d(b,c,e,g){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var h=b.getByte(),k=b.getByte();if(0!==h||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
443 -typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function g(b,c,d){function e(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
444 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var g=b.p;b.p=b.q;b.q=g}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,e()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,e()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
445 -(g=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,g,b.p,b.q,g.mod(b.p1),g.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);e()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
446 -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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,r=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
443 +typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
444 +b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,r,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
445 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var r={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(r.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
446 +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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
447 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},B={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
448 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
449 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
450 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},A=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
451 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},y=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
450 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
451 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
452 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
453 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
454 -b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,g,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
455 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,g).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,g):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
454 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
455 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,e):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
456 c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:g,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},g=+new Date,p,k=0;null===a.keys&&
457 -(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(r[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
457 +(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
458 null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(p=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,p,a.p,a.q,
459 p.mod(a.p1),p.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});p=+new Date;k+=p-g;g=p}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
460 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var e=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(e,0),e.keys;g(e,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,g){var l={n:b,e:g,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
460 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var g=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(g,0),g.keys;e(g,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
461 b,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+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
462 -l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,g,k,l,m,q,r){var x={n:b,e:c,d:g,p:k,q:l,dP:m,dQ:q,qInv:r,decrypt:function(b,c,g){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,g)}};else if(-1!==["RAW","NONE",
463 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:y},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
462 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,l,m,r,u){var x={n:b,e:c,d:e,p:k,q:l,dP:m,dQ:r,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
463 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
464 [k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,B,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
465 -c.errors=d,c;var e,g,l,q,y,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();y=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
466 -16),new m(e,16),new m(g,16),new m(l,16),new m(q,16),new m(y,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
467 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,A,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
465 +c.errors=d,c;var e,g,l,r,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();r=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
466 +16),new m(e,16),new m(g,16),new m(l,16),new m(r,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
467 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
468 c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
469 -!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||
470 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<g.length;++l)g[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
471 -b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var g=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encryptionOid"},
472 -{name:"AlgorithmIdentifier.parameters",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
473 -tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:g.Class.UNIVERSAL,
474 -type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"salt"},
475 -{name:"pkcs-12PbeParams.iterations",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var e=a.random.getBytesSync(d.saltSize),h=d.count,k=g.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var z,q;switch(d.algorithm){case "aes128":z=m=16;d=n["aes128-CBC"];q=a.aes.createEncryptionCipher;break;case "aes192":m=24;
476 -z=16;d=n["aes192-CBC"];q=a.aes.createEncryptionCipher;break;case "aes256":m=32;z=16;d=n["aes256-CBC"];q=a.aes.createEncryptionCipher;break;case "des":z=m=8;d=n.desCBC;q=a.des.createEncryptionCipher;break;default:throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;}var v=a.pkcs5.pbkdf2(c,e,h,m);c=a.random.getBytesSync(z);h=q(v);h.start(c);h.update(g.toDer(b));h.finish();b=h.output.getBytes();e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,
477 -g.Type.OID,!1,g.oidToDer(n.pkcs5PBES2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n.pkcs5PBKDF2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(d).getBytes()),g.create(g.Class.UNIVERSAL,
478 -g.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(e),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(g.toDer(b)),h.finish(),b=h.output.getBytes(),e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,
479 -!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]);else throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[e,g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,e={},h=[];if(!g.validate(b,m,e,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=g.derToOid(e.encryptionOid);
480 -h=l.pbe.getCipher(h,e.encryptionParams,c);e=a.util.createBuffer(e.encryptedData);h.update(e);h.finish()&&(d=g.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:g.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
481 -b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return g.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var e,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
482 -h=24;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
483 -e.substr(0,8),h);c=k(c);c.start(e);c.update(g.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(e).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,e=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==e.type&&"PRIVATE KEY"!==e.type&&"RSA PRIVATE KEY"!==e.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".'),
484 -d.headerType=d,d;if(e.procType&&"ENCRYPTED"===e.procType.type){var h,k;switch(e.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
485 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+e.dekInfo.algorithm+'".'),d.algorithm=e.dekInfo.algorithm,d;}var m=a.util.hexToBytes(e.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(e.body));if(k.finish())d=k.output.getBytes();else return d}else d=
486 -e.body;d="ENCRYPTED PRIVATE KEY"===e.type?l.decryptPrivateKeyInfo(g.fromDer(d),c):g.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,q=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var u=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,q);
487 -var C=q*Math.ceil(u/q);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%u));C=q*Math.ceil(b/q);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<q;l++)D.putByte(C.at(l%m));var Y=Math.ceil(u/q)+Math.ceil(b/q),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(q)),
469 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
470 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
471 +b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
472 +{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"}]},k={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",
473 +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,
474 +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"}]}]},h={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"},
475 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var g=a.random.getBytesSync(d.saltSize),h=d.count,k=e.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,r;switch(d.algorithm){case "aes128":y=m=16;d=n["aes128-CBC"];r=a.aes.createEncryptionCipher;break;case "aes192":m=24;
476 +y=16;d=n["aes192-CBC"];r=a.aes.createEncryptionCipher;break;case "aes256":m=32;y=16;d=n["aes256-CBC"];r=a.aes.createEncryptionCipher;break;case "des":y=m=8;d=n.desCBC;r=a.des.createEncryptionCipher;break;default:throw g=Error("Cannot encrypt private key. Unknown encryption algorithm."),g.algorithm=d.algorithm,g;}var v=a.pkcs5.pbkdf2(c,g,h,m);c=a.random.getBytesSync(y);h=r(v);h.start(c);h.update(e.toDer(b));h.finish();b=h.output.getBytes();g=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
477 +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,
478 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(g),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(e.toDer(b)),h.finish(),b=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,
479 +!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,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,g={},h=[];if(!e.validate(b,m,g,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=e.derToOid(g.encryptionOid);
480 +h=l.pbe.getCipher(h,g.encryptionParams,c);g=a.util.createBuffer(g.encryptedData);h.update(g);h.finish()&&(d=e.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
481 +b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var g,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
482 +h=24;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
483 +g.substr(0,8),h);c=k(c);c.start(g);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(g).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,g=a.pem.decode(b)[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".'),
484 +d.headerType=d,d;if(g.procType&&"ENCRYPTED"===g.procType.type){var h,k;switch(g.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
485 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+g.dekInfo.algorithm+'".'),d.algorithm=g.dekInfo.algorithm,d;}var m=a.util.hexToBytes(g.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(g.body));if(k.finish())d=k.output.getBytes();else return d}else d=
486 +g.body;d="ENCRYPTED PRIVATE KEY"===g.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,r=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var q=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,r);
487 +var C=r*Math.ceil(q/r);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%q));C=r*Math.ceil(b/r);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<r;l++)D.putByte(C.at(l%m));var Y=Math.ceil(q/r)+Math.ceil(b/r),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(r)),
488 V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);L.putBuffer(ea)}v=L;n.putBuffer(C)}n.truncate(n.length()-g);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
489 -"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var e={};b=[];if(!g.validate(c,k,e,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=g.derToOid(e.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=g.derToOid(e.encOid);if(b!==l.oids["aes128-CBC"]&&
490 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=e.kdfSalt;var m=a.util.createBuffer(e.kdfIterationCount),m=m.getInt(m.length()<<3),q;switch(l.oids[b]){case "aes128-CBC":q=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":q=24;h=a.aes.createDecryptionCipher;break;
491 -case "aes256-CBC":q=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":q=24;h=a.des.createDecryptionCipher;break;case "desCBC":q=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,q);e=e.encIv;h=h(b);h.start(e);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var e={},k=[];if(!g.validate(c,h,e,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(e.salt),e=a.util.createBuffer(e.iterations),
492 -e=e.getInt(e.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,e,m);d=l.pbe.generatePkcs12Key(d,k,2,e,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
493 -typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
494 -0;l<g.length;++l)g[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
495 -a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var g={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
489 +"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var g={};b=[];if(!e.validate(c,k,g,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=e.derToOid(g.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=e.derToOid(g.encOid);if(b!==l.oids["aes128-CBC"]&&
490 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=g.kdfSalt;var m=a.util.createBuffer(g.kdfIterationCount),m=m.getInt(m.length()<<3),r;switch(l.oids[b]){case "aes128-CBC":r=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":r=24;h=a.aes.createDecryptionCipher;break;
491 +case "aes256-CBC":r=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":r=24;h=a.des.createDecryptionCipher;break;case "desCBC":r=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,r);g=g.encIv;h=h(b);h.start(g);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
492 +g=g.getInt(g.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,g,m);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
493 +typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
494 +0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
495 +a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
496 tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",
497 -tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(g)};d.encryptedDataValidator={name:"EncryptedData",
498 -tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(g)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
497 +tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(e)};d.encryptedDataValidator={name:"EncryptedData",
498 +tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(e)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
499 captureAsn1:"digestAlgorithms"},a,{name:"SignedData.Certificates",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,capture:"signerInfos",optional:!0,value:[{name:"SignerInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:c.Class.UNIVERSAL,
500 type:c.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
501 value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,
502 constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]}]}]};d.recipientInfoValidator={name:"RecipientInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,
503 constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
504 -value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
505 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
506 -["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var g=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());g.putBuffer(b.digest())}g.truncate(g.length()-d);return g.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
507 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
508 -Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
509 -{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
510 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,g=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,x=Math.ceil(v/8),A=b.digest().getBytes();
511 -if(x<g+m+2)throw Error("Message is too long to encrypt.");var y;y=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(A);n.putBytes(y);c.start();c.update(n.getBytes());A=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-g-2);n.putByte(1);n.putBytes(y);var R=n.getBytes(),z=x-g-1,E=d.generate(A,z);y="";for(n=0;n<z;n++)y+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;y=String.fromCharCode(y.charCodeAt(0)&~v)+y.substr(1);
512 -return y+A+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<g+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-g-1,v=k.substr(0,n);k=k.substr(n,g);var y=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&y))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),z="";for(q=0;q<n;q++)z+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
513 -z=String.fromCharCode(z.charCodeAt(0)&~y)+z.substr(1);l=l-g-m-2;for(q=0;q<l;q++)if(0!==z.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==z.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=z.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,
514 -module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
504 +value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
505 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
506 +["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var e=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());e.putBuffer(b.digest())}e.truncate(e.length()-d);return e.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
507 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
508 +Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
509 +{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
510 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,r){var n,v=r-1,x=Math.ceil(v/8),z=b.digest().getBytes();
511 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
512 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var r;r=l-1;l=Math.ceil(r/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-r&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(r=0;r<n;r++)y+=String.fromCharCode(v.charCodeAt(r)^R.charCodeAt(r));
513 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(r=0;r<l;r++)if(0!==y.charCodeAt(r))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
514 +module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
515 ["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
516 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function g(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
517 -v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===r.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
516 +var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
517 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
518 typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
519 (e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
520 -"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in r?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
520 +"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
521 d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
522 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
523 -d.extension=b,d;return b}function n(a,b){switch(a){case r["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
523 +d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
524 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
525 !1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
526 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},r=h.oids,v={};v.CN=r.commonName;v.commonName="CN";v.C=r.countryName;v.countryName="C";v.L=r.localityName;v.localityName="L";v.ST=r.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=r.organizationName;v.organizationName="O";v.OU=r.organizationalUnitName;v.organizationalUnitName="OU";v.E=r.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
526 +h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
527 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
528 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
529 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
530 {name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},B,{name:"Certificate.TBSCertificate.issuerUniqueID",
531 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
532 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
533 -{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},A={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
533 +{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
534 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
535 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
536 -tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},y={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
536 +tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
537 tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},B,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
538 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
539 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in r&&(g.name=r[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
540 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in r&&(p.name=r[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===r.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==r["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:r.sha1},mgf:{algorithmOid:r.mgf1,hash:{algorithmOid:r.sha1}},
541 -saltLength:20});c={};a=[];if(!k.validate(b,A,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
539 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
540 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
541 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
542 b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
543 return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
544 body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
545 break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
546 c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
547 -null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){g([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){g(a);
548 -b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){g(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
549 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
550 -e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in r)switch(r[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
551 -e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case r.sha1WithRSAEncryption:l=void 0;break;case r["RSASSA-PSS"]:d=r[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=r[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
552 -e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=r[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
553 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=r.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
554 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,x,e,l))throw e=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),e.errors=l,e;if("string"!==typeof e.certSignature){for(var l="\x00",m=0;m<e.certSignature.length;++m)l+=k.toDer(e.certSignature[m]).getBytes();e.certSignature=l}var l=k.derToOid(e.publicKeyOid),y=h.createCertificate();y.version=e.certVersion?e.certVersion.charCodeAt(0):
555 -0;m=a.util.createBuffer(e.certSerialNumber);y.serialNumber=m.toHex();y.signatureOid=a.asn1.derToOid(e.certSignatureOid);y.signatureParameters=R(y.signatureOid,e.certSignatureParams,!0);y.siginfo.algorithmOid=a.asn1.derToOid(e.certinfoSignatureOid);y.siginfo.parameters=R(y.siginfo.algorithmOid,e.certinfoSignatureParams,!1);m=a.util.createBuffer(e.certSignature);++m.read;y.signature=m.getBytes();m=[];void 0!==e.certValidity1UTCTime&&m.push(k.utcTimeToDate(e.certValidity1UTCTime));void 0!==e.certValidity2GeneralizedTime&&
556 -m.push(k.generalizedTimeToDate(e.certValidity2GeneralizedTime));void 0!==e.certValidity3UTCTime&&m.push(k.utcTimeToDate(e.certValidity3UTCTime));void 0!==e.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(e.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
557 -y.validity.notBefore=m[0];y.validity.notAfter=m[1];y.tbsCertificate=e.tbsCertificate;if(d){y.md=null;if(y.signatureOid in r)switch(l=r[y.signatureOid],l){case "sha1WithRSAEncryption":y.md=a.md.sha1.create();break;case "md5WithRSAEncryption":y.md=a.md.md5.create();break;case "sha256WithRSAEncryption":y.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":y.md=a.md.sha512.create();break;case "RSASSA-PSS":y.md=a.md.sha256.create()}if(null===y.md)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
558 -e.signatureOid=y.signatureOid,e;m=k.toDer(y.tbsCertificate);y.md.update(m.getBytes())}m=a.md.sha1.create();y.issuer.getField=function(a){return c(y.issuer,a)};y.issuer.addField=function(a){g([a]);y.issuer.attributes.push(a)};y.issuer.attributes=h.RDNAttributesAsArray(e.certIssuer,m);e.certIssuerUniqueId&&(y.issuer.uniqueId=e.certIssuerUniqueId);y.issuer.hash=m.digest().toHex();m=a.md.sha1.create();y.subject.getField=function(a){return c(y.subject,a)};y.subject.addField=function(a){g([a]);y.subject.attributes.push(a)};
559 -y.subject.attributes=h.RDNAttributesAsArray(e.certSubject,m);e.certSubjectUniqueId&&(y.subject.uniqueId=e.certSubjectUniqueId);y.subject.hash=m.digest().toHex();y.extensions=e.certExtensions?h.certificateExtensionsFromAsn1(e.certExtensions):[];l===h.oids.rsaEncryption&&(y.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo));return y};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
560 -return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in r)if(c.name=r[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
547 +null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
548 +b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
549 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
550 +e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
551 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
552 +e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
553 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
554 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),q=h.createCertificate();q.version=g.certVersion?g.certVersion.charCodeAt(0):
555 +0;m=a.util.createBuffer(g.certSerialNumber);q.serialNumber=m.toHex();q.signatureOid=a.asn1.derToOid(g.certSignatureOid);q.signatureParameters=R(q.signatureOid,g.certSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;q.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
556 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
557 +q.validity.notBefore=m[0];q.validity.notAfter=m[1];q.tbsCertificate=g.tbsCertificate;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===q.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
558 +g.signatureOid=q.signatureOid,g;m=k.toDer(q.tbsCertificate);q.md.update(m.getBytes())}m=a.md.sha1.create();q.issuer.getField=function(a){return c(q.issuer,a)};q.issuer.addField=function(a){e([a]);q.issuer.attributes.push(a)};q.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(q.issuer.uniqueId=g.certIssuerUniqueId);q.issuer.hash=m.digest().toHex();m=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};
559 +q.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(q.subject.uniqueId=g.certSubjectUniqueId);q.subject.hash=m.digest().toHex();q.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return q};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
560 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
561 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
562 -k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in r?c[r[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
563 -g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,y,e,l))throw e=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),e.errors=l,e;if("string"!==typeof e.csrSignature){for(var l=
564 -"\x00",m=0;m<e.csrSignature.length;++m)l+=k.toDer(e.csrSignature[m]).getBytes();e.csrSignature=l}l=k.derToOid(e.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var u=h.createCertificationRequest();u.version=e.csrVersion?e.csrVersion.charCodeAt(0):0;u.signatureOid=a.asn1.derToOid(e.csrSignatureOid);u.signatureParameters=R(u.signatureOid,e.csrSignatureParams,!0);u.siginfo.algorithmOid=a.asn1.derToOid(e.csrSignatureOid);u.siginfo.parameters=R(u.siginfo.algorithmOid,
565 -e.csrSignatureParams,!1);l=a.util.createBuffer(e.csrSignature);++l.read;u.signature=l.getBytes();u.certificationRequestInfo=e.certificationRequestInfo;if(d){u.md=null;if(u.signatureOid in r)switch(l=r[u.signatureOid],l){case "sha1WithRSAEncryption":u.md=a.md.sha1.create();break;case "md5WithRSAEncryption":u.md=a.md.md5.create();break;case "sha256WithRSAEncryption":u.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":u.md=a.md.sha512.create();break;case "RSASSA-PSS":u.md=a.md.sha256.create()}if(null===
566 -u.md)throw e=Error("Could not compute certification request digest. Unknown signature OID."),e.signatureOid=u.signatureOid,e;l=k.toDer(u.certificationRequestInfo);u.md.update(l.getBytes())}l=a.md.sha1.create();u.subject.getField=function(a){return c(u.subject,a)};u.subject.addField=function(a){g([a]);u.subject.attributes.push(a)};u.subject.attributes=h.RDNAttributesAsArray(e.certificationRequestInfoSubject,l);u.subject.hash=l.digest().toHex();u.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo);
567 -u.getAttribute=function(a){return c(u,a)};u.addAttribute=function(a){g([a]);u.attributes.push(a)};u.attributes=h.CRIAttributesAsArray(e.certificationRequestInfoAttributes||[]);return u};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
568 -null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){g([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){g(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){g(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
569 -e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in r)switch(r[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
570 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case r["RSASSA-PSS"]:c=r[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=r[b.signatureParameters.mgf.algorithmOid];
571 -if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=r[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
562 +k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
563 +g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
564 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var q=h.createCertificationRequest();q.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;q.signatureOid=a.asn1.derToOid(g.csrSignatureOid);q.signatureParameters=R(q.signatureOid,g.csrSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,
565 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;q.signature=l.getBytes();q.certificationRequestInfo=g.certificationRequestInfo;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===
566 +q.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=q.signatureOid,g;l=k.toDer(q.certificationRequestInfo);q.md.update(l.getBytes())}l=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};q.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);q.subject.hash=l.digest().toHex();q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
567 +q.getAttribute=function(a){return c(q,a)};q.addAttribute=function(a){e([a]);q.attributes.push(a)};q.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return q};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
568 +null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
569 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
570 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
571 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
572 h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
573 k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
574 !1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
575 return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
576 return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
577 -h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return g.certs[b.hash]||
578 -null}var g={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in g.certs?(c=g.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):g.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
579 -for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)g.addCertificate(b[l]);return g};h.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"};
580 -h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var q=c.shift(),y=null,r=!1;if(g<q.validity.notBefore||g>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:g};if(null===k){y=c[0]||b.getIssuer(q);null===y&&q.isIssuer(q)&&(r=!0,y=q);if(y){var n=y;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){y=n.shift();
581 -try{x=y.verify(q)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||y&&!r||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&y&&!q.isIssuer(y)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<q.extensions.length;++x){var w=q.extensions[x];!w.critical||w.name in n||(k=
582 -{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||y&&!r)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
583 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
584 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
585 -c.defined.x509=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
586 -[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function g(b,c,h,q){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
587 -for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],r,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},u=null,u=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(u.tagClass!==m.Class.UNIVERSAL||u.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");u=d(u).value;break;case k.oids.encryptedData:var A=q,x={},B=[];if(!m.validate(u,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
588 -b.errors=B,b;u=m.derToOid(x.contentType);if(u!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=u,b;u=m.derToOid(x.encAlgorithm);u=k.pbe.getCipher(u,x.encParameter,A);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);u.update(x);if(!u.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");u=u.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
589 -l(u,h,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var q,r,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
590 -k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:q=A;r=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
591 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(x,q,g,h))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=h,a;r()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
592 -a.pkcs12||{},r={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
593 -r,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
577 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
578 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
579 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.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"};
580 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var r=c.shift(),A=null,u=!1;if(g<r.validity.notBefore||g>r.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:r.validity.notBefore,notAfter:r.validity.notAfter,now:g};if(null===k){A=c[0]||b.getIssuer(r);null===A&&r.isIssuer(r)&&(u=!0,A=r);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
581 +try{x=A.verify(r)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(r)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&A&&!r.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<r.extensions.length;++x){var w=r.extensions[x];!w.critical||w.name in n||(k=
582 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=r.getExtension("basicConstraints"),r=r.getExtension("keyUsage"),null!==r&&(r.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
583 +null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==r&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));r=null===k?!0:k.error;l=d?d(r,m,e):r;if(!0===l)k=null;else{!0===r&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
584 +if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
585 +c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
586 +[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,r){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
587 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},q=null,q=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(q.tagClass!==m.Class.UNIVERSAL||q.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");q=d(q).value;break;case k.oids.encryptedData:var z=r,x={},B=[];if(!m.validate(q,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
588 +b.errors=B,b;q=m.derToOid(x.contentType);if(q!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=q,b;q=m.derToOid(x.encAlgorithm);q=k.pbe.getCipher(q,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);q.update(x);if(!q.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");q=q.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
589 +l(q,h,r);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var r,u,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
590 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:r=z;u=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
591 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==r&&!m.validate(x,r,g,h))throw a=Error("Cannot read PKCS#12 "+r.name),a.errors=h,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
592 +a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
593 +u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
594 tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},B={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
595 value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
596 -capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},A={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
597 -h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var r={};if(!m.validate(b,v,r,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:r.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
598 -(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==r.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=r.version.charCodeAt(0),l;if(m.derToOid(r.contentType)!==k.oids.data)throw l=
599 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(r.contentType),l;b=r.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(r.mac){var w=null,A=0,u=m.derToOid(r.macAlgorithm);switch(u){case k.oids.sha1:w=a.md.sha1.create();A=20;break;case k.oids.sha256:w=a.md.sha256.create();A=32;break;case k.oids.sha384:w=a.md.sha384.create();A=48;break;case k.oids.sha512:w=a.md.sha512.create();
600 -A=64;break;case k.oids.md5:w=a.md.md5.create(),A=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+u);var u=new a.util.ByteBuffer(r.macSalt),B="macIterations"in r?parseInt(a.util.bytesToHex(r.macIterations),16):1,A=h.generateKey(n,u,3,B,A,w),u=a.hmac.create();u.start(w,A);u.update(b.value);if(u.getMac().getBytes()!==r.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}g(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
601 -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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(q)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);q=[];null!==
602 -g&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
603 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));g=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],n=0;n<q.length;++n){c=q[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
604 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
596 +capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
597 +h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
598 +(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
599 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var w=null,z=0,q=m.derToOid(u.macAlgorithm);switch(q){case k.oids.sha1:w=a.md.sha1.create();z=20;break;case k.oids.sha256:w=a.md.sha256.create();z=32;break;case k.oids.sha384:w=a.md.sha384.create();z=48;break;case k.oids.sha512:w=a.md.sha512.create();
600 +z=64;break;case k.oids.md5:w=a.md.md5.create(),z=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+q);var q=new a.util.ByteBuffer(u.macSalt),B="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,z=h.generateKey(n,q,3,B,z,w),q=a.hmac.create();q.start(w,z);q.update(b.value);if(q.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
601 +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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var r=a.util.isArray(c)?c[0]:c;"string"===typeof r&&(r=k.certificateFromPem(r));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(r)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);r=[];null!==
602 +g&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
603 +0<r.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,r));g=[];r=[];null!==c&&(r=a.util.isArray(c)?c:[c]);for(var u=[],n=0;n<r.length;++n){c=r[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
604 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);u.push(c)}0<u.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,u),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
605 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
606 [m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var v;e.useMac&&(g=a.md.sha1.create(),v=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,v,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),v=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
607 !0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,v.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
608 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
609 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
610 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var g=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
611 -g.headerType=b.type;throw g;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,g){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:g})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
612 -typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
608 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
609 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
610 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
611 +e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
612 +typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
613 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var g=a.util.createBuffer(),h=b.length>>1,l=h+(b.length&1),k=b.substr(0,l),l=b.substr(h,l);b=a.util.createBuffer();h=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);h.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
614 -for(var q=0;q<m;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
615 -a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},g=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
614 +for(var r=0;r<m;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(r=0;r<c;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
615 +a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
616 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
617 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
618 certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};m.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};m.CipherSuites={};m.getCipherSuite=function(a){var b=null,c;for(c in m.CipherSuites){var d=m.CipherSuites[c];if(d.id[0]===a.charCodeAt(0)&&d.id[1]===a.charCodeAt(1)){b=d;break}}return b};
@@ -623,41 +623,41 @@ send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protoco
623 b.session.compressionMethod=g?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.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,
624 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
625 (a.expect=B,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
626 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:z,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
626 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
627 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
628 !1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
629 -l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:z:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:z)):b.error(b,{message:e?"No server certificate provided.":
630 -"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=r;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
629 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
630 +"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
631 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
632 try{var g=b.session.sp;g.pre_master_secret=d.decrypt(c);var h=b.session.clientHelloVersion;if(h.major!==g.pre_master_secret.charCodeAt(0)||h.minor!==g.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){g.pre_master_secret=a.random.getBytes(48)}b.expect=O;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
633 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
634 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(g){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=O;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
635 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
636 -return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=y;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
636 +return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
637 data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=B;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
638 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:H;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var g=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
639 e.putBuffer(b.session.sha1.digest());var h=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,h?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(g);b.session.sha1.update(g);if(b.session.resuming&&h||!b.session.resuming&&!h)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
640 -data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?A:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
640 +data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?z:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
641 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
642 "Bad certificate.";break;case m.Alert.Description.unsupported_certificate:d="Unsupported certificate.";break;case m.Alert.Description.certificate_revoked:d="Certificate revoked.";break;case m.Alert.Description.certificate_expired:d="Certificate expired.";break;case m.Alert.Description.certificate_unknown:d="Certificate unknown.";break;case m.Alert.Description.illegal_parameter:d="Illegal parameter.";break;case m.Alert.Description.unknown_ca:d="Unknown certificate authority.";break;case m.Alert.Description.access_denied:d=
643 "Access denied.";break;case m.Alert.Description.decode_error:d="Decode error.";break;case m.Alert.Description.decrypt_error:d="Decrypt error.";break;case m.Alert.Description.export_restriction:d="Export restriction.";break;case m.Alert.Description.protocol_version:d="Unsupported protocol version.";break;case m.Alert.Description.insufficient_security:d="Insufficient security.";break;case m.Alert.Description.internal_error:d="Internal error.";break;case m.Alert.Description.user_canceled:d="User canceled.";
644 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt24();if(g>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var h=d.bytes(g+
645 4);d.read+=4;e in J[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(h),b.session.sha1.update(h)),J[b.entity][b.expect][e](b,c,g)):
646 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt16(),d=d.getBytes(g);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||g>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
647 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,r=3,v=4,B=5,x=6,A=7,y=8,R=1,z=2,E=3,O=4,H=5,N=6,u=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];ea[m.ConnectionEnd.server]=[[u,P,F,u,L],[u,
648 -P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[u,u,m.handleServerHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,P,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,L,u,u,u,u,u,u],
649 -[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];J[m.ConnectionEnd.server]=[[u,m.handleClientHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,P,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleClientKeyExchange,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleCertificateVerify,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,
650 -u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
647 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,B=5,x=6,z=7,A=8,R=1,y=2,E=3,O=4,H=5,N=6,q=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];ea[m.ConnectionEnd.server]=[[q,P,F,q,L],[q,
648 +P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[q,q,m.handleServerHello,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,P,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,L,q,q,q,q,q,q],
649 +[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q]];J[m.ConnectionEnd.server]=[[q,m.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,P,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.handleClientKeyExchange,q,q,q,q],[q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,m.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,
650 +q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[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]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
651 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};g&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
652 cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
653 a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
654 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=g;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
654 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
655 }return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
656 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
657 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
656 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var r=a.util.createBuffer();
657 +n(r,2,k);n(l,2,r);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
658 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var g=
659 -null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(q.bytes(),!1));
660 -var y=a.util.createBuffer();n(y,3,q);e.putBuffer(y)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
659 +null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var r=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(r.bytes(),!1));
660 +var u=a.util.createBuffer();n(u,3,r);e.putBuffer(u)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(q){return b.error(b,{message:"Could not send certificate list.",cause:q,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
661 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
662 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(g){b.error(b,{message:"Could not get private key.",cause:g,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
663 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var g=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(g))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -679,199 +679,199 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_versio
679 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_message}})),c.record.ready=!0));c=b}if(!h.fail&&null!==h.record&&h.record.ready)if(b=h.record,d=b.type-m.ContentType.change_cipher_spec,e=ea[h.entity][h.expect],d in e)e[d](h,b);else m.handleUnexpected(h,b)}return c};h.prepare=function(b){m.queue(h,m.createRecord(h,{type:m.ContentType.application_data,data:a.util.createBuffer(b)}));return m.flush(h)};h.prepareHeartbeatRequest=function(b,c){b instanceof a.util.ByteBuffer&&
680 (b=b.bytes());"undefined"===typeof c&&(c=b.length);h.expectedHeartbeatPayload=b;m.queue(h,m.createRecord(h,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_request,b,c)}));return m.flush(h)};h.close=function(a){if(!h.fail&&h.sessionCache&&h.session){var b={id:h.session.id,version:h.session.version,sp:h.session.sp};b.sp.keys=null;h.sessionCache.setSession(b.id,b)}if(h.open){h.open=!1;h.input.clear();if(h.isConnected||h.handshaking)h.isConnected=h.handshaking=!1,
681 m.queue(h,m.createAlert(h,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(h);h.closed(h)}h.reset(a)};return h};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
682 -return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<g.length;++l)g[l](c);return c.tls}},
683 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,g,l){g=g.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
684 -g?l.keys.server_write_key:l.keys.client_write_key),iv:g?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",g?l.keys.client_write_key:l.keys.server_write_key),iv:g?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var e=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
685 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(g)&&(b.fragment=k.output,b.length=b.fragment.length(),e=!0);return e}function g(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
686 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,q=a.random.getBytesSync(g),y=e.output.length();y>=g?(b.fragment=e.output.getBytes(y-g),q=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
687 -b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;y=a.hmac.create();y.start("SHA1",e);y.update(q);q=y.digest().getBytes();y.start(null,null);y.update(g);g=y.digest().getBytes();return q===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
682 +return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
683 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
684 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
685 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
686 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,r=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),r=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
687 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(r);r=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return r===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
688 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
689 -20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<g.length;++l)g[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
690 -typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
691 -a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
692 -function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<g.length;++l)g[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
693 -(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<q;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var g=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(g.getBytesSync(h)),
694 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));h-=q.length;0<h&&(q=a.util.fillString(String.fromCharCode(0),h)+q);h=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:h,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
695 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<g.length;++l)g[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
696 -"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],g=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var g=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):g<=c[m.level].index&&
689 +20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
690 +typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
691 +a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
692 +function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
693 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,r=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<r;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),r;do r=(new d(a.util.bytesToHex(e.getBytesSync(h)),
694 +16)).mod(c.n);while(r.equals(d.ZERO));r=a.util.hexToBytes(r.toString(16));h-=r.length;0<h&&(r=a.util.fillString(String.fromCharCode(0),h)+r);h=c.encrypt(r,"NONE");r=b.generate(r,l);return{encapsulation:h,key:r}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
695 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
696 +"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
697 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
698 a.log.logMessage({timestamp:new Date,level:b,category:c,message:d,arguments:e})}})(n[l]);a.log.makeLogger=function(b){b={flags:0,f:b};a.log.setLevel(b,"none");return b};a.log.setLevel=function(b,c){var d=!1;if(b&&!(b.flags&a.log.LEVEL_LOCKED))for(var e=0;e<a.log.levels.length;++e)if(c==a.log.levels[e]){b.level=c;d=!0;break}return d};a.log.lock=function(b,c){b.flags="undefined"===typeof c||c?b.flags|a.log.LEVEL_LOCKED:b.flags&~a.log.LEVEL_LOCKED};a.log.addLogger=function(a){d.push(a)};if("undefined"!==
699 -typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},g=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else g=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};g=a.log.makeLogger(g);a.log.setLevel(g,"debug");a.log.addLogger(g)}else console={log:function(){}};
700 -null!==g&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(g,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(g));a.log.consoleLogger=g}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
701 -c.defined.log=!0;for(var l=0;l<g.length;++l)g[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!r.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
702 -b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:r.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
703 -r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.encryptedContent.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]),r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function g(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
704 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.digestAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(r.create(r.Class.UNIVERSAL,
705 -r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.signatureAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]));c.value.push(r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=r.create(r.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
706 -r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?r.utcTimeToDate(e):r.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?r.create(r.Class.UNIVERSAL,r.Type.UTCTIME,!1,r.dateToUtcTime(e)):
707 -r.create(r.Class.UNIVERSAL,r.Type.GENERALIZEDTIME,!1,r.dateToGeneralizedTime(e))}return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[c])])}function m(b){return[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,
708 -r.Type.OCTETSTRING,!1,b.parameter.getBytes())]),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!r.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(r.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
709 -0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:r.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
699 +typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},e=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else e=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};e=a.log.makeLogger(e);a.log.setLevel(e,"debug");a.log.addLogger(e)}else console={log:function(){}};
700 +null!==e&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(e,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(e));a.log.consoleLogger=e}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
701 +c.defined.log=!0;for(var l=0;l<e.length;++l)e[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!u.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
702 +b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:u.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
703 +u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.encryptedContent.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]),u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function e(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
704 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.digestAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(u.create(u.Class.UNIVERSAL,
705 +u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.signatureAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]));c.value.push(u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=u.create(u.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
706 +u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?u.utcTimeToDate(e):u.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?u.create(u.Class.UNIVERSAL,u.Type.UTCTIME,!1,u.dateToUtcTime(e)):
707 +u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
708 +u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
709 +0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
710 c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
711 -break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var r=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
712 -b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=r.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:r.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!r.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=r.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
711 +break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
712 +b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
713 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
714 -c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
715 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.signerInfos));return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),
714 +c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
715 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
716 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
717 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
718 -signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(r.create(r.Class.CONTEXT_SPECIFIC,
719 -0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(g).getBytes()),r.create(r.Class.UNIVERSAL,
720 -r.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=r.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=r.toDer(d);h.getByte();r.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
721 -}else{e.authenticatedAttributesAsn1=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=r.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
717 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var r=c[m];if(!l&&r.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&r.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
718 +signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
719 +0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
720 +u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
721 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var r=e.authenticatedAttributes[m];r.type===a.pki.oids.messageDigest?r.value=c[e.digestAlgorithm].digest():r.type!==a.pki.oids.signingTime||r.value||(r.value=k);h.value.push(n(r));e.authenticatedAttributesAsn1.value.push(n(r))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
722 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
723 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,
724 -!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,g(b.recipients)),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
723 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
724 +!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
725 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
726 }h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
727 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
728 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
729 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
730 -Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function g(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
731 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=g(w.bytes()),b.truncate(b.length()-
732 -x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(g("\x00\x00\x00\x00",l)),x.putBuffer(g("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=g("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
733 -h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,g){g=g||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+g};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
734 -function(b,g){g=g||{};var l=g.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===g.encoding)return l=l.toHex(),g.delimiter?l.match(/.{2}/g).join(g.delimiter):l;if("binary"===g.encoding)return l.getBytes();if(g.encoding)throw Error('Unknown encoding "'+g.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
735 -(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<g.length;++l)g[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
736 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var g={};a.debug.set("forge.task","queues",g);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
729 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
730 +Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
731 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
732 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
733 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
734 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
735 +(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
736 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
737 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
738 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
739 -this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",g)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
739 +this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
740 (c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
741 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
742 this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
743 a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
744 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in g?0===g[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):g[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(g[b.type].shift(),0===g[b.type].length?delete g[b.type]:g[b.type][0].start()):a.log.error("forge.task",
745 -"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in g?g[a.type].push(b):(g[b.type]=[b],m(b))};a.task.cancel=function(a){a in g&&(g[a]=[g[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
746 -a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<g.length;++l)g[l](c);return c.task}},
747 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
748 -return}var g,v=function(a,b){b.exports=function(b){var c=g.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){g="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
744 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
745 +"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
746 +a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
747 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
748 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
749 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});
750 -function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var g=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),g=g.substring(0,g.length-24),v=0;v<c.length;v++)if(g===c[v].DERKey||g==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
751 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),g=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(g,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
752 -var e=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,e,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,g){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,g)}
753 -function amtcert_createCertificate(b,c,a,d,g){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
754 -value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==g?g={name:"extKeyUsage",serverAuth:!0}:g.name="extKeyUsage",
755 -n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},g,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
756 -function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,g=b.length;d<g;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
750 +function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),e=e.substring(0,e.length-24),v=0;v<c.length;v++)if(e===c[v].DERKey||e==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
751 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),r=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(r).getBytes();
752 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
753 +function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
754 +value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
755 +n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
756 +function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,e=b.length;d<e;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
757 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
758 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
759 -require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var g="";a.on("data",function(a){null!=g&&(g+=a.toString("binary"));5E5<g.length&&(g=null)});a.on("end",function(){certUrlCache[b]={data:btoa(g),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,g)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
760 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,e,k,m,q){var r=a[b++];q={};var u=0,B=0;if(0==r){if(2==h.bpp)for(e=0;e<m;e++)n(a[b++]+(a[b++]<<8),e);else for(e=0;e<m;e++)v(a[b++],e);g(h.spare,c,d)}else if(1==r)h.graymode?(r=a[b++],h.lowcolor&&(r<<=4),h.canvas.fillStyle="rgb("+r+","+r+","+r+")"):(r=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(r&224)+","+((r&28)<<3)+","+D((r&3)<<6):(r>>8&248)+","+(r>>3&252)+","+
761 -((r&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,e,k);else if(1<r&&17>r){k=4;B=15;if(2==h.bpp){for(e=0;e<r;e++)q[e]=a[b++]+(a[b++]<<8);2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)n(q[r>>e&B],u++)}else{for(e=0;e<r;e++)q[e]=a[b++];2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)v(q[r>>e&B],u++)}g(h.spare,c,d)}else if(128==r){if(2==h.bpp)for(;u<m&&b<a.byteLength;){r=a[b++]+(a[b++]<<8);B=1;do B+=e=a[b++];while(255==e);if(0==
762 -h.rotation)p(r,u,B),u+=B;else for(;0<=--B;)n(r,u++)}else for(;u<m&&b<a.byteLength;){r=a[b++];B=1;do B+=e=a[b++];while(255==e);if(0==h.rotation)l(r,u,B),u+=B;else for(;0<=--B;)v(r,u++)}g(h.spare,c,d)}else if(129<r){if(2==h.bpp)for(e=0;e<r-128;e++)q[e]=a[b++]+(a[b++]<<8);else for(e=0;e<r-128;e++)q[e]=a[b++];for(;u<m&&b<a.byteLength;){B=1;e=a[b++];r=q[e%128];if(127<e){do B+=e=a[b++];while(255==e)}if(0==h.rotation)2==h.bpp?p(r,u,B):l(r,u,B),u+=B;else if(2==h.bpp)for(;0<=--B;)n(r,u++);else for(;0<=--B;)v(r,
763 -u++)}g(h.spare,c,d)}}function g(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
759 +require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
760 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,r){var u=a[b++];r={};var q=0,B=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
761 +((u&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;B=15;if(2==h.bpp){for(g=0;g<u;g++)r[g]=a[b++]+(a[b++]<<8);2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(r[u>>g&B],q++)}else{for(g=0;g<u;g++)r[g]=a[b++];2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(r[u>>g&B],q++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;q<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);B=1;do B+=g=a[b++];while(255==g);if(0==
762 +h.rotation)p(u,q,B),q+=B;else for(;0<=--B;)n(u,q++)}else for(;q<m&&b<a.byteLength;){u=a[b++];B=1;do B+=g=a[b++];while(255==g);if(0==h.rotation)l(u,q,B),q+=B;else for(;0<=--B;)v(u,q++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)r[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)r[g]=a[b++];for(;q<m&&b<a.byteLength;){B=1;g=a[b++];u=r[g%128];if(127<g){do B+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?p(u,q,B):l(u,q,B),q+=B;else if(2==h.bpp)for(;0<=--B;)n(u,q++);else for(;0<=--B;)v(u,
763 +q++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
764 h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
765 b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
766 -1]=e,h.spare.data[b+2]=a,b+=4}function q(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function e(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
767 -2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):r[c.code];
768 -null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
769 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
770 -0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
771 -h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var e=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)e=12,h.state=1,h.parent&&delete h.parent.connectTime,
772 -h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)e=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){e=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;e=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
766 +1]=e,h.spare.data[b+2]=a,b+=4}function r(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
767 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];null!=c&&h.sendkey(c,
768 +a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);173==c&&(d=45);186==c&&
769 +(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=0;h.spareh2=0;
770 +h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=h.rwidth=
771 +h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
772 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
773 h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
774 0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
775 -50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);e=4;break;case 2:e=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)e=0;else if(b=l.getUint32(4)+8,c.byteLength<b)e=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
775 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
776 0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
777 -h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}e=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),e=l.getUint16(4),q=l.getUint16(6),p=e*q,r=l.getUint32(8);if(17>r){if(1>e||64<e||1>q||
778 -64<q)return console.log("Invalid tile size ("+e+","+q+"), disconnecting."),h.Stop();if(h.sparew!=e||h.spareh!=q){h.sparew=h.sparew2=e;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=e;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==r){h.canvas.canvas.width=h.rwidth=h.width=e;h.canvas.canvas.height=h.rheight=
779 -h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));e=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==r){r=12;e=12+p*h.bpp;if(h.acc.byteLength<e)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(r,!0),w),r+=2;else for(w=0;w<p;w++)v(h.acc[r++],w);g(h.spare,b,c)}else if(16==r){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
780 -16+w)break;r=16;if(5<w&&0==h.acc[r]&&l.getUint16(r+1,!0)==w-5)d(h.acc,r+5,b,c,e,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(r,r+w-0)))),0<l.length){for(var r=l,N=new Uint8Array(r.length),u=0,C=r.length;u<C;++u)N[u]=r.charCodeAt(u);d(N,0,b,c,e,q,p,l.length)}else console.log("Invalid deflate data");e=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==e)break;h.acc=e!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(e)):
777 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),r=l.getUint16(6),p=g*r,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>r||
778 +64<r)return console.log("Invalid tile size ("+g+","+r+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=r){h.sparew=h.sparew2=g;h.spareh=h.spareh2=r;if(1==h.rotation||3==h.rotation)h.sparew2=r,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
779 +h.height=r;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
780 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,r,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,N=new Uint8Array(u.length),q=0,C=u.length;q<C;++q)N[q]=u.charCodeAt(q);d(N,0,b,c,g,r,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
781 null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
782 function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
783 -h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,C(0,0),w(0,0));h.width=h.canvas.canvas.width;
784 -h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var r={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
784 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
785 NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
786 F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
787 h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
788 h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var K=!1,B=!1;h.GrabMouseInput=function(){if(1!=K){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;K=!0}};h.UnGrabMouseInput=function(){if(0!=K){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;K=!1}};h.GrabKeyInput=function(){1!=B&&(document.onkeyup=
789 h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,B=!0)};h.UnGrabKeyInput=function(){0!=B&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,B=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
790 0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){h.ReverseMouseWheel&&(b*=-1);var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/
791 -Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,g=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-g[0])*d;h.my=(event.pageY-g[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=q(h.mx,h.my),h.my=e(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
791 +Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=r(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
792 h.mNagleTimer=null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=
793 -0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;
794 -a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,g="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?g:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");
795 -a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&
796 -a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var g=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<g&&0!=a.State)for(a.PendingOperations.push([g,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];
797 -if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&
798 -255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),g=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),n=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,n,b,e,g,n,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);
799 -a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();
800 -if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,e=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,
801 -4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),e=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+
802 -q+" Y="+e);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,e);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,e);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,
803 -4));break;case 11:c=0;q={};e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<e)for(c=((b.charCodeAt(6+2*e)&255)<<8)+(b.charCodeAt(7+2*e)&255),n=0;n<e;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,
804 -4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);g=v[b];d&&(a.CanvasId.style.cursor=g)}return w+D}}};a.MouseButton=
805 -{NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,
806 -Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?
807 -d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,
808 -a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,
809 -67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,g;for(g in a.TouchArray)g==b?e=c:1==a.TouchArray[g].f?(e=65542,a.TouchArray[g].f=3):e=2==a.TouchArray[g].f?262144:131078,d+=String.fromCharCode(g)+a.intToStr(e)+a.shortToStr(a.TouchArray[g].x)+a.shortToStr(a.TouchArray[g].y),2==a.TouchArray[g].f&&
810 -delete a.TouchArray[g];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,g=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-g[0])*e,d=(c.pageY-
811 -g[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var n=g=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?g=a.MouseButton.LEFT:2==c.which?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT:c.button&&(0==c.button?g=a.MouseButton.LEFT:1==c.button?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?n=-120*c.detail:c.wheelDelta&&(n=3*c.wheelDelta));var v="",v=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,
812 -a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,n/256&255,n&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?g:2*g&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(v),a.Alternate=1):a.Alternate=0:a.send(v)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",
813 -b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,
814 -a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&
815 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&
816 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&
817 -(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&
818 -a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};
819 -a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,g=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]=
820 -{x:e,y:g});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
821 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<
822 -b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/
823 -a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=
824 -a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
825 -null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=
826 -null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;
827 -if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||
828 -3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,
829 -0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};
830 -a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;
831 -d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var g=new FileReader,v=!1,n=[];g.readAsBinaryString?g.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:g.readAsBinaryString(new Blob([n.shift()]))}:g.readAsArrayBuffer&&(g.onloadend=function(a){d.xxOnSocketData(a.target.result);
832 -0==n.length?v=!1:g.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(g.readAsBinaryString)v=!0,g.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,g.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=
833 -function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=
834 -a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");
835 -d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(u[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<
836 -b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){y[m][D]=a;A[m][D]=(e<<6)+(C<<12)+q}function g(){for(var a=(e<<6)+(C<<12)+q,b=D;b<l.width;b++)y[m][b]=" ",A[m][b]=a}function v(a){for(var b=(e<<6)+(C<<12)+q,c=0;c<l.width;c++)y[a][c]=" ",A[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)y[b]=y[b+a],A[b]=A[b+a];for(b=E[1]-a+1;b<=
837 -E[1];b++)for(y[b]=[],A[b]=[],a=0;a<l.width;a++)y[b][a]=" ",A[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,e=7,C=0,w=!0,D=0,m=0,k=0,h=0,r=0,K=[],B=0,x=0,A=[],y=[],R=!1,z=!0,E,O=!1,H=[],
838 -N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){y[c]=[];A[c]=[];for(var d=0;d<l.width;d++)y[c][d]=" ",A[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=
839 -decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(r){case 0:switch(n){case 27:r=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":r=2;break;case "(":r=4;break;case ")":r=5;break;case "]":r=6;break;case "=":O=!0;r=0;break;case ">":O=!1;r=0;break;case "7":k=D;h=m;r=0;break;case "8":D=k;m=h;r=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var u=0;u<l.width;u++)y[n][u]=y[n-1][u],A[n][u]=A[n-1][u];for(n=
840 -E[0]+1-1;n>E[0]-1;n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;r=0;break;default:console.log("unknown terminal short code",p),r=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,u=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(z=!1);break;case "h":25==n[0]&&(z=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==u&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==
841 -u&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==u&&(0==n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==u&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==u&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==u&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==u&&(p=n[0]);for(J=D;J<l.width-p;J++)y[m][J]=y[m][J+p],A[m][J]=A[m][J+p];for(J=l.width-p;J<l.width;J++)y[m][J]=" ",A[m][J]=448;break;case "L":J=1;1==u&&(J=n[0]);0==J&&(J=1);
842 -for(n=E[1];n>=m+J;n--)y[n]=y[n-J],A[n]=A[n-J];for(n=m;n<m+J;n++)for(y[n]=[],A[n]=[],p=0;p<l.width;p++)y[n][p]=" ",A[n][p]=448;break;case "J":if(1==u&&2==n[0])l.TermClear((C<<12)+(e<<6)),m=D=0,H=[];else if(0==u||1==u&&0==n[0])for(g(),J=m+1;J<l.height;J++)v(J);else if(1==u&&1==n[0])for(g(),J=0;J<m-1;J++)v(J);break;case "H":2==u?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<u;J++)n[J]&&0!=n[J]?1==n[J]?
843 -8>e&&(e+=8):2==n[J]||22==n[J]?8<=e&&(e-=8):7==n[J]?q=2:27==n[J]?q=0:30<=n[J]&&37>=n[J]?(p=8<=e,e=n[J]-30,p&&8>=e&&(e+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?e=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,e=7,q=0);break;case "K":if(0!=u&&(1!=u||n[0]&&0!=n[0])){if(1==u)if(1==n[0])for(n=(e<<6)+(C<<12)+q,u=0;u<D;u++)y[m][u]=" ",A[m][u]=n;else 2==n[0]&&v(m)}else g();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==u&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-
844 -1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=E[1]);break;case "S":p=1;1==u&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "M":p=1;1==u&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "T":p=1;1==u&&(p=n[0]);for(n=E[1];n>E[0]+
845 -p;n--)for(u=0;u<l.width;u++)y[n][u]=y[n-p][u],A[n][u]=A[n-p][u];for(n=E[0]+p;n>E[0];n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "X":p=1;J=D;R=m;for(1==u&&(p=n[0]);0<p&&R<l.height;)y[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}r=0}break;case 4:r=0;break;case 5:r=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(u=parseInt(n[0]),(0==u||2==u)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,
846 -l.title=n[1]);r=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var u=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
847 -9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,
848 -9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)y[b][c]=" ",A[b][c]=a;H=[]};l.TermResetScreen=function(){q=0;e=7;C=0;w=z=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);
849 -N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};
850 -l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,
851 -79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,
852 -91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;
853 -var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
854 -a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=A[b][h],D==h&&m==b&&z&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=y[b][h],d){case "&":a+="&amp;";
793 +0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=
794 +700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
795 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
796 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
797 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
798 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
799 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
800 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,r=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
801 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),r=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+r+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
802 +a.ProcessPictureMsg(c,r,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(r,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;r={};g=((b.charCodeAt(4)&255)<<8)+
803 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);r[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,r,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
804 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
805 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
806 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&
807 +7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==
808 +a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&
809 +a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+
810 +a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
811 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
812 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
813 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
814 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
815 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
816 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
817 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
818 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
819 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
820 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
821 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
822 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
823 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
824 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
825 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
826 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
827 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
828 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
829 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
830 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
831 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
832 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
833 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
834 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
835 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(q[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
836 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(C<<12)+r}function e(){for(var a=(g<<6)+(C<<12)+r,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(C<<12)+r,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
837 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),r=0,g=7,C=0,w=!0,D=0,m=0,k=0,h=0,u=0,K=[],B=0,x=0,z=[],A=[],R=!1,y=!0,E,O=!1,H=[],N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
838 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=
839 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":O=!0;u=0;break;case ">":O=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var q=0;q<l.width;q++)A[n][q]=A[n-1][q],z[n][q]=z[n-1][q];for(n=E[0]+1-1;n>E[0]-1;n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;u=0;break;
840 +default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,q=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==q&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==q&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==q&&(0==
841 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==q&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==q&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==q&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==q&&(p=n[0]);for(J=D;J<l.width-p;J++)A[m][J]=A[m][J+p],z[m][J]=z[m][J+p];for(J=l.width-p;J<l.width;J++)A[m][J]=" ",z[m][J]=448;break;case "L":J=1;1==q&&(J=n[0]);0==J&&(J=1);for(n=E[1];n>=m+J;n--)A[n]=A[n-J],z[n]=z[n-J];for(n=m;n<m+J;n++)for(A[n]=[],
842 +z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==q&&2==n[0])l.TermClear((C<<12)+(g<<6)),m=D=0,H=[];else if(0==q||1==q&&0==n[0])for(e(),J=m+1;J<l.height;J++)v(J);else if(1==q&&1==n[0])for(e(),J=0;J<m-1;J++)v(J);break;case "H":2==q?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<q;J++)n[J]&&0!=n[J]?1==n[J]?8>g&&(g+=8):2==n[J]||22==n[J]?8<=g&&(g-=8):7==n[J]?r=2:27==n[J]?r=0:30<=n[J]&&
843 +37>=n[J]?(p=8<=g,g=n[J]-30,p&&8>=g&&(g+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?g=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,g=7,r=0);break;case "K":if(0!=q&&(1!=q||n[0]&&0!=n[0])){if(1==q)if(1==n[0])for(n=(g<<6)+(C<<12)+r,q=0;q<D;q++)A[m][q]=" ",z[m][q]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==q&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
844 +E[1]);break;case "S":p=1;1==q&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "M":p=1;1==q&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "T":p=1;1==q&&(p=n[0]);for(n=E[1];n>E[0]+p;n--)for(q=0;q<l.width;q++)A[n][q]=A[n-p][q],z[n][q]=z[n-p][q];for(n=
845 +E[0]+p;n>E[0];n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "X":p=1;J=D;R=m;for(1==q&&(p=n[0]);0<p&&R<l.height;)A[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(q=parseInt(n[0]),(0==q||2==q)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=
846 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var q=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
847 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
848 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;H=[]};l.TermResetScreen=function(){r=0;g=7;C=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
849 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
850 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
851 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
852 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
853 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
854 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
855 break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<H.length&&(H=H.slice(H.length-800));c=H.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
856 l.Init();return l},ZLIB=ZLIB||{};
857 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
858 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
859 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,x,A,B,D,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=A=1;15>=p;p++)if(A<<=1,A-=M[p],0>A)return-1;if(0<A&&(0==
860 -b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(q=0;q<n;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=r,fa=K,ga=ca=0,U=-1}q=D=0;p=d;S=c;n=w;x=0;W=-1;B=1<<w;I=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[q]<U?G.val=e[q]:e[q]>U?(G.op=fa[ga+e[q]],G.val=Z[ca+e[q]]):G.op=96;A=1<<p-x;d=C=1<<n;do C-=A,m[S+(D>>>x)+C]=G;while(0!=C);for(A=1<<p-1;D&A;)A>>>=1;
861 -0!=A?(D&=A-1,D+=A):D=0;q++;if(0==--M[p]){if(p==v)break;p=g[l+e[q]]}if(p>w&&(D&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(A=1<<n;n+x<v;){A-=M[n+x];if(0>=A)break;n++;A<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=D&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=D&&(m[S+D]={op:64,bits:p-x,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function g(){var a;this.total=this.check=
859 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,r,v,w,x,z,D,B,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(r=0;r<n;r++)M[g[l+r]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
860 +b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(r=0;r<n;r++)0!=g[l+r]&&(e[x[g[l+r]]++]=r);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=u,fa=K,ga=ca=0,U=-1}r=B=0;p=d;S=c;n=w;x=0;W=-1;D=1<<w;I=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[r]<U?G.val=e[r]:e[r]>U?(G.op=fa[ga+e[r]],G.val=Z[ca+e[r]]):G.op=96;z=1<<p-x;d=C=1<<n;do C-=z,m[S+(B>>>x)+C]=G;while(0!=C);for(z=1<<p-1;B&z;)z>>>=1;
861 +0!=z?(B&=z-1,B+=z):B=0;r++;if(0==--M[p]){if(p==v)break;p=g[l+e[r]]}if(p>w&&(B&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(z=1<<n;n+x<v;){z-=M[n+x];if(0>=z)break;n++;z<<=1}D+=1<<n;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:p-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
862 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
863 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function e(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function C(a,b){return a.hold&
864 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
863 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function r(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!r(a))return!1;return!0}function C(a,b){return a.hold&
864 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
865 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
866 -e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new g;ZLIB.inflateReset(b,
867 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,g,h,k,r,u=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);g={};n(a,g);h=g.have;k=g.left;
868 -P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!e(g,16))break a;if(d.wrap&2&&35615==g.hold){d.check=a.checksum_function(0,null,0,0);v(a,g.hold);p(g);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(g,8)<<8)+(g.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(g,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(g,4);u=C(g,4)+8;if(0==d.wbits)d.wbits=u;else if(u>d.wbits){a.msg="invalid window size";d.mode=
869 -29;break}d.dmax=1<<u;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=g.hold&512?9:11;p(g);break;case 1:if(!e(g,16))break a;d.flags=g.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=g.hold>>>8&1);d.flags&512&&v(a,g.hold);p(g);d.mode=2;case 2:if(!e(g,32))break a;null!==d.head&&(d.head.time=g.hold);d.flags&512&&(r=g.hold,a.state.check=a.checksum_function(a.state.check,
870 -[r&255,r>>>8&255,r>>>16&255,r>>>24&255],0,4));p(g);d.mode=3;case 3:if(!e(g,16))break a;null!==d.head&&(d.head.xflags=g.hold&255,d.head.os=g.hold>>>8);d.flags&512&&v(a,g.hold);p(g);d.mode=4;case 4:if(d.flags&1024){if(!e(g,16))break a;d.length=g.hold;null!==d.head&&(d.head.extra_len=g.hold);d.flags&512&&v(a,g.hold);p(g);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(r=d.length,r>g.have&&(r=g.have),r&&(null!==d.head&&null!==d.head.extra&&(u=d.head.extra_len-
871 -d.length,d.head.extra+=a.input_data.substring(g.next,g.next+(u+r>d.head.extra_max?d.head.extra_max-u:r))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r)),g.have-=r,g.next+=r,d.length-=r),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==g.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");r=0;do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=u,d.length++)}while(r<g.have);d.flags&
872 -512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==g.have)break a;r=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=u,d.length++)}while(r<g.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=
873 -r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!e(g,16))break a;if(g.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(g)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!e(g,32))break a;a.adler=d.check=m(g.hold);p(g);d.mode=10;case 10:if(0==d.havedict)return l(g),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
874 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(g);d.mode=26;break}if(!e(g,3))break a;d.last=C(g,1);w(g,1);switch(C(g,2)){case 0:d.mode=13;break;case 1:r=d;u=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
866 +e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
867 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,q=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
868 +P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);q=C(e,4)+8;if(0==d.wbits)d.wbits=q;else if(q>d.wbits){a.msg="invalid window size";d.mode=
869 +29;break}d.dmax=1<<q;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
870 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(q=d.head.extra_len-
871 +d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(q+u>d.head.extra_max?d.head.extra_max-q:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=q,d.length++)}while(u<e.have);d.flags&
872 +512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=q,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
873 +u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
874 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=C(e,1);w(e,1);switch(C(e,2)){case 0:d.mode=13;break;case 1:u=d;q=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
875 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
876 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
877 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -894,28 +894,28 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
894 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
895 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
896 {op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
897 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);r.lencode=0;r.distcode=512;for(u=0;512>u;u++)r.codes[u]=B[u];for(u=0;32>u;u++)r.codes[u+512]=x[u];r.lenbits=9;r.distbits=5;
898 -d.mode=19;if(c==ZLIB.Z_TREES){w(g,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(g,2);break;case 13:D(g);if(!e(g,32))break a;if((g.hold&65535)!=(g.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=g.hold&65535;p(g);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(r=d.length){r>g.have&&(r=g.have);r>g.left&&(r=g.left);if(0==r)break a;a.output_data+=a.input_data.substring(g.next,g.next+r);a.next_out+=r;g.have-=
899 -r;g.next+=r;g.left-=r;d.length-=r;break}d.mode=11;break;case 16:if(!e(g,14))break a;d.nlen=C(g,5)+257;w(g,5);d.ndist=C(g,5)+1;w(g,5);d.ncode=C(g,4)+4;w(g,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!e(g,3))break a;r=C(g,3);d.lens[A[d.have++]]=r;w(g,3)}for(;19>d.have;)d.lens[A[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
900 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(16>r.val)w(g,r.bits),d.lens[d.have++]=r.val;else{if(16==r.val){if(!e(g,r.bits+2))break a;w(g,r.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}u=d.lens[d.have-1];r=3+C(g,2);w(g,2)}else if(17==r.val){if(!e(g,r.bits+3))break a;w(g,r.bits);u=0;r=3+C(g,3);w(g,3)}else{if(!e(g,r.bits+7))break a;w(g,r.bits);u=0;r=11+C(g,7);w(g,7)}if(d.have+r>d.nlen+d.ndist){a.msg=
901 -"invalid bit length repeat";d.mode=29;break}for(;r--;)d.lens[d.have++]=u}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=g.have&&258<=g.left){l(g);r=a;var F=K=u=void 0,Y=void 0,L=void 0,
902 -ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,u=r.state,K=r.input_data,F=r.next_in,Y=F+r.avail_in-5,L=r.next_out,ea=L-(k-r.avail_out),V=L+(r.avail_out-257),J=u.wsize,aa=u.whave,ba=u.wnext,W=u.window,I=u.hold,G=u.bits,S=u.codes,Z=u.lencode,ca=u.distcode,fa=(1<<u.lenbits)-1,ga=(1<<u.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
903 -G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)r.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
904 -u.sane){r.msg="invalid distance too far back";u.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,r.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)r.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);r.output_data+=r.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),X-=3;X&&(r.output_data+=r.output_data.charAt(U++),
905 -1<X&&(r.output_data+=r.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{r.msg="invalid distance code";u.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?u.mode=11:(r.msg="invalid literal/length code",u.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;r.next_in=F;r.next_out=L;r.avail_in=F<Y?5+(Y-F):5-(F-Y);r.avail_out=L<V?257+(V-L):257-(L-V);u.hold=I;u.bits=G;n(a,g);11==d.mode&&(d.back=-1);
906 -break}for(d.back=0;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(r.op&&0==(r.op&240)){for(u=r;;){r=d.codes[d.lencode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;d.length=r.val;if(0==r.op){d.mode=25;break}if(r.op&32){d.back=-1;d.mode=11;break}if(r.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=r.op&15;d.mode=21;case 21:if(d.extra){if(!e(g,d.extra))break a;
907 -d.length+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){r=d.codes[d.distcode+C(g,d.distbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(0==(r.op&240)){for(u=r;;){r=d.codes[d.distcode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;if(r.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=r.val;d.extra=r.op&15;d.mode=23;case 23:if(d.extra){if(!e(g,d.extra))break a;
908 -d.offset+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==g.left)break a;r=k-g.left;if(d.offset>r){r=d.offset-r;if(r>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}r>d.wnext?(r-=d.wnext,u=d.wsize-r):u=d.wnext-r;K=-1;r>d.length&&(r=d.length)}else u=-1,K=a.next_out-d.offset,r=d.length;r>g.left&&(r=g.left);g.left-=r;d.length-=r;if(0<=u)a.output_data+=d.window.substring(u,u+r),a.next_out+=r;else{a.next_out+=r;do a.output_data+=a.output_data.charAt(K++);while(--r)}0==
909 -d.length&&(d.mode=20);break;case 25:if(0==g.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;g.left--;d.mode=20;break;case 26:if(d.wrap){if(!e(g,32))break a;k-=g.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=g.left;if((d.flags?g.hold:m(g.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(g)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!e(g,32))break a;if(g.hold!=(d.total&4294967295)){a.msg="incorrect length check";
910 -d.mode=29;break}p(g)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(g);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))g=a.state,r=a.output_data.length,null===g.window&&(g.window=""),0==g.wsize&&(g.wsize=1<<g.wbits),g.window=r>=g.wsize?a.output_data.substring(r-g.wsize):g.whave+r<g.wsize?g.window+a.output_data:g.window.substring(g.whave-(g.wsize-r))+a.output_data,g.whave=g.window.length,
911 -g.wnext=g.whave<g.wsize?g.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
897 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(q=0;512>q;q++)u.codes[q]=B[q];for(q=0;32>q;q++)u.codes[q+512]=x[q];u.lenbits=9;u.distbits=5;
898 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
899 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=C(e,5)+257;w(e,5);d.ndist=C(e,5)+1;w(e,5);d.ncode=C(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=C(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
900 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}q=d.lens[d.have-1];u=3+C(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);q=0;u=3+C(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);q=0;u=11+C(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
901 +"invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=q}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var F=K=q=void 0,Y=void 0,L=void 0,
902 +ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,q=u.state,K=u.input_data,F=u.next_in,Y=F+u.avail_in-5,L=u.next_out,ea=L-(k-u.avail_out),V=L+(u.avail_out-257),J=q.wsize,aa=q.whave,ba=q.wnext,W=q.window,I=q.hold,G=q.bits,S=q.codes,Z=q.lencode,ca=q.distcode,fa=(1<<q.lenbits)-1,ga=(1<<q.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
903 +G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)u.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
904 +q.sane){u.msg="invalid distance too far back";q.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)u.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);u.output_data+=u.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),X-=3;X&&(u.output_data+=u.output_data.charAt(U++),
905 +1<X&&(u.output_data+=u.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{u.msg="invalid distance code";q.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?q.mode=11:(u.msg="invalid literal/length code",q.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;u.next_in=F;u.next_out=L;u.avail_in=F<Y?5+(Y-F):5-(F-Y);u.avail_out=L<V?257+(V-L):257-(L-V);q.hold=I;q.bits=G;n(a,e);11==d.mode&&(d.back=-1);
906 +break}for(d.back=0;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(u.op&&0==(u.op&240)){for(q=u;;){u=d.codes[d.lencode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
907 +d.length+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+C(e,d.distbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(0==(u.op&240)){for(q=u;;){u=d.codes[d.distcode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
908 +d.offset+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,q=d.wsize-u):q=d.wnext-u;K=-1;u>d.length&&(u=d.length)}else q=-1,K=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=q)a.output_data+=d.window.substring(q,q+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(K++);while(--u)}0==
909 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
910 +d.mode=29;break}p(e)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
911 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
912 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
913 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
914 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
915 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
916 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;a%=65521;n%=65521}return a|n<<16}function c(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b[c],65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),
917 a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b[c++],n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=
918 -a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,g,v){return"string"===typeof d?b(a,d,g,v):c(a,d,g,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
918 +a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,e,v){return"string"===typeof d?b(a,d,e,v):c(a,d,e,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
919 65521);131042<=v&&(v-=131042);65521<=v&&(v-=65521);return c|v<<16}})();"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-crc32.js");
920 (function(){function b(a,b){var c,n=0;for(c=0;b;)b&1&&(c^=a[n]),b>>=1,n++;return c}function c(a,c){var v;for(v=0;32>v;v++)a[v]=b(c,c[v])}var a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,
921 3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,
@@ -924,32 +924,32 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
924 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
925 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
926 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
927 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,g,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^g}})();
928 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),g=b.webkitRequestFileSystem,v=b.requestFileSystem||g||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
929 -b.chrome?c():setTimeout(c,500)},q=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(g){n(g)}}},e=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},C=function(n,m,k){k||(n=e(n));var h=this;k=n.type;var r=!1,w,B,x=function(){q(h,["writestart","progress","write","writeend"])},A=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
930 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(r||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},y=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},z;h.readyState=h.INIT;m||(m="download");if(a)w=
931 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(z=n.slice||n.webkitSlice,n=z.call(n,0,n.size,"application/octet-stream"),r=!0);g&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||g)B=b;v?(l+=n.size,v(b.TEMPORARY,l,y(function(a){a.root.getDirectory("saved",C,y(function(a){var b=function(){a.getFile(m,C,y(function(a){a.createWriter(y(function(b){b.onwriteend=
932 -function(b){B.location.href=a.toURL();h.readyState=h.DONE;q(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&A()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),A)}),A)};a.getFile(m,{create:!1},y(function(a){a.remove();b()}),y(function(a){a.code===a.NOT_FOUND_ERR?b():A()}))}),A)}),A)):A()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
933 -b,c){c||(a=e(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
927 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,r;if(0>=v)return a;p=Array(32);r=Array(32);r[0]=3988292384;for(n=l=1;32>n;n++)r[n]=l,l<<=1;c(p,r);c(r,p);do{c(p,r);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(r,p);v&1&&(a=b(r,a));v>>=1}while(0!=v);return a^e}})();
928 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
929 +b.chrome?c():setTimeout(c,500)},r=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(g){n(g)}}},g=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},C=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){r(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
930 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
931 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",C,A(function(a){var b=function(){a.getFile(m,C,A(function(a){a.createWriter(A(function(b){b.onwriteend=
932 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;r(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
933 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;r(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
934 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
935 -var version="0.9.3",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
935 +var version="0.9.7",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
936 null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Carregando...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetAuth NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
937 StatusStrs=["Desconectado","A ligar ...","Configura\u00e7\u00e3o...","Conectado"],t,t2,rsepass=null;
938 -function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
939 -applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
940 -haltEvent,!1);document.addEventListener("dragleave",haltEvent,!1);document.addEventListener("drop",documentFileSelectHandler,!1);Q("p16").addEventListener("dragover",haltEvent,!1);Q("p16").addEventListener("dragleave",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",
941 -p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
938 +function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(23).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
939 +urlvars.kvmenc&&(c=parseInt(urlvars.kvmenc),"number"==typeof c&&(desktopsettings.encflags=c));urlvars.kvmdec&&(c=parseInt(urlvars.kvmdec),"number"==typeof c&&(desktopsettings.decimationMode=c));applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(34).value=terminalEmulations[terminal.m.terminalEmulation];Q(31).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",
940 +haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);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",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);
941 +document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
942 function documentFileSelectHandler(b){haltEvent(b);for(var c=!0,a=0;a<b.dataTransfer.files.length;a++)0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".img")&&0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".iso")&&(c=!1);1==c&&null!=b.dataTransfer&&0<currentView&&100>currentView&&(1==b.dataTransfer.files.length||2==b.dataTransfer.files.length)?(a=c=null,b.dataTransfer.files[0].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[0]),b.dataTransfer.files[0].name.toLowerCase().endsWith(".img")&&
943 (c=b.dataTransfer.files[0]),2==b.dataTransfer.files.length&&(b.dataTransfer.files[1].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[1]),b.dataTransfer.files[1].name.toLowerCase().endsWith(".img")&&(c=b.dataTransfer.files[1])),null==c&&null==a||iderStart3(c,a,1)):null!=b.dataTransfer&&1==b.dataTransfer.files.length&&(c=b.dataTransfer.files[0].name.toLowerCase(),21==currentView&&UploadToStorage(b.dataTransfer.files[0],c))}
944 function connectButtonfunction(){wsstack&&0!=wsstack.socketState?disconnect():meshcentral2credCallback()}function connectButtonfunctionEx(){currentMeshNode=parent.getCurrentNode();connect(currentMeshNode._id,16992,null,null,0);Q("xconnectbutton1").value="desconectar"}function getCurrentMeshNode(){return currentMeshNode}function setConnectionState(b){QE("xconnectbutton1",b);0==b&&disconnect()}function setFrameHeight(b){}function setAuthCallback(b){meshcentral2credCallback=b}
945 function setUrlVar(b,c){urlvars||(urlvars={});urlvars[b]=c}function cleanup(){c3.value="Come\u00e7ar captura";terminal.m.capture&&delete terminal.m.capture;terminal.Stop();desktop.disconnectCode=0;desktop.Stop()}
946 -function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
947 -function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
948 -function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
949 -function connect(b,c,a,d,g,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,g);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(28,"");QH(39,"");amtversion=amtversionmin=amtFirstPull=
950 -0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(21,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(49,"");
951 -QH(50,LoadingHtml);xxCertificates=null;QH(51,LoadingHtml);QH(24,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(52,LoadingHtml);QH(54,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
952 -!1;QH(53,LoadingHtml);QE(43,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(48,!1),Q(48).checked=!0);QE(44,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
946 +function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
947 +function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
948 +function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
949 +function connect(b,c,a,d,e,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,e);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(29,"");QH(40,"");amtversion=amtversionmin=amtFirstPull=
950 +0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(22,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(50,"");
951 +QH(51,LoadingHtml);xxCertificates=null;QH(52,LoadingHtml);QH(25,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(53,LoadingHtml);QH(55,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
952 +!1;QH(54,LoadingHtml);QE(44,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(49,!1),Q(49).checked=!0);QE(45,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
953 function disconnect(){null!=desktopPollTimer&&(clearInterval(desktopPollTimer),desktopPollTimer=null);fullscreen&&deskToggleFull();iderStop();StopDefenseStatsTimer();dialogclose(0);amtstack&&(amtstack.onProcessChanged=null,amtstack.CancelAllQueries(999),amtstack=null);cleanup();wsstack=null;delete amtstack;onProcessChanged(0,1);go(101);Q("xconnectbutton1").value="Conectar";QH(5,"Desconectado");go(100)}
954 function onProcessChanged(b,c){QS(3).width=100*b/c+"%";0==b&&refreshButtons(!0);0==b&&amtstack&&(0<amtversion&&0==(amtFirstPull&64)?(amtFirstPull|=64,PullPowerPolicy(),subscriptionsFilters=null,PullEventSubscriptions(),PullWatchdog(),5<amtversion&&(PullCertificates(),PullRemoteAccess())):0==(amtFirstPull&1)?PullHardware():0==(amtFirstPull&16)?PullEventLog():0==(amtFirstPull&32)&&PullAuditLog())}
955 function checkAmtVersion(b){var c=b.split(".");b=parseInt(c[0]);var a=parseInt(c[1]),c=parseInt(c[2]),c=1E3*a+c,d=0;5>=b||12<=b?d=1:6==b&&2061<=c?d=1:7==b&&1091<=c?d=1:8==b&&1071<=c?d=1:9==b?5>a&&1041<=c?d=1:5061<=c&&(d=1):10==b&&55<=c?d=1:11==b&&(5>a&&25<=c?d=1:6027<=c&&(d=1));return 0==d}
@@ -958,35 +958,35 @@ function processSystemVersion(b,c,a,d){if(200==d||400==d){if(200==d){amtlogicale
958 1==urlvars.sol&&(go(13),connectTerminal())}else errcheck(d,b)}var refreshButtonsState=!0;function refreshButtons(b){if(refreshButtonsState!=b){refreshButtonsState=b;for(var c=0,a=document.getElementsByTagName("input");c<a.length;c++)"refreshbtn"==a[c].name&&(a[c].disabled=!b)}}
959 function PullPowerState(){amtstack&&0==amtstack.GetPendingActions()&&amtsysstate&&amtsysstate.CIM_ServiceAvailableToElement&&amtstack.Enum("CIM_ServiceAvailableToElement",function(b,c,a,d){200==d&&(amtsysstate.CIM_ServiceAvailableToElement.responses=a,9<amtversion&&null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?
960 amtstack.Get("IPS_PowerManagementService",function(a,b,c,d){200==d&&(amtsysstate.IPS_PowerManagementService.response=c.Body,updateSystemStatus())}):updateSystemStatus())})}
961 -function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c=["CIM_ServiceAvailableToElement","*AMT_GeneralSettings","AMT_EthernetPortSettings","*AMT_RedirectionService","CIM_ElementSettingData"];5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");15<amtversion&&1==amtstack.wsman.comm.xtls&&
962 -c.push("*CIM_BootService");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
961 +function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c="CIM_ServiceAvailableToElement *AMT_GeneralSettings AMT_EthernetPortSettings *AMT_RedirectionService CIM_ElementSettingData *AMT_BootCapabilities".split(" ");5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");
962 +15<amtversion&&c.push("*CIM_BootService");2<amtversion&&c.push("*AMT_8021XProfile");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
963 function processSystemStatus(b,c,a,d){if(void 0==a.IPS_ScreenConfigurationService||400==a.IPS_ScreenConfigurationService.status)a.IPS_ScreenConfigurationService=null;if(void 0==a.IPS_KVMRedirectionSettingData||400==a.IPS_KVMRedirectionSettingData.status)a.IPS_KVMRedirectionSettingData=null;if(void 0==a.CIM_KVMRedirectionSAP||400==a.CIM_KVMRedirectionSAP.status)a.CIM_KVMRedirectionSAP=null;if(void 0==a.IPS_OptInService||400==a.IPS_OptInService.status)a.IPS_OptInService=null;void 0!=a.AMT_RedirectionService&&
964 -200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var g in a)null!=a[g]&&a[g].status>d&&(d=a[g].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"Sincronizar rel\u00f3gio",3,syncClockEx,"Sincronizar o rel\u00f3gio Intel AMT com este computador?")}
964 +200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var e in a)null!=a[e]&&a[e].status>d&&(d=a[e].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"Sincronizar rel\u00f3gio",3,syncClockEx,"Sincronizar o rel\u00f3gio Intel AMT com este computador?")}
965 function syncClockEx(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(b,c,a,d){200!=d?messagebox("","Falha ao definir a hora, status ="+d):0!=a.Body.ReturnValue?messagebox("","Falha ao definir hora, erro: "+a.Body.ReturnValueStr):(b=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(a.Body.Ta0,b,b,function(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}))})}var DMTFPowerStates=";;Ligar;Sono leve;Sono profundo;Ciclo de energia (desligamento suave);Desligado - Dif\u00edcil;Hiberna\u00e7\u00e3o (desativado suave);Soft off;Ciclo de energia (Off-hard);Redefini\u00e7\u00e3o do barramento principal;Interrup\u00e7\u00e3o de diagn\u00f3stico (MNI);N\u00e3o aplic\u00e1vel;Desligado - suave e gracioso;Desligado - Dif\u00edcil gracioso;Redefini\u00e7\u00e3o do barramento mestre graciosa;Ciclo de energia (desligado - suave suave);Ciclo de energia (desligado - com for\u00e7a);Interrup\u00e7\u00e3o de diagn\u00f3stico (INIT)".split(";");
966 -function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),g="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Desconhecido</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Ligar"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
967 -3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", Conectado",", Com bateria"][v.PowerSource]);d+=TableEntry("Poder",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Nenhum</i>":EscapeHtml(c);d+=TableEntry("Nome e dom\u00ednio",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?
966 +function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Desconhecido</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Ligar"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
967 +3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(29,n),QH(40,n));v.PowerSource&&(n+=[", Conectado",", Com bateria"][v.PowerSource]);d+=TableEntry("Poder",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Nenhum</i>":EscapeHtml(c);d+=TableEntry("Nome e dom\u00ednio",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?
968 d+=TableEntry("ID do sistema",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("ID do sistema",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" ativado no modo de controle de administrador (ACM)",4==l.ProvisioningMode&&(n=" ativado no modo de controle de cliente (CCM)",b=9));d+=TableEntry("Intel&reg; ME",
969 -"v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
970 -q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),e=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),e=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
971 -p&&(g+=", Porta de redirecionamento");q&&(g+=", Serial-over-LAN");n&&(g+=", Redirecionamento de IDE");e&&(g+=", KVM");""==g&&(g=" Nenhum");d+=TableEntry("Recursos ativos",addLinkConditional(g.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,g="Visor principal",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(g=["Visor principal",
972 -"Visor secund\u00e1rio","3\u00aa exibi\u00e7\u00e3o"][n.DefaultScreen]),g='<span title="'+format("O visor remoto padr\u00e3o \u00e9 {0}",g.toLowerCase())+'">'+g+"</span>",1==n.Is5900PortEnabled&&(g+="Porta 5900 ativada"),1==n.OptInPolicy&&(g+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"segundos de aceita\u00e7\u00e3o":"segunda inscri\u00e7\u00e3o")),g+=","+n.SessionTimeout+" minuto"+(0<n.SessionTimeout?"s":"")+" sess\u00e3o expirada",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?
973 -((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(g+=", Supress\u00e3o permitida"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("\u00c1rea de trabalho remota",addLinkConditional(g,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!e);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&
974 -void 0!=amtsysstate.IPS_OptInService.response&&(g="Estado desconhecido",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(g="N\u00e3o requerido"),1==p&&(g="Necess\u00e1rio apenas para KVM"),4294967295==p&&(g="Sempre necess\u00e1rio"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(g=addLinkConditional(g,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consentimento do Usu\u00e1rio",g));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&
975 -(g={0:"Desconhecido",1:"De outros",2:"ativado",3:"Desativado",4:"Desligando",5:"N\u00e3o aplic\u00e1vel",6:"Ativado, mas offline",7:"Em teste",8:"Diferido",9:"Quiesce",10:"Iniciando",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(g[32768]="OCR & RPE Disabled",g[32769]="OCR Enabled, RPE Disabled"),n=g[amtsysstate.CIM_BootService.response.EnabledState]?g[amtsysstate.CIM_BootService.response.EnabledState]:"Desconhecido",d+=TableEntry("Boot Features",
976 -addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)if(g[C].SettingData&&1==g[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==g[C].SettingData.ReferenceParameters.ResourceURI)for(p=g[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("Pol\u00edtica de energia",
977 -addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Data hora",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));g=AddRefreshButton("PullSystemStatus()")+" ";g+=AddButton("A\u00e7\u00f5es de poder ...","showPowerActionDlg()")+" ";g+=AddButton("Estado salvo...","saveEntireAmtState()")+" ";d+=TableEnd(g);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
978 -QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" Alterar as configura\u00e7\u00f5es de rede pode fazer com que esta p\u00e1gina fique indispon\u00edvel.");d=d+"<br><h2>Configura\u00e7\u00f5es Gerais</h2>"+TableStart();g="";"<i>Nenhum</i>"!=c&&(1==v.SharedFQDN&&(g=", compartilhado com o SO"),0==v.SharedFQDN&&(g=", diferente do SO"));d+=TableEntry("Nome e dom\u00ednio",addLinkConditional(c+
979 -g,"showEditNameDlg(1)",xxAccountAdminName));c="Desativado";1==v.DDNSUpdateEnabled?c="Ativado cada"+v.DDNSPeriodicUpdateInterval+" minutos, TTL \u00e9"+v.DDNSTTL+" minutos":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Atualiza\u00e7\u00e3o pelo servidor DHCP");d+=TableEntry("DNS din\u00e2mico",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||
980 -1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Interface sem fio":"Interface com fio")+"</h2>";d+=TableStart();d+=TableEntry("Estado do link",1==c.LinkIsUp?"O link est\u00e1 ativo":"Link desativado");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);g=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&g.push("S0 / AC"),14==c.LinkPolicy[C]&&g.push("Sx / AC"),16==c.LinkPolicy[C]&&g.push("S0 / DC"),224==c.LinkPolicy[C]&&g.push("Sx / DC");
981 -0==g.length&&g.push("");d+=TableEntry("Pol\u00edtica de links",addLinkConditional(0==g.length?"N\u00e3o dispon\u00edvel":"Dispon\u00edvel em: "+g.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("Endere\u00e7o MAC",c.MACAddress));amtwirelessif==a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("Estado",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),
982 -s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("Estado da R\u00e1dio",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>Nenhum</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?
983 -"ativado":"Desativado","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"ativado":"Desativado","showUefiWifiCoExDlg()",
984 -xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Responder ao ping",addLinkConditional(["Desativado","Resposta ICMP","Resposta RMCP","Resposta ICMP e RMCP"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),g=1==c.DHCPEnabled?"Autom\u00e1tico usando servidor DHCP":"Endere\u00e7o IP est\u00e1tico",1==c.IpSyncEnabled&&(g+=", IP sync with OS"),d+=TableEntry("Estado IPv4",addLinkConditional(g,
985 -"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("Endere\u00e7o IPv4",isIpAddress(c.IPAddress,"Nenhum"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("Gateway IPv4 / M\u00e1scara",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Nenhum")));g=c.PrimaryDNS;isIpAddress(g)&&(c.SecondaryDNS&&(g+=" / "+c.SecondaryDNS),d+=TableEntry("Servidor de nomes de dom\u00ednio IPv4",g));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p=
986 -"Desativado",w,g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)g[C].SettingData&&g[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==g[C].IsCurrent);1==w&&(p=(g=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Endere\u00e7os ativados, autom\u00e1ticos e manuais":"Habilitado, Endere\u00e7os autom\u00e1ticos");d+=TableEntry("Estado IPv6",addLinkConditional(p,"showIPv6StateDlg("+
987 -a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("Endere\u00e7o IPv6",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("Endere\u00e7o IPv6","Nenhum");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("Roteador IPv6 padr\u00e3o",
988 -c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(g=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(g+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("Servidor de nomes de dom\u00ednio IPv6",g))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&
989 -go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
969 +"v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(28,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(39,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
970 +r=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
971 +p&&(e+=", Porta de redirecionamento");r&&(e+=", Serial-over-LAN");n&&(e+=", Redirecionamento de IDE");g&&(e+=", KVM");""==e&&(e=" Nenhum");d+=TableEntry("Recursos ativos",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Visor principal",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Visor principal",
972 +"Visor secund\u00e1rio","3\u00aa exibi\u00e7\u00e3o"][n.DefaultScreen]),e='<span title="'+format("O visor remoto padr\u00e3o \u00e9 {0}",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+="Porta 5900 ativada"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"segundos de aceita\u00e7\u00e3o":"segunda inscri\u00e7\u00e3o")),e+=","+n.SessionTimeout+" minuto"+(0<n.SessionTimeout?"s":"")+" sess\u00e3o expirada",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?
973 +((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+=", Supress\u00e3o permitida"),QV(46,n),Q(47).checked=!1):QV(46,!1),d+=TableEntry("\u00c1rea de trabalho remota",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(26,!p||!r);QV(27,xxAccountAdminName);QV(37,!p||!g);QV(38,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&
974 +void 0!=amtsysstate.IPS_OptInService.response&&(e="Estado desconhecido",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(e="N\u00e3o requerido"),1==p&&(e="Necess\u00e1rio apenas para KVM"),4294967295==p&&(e="Sempre necess\u00e1rio"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consentimento do Usu\u00e1rio",e));null!=amtsysstate.AMT_BootCapabilities.response.PlatformErase&&0<amtsysstate.AMT_BootCapabilities.response.PlatformErase&&
975 +null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"Desconhecido",1:"De outros",2:"ativado",3:"Desativado",4:"Desligando",5:"N\u00e3o aplic\u00e1vel",6:"Ativado, mas offline",7:"Em teste",8:"Diferido",9:"Quiesce",10:"Iniciando",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?
976 +e[amtsysstate.CIM_BootService.response.EnabledState]:"Desconhecido",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)if(e[C].SettingData&&1==e[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[C].SettingData.ReferenceParameters.ResourceURI)for(p=e[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,
977 +r=0;r<AmtSystemPowerSchemes.length;r++)AmtSystemPowerSchemes[r].SchemeGUID==p&&(d+=TableEntry("Pol\u00edtica de energia",addLinkConditional(AmtSystemPowerSchemes[r].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Data hora",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("A\u00e7\u00f5es de poder ...","showPowerActionDlg()")+
978 +" ";e+=AddButton("Estado salvo...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" Alterar as configura\u00e7\u00f5es de rede pode fazer com que esta p\u00e1gina fique indispon\u00edvel.");
979 +d=d+"<br><h2>Configura\u00e7\u00f5es Gerais</h2>"+TableStart();e="";"<i>Nenhum</i>"!=c&&(1==v.SharedFQDN&&(e=", compartilhado com o SO"),0==v.SharedFQDN&&(e=", diferente do SO"));d+=TableEntry("Nome e dom\u00ednio",addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));c="Desativado";1==v.DDNSUpdateEnabled?c="Ativado cada"+v.DDNSPeriodicUpdateInterval+" minutos, TTL \u00e9"+v.DDNSTTL+" minutos":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Atualiza\u00e7\u00e3o pelo servidor DHCP");d+=TableEntry("DNS din\u00e2mico",
980 +addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Interface sem fio":"Interface com fio")+"</h2>";d+=TableStart();d+=TableEntry("Estado do link",1==c.LinkIsUp?"O link est\u00e1 ativo":"Link desativado");if(c.LinkPolicy){c.LinkPolicy=
981 +MakeToArray(c.LinkPolicy);e=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&e.push("S0 / AC"),14==c.LinkPolicy[C]&&e.push("Sx / AC"),16==c.LinkPolicy[C]&&e.push("S0 / DC"),224==c.LinkPolicy[C]&&e.push("Sx / DC");0==e.length&&e.push("");d+=TableEntry("Pol\u00edtica de links",addLinkConditional(0==e.length?"N\u00e3o dispon\u00edvel":"Dispon\u00edvel em: "+e.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("Endere\u00e7o MAC",c.MACAddress));amtwirelessif==
982 +a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("Estado",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("Estado da R\u00e1dio",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>Nenhum</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&
983 +(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"ativado":"Desativado","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",
984 +addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"ativado":"Desativado","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Responder ao ping",addLinkConditional(["Desativado","Resposta ICMP","Resposta RMCP","Resposta ICMP e RMCP"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-FAST/TLS".split(" "),
985 +p="Desativado",amtsysstate.AMT_8021XProfile.responses.Body.Enabled&&(p="Ativado,"+e[amtsysstate.AMT_8021XProfile.responses.Body.AuthenticationProtocol]),d+=TableEntry("802.1x",addLinkConditional(p,"editNetAuthProfile()",xxAccountAdminName)),e=1==c.DHCPEnabled?"Autom\u00e1tico usando servidor DHCP":"Endere\u00e7o IP est\u00e1tico",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("Estado IPv4",addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("Endere\u00e7o IPv4",
986 +isIpAddress(c.IPAddress,"Nenhum"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("Gateway IPv4 / M\u00e1scara",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Nenhum")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("Servidor de nomes de dom\u00ednio IPv4",e));if(5<amtversion&&200==amtsysstate.IPS_IPv6PortSettings.status){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="Desativado",w,e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)e[C].SettingData&&
987 +e[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[C].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Endere\u00e7os ativados, autom\u00e1ticos e manuais":"Habilitado, Endere\u00e7os autom\u00e1ticos");d+=TableEntry("Estado IPv6",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=
988 +MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("Endere\u00e7o IPv6",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("Endere\u00e7o IPv6","Nenhum");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("Roteador IPv6 padr\u00e3o",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&
989 +(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("Servidor de nomes de dom\u00ednio IPv6",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
990 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
991 "")+">Available in S0/DC - Powered on & on battery</label><br>";a+="<label><input type=checkbox id=d11p4 value=224 "+(0<=c.LinkPolicy.indexOf(224)?"checked":"")+">Available in Sx/DC - Sleeping & on battery</label><br>";setDialogMode(11,"Pol\u00edtica de Links",3,showLinkPolicyDlgEx,a,b)}}
992 function showLinkPolicyDlgEx(b,c){var a=Clone(amtsysstate.AMT_EthernetPortSettings.responses[c]);a.DHCPEnabled&&(delete a.IPAddress,delete a.SubnetMask,delete a.DefaultGateway,delete a.PrimaryDNS,delete a.SecondaryDNS);a.LinkPolicy=[];Q("d11p1").checked&&a.LinkPolicy.push(1);Q("d11p2").checked&&a.LinkPolicy.push(14);Q("d11p3").checked&&a.LinkPolicy.push(16);Q("d11p4").checked&&a.LinkPolicy.push(224);amtstack.Put("AMT_EthernetPortSettings",a,showLinkPolicyDlgExDone,0,1,a)}
@@ -995,30 +995,30 @@ function showAuthCsme(){if(!xxdialogMode){var b;b="<div style=margin-top:8px>Int
995 for(var c in amtstack.amtauth.Certificates){var a=amtstack.amtauth.Certificates[c];b+="<tr><td style=width:32px;vertical-align:top><img src=images-commander/cert1.png height=32 width=32 />";b+="<td style=padding-bottom:6px><b>"+EscapeHtml(a.subject.getField("CN").value)+(!0===a.xTrusted?", <span style=color:#080>Confi\u00e1vel</span>":"")+"</b><br />";a.subject.getField("OU")&&(b+=EscapeHtml(a.subject.getField("OU").value)+"<br />");b+=amtstack.amtauth.CertificatesDer[c].length+" bytes,<a style=cursor:pointer;color:blue onclick=downloadAuthCert("+
996 c+")>Baixar</a>";a.xCrl&&(b+="<br />CRL "+a.xCrl.length+" bytes,<a style=cursor:pointer;color:blue onclick=downloadCertCrl("+c+")>Baixar</a>")}setDialogMode(11,"Authentic CSME",1,null,b+"</table><div>")}}function downloadCertCrl(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.Certificates[b].xCrl),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".crl")}
997 function downloadAuthCert(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.CertificatesDer[b]),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".cer")}var IntelAmtEntireState,IntelAmtEntireStateCalls;
998 -function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c30.value="amtstate"+b+".json";setDialogMode(19,"Salvar todo o estado Intel&reg; AMT",3,saveEntireAmtStateOk)}}
999 -function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(60,"Fetching entire state, please wait...");setDialogMode(1,"Salvar todo o estado Intel&reg; AMT",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
1000 -function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c30.value))}
998 +function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c55.value="amtstate"+b+".json";setDialogMode(19,"Salvar todo o estado Intel&reg; AMT",3,saveEntireAmtStateOk)}}
999 +function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(61,"Fetching entire state, please wait...");setDialogMode(1,"Salvar todo o estado Intel&reg; AMT",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
1000 +function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c55.value))}
1001 function showDesktopSettingsDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_KVMRedirectionSettingData.response,c;c="<div style=text-align:left><div style=height:26px;margin-top:4px><select id=subddisplay style=float:right;width:200px><option value=0>Visor principal</option><option value=1>Visor secund\u00e1rio</option>";9<amtversion&&(c+="<option value=2>3\u00aa exibi\u00e7\u00e3o</option>");c+='</select><div style=padding-top:4px>Exibi\u00e7\u00e3o padr\u00e3o</div></div><div style=height:26px;margin-top:4px><input id=subsessiontimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>Tempo limite da sess\u00e3o (minutos)</div></div>';
1002 1==b.OptInPolicy&&(c+='<div style=height:26px;margin-top:4px><input id=suboptintimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>Tempo limite de ativa\u00e7\u00e3o (segundos)</div></div>');c+="<div style=height:26px;margin-top:4px><select id=subdlegacy style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>Desativado, Recomendado</option><option value=1>Habilitado, visualizadores KVM herdados</option></select><div style=padding-top:4px>Porta 5900</div></div>";
1003 c+="<div style=height:26px;margin-top:4px id=subspassx><input id=subspass type=password autocomplete=off style=float:right;width:200px maxlength=8 onkeyup=showDesktopSettingsDlgUpdate()><div style=padding-top:4px>Senha do 5900 (8 caracteres)</div></div>";9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(c+='<div style=height:26px;margin-top:4px><select id=subsb style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>Desativado</option><option value=1>ativado</option></select><div style=padding-top:4px title="Esse recurso n\u00e3o \u00e9 frequentemente suportado">Tela em branco</div></div>');
1004 c+="</div>";setDialogMode(11,"Configura\u00e7\u00f5es da \u00e1rea de trabalho remota",3,showDesktopSettingsDlgOk,c);Q("subddisplay").value=b.DefaultScreen;Q("subsessiontimeout").value=b.SessionTimeout;1==b.OptInPolicy&&(Q("suboptintimeout").value=b.OptInPolicyTimeout);Q("subdlegacy").value=1==b.Is5900PortEnabled?1:0;9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(Q("subsb").value=amtsysstate.IPS_ScreenConfigurationService.response.EnabledState);showDesktopSettingsDlgUpdate()}}
1005 -function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c54",b)}
1005 +function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c106",b)}
1006 function showDesktopSettingsDlgOk(){var b=Clone(amtsysstate.IPS_KVMRedirectionSettingData.response);b.DefaultScreen=Q("subddisplay").value;b.SessionTimeout=Q("subsessiontimeout").value;b.Is5900PortEnabled=1==Q("subdlegacy").value;1==b.OptInPolicy&&(b.OptInPolicyTimeout=Q("suboptintimeout").value);1==b.Is5900PortEnabled&&(b.RFBPassword=Q("subspass").value);amtstack.Put("IPS_KVMRedirectionSettingData",b,showDesktopSettingsDlgOk2);b=Clone(amtsysstate.IPS_ScreenConfigurationService.response);b.EnabledState=
1007 parseInt(Q("subsb").value);amtstack.Put("IPS_ScreenConfigurationService",b,showDesktopSettingsDlgOk3)}function showDesktopSettingsDlgOk2(b,c,a,d){200==d?PullSystemStatus():messagebox("Configura\u00e7\u00f5es da \u00e1rea de trabalho remota",format("Erro {0}, incapaz de definir valores.",d))}
1008 function showDesktopSettingsDlgOk3(b,c,a,d){200!=d?messagebox("Erro",format("N\u00e3o foi poss\u00edvel definir o apagamento da tela; o apagamento pode n\u00e3o ser suportado neste sistema ({0}).",d)):amtstack.Get("IPS_ScreenConfigurationService",function(a,b,c,d){200==d&&(amtsysstate.IPS_ScreenConfigurationService.response=c.Body,updateSystemStatus())},0,1)}
1009 function PullEventLog(b){1==b&&xxdialogMode||(amtFirstPull|=16,amtstack.Enum("AMT_MessageLog",processMessageLog0),amtstack.GetMessageLog(processMessageLog1))}var processMessageLog0responses=null;
1010 function processMessageLog0(b,c,a,d){200==d&&(d&&QV("go6",!0),a&&(processMessageLog0responses=a),b="",c="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>",null!=processMessageLog0responses&&(b=1==processMessageLog0responses[0].IsFrozen?AddButton("Descongelar registro","FreezeLog(0)"):AddButton("Congelar log","FreezeLog(1)")),c+=TableEnd('<div style=float:right><input id=eventFilter placeholder="Filtro" style=margin:4px onkeyup=eventFilter()>&nbsp;</div><div>&nbsp;'+
1011 AddRefreshButton("PullEventLog(1)")+AddButton("Log clara","ClearLog()")+AddButton("Salve \ue051...","SaveEventLog()")+b),QH(17,c+"<br>"))}function SaveEventLog(){xxdialogMode||null==eventmessages||SaveJsonFile("IntelAmtEventlog","events","Intel AMT Event Log",eventmessages)}var eventmessages=null;
1012 -function processMessageLog1(b,c){eventmessages=c;var a,d=0,g;g="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>Fonte</b><td class=r1><b>Descri\u00e7\u00e3o</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);g+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1013 -a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}g+=TableEnd(0==d?"&nbsp;":"");QH(18,g+"<br>");processMessageLog0()}
1014 -function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(60,"Limpar log de eventos?"),setDialogMode(1,"Registro de Eventos",3,ClearLogEx))}function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("Registro de Eventos","N\u00e3o foi poss\u00edvel limpar, Erro: "+d):PullEventLog()})}
1015 -function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("Tempo",c.Time.toLocaleString());a+=addHtmlValue("Fonte",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("Descri\u00e7\u00e3o",c.Desc);a+=MoreStart();a+=addHtmlValue("Endere\u00e7o do dispositivo",c.DeviceAddress);a+=addHtmlValue("Entidade",c.Entity);a+=addHtmlValue("Inst\u00e2ncia da entidade",c.EntityInstance);var d="",g;for(g in c.EventData)0<d.length&&(d+=","),d+=c.EventData[g];
1012 +function processMessageLog1(b,c){eventmessages=c;var a,d=0,e;e="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>Fonte</b><td class=r1><b>Descri\u00e7\u00e3o</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);e+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1013 +a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}e+=TableEnd(0==d?"&nbsp;":"");QH(18,e+"<br>");processMessageLog0()}
1014 +function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(61,"Limpar log de eventos?"),setDialogMode(1,"Registro de Eventos",3,ClearLogEx))}function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("Registro de Eventos","N\u00e3o foi poss\u00edvel limpar, Erro: "+d):PullEventLog()})}
1015 +function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("Tempo",c.Time.toLocaleString());a+=addHtmlValue("Fonte",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("Descri\u00e7\u00e3o",c.Desc);a+=MoreStart();a+=addHtmlValue("Endere\u00e7o do dispositivo",c.DeviceAddress);a+=addHtmlValue("Entidade",c.Entity);a+=addHtmlValue("Inst\u00e2ncia da entidade",c.EntityInstance);var d="",e;for(e in c.EventData)0<d.length&&(d+=","),d+=c.EventData[e];
1016 a+=addHtmlValue("Dados",d);a+=addHtmlValue("Deslocamento",c.EventOffset);a+=addHtmlValue("Tipo de sensor",c.EventSensorType);a+=addHtmlValue("Gravidade",c.EventSeverity);a+=addHtmlValue("Tipo de fonte",c.EventSourceType);a+=addHtmlValue("Tipo",c.EventType);a+=addHtmlValue("N\u00famero do sensor",c.SensorNumber);a+=MoreEnd();a+="</div>";messagebox(format("Detalhes do evento {{}}",b+1),a)}}
1017 function eventFilter(){var b=Q("eventFilter").value.toLowerCase(),c;for(c in eventmessages)QV("xamtevent"+c,""==b||0<=eventmessages[c].Desc.toLowerCase().indexOf(b)||0<=eventmessages[c].EntityStr.toLowerCase().indexOf(b))}var subscriptionsFilters=null,subscriptionsListeners=null;
1018 function PullEventSubscriptions(){null==subscriptionsFilters&&amtstack.Enum("CIM_FilterCollection",processEventSubscriptions0);amtstack.BatchEnum(null,["CIM_ListenerDestination","CIM_FilterCollectionSubscription"],processEventSubscriptions1)}function processEventSubscriptions0(b,c,a,d){408!=d&&400!=d&&(d&&errcheck(d,b)||(subscriptionsFilters=a))}
1019 -function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gerenciar assinantes de eventos.<br><br>";for(var g in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[g].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[g],
1020 -b+='<div class=itemBar onclick="showSubscriptionDetails('+g+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>Nenhuma assinatura encontrada.</i></div><br>");g="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(g+=AddButton("Nova assinatura","newSubscriptionButton()"));b+="<br><td class=r1>"+
1021 -TableEnd(g+"</div>");QH(56,b)}}var subscriptionDeliveryModes={2:"Empurrar",3:"Empurre com ACK",4:"Eventos",5:"Puxar"};
1019 +function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gerenciar assinantes de eventos.<br><br>";for(var e in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[e].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[e],
1020 +b+='<div class=itemBar onclick="showSubscriptionDetails('+e+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>Nenhuma assinatura encontrada.</i></div><br>");e="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(e+=AddButton("Nova assinatura","newSubscriptionButton()"));b+="<br><td class=r1>"+
1021 +TableEnd(e+"</div>");QH(57,b)}}var subscriptionDeliveryModes={2:"Empurrar",3:"Empurre com ACK",4:"Eventos",5:"Puxar"};
1022 function showSubscriptionDetails(b){if(!xxdialogMode){var c=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[b].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),a=subscriptionsListeners.CIM_ListenerDestination.responses[b],d;d="<div style=text-align:left>"+addHtmlValue("Destino",a.Destination);d+=addHtmlValue("Filtro",c);d+=addHtmlValue("Modo de entrega",subscriptionDeliveryModes[a.DeliveryMode]);setDialogMode(11,"Inscri\u00e7\u00e3o"+(b+1),xxAccountAdminName?
1023 5:1,deleteSubscriptionButton,d+"</div>",b)}}
1024 function deleteSubscriptionButton(b,c){2==b&&amtstack.UnSubscribe("CIM_FilterCollectionSubscription",PullEventSubscriptions,null,1,{Filter:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_FilterCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+subscriptionsListeners.CIM_FilterCollectionSubscription.responses[c].Filter.ReferenceParameters.SelectorSet.Selector.Value+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference>",
@@ -1026,93 +1026,93 @@ Handler:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/a
1026 function newSubscriptionButton(){if(!xxdialogMode&&null!=subscriptionsFilters){var b;b="<div style=height:26px;margin-top:4px><select id=subtype style=float:right;width:260px><option value=Push>Empurrar</option><option value=PushWithAck>Empurre com ACK</option></select><div style=padding-top:4px>Tipo</div></div><div style=height:26px;margin-top:4px><select id=subfilter style=float:right;width:260px>";for(var c in subscriptionsFilters)b+='<option value="'+subscriptionsFilters[c].InstanceID+'">'+subscriptionsFilters[c].CollectionName.substring(13)+
1027 "</option>";b+="</select><div style=padding-top:4px>Filtro</div></div>";b+='<div style=height:26px;margin-top:4px><input id=suburl style=float:right;width:260px maxlength=253 onkeyup=newSubscriptionUpdate() value="http://"><div style=padding-top:4px>URL</div></div>';b+="<div style=height:26px;margin-top:4px><select id=subauth style=float:right;width:260px onchange=newSubscriptionUpdate()><option value=0>Nenhum</option><option value=1>Digerir</option></select><div style=padding-top:4px>Autentica\u00e7\u00e3o</div></div>";
1028 b+="<div style=height:26px;margin-top:4px id=subxuser><input id=subuser style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>Nome do usu\u00e1rio</div></div>";b+="<div style=height:26px;margin-top:4px id=subxpass><input id=subpass style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>Senha</div></div>";b+="<div style=height:26px;margin-top:4px><input id=subargs style=float:right;width:260px maxlength=128><div style=padding-top:4px>Argumentos</div></div>";
1029 -setDialogMode(11,"Adicionar assinatura de evento",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c54",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1029 +setDialogMode(11,"Adicionar assinatura de evento",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c106",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1030 function newSubscriptionButtonOk(){var b=0==Q("subuser").value.length?void 0:Q("subuser").value,c=0==Q("subpass").value.length?void 0:Q("subpass").value;amtstack.Subscribe("CIM_FilterCollection",Q("subtype").value,Q("suburl").value,newSubscriptionButtonOk2,null,1,{InstanceID:Q("subfilter").value},0<Q("subargs").value.length?Q("subargs").value:null,b,c)}function newSubscriptionButtonOk2(b,c,a,d){200==d&&PullEventSubscriptions()}
1031 function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AMT_AuditLog",processAuditLog0))}var auditLog=null,auditLogEnabledStates="Desconhecido;De outros;ativado;Desativado;Desligando;N\u00e3o aplic\u00e1vel;Ativado, mas offline;Em teste;Diferido;Quiesce;Iniciando".split(";");
1032 -function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Desativado":"ativado",c&2&&(b+="Bloqueado"),c&4&&(b+=", Quase cheio"),c&8&&(b+=", Cheio"),c&16&&(b+=", NoKey"),c="<h1>Configura\u00e7\u00f5es do log de auditoria</h1>"+TableStart(),c+=TableEntry("Estado",b),c+=TableEntry("Armazenamento",a[0].CurrentNumberOfRecords+" registro (s),"+a[0].PercentageFree+"% livre"),c+=TableEntry("Pol\u00edtica de substitui\u00e7\u00e3o",2==a[0].OverwritePolicy?"Envolt\u00f3rios quando cheios":
1033 -"Nunca substitui"),c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1034 -function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filtro" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Salve \ue051...","SaveAuditLog()")+AddButton("Log clara","ClearAuditLog()"))+"<br>");if(0==c.length)d="Nenhum evento de log de auditoria encontrado.";else{var g=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Tempo</b><td class=r1 style=width:260px><b>Iniciador</b><td class=r1><b>Action</b>";
1035 -for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;g++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1036 -minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==g?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Registro de auditoria da Intel AMT",auditLog)}
1037 -function ClearAuditLog(b){QH(60,"Limpar log de auditoria?");setDialogMode(1,"Log de auditoria",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1032 +function processAuditLog0(b,c,a,d){200==d&&a&&0<a.length&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Desativado":"ativado",c&2&&(b+="Bloqueado"),c&4&&(b+=", Quase cheio"),c&8&&(b+=", Cheio"),c&16&&(b+=", NoKey"),c="<h1>Configura\u00e7\u00f5es do log de auditoria</h1>"+TableStart(),c+=TableEntry("Estado",b),c+=TableEntry("Armazenamento",a[0].CurrentNumberOfRecords+" registro (s),"+a[0].PercentageFree+"% livre"),c+=TableEntry("Pol\u00edtica de substitui\u00e7\u00e3o",2==a[0].OverwritePolicy?"Envolt\u00f3rios quando cheios":
1033 +"Nunca substitui"),c+=TableEnd(),QH(50,c),amtstack.GetAuditLog(processAuditLog1))}
1034 +function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filtro" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Salve \ue051...","SaveAuditLog()")+AddButton("Log clara","ClearAuditLog()"))+"<br>");if(0==c.length)d="Nenhum evento de log de auditoria encontrado.";else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Tempo</b><td class=r1 style=width:260px><b>Iniciador</b><td class=r1><b>Action</b>";
1035 +for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1036 +minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(51,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Registro de auditoria da Intel AMT",auditLog)}
1037 +function ClearAuditLog(b){QH(61,"Limpar log de auditoria?");setDialogMode(1,"Log de auditoria",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1038 function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("Log de auditoria","Erro: "+d)}
1039 -function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Tempo",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Iniciador",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Endere\u00e7o",a.NetAddress));d+=addHtmlValue("Inscri\u00e7\u00e3o",a.AuditApp);d+=addHtmlValue("Evento",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Dados estendidos",a.ExStr);else if(0<a.Ex.length){var g="";for(c in a.Ex)0<g.length&&(g+=","),g+=a.Ex.charCodeAt(c);
1040 -""!=g&&(d+=addHtmlValue("Valores de dados",g));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("Data String",a.Ex.substring(2)))}messagebox("Evento de auditoria #"+(b+1)+" Detalhes",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1039 +function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Tempo",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Iniciador",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Endere\u00e7o",a.NetAddress));d+=addHtmlValue("Inscri\u00e7\u00e3o",a.AuditApp);d+=addHtmlValue("Evento",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Dados estendidos",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=","),e+=a.Ex.charCodeAt(c);
1040 +""!=e&&(d+=addHtmlValue("Valores de dados",e));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("Data String",a.Ex.substring(2)))}messagebox("Evento de auditoria #"+(b+1)+" Detalhes",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1041 function PullCertificates(){amtstack.BatchEnum(null,["AMT_PublicKeyCertificate","AMT_PublicPrivateKeyPair","AMT_TLSSettingData","AMT_TLSCredentialContext"],processCerts1)}
1042 -function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var g in xxCertificates)xxCertificates[g].InstanceID==b&&(xxTlsCurrentCert=
1043 -g)}for(g in xxCertificates)xxCertificates[g].TrustedRootCertficate=1==xxCertificates[g].TrustedRootCertficate,xxCertificates[g].X509Certificate=window.atob(xxCertificates[g].X509Certificate),xxCertificates[g].XIssuer=parseCertName(xxCertificates[g].Issuer),xxCertificates[g].XSubject=parseCertName(xxCertificates[g].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1042 +function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var e in xxCertificates)xxCertificates[e].InstanceID==b&&(xxTlsCurrentCert=
1043 +e)}for(e in xxCertificates)xxCertificates[e].TrustedRootCertficate=1==xxCertificates[e].TrustedRootCertficate,xxCertificates[e].X509Certificate=window.atob(xxCertificates[e].X509Certificate),xxCertificates[e].XIssuer=parseCertName(xxCertificates[e].Issuer),xxCertificates[e].XSubject=parseCertName(xxCertificates[e].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1044 function parseCertName(b){var c={},a=b.split(","),d;for(d in a)b=a[d].indexOf("="),c[a[d].substring(0,b)]=a[d].substring(b+1);return c}
1045 function getTlsSecurityState(b){if(0==xxTlsSettings[b].Enabled)return"Desativado";var c=(1==xxTlsSettings[b].MutualAuthentication?"TLS de autentica\u00e7\u00e3o m\u00fatua":"TLS de autentica\u00e7\u00e3o do servidor")+(1==xxTlsSettings[b].AcceptNonSecureConnections?" e n\u00e3o TLS":"");1==xxTlsSettings[b].MutualAuthentication&&xxTlsSettings[b].TrustedCN&&(b=MakeToArray(xxTlsSettings[b].TrustedCN),0<b.length&&(c+=", "+(1<b.length?"Trusted names":"Trusted name")+": "+b.join(", ")+"."));return c}
1046 function updateCertificates(){if(null!=xxCertificates){var b="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,c=1-b,a=TableStart(),a=a+TableEntry("Seguran\u00e7a TLS remota",addLinkConditional(getTlsSecurityState(c),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEntry("Seguran\u00e7a TLS local",addLinkConditional(getTlsSecurityState(b),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEnd(),a=a+("<br>"+TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gerenciar certificados Intel&reg; AMT para este computador.<br><br>");
1047 if(0==xxCertificates.length&&0==xxCertPrivateKeys.length)a+="<div style=padding-left:15px><br><i>Nenhum certificado encontrado.</i></div><br>";else{for(var d in xxCertificates)b="",xxCertificates[d].TrustedRootCertficate&&(b="Raiz confi\u00e1vel"),xxCertificates[d].XPrivateKey&&(b=", Chave privada"),d==xxTlsCurrentCert&&(b+=", Certificado TLS"),a+="<div class=itemBar onclick=showCertDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(xxCertificates[d].XSubject.CN)+"</b><i>"+b+"</i></div></div>";
1048 -for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>Par de chaves privadas n\u00e3o atribu\u00eddas #"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("Adicionar certificado ...","addCertButton()")+AddButton("Emitir certificado ...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(51,a)}}
1048 +for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>Par de chaves privadas n\u00e3o atribu\u00eddas #"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("Adicionar certificado ...","addCertButton()")+AddButton("Emitir certificado ...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(52,a)}}
1049 function showKeyPairDetails(b){setDialogMode(11,"Par de chaves #"+b,5,function(c){2==c&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertPrivateKeys[b].InstanceID},PullCertificates,0,1)},"Este \u00e9 um par de chaves de certificado p\u00fablico / privado que n\u00e3o pertence a nenhum certificado. Esta entrada deve ser tempor\u00e1ria.")}
1050 var xxCertSubjectNames={CN:"Nome comum",O:"Organiza\u00e7\u00e3o",OU:"Unidade organizacional",S:"Estado / Prov\u00edncia",ST:"Estado / Prov\u00edncia",L:"Localidade",C:"Pa\u00eds",SN:"Sobrenome",GN:"Nome dado"};
1051 function showCertDetails(b){if(!xxdialogMode){var c=xxCertificates[b],a;a="<br>"+addHtmlValue("Certificado",c.X509Certificate.length+" bytes,<a style=cursor:pointer;color:blue onclick=downloadCert("+b+")>Baixar</a>");a+=addHtmlValue("Raiz confi\u00e1vel",c.TrustedRootCertficate?"sim":"N\u00e3o");0==c.TrustedRootCertficate&&c.XPrivateKey&&(a+=addHtmlValue("Chave privada","Presente"));a+='<br><div style="border-bottom:1px solid gray"><i>Assunto do certificado</i></div><br>';for(var d in c.XSubject)c.XSubject[d]&&
1052 (a+=addHtmlValue(xxCertSubjectNames[d]?xxCertSubjectNames[d]:d,EscapeHtml(c.XSubject[d])));a+='<br><div style="border-bottom:1px solid gray"><i>Certificado do emissor</i></div><br>';for(d in c.XIssuer)c.XIssuer[d]&&(a+=addHtmlValue(xxCertSubjectNames[d]?xxCertSubjectNames[d]:d,EscapeHtml(c.XIssuer[d])));setDialogMode(11,"Certificado -"+EscapeHtml(c.XSubject.CN),5,function(a){2==a&&(xxCertificates[b].XPrivateKey&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertificates[b].XPrivateKey.InstanceID},
1053 function(){},0,1),amtstack.Delete("AMT_PublicKeyCertificate",xxCertificates[b],certificateRemoved,0,1))},a)}}function downloadCert(b){saveAs(data2blob(xxCertificates[b].X509Certificate),xxCertificates[b].XSubject.CN+".cer")}function cert_FileSelectHandler(b){haltEvent(b);1==b.dataTransfer.files.length&&(b.dataTransfer.files[0].name.toLowerCase().endsWith(".p12")?issueCertButton(b.dataTransfer.files):addCertButton(b.dataTransfer.files))}var xxDragDropCertFiles=null;
1054 function addCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen onchange=addCertButtonUpdate() type=file style=float:right;width:260px accept=".cer,.pem">',xxDragDropCertFiles&&(b='<input style=float:right;width:260px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b="<div style=height:10px></div>"+("<div style=height:26px;margin-top:4px>"+b+"<div style=padding-top:4px>Arquivo de certificado</div></div>")+"<div style=height:26px;margin-top:4px><select id=certtype style=float:right;width:260px><option value=1>Certificado raiz confi\u00e1vel</option><option value=0>Certificado de cadeia</option></select><div style=padding-top:4px>Tipo de certificado</div></div>",
1055 -setDialogMode(11,"Adicionar certificado",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c54",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1055 +setDialogMode(11,"Adicionar certificado",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c106",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1056 function addCertButtonOk2(b){b=b.target.result;var c=b.indexOf("-----BEGIN CERTIFICATE-----");0<=c?(b=b.substring(c+27),c=b.indexOf("-----END CERTIFICATE-----"),0<=c&&(b=b.substring(0,c)),b=b.replace(/\r\n/g,"")):b=btoa(b);1==getSelectElement("certtype").value?amtstack.AMT_PublicKeyManagementService_AddTrustedRootCertificate(b,certificateAdded):amtstack.AMT_PublicKeyManagementService_AddCertificate(b,certificateAdded)}
1057 function issueCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen type=file style=float:right;width:230px onchange=issueCertButtonUpdate() accept=".p12">',xxDragDropCertFiles&&(b='<input style=float:right;width:230px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b=""+("<div styleheight:26px;margin-top:14px>"+b+"<div style=padding-top:4px>Certificate file</div></div>")+"<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certopenpass type=password autocomplete=off style=float:right;width:230px><div style=padding-top:4px>Senha do certificado</div></div>",
1058 b+='<br><div style="border-bottom:1px solid gray"><i>Certificado Intel&reg; AMT</i></div>',b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certcn style=float:right;width:230px><div style=padding-top:4px>Nome comum</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certo style=float:right;width:230px><div style=padding-top:4px>Organiza\u00e7\u00e3o</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certst style=float:right;width:230px><div style=padding-top:4px>Estado / Prov\u00edncia</div></div>",
1059 b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certc style=float:right;width:230px><div style=padding-top:4px>Pa\u00eds</div></div>",b+='<div>Usos do certificado</div><ul 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">',b+="<li><label><input type=checkbox id=d11_cu4 checked>Servidor TLS (HTTPS)</label></li>",b+="<li><label><input type=checkbox id=d11_cu5>Cliente TLS (HTTPS)</label></li>",
1060 b+="<li><label><input type=checkbox id=d11_cu6>Prote\u00e7\u00e3o de Email</label></li>",b+="<li><label><input type=checkbox id=d11_cu7>Assinatura de c\u00f3digo</label></li>",b+="<li><label><input type=checkbox id=d11_cu8>Carimbo de hora</label></li>",b+="</ul>",setDialogMode(11,"Certificado de Emiss\u00e3o",3,issueCertButtonOk,b),issueCertButtonUpdate())}
1061 -function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c54",c)}
1061 +function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c106",c)}
1062 function issueCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length?(b=new FileReader,b.onload=issueCertButtonOk2,b.readAsBinaryString(c[0])):issueCertButtonOk3(null)}function issueCertButtonOk2(b){0==amtcert_loadP12File(b.target.result,Q("certopenpass").value,issueCertButtonOk3)&&messagebox("Certificado de Emiss\u00e3o","N\u00e3o foi poss\u00edvel descriptografar / decodificar o certificado.")}
1063 function issueCertButtonOk3(b,c,a){xxCaPrivateKey=b;xxCaSubjectAttributes=c;amtstack.AMT_PublicKeyManagementService_GenerateKeyPair(0,2048,GenerateKeyPairResponse)}
1064 function GenerateKeyPairResponse(b,c,a,d){200!=d?messagebox("Certificado de Emiss\u00e3o","Falha ao gerar o par de chaves. Estado: "+d):0!=a.Body.ReturnValue?messagebox("Certificado de Emiss\u00e3o","Falha ao gerar o par de chaves,"+a.Body.ReturnValueStr):amtstack.Enum("AMT_PublicPrivateKeyPair",GenerateKeyPairResponse2,a.Body.KeyPair.ReferenceParameters.SelectorSet.Selector.Value)}
1065 -function GenerateKeyPairResponse2(b,c,a,d,g){if(200!=d)messagebox("Certificado de Emiss\u00e3o","Falha ao gerar o par de chaves. Estado: "+d);else{b=null;for(var v in a)a[v].InstanceID==g&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};g={CN:"Certificado raiz n\u00e3o confi\u00e1vel"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in g={},xxCaSubjectAttributes)g[xxCaSubjectAttributes[v].shortName]=
1066 -xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,g,v);null==v?messagebox("Certificado de Emiss\u00e3o","N\u00e3o foi poss\u00edvel assinar o certificado."):(v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,
1065 +function GenerateKeyPairResponse2(b,c,a,d,e){if(200!=d)messagebox("Certificado de Emiss\u00e3o","Falha ao gerar o par de chaves. Estado: "+d);else{b=null;for(var v in a)a[v].InstanceID==e&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};e={CN:"Certificado raiz n\u00e3o confi\u00e1vel"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in e={},xxCaSubjectAttributes)e[xxCaSubjectAttributes[v].shortName]=
1066 +xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,e,v);null==v?messagebox("Certificado de Emiss\u00e3o","N\u00e3o foi poss\u00edvel assinar o certificado."):(v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,
1067 v.length-25),GenerateKeyPairResponse4))}}function GenerateKeyPairResponse4(b,c,a,d){200!=d?messagebox("Certificado de Emiss\u00e3o","Falha ao gerar o par de chaves. Estado: "+d):PullCertificates()}function certificateAdded(b,c,a,d){200!=d||0!=a.Body.ReturnValue?messagebox("Adicionar certificado","N\u00e3o foi poss\u00edvel adicionar o certificado, erro"+(200!=d?d:a.Body.ReturnValueStr)):PullCertificates()}
1068 function certificateRemoved(b,c,a,d){200!=d?messagebox("Remover certificado","N\u00e3o foi poss\u00edvel remover o certificado, erro"+d):PullCertificates()}function getInputElement(b){var c=document.getElementsByTagName("input");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}function getSelectElement(b){var c=document.getElementsByTagName("select");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}
1069 -function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>Sem certificado, TLS desativado</option>";for(var c in xxCertificates)0!=xxCertificates[c].TrustedRootCertficate||!xxCertificates[c].XPrivateKey||null!=xxTlsCurrentCert&&xxTlsCurrentCert!=c||(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>Certificado</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1069 +function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>Sem certificado, TLS desativado</option>";for(var c in xxCertificates)0==xxCertificates[c].TrustedRootCertficate&&xxCertificates[c].XPrivateKey&&(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>Certificado</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1070 b+="<option value=2>Mutual-auth TLS only</option><option value=3>Mutual-auth, non-TLS allowed</option>";b+='</select><div style=padding-top:4px>Security</div></div><div style=height:26px id=d11rcn title="Lista separada por v\u00edrgulas de nomes comuns de certificados que ter\u00e3o permiss\u00e3o para se conectar remotamente."><input id=d11_rcn style=float:right;width:260px onkeyup=showSetTlsSecurityDlgUpdate() placeholder="nome1, nome2"><div style=padding-top:4px>CN remoto</div></div>';setDialogMode(11,
1071 "Configura\u00e7\u00f5es TLS",3,showSetTlsSecurityDlgOk,b);if(0==xxTLSCredentialContext.length||0==xxTlsSettings[0].Enabled||0==xxTlsSettings[1].Enabled)getSelectElement("tlscert").value=-1;else for(c in b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value,xxCertificates)xxCertificates[c].InstanceID==b&&(getSelectElement("tlscert").value=c);c=1-("Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1);getSelectElement("tlsremote").value=(1==xxTlsSettings[c].MutualAuthentication?
1072 -2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c54",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1072 +2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c106",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1073 function showSetTlsSecurityDlgOk(){var b=getSelectElement("tlscert").value,c=getSelectElement("tlsremote").value,a=Clone(xxTlsSettings);setTlsSecurityPendingCalls=0;setTlsSecurityDeleteCredentialContext=null;if(-1!=b){if(0<xxTLSCredentialContext.length){var d=Clone(xxTLSCredentialContext[0]);d.ElementInContext.ReferenceParameters.SelectorSet.Selector.Value=xxCertificates[b].InstanceID;amtstack.Put("AMT_TLSCredentialContext",d,setTlsSecurityResponse,0,1)}else amtstack.Create("AMT_TLSCredentialContext",
1074 {ElementInContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[b].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",ElementProvidingContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_TLSProtocolEndpointCollection")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters>'},
1075 -setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,g=1-d;a[g].Enabled=-1!=b;a[g].MutualAuthentication=2<=c;a[g].AcceptNonSecureConnections=1==c%2;a[g].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1075 +setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,e=1-d;a[e].Enabled=-1!=b;a[e].MutualAuthentication=2<=c;a[e].AcceptNonSecureConnections=1==c%2;a[e].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1076 b,c,d){200!=d?messagebox("","Falha ao definir a hora, status ="+d):0!=c.Body.ReturnValue?messagebox("","Falha ao definir hora, erro: "+c.Body.ReturnValueStr):(a=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(c.Body.Ta0,a,a,function(){setTlsSecurityResponse()}))}));setTlsSecurityPendingCalls+=2;amtstack.Put("AMT_TLSSettingData",a[0],setTlsSecurityResponse,0,1,a[0]);amtstack.Put("AMT_TLSSettingData",a[1],setTlsSecurityResponse,0,1,a[1]);statusbox("Configura\u00e7\u00f5es TLS",
1077 "Aplicando novas configura\u00e7\u00f5es de seguran\u00e7a ...")}function splitDomains(b){b=b.split(",");if(0!=b.length){for(var c in b)if(b[c]=b[c].trim(),0<=b[c].indexOf(" ")||0==b[c].length)return;if(!(4<b.length))return b}}
1078 function setTlsSecurityResponse(b,c,a,d){if(b){if(200!=d){messagebox("","Falha ao definir a seguran\u00e7a TLS, status ="+d);return}if(a.Body.ReturnValueStr&&!methodcheck(a))return}0==--setTlsSecurityPendingCalls&&amtstack.AMT_SetupAndConfigurationService_CommitChanges(null,setTlsSecurityResponse2)}
1079 function setTlsSecurityResponse2(b,c,a,d){200!=d?messagebox("","Falha ao definir a seguran\u00e7a TLS, status ="+d):0!=a.Body.ReturnValue?messagebox("","Falha ao definir a seguran\u00e7a TLS, erro: "+a.Body.ReturnValueStr):setTimeout(setTlsSecurityResponse3,2E3)}
1080 function setTlsSecurityResponse3(){null!=setTlsSecurityDeleteCredentialContext&&amtstack.Delete("AMT_TLSCredentialContext",setTlsSecurityDeleteCredentialContext,function(){});PullCertificates();setDialogMode();amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}var xxWatchdog=null;
1081 function PullWatchdog(){amtstack.BatchEnum(null,["*AMT_AgentPresenceCapabilities","AMT_AgentPresenceWatchdog","AMT_AgentPresenceWatchdogAction","AMT_StateTransitionCondition","CIM_ConcreteDependency"],PullWatchdogResponse)}
1082 -function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var g in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[g],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1082 +function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var e in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[e],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1083 "@Name","PolicyConditionName").Value,d=getItem(xxWatchdog.AMT_AgentPresenceWatchdog.responses,"DeviceID",d),a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,"PolicyConditionName",a),d.transitions||(d.transitions=[]),d.transitions.push(a)),c&&"AMT_StateTransitionCondition"==c.Value&&(a=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyConditionName").Value,b=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyActionName").Value,a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,
1084 "PolicyConditionName",a),b=getItem(xxWatchdog.AMT_AgentPresenceWatchdogAction.responses,"PolicyActionName",b),a.actions||(a.actions=[]),a.actions.push(b));updateWatchdog();QV("go19",!0)}}var watchdogEnabledStates="Desconhecido;De outros;ativado;Desativado;Desligando;N\u00e3o aplic\u00e1vel;Ativado, mas offline;Em teste;Diferido;Quiesce;Iniciando".split(";"),watchdogMonitoredEntity="Desconhecido;De outros;Sistema operacional;Processo de inicializa\u00e7\u00e3o do sistema operacional;Processo de desligamento do sistema operacional;Processo de inicializa\u00e7\u00e3o do firmware;Processo de inicializa\u00e7\u00e3o do BIOS;Inscri\u00e7\u00e3o;Processador de servi\u00e7o".split(";");
1085 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("C\u00e3es de guarda m\u00e1ximos",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" assistir cachorros");b+=TableEntry("Total de a\u00e7\u00f5es m\u00e1ximas",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" a\u00e7\u00f5es");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Gerenciar os c\u00e3es de guarda de presen\u00e7a do agente Intel&reg; AMT.<br><br>";
1086 if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>Nenhum c\u00e3o de guarda de presen\u00e7a do agente encontrado.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));
1087 -b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="Adicionar a\u00e7\u00e3o ..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="Excluir a\u00e7\u00f5es ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",g;for(g in a.transitions){var v=a.transitions[g];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+
1088 -" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : Evento a ser registrado")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Adicionar c\u00e3o de guarda ...","AddWatchdog()"));b+="<br>";QH(54,b)}}
1087 +b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="Adicionar a\u00e7\u00e3o ..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="Excluir a\u00e7\u00f5es ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+
1088 +" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : Evento a ser registrado")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Adicionar c\u00e3o de guarda ...","AddWatchdog()"));b+="<br>";QH(55,b)}}
1089 function getWatchdogTransitionStr(b){if(31==b)return"Qualquer Estado";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1090 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("Descri\u00e7\u00e3o",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("Entidade monitorada",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("Estado atual",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("Estado ativado",watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("Intervalo de inicializa\u00e7\u00e3o",
1091 b.StartupInterval+" segundo (s)");c+=addHtmlValue("Intervalo de tempo limite",b.TimeoutInterval+" segundo (s)");setDialogMode(11,format("C\u00e3o de guarda {0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
1092 function AddWatchdog(){var b;b="<div style=height:26px;margin-top:4px><input id=wgname style=float:right;width:240px maxlength=16 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Nome</div></div>"+('<div style=height:26px;margin-top:4px><input id=wgguid style=float:right;width:240px maxlength=36 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px title="Gere DeviceID aleat\u00f3rio">'+addLink("ID de dispositivo","GenerateWatchdogGuid()")+"</div></div>");b+="<div style=height:26px;margin-top:4px><input id=wgstart style=float:right;width:240px maxlength=8 placeholder=3600 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Inicializa\u00e7\u00e3o (segundos)</div></div>";
1093 b+="<div style=height:26px;margin-top:4px><input id=wgtimeout style=float:right;width:240px maxlength=8 placeholder=60 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>Tempo limite (segundos)</div></div>";setDialogMode(11,"Adicionar c\u00e3o de guarda",3,AddWatchdogOk,b);AddWatchdogUpdate()}function GenerateWatchdogGuid(){var b,c="";for(b=0;16>b;b++)c+=String.fromCharCode(random(255));Q("wgguid").value=guidToStr(rstr2hex(c));AddWatchdogUpdate()}
1094 -function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var g=a.charCodeAt(d);45!=g&&(48<=g&&57>=g||97<=g&&102>=g?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1094 +function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var e=a.charCodeAt(d);45!=e&&(48<=e&&57>=e||97<=e&&102>=e?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1095 function AddWatchdogOk(){var b=Q("wgtimeout").value,c=Q("wgstart").value;""==b&&(b=60);""==c&&(c=3600);b={CreationClassName:0,DeviceID:btoa(hex2rstr(guidToStr(Q("wgguid").value.replace(/-/g,"")).replace(/-/g,""))),StartupInterval:c,SystemCreationClassName:0,SystemName:0,TimeoutInterval:b,MonitoredEntityDescription:Q("wgname").value};amtstack.Create("AMT_AgentPresenceWatchdog",b,AddWatchdogOk2)}
1096 function AddWatchdogOk2(b,c,a,d){200!=d?messagebox("C\u00e3o de guarda","N\u00e3o foi poss\u00edvel adicionar o watchdog, erro #"+d):PullWatchdog()}
1097 function addWatchdogAction(b,c){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d;d="<table><td style=width:180px>De<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsa"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";d+="<td>Para<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsb"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";setDialogMode(11,"Adicionar a\u00e7\u00e3o Watchdog",
1098 3,addWatchdogActionOk,d+"</table><br>Executar a a\u00e7\u00e3o<br><input id=wgsevent type=checkbox checked onclick=addWatchdogActionUpdate()>Gravar no log de eventos<br />",a);addWatchdogActionUpdate();haltEvent(b)}function addWatchdogActionUpdate(){var b=0,c=0,a;for(a in amtstack.WatchdogCurrentStates)1==Q("wgsa"+a).checked&&(b+=parseInt(a)),1==Q("wgsb"+a).checked&&(c+=parseInt(a));QE("dlgOkButton",0<b&&0<c&&1==Q("wgsevent").checked)}
1099 -function addWatchdogActionOk(b,c){var a=0,d=0,g;for(g in amtstack.WatchdogCurrentStates)1==Q("wgsa"+g).checked&&(a+=parseInt(g)),1==Q("wgsb"+g).checked&&(d+=parseInt(g));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("A\u00e7\u00e3o de Watchdog","N\u00e3o foi poss\u00edvel adicionar a a\u00e7\u00e3o do watchdog, erro #"+d):PullWatchdog()}
1099 +function addWatchdogActionOk(b,c){var a=0,d=0,e;for(e in amtstack.WatchdogCurrentStates)1==Q("wgsa"+e).checked&&(a+=parseInt(e)),1==Q("wgsb"+e).checked&&(d+=parseInt(e));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("A\u00e7\u00e3o de Watchdog","N\u00e3o foi poss\u00edvel adicionar a a\u00e7\u00e3o do watchdog, erro #"+d):PullWatchdog()}
1100 function deleteWatchdogActions(b,c){setDialogMode(11,"Excluir a\u00e7\u00f5es do Watchdog",3,deleteWatchdogActionsOk,"Excluir todas as a\u00e7\u00f5es deste watchdog?",xxWatchdog.AMT_AgentPresenceWatchdog.responses[c]);haltEvent(b)}function deleteWatchdogActionsOk(b,c){amtstack.AMT_AgentPresenceWatchdog_DeleteAllActions(deleteWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
1101 function deleteWatchdogActionResponse(b,c,a,d){200!=d?messagebox("A\u00e7\u00e3o de Watchdog","N\u00e3o foi poss\u00edvel remover as a\u00e7\u00f5es do watchdog, erro #"+d):PullWatchdog()}
1102 var xxSystemDefense=null,xxSystemDefenceLinkedPolicy={},xxUpdatingDefenseStats=!1,xxFilterStatistics=[{},{}],xxFilterStatisticsTimer=null,xxFilterStatisticsTimerActive=!1,xxSystemDefenceFilterEthernetTypes={2048:"Todos os pacotes IP",2054:"Todos os pacotes ARP"},xxSystemDefenceFilterIPTypes={4:"IPv4",6:"IPv6"},xxSystemDefenceFilterDesc={0:"Permitir, Contar",1:"Drop, Count",2:"Taxa limite",3:"Permitir",4:"Solta"},xxSystemDefenceFilters={HdrProtocolID:1,HdrDestAddress:2,HdrDestMask:2,HdrSrcAddress:2,
1103 HdrSrcMask:2,HdrSrcPortStart:1,HdrSrcPortEnd:1,HdrDestPortStart:1,HdrDestPortEnd:1,HdrSrcAddressEndOfRange:2,"HdrDestAddressEndOfRange ":2,TCPFlagsOn:3,TCPFlagsOff:3};function PullSystemDefense(){amtFirstPull|=4;amtstack.BatchEnum(null,["AMT_SystemDefensePolicy","AMT_NetworkPortSystemDefensePolicy","AMT_Hdr8021Filter","AMT_IPHeadersFilter","AMT_NetworkFilter"],PullSystemDefenseResponse)}
1104 function PullSystemDefenseResponse(b,c,a,d){200==d&&(xxSystemDefense=a,updateSystemDefense(),QV("go18",!0),urlvars.norefresh&&UpdateDefenseStats())}
1105 function updateSystemDefense(){if(null!=xxSystemDefense){var b="";xxSystemDefenceLinkedPolicy={};for(var c in xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses){var a=xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses[c],d=+getItem(a.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value.substring(27),a=getItem(xxSystemDefense.AMT_SystemDefensePolicy.responses,"InstanceID",a.Dependent.ReferenceParameters.SelectorSet.Selector.Value);xxSystemDefenceLinkedPolicy[d]=
1106 -a}b+=TableStart();c="<i>Nenhum</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("Pol\u00edtica com fio padr\u00e3o",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],g;for(g in a)d=a[g],d=1==d?d+" pacote":d+" pacotes",b+=TableEntry((0==c?"Com fio":"Sem fio")+g,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>Gerenciar pol\u00edticas de defesa do sistema Intel&reg; AMT.<br><br>";
1106 +a}b+=TableStart();c="<i>Nenhum</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("Pol\u00edtica com fio padr\u00e3o",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],e;for(e in a)d=a[e],d=1==d?d+" pacote":d+" pacotes",b+=TableEntry((0==c?"Com fio":"Sem fio")+e,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>Gerenciar pol\u00edticas de defesa do sistema Intel&reg; AMT.<br><br>";
1107 if(0==xxSystemDefense.AMT_SystemDefensePolicy.responses.length)b+="<div style=padding-left:15px><i>Nenhuma pol\u00edtica de defesa do sistema encontrada.</i></div><br>";else for(c in xxSystemDefense.AMT_SystemDefensePolicy.responses)a=xxSystemDefense.AMT_SystemDefensePolicy.responses[c],d="",a.FilterCreationHandles&&(a.FilterCreationHandles=MakeToArray(a.FilterCreationHandles),d=a.FilterCreationHandles.length,d=", "+d+" filter"+(1<d?"s":"")),b+="<div class=itemBar onclick=showPolicyDetails("+c+")><div style=padding-top:3px><b>"+
1108 EscapeHtml(a.PolicyName)+"</b>"+d+"</div></div>";b+="<tr><td class=r1 style=padding-left:15px><br>Gerenciar filtros de defesa do sistema Intel&reg; AMT.<br><br>";if(0==xxSystemDefense.AMT_Hdr8021Filter.responses.length&&0==xxSystemDefense.AMT_IPHeadersFilter.responses.length)b+="<div style=padding-left:15px><i>Nenhum filtro de defesa do sistema encontrado.</i></div><br>";else{for(c in xxSystemDefense.AMT_Hdr8021Filter.responses)a=xxSystemDefense.AMT_Hdr8021Filter.responses[c],(d=xxSystemDefenceFilterEthernetTypes[a.HdrProtocolID8021])||
1109 (d="All Ethernet Protocol"+a.HdrProtocolID8021),d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile],2==a.FilterProfile&&(d+=" \u00e0s"+a.FilterProfileData+" pacote / s"),1==a.ActionEventOnMatch&&(d+=", Evento em jogo"),b+="<div class=itemBar onclick=showFilterDetails(0,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>";for(c in xxSystemDefense.AMT_IPHeadersFilter.responses){a=xxSystemDefense.AMT_IPHeadersFilter.responses[c];
1110 -(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="All Ethernet Protocol"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" \u00e0s"+a.FilterProfileData+" pacote / s");1==a.ActionEventOnMatch&&(d+=", Evento em jogo");var v=0;for(g in xxSystemDefenceFilters)a[g]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+
1111 -"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("Adicionar filtro ...","AddDefenseFilter()")+AddButton("Adicionar pol\u00edtica ...","AddDefensePolicy()"));QH(53,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}
1110 +(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="All Ethernet Protocol"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" \u00e0s"+a.FilterProfileData+" pacote / s");1==a.ActionEventOnMatch&&(d+=", Evento em jogo");var v=0;for(e in xxSystemDefenceFilters)a[e]&&v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+
1111 +"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("Adicionar filtro ...","AddDefenseFilter()")+AddButton("Adicionar pol\u00edtica ...","AddDefensePolicy()"));QH(54,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}
1112 function StopDefenseStatsTimer(){null!=xxFilterStatisticsTimer&&(clearInterval(xxFilterStatisticsTimer),xxFilterStatisticsTimer=null);xxFilterStatisticsTimerActive=!1}
1113 function UpdateDefenseStats(b){if(b||1!=xxFilterStatisticsTimerActive)xxFilterStatisticsTimerActive=!0,b=b?b:0,xxSystemDefenceLinkedPolicy[b]?amtstack.AMT_SystemDefensePolicy_UpdateStatistics('<a:Address></a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+b+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",!1,UpdateDefenseStats2,b,0,{InstanceID:xxSystemDefenceLinkedPolicy[b].InstanceID}):
1114 -(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,g){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,g):StopDefenseStatsTimer()}
1115 -function UpdateDefenseStats3(b,c,a,d,g){b=0;if(200==d){xxFilterStatistics[g]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[g][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1114 +(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,e){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,e):StopDefenseStatsTimer()}
1115 +function UpdateDefenseStats3(b,c,a,d,e){b=0;if(200==d){xxFilterStatistics[e]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[e][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1116 function changeDefaultPolicy(b){if(!xxdialogMode){var c;c="<div style=height:26px;margin-top:4px><select id=policySelection style=float:right;width:266px><option value=-1>Nenhum";for(var a in xxSystemDefense.AMT_SystemDefensePolicy.responses)c+="<option value="+a+(xxSystemDefenceLinkedPolicy[b]&&xxSystemDefense.AMT_SystemDefensePolicy.responses[a].InstanceID==xxSystemDefenceLinkedPolicy[b].InstanceID?" selected":"")+">"+xxSystemDefense.AMT_SystemDefensePolicy.responses[a].PolicyName;setDialogMode(11,
1117 "Pol\u00edtica de Defesa do Sistema Padr\u00e3o",3,changeDefaultPolicyOk,c+"</select><div style=padding-top:4px>Pol\u00edtica padr\u00e3o</div></div>",b)}}
1118 function changeDefaultPolicyOk(b,c){var a=Q("policySelection").value,d=xxSystemDefenceLinkedPolicy[c];d&&amtstack.Delete("AMT_NetworkPortSystemDefensePolicy",'<w:SelectorSet><w:Selector Name="Antecedent"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">CIM_EthernetPort</w:Selector><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+c+
@@ -1125,118 +1125,136 @@ function AddDefenseFilter(){if(!xxdialogMode){var b;b="<div style=height:26px;ma
1125 b+="<div style=height:26px;margin-top:4px><select id=filterprofile style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=0>Permitir, Contar<option value=1>Drop, Count<option value=2>Taxa limite<option value=3>Permitir<option value=4>Solta</select><div style=padding-top:4px>A\u00e7ao</div></div>";b+="<div style=height:26px;margin-top:4px id=filterdatadiv><input id=filterdata style=float:right;width:260px maxlength=8 onkeyup=AddDefenseFilterUpdate()><div style=padding-top:4px>Pacotes / segundo</div></div>";
1126 b+="<div style=height:26px;margin-top:4px><select id=filteraction style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=false>Fazer nada<option value=1>Evento em jogo</select><div style=padding-top:4px>Registro de Eventos</div></div>";setDialogMode(11,"Adicionar filtro de defesa do sistema",3,AddDefenseFilterOk,b);AddDefenseFilterUpdate()}}
1127 function AddDefenseFilterOk(){if(1>=Q("filtertype").value){var b=0==Q("filtertype").value?2048:2054,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrProtocolID8021:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value};2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_Hdr8021Filter",c,AddDefenseFilterOk2)}else{var b=2==Q("filtertype").value?
1128 -4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var g=a[d].indexOf("="),v=a[d].substring(0,g),g=a[d].substring(g+1),n=xxSystemDefenceFilters[v];n||(v="Hdr"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(g=g.split("."),4==g.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(g[0]),
1129 -parseInt(g[1]),parseInt(g[2]),parseInt(g[3]))))):c[v]=g)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c54",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1128 +4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var e=a[d].indexOf("="),v=a[d].substring(0,e),e=a[d].substring(e+1),n=xxSystemDefenceFilters[v];n||(v="Hdr"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(e=e.split("."),4==e.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(e[0]),
1129 +parseInt(e[1]),parseInt(e[2]),parseInt(e[3]))))):c[v]=e)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c106",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1130 function AddDefenseFilterOk2(b,c,a,d){200!=d?messagebox("Adicionar filtro de defesa do sistema","N\u00e3o foi poss\u00edvel adicionar o filtro, erro #"+d):PullSystemDefense()}
1131 -function showFilterDetails(b,c){if(!xxdialogMode){var a,d,g,v;0==b?(v="AMT_Hdr8021Filter",g="Tr\u00e1fego Ethernet",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="All Ethernet Protocol"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",g="Tr\u00e1fego IP",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="Todo o protocolo IP"+d.HdrIPVersion));var n;n=""+addHtmlValue("Nome",EscapeHtml(d.Name));n+=addHtmlValue("Tipo",
1132 -g);n+=addHtmlValue("Tr\u00e1fego correspondente",a);n+=addHtmlValue("Dire\u00e7\u00e3o",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,g=d[l],b=xxSystemDefenceFilters[l],2==b&&4==g.length&&(g=hex2rstr(g),g=g.charCodeAt(0)+"."+g.charCodeAt(1)+"."+g.charCodeAt(2)+"."+g.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("Filtro"+a,g));n+=addHtmlValue("Evento em jogo",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,
1131 +function showFilterDetails(b,c){if(!xxdialogMode){var a,d,e,v;0==b?(v="AMT_Hdr8021Filter",e="Tr\u00e1fego Ethernet",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="All Ethernet Protocol"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",e="Tr\u00e1fego IP",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="Todo o protocolo IP"+d.HdrIPVersion));var n;n=""+addHtmlValue("Nome",EscapeHtml(d.Name));n+=addHtmlValue("Tipo",
1132 +e);n+=addHtmlValue("Tr\u00e1fego correspondente",a);n+=addHtmlValue("Dire\u00e7\u00e3o",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,e=d[l],b=xxSystemDefenceFilters[l],2==b&&4==e.length&&(e=hex2rstr(e),e=e.charCodeAt(0)+"."+e.charCodeAt(1)+"."+e.charCodeAt(2)+"."+e.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("Filtro"+a,e));n+=addHtmlValue("Evento em jogo",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,
1133 "Filtro Ethernet #"+d.InstanceID,5,showFilterDetailsOk,n,[v,d])}}function showFilterDetailsOk(b,c){2==b&&amtstack.Delete(c[0],c[1],deleteDefenseFilter)}function deleteDefenseFilter(b,c,a,d){200!=d?messagebox("Remover filtro","N\u00e3o foi poss\u00edvel remover o filtro, verifique se ele n\u00e3o est\u00e1 em uso."):PullSystemDefense()}var xxAddDefensePolicyFilters;
1134 function AddDefensePolicy(){if(!xxdialogMode){xxAddDefensePolicyFilters=[];var b;b='<div style=height:26px;margin-top:4px><input id=policyname title="<policy name>:<policy precedence number>" style=float:right;width:260px maxlength=16 onkeyup=AddDefensePolicyUpdate()><div style=padding-top:4px>Nome</div></div><div style=height:26px;margin-top:4px><select id=policytx title="A\u00e7\u00e3o padr\u00e3o a ser tomada para o tr\u00e1fego de sa\u00edda" style=float:right;width:133px><option value=0>Allow<option value=1>Solta<option value=2>Permitir, Contar<option value=3>Drop, Count<option value=4>Permitir, Contar, Evento<option value=5>Drop, Count, Evento</select><select id=policyrx style=float:right;width:133px title="A\u00e7\u00e3o padr\u00e3o a ser tomada para o tr\u00e1fego de entrada"><option value=0>Permitir<option value=1>Solta<option value=2>Permitir, Contar<option value=3>Drop, Count<option value=4>Permitir, Contar, Evento<option value=5>Drop, Count, Evento</select><div style=padding-top:4px>TX / RX padr\u00e3o</div></div>';b+=
1135 "<div id=policyFilters></div>";if(0<xxSystemDefense.AMT_Hdr8021Filter.responses.length||0<xxSystemDefense.AMT_IPHeadersFilter.responses.length){b+="<div style=height:26px;margin-top:4px><div style=float:right><select id=xfilter style=width:186px>";for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];b+="<option value="+a.InstanceID+">"+a.Name}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],
1136 b+="<option value="+a.InstanceID+">"+a.Name;b+="</select><input id=addFilterButton type=button value=Add style=width:80px onclick=addFilterButton()></div><div style=padding-top:4px>Adicionar filtro</div></div>"}setDialogMode(11,"Adicionar diretiva de defesa do sistema",3,AddDefensePolicyOk,b);AddDefensePolicyUpdate()}}function addFilterButton(){0<=xxAddDefensePolicyFilters.indexOf(Q("xfilter").value)||(xxAddDefensePolicyFilters.push(Q("xfilter").value),AddDefensePolicyUpdate())}
1137 function removeFilterButton(b){xxAddDefensePolicyFilters.splice(b,1);AddDefensePolicyUpdate()}
1138 -function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c54",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>Esta pol\u00edtica n\u00e3o cont\u00e9m filtros.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Retirar","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+GetFilterById(xxAddDefensePolicyFilters[c]).Name+
1138 +function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c106",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>Esta pol\u00edtica n\u00e3o cont\u00e9m filtros.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Retirar","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+GetFilterById(xxAddDefensePolicyFilters[c]).Name+
1139 "</b></div></div>";QH("policyFilters",b)}}function GetFilterById(b){for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];if(a.InstanceID==b)return a}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)if(a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],a.InstanceID==b)return a}
1140 function AddDefensePolicyOk(){var b=Q("policytx").value,c=Q("policyrx").value,a=0,d=Q("policyname").value.split(":");2==d.length&&(a=parseInt(d[1]));b={"InstanceID ":0,PolicyName:d[0],PolicyPrecedence:a,TxDefaultCount:1<b,TxDefaultDrop:1==b%2,TxDefaultMatchEvent:3<b,RxDefaultCount:1<c,RxDefaultDrop:1==c%2,RxDefaultMatchEvent:3<c};0<xxAddDefensePolicyFilters.length&&(b.FilterCreationHandles=xxAddDefensePolicyFilters);amtstack.Create("AMT_SystemDefensePolicy",b,AddDefensePolicyOk2)}
1141 function AddDefensePolicyOk2(b,c,a,d){200!=d?messagebox("Adicionar diretiva de defesa do sistema","N\u00e3o foi poss\u00edvel adicionar a pol\u00edtica, erro #"+d):PullSystemDefense()}
1142 function showPolicyDetails(b){if(!xxdialogMode){var c=xxSystemDefense.AMT_SystemDefensePolicy.responses[b],a;a=""+addHtmlValue("Nome",EscapeHtml(c.PolicyName));0!=c.PolicyPrecedence&&(a+=addHtmlValue("Preced\u00eancia",c.PolicyPrecedence));var d=1==c.TxDefaultDrop?"Solta":"Permitir";1==c.TxDefaultCount&&(d+=", Contagem");1==c.TxDefaultMatchEvent&&(d+=", Evento");a+=addHtmlValue("A\u00e7\u00e3o TX padr\u00e3o",d);d=1==c.RxDefaultDrop?"Drop":"Allow";1==c.RxDefaultCount&&(d+=", Count");1==c.RxDefaultMatchEvent&&
1143 (d+=", Event");a+=addHtmlValue("A\u00e7\u00e3o RX padr\u00e3o",d);if(c.FilterCreationHandles)for(b in c.FilterCreationHandles)a+=addHtmlValue("N\u00ba do filtro"+(+b+1),GetFilterById(c.FilterCreationHandles[b]).Name);setDialogMode(11,format("Pol\u00edtica #",c.InstanceID.substring(20)),5,showPolicyDetailsOk,a,c)}}function showPolicyDetailsOk(b,c){2==b&&amtstack.Delete("AMT_SystemDefensePolicy",c,deleteDefensePolicy)}
1144 -function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("Remover pol\u00edtica","N\u00e3o foi poss\u00edvel remover a pol\u00edtica, verifique se ela n\u00e3o est\u00e1 em uso."):PullSystemDefense()}var xxWireless;function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService *AMT_BootCapabilities".split(" "),processWireless)}
1145 -function wifiRefresh(){xxdialogMode||PullWireless()}var xxWifiState={3:"Desativado",32768:"Ativado em S0",32769:"Habilitado em S0, Sx / AC"},xxRadioState={2:"Ligado, conectado",3:"Fora",6:"Ativado, Desconectado"},xxWifiAuthenticationMethod={1:"De outros",2:"Aberto",3:"Chave compartilhada",4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE"},xxWifiEncryptionMethod={1:"De outros",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"Nenhum"};
1144 +function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("Remover pol\u00edtica","N\u00e3o foi poss\u00edvel remover a pol\u00edtica, verifique se ela n\u00e3o est\u00e1 em uso."):PullSystemDefense()}var xxWireless;function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService CIM_IEEE8021xSettings".split(" "),processWireless)}
1145 +function wifiRefresh(){xxdialogMode||PullWireless()}var xxWifiState={3:"Desativado",32768:"Ativado em S0",32769:"Habilitado em S0, Sx / AC"},xxRadioState={2:"Ligado, conectado",3:"Fora",6:"Ativado, Desconectado"},xxWifiAuthenticationMethod={1:"De outros",2:"Aberto",3:"Chave compartilhada",4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE IEEE 802.1x",32769:"WPA3 OWE IEEE 802.1x"},xxWifiEncryptionMethod={1:"De outros",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"Nenhum"};
1146 function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1147 -function showWirelessInfo(){if(xxWireless){var b,c,a="",d,g;if(xxWireless.CIM_WiFiPortCapabilities.response){g="<br><h2>Perfis sem fio</h2>"+TableStart2();g+="<tr><td class=r2 style=padding-left:15px><br>Perfis sem fio que o Intel&reg; AMT usar\u00e1 para conectividade de rede.<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b&&(g+="<div class=itemBar onclick=showWifiDetails("+
1148 -c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+" &nbsp; ",xxAccountAdminName&&(g+=AddButton2("Retirar",'wifiRemoveButton("'+c+'")')),g+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>",a++);0==a&&(g+="<i>N\u00e3o h\u00e1 perfis sem fio presentes</i><br>");g+="<br><td class=r2>";g=xxAccountAdminName?g+TableEnd(AddButton("Novo perfil","showWifiNewProfile()")):
1149 -g+TableEnd("");QH(20,g+"<br>")}}}function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"Estado sem fio",3,wifiStateDlg,b)}}
1147 +function showWirelessInfo(){if(xxWireless){var b,c,a="",d,e;if(xxWireless.CIM_WiFiPortCapabilities.response){e="<br><h2>Perfis sem fio</h2>"+TableStart2();e+="<tr><td class=r2 style=padding-left:15px><br>Perfis sem fio que o Intel&reg; AMT usar\u00e1 para conectividade de rede.<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)if(d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b){var v="",n=null,l="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");
1148 +if(xxWireless.CIM_IEEE8021xSettings.responses)for(var p in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[p].ElementName==d.ElementName&&(n=xxWireless.CIM_IEEE8021xSettings.responses[p]);n&&(v=", "+l[n.AuthenticationProtocol]);e+="<div class=itemBar onclick=showWifiDetails("+c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+v+" &nbsp; ";xxAccountAdminName&&
1149 +(e+=AddButton2("Retirar",'wifiRemoveButton("'+c+'")'));e+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>";a++}0==a&&(e+="<i>N\u00e3o h\u00e1 perfis sem fio presentes</i><br>");e+="<br><td class=r2>";e=xxAccountAdminName?e+TableEnd(AddButton("Novo perfil","showWifiNewProfile()")):e+TableEnd("");QH(20,e+"<br>")}}}
1150 +function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"Estado sem fio",3,wifiStateDlg,b)}}
1151 function wifiStateDlg(){amtstack.CIM_WiFiPort_RequestStateChange(document.querySelector("input[name=d11]:checked").value,null,function(){amtstack.Get("CIM_WiFiPort",function(b,c,a,d){200==d&&(xxWireless.CIM_WiFiPort.response=a.Body,showWirelessInfo())})})}
1152 function showWifiSyncDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d11 id=wl0 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">Desativado</label><br>");b+="<label><input type=radio name=d11 id=wl0 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">ativado</label><br>";setDialogMode(11,"Local Profile Sync",3,showWifiSyncDlgEx,b)}}
1152 -function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,g){200==g&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1153 +function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,e){200==e&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1154 function showUefiWifiCoExDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d12 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Disabled</label><br>");b+="<label><input type=radio name=d12 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Enabled</label><br>";setDialogMode(11,"UEFI Wifi CoEx Profile Sharing",3,UefiWifiCoExDlg,b)}}
1154 -function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,g){200==g&&PullWireless()})}
1155 -function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("Nome do perfil",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",b.SSID);c+=addHtmlValue("Autentica\u00e7\u00e3o",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("Criptografia",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("Prioridade",b.Priority);messagebox("Perfil sem fio",c+"</div>")}}
1156 -function wifiRemoveButton(b){xxdialogMode||(QH(60,format('Remover perfil sem fio "{0}"?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"Perfil sem fio",3,function(){removeWifiButtonEx(b)}))}function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1157 -function removeWifiEntryResponse(b,c,a,d,g){methodcheck(a)||amtstack.Enum("CIM_WiFiEndpointSettings",function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c,showWirelessInfo())})}
1158 -function showWifiNewProfile(){if(!xxdialogMode){var b="";for(i=1;256>i;i++){var c=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==i&&(c=0);c&&(b+="<option value="+i+">"+i)}QH("c24",b);QV("c26",13<amtversion);c25.value=6;c27.value=4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"Adicionar perfil sem fio",3,function(){addWifiProfile()});updateWifiDialog()}}
1159 -function addWifiProfile(){amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},{__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c27.value,SSID:c23.value,Priority:c24.value,
1160 -PSKPassPhrase:c28.value},null,null,null,removeWifiEntryResponse)}
1161 -function updateWifiDialog(){var b=!0,c=c25.value,a=c27.value;QV(66,4>c);QV(65,3<c);QV(64,3<c);QV(67,4>c);4>c&&(3==a||4==a)&&(c27.value=2);3<c&&(2==a||5==a)&&(c27.value=3);32768==c&&(c27.value=4);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);QE("c54",1==b&&0<c22.value.length&&0<c23.value.length&&7<c28.value.length&&
1162 -c28.value==c29.value)}function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1155 +function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,e){200==e&&PullWireless()})}
1156 +function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("Nome do perfil",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",EscapeHtml(b.SSID));c+=addHtmlValue("Autentica\u00e7\u00e3o",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("Criptografia",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("Prioridade",b.Priority);var a=null,d="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");
1157 +if(xxWireless.CIM_IEEE8021xSettings.responses)for(var e in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[e].ElementName==b.ElementName&&(a=xxWireless.CIM_IEEE8021xSettings.responses[e]);a&&(c=c+'<div style="width:100%;border-bottom:1px solid #000;margin-bottom:5px;margin-top:5px">802.11x</div>'+addHtmlValue("Autentica\u00e7\u00e3o",d[a.AuthenticationProtocol]),a.Domain&&(c+=addHtmlValue("Domain",EscapeHtml(a.Domain))),a.Username&&(c+=addHtmlValue("Nome do usu\u00e1rio",
1158 +EscapeHtml(a.Username))));c+="</div>";messagebox("Perfil sem fio",c)}}function wifiRemoveButton(b){xxdialogMode||(QH(61,format('Remover perfil sem fio "{0}"?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"Perfil sem fio",3,function(){removeWifiButtonEx(b)}))}function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1159 +function removeWifiEntryResponse(b,c,a,d,e){methodcheck(a)||amtstack.BatchEnum("",["CIM_WiFiEndpointSettings","CIM_IEEE8021xSettings"],function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c.CIM_WiFiEndpointSettings.responses,xxWireless.CIM_IEEE8021xSettings.responses=c.CIM_IEEE8021xSettings.responses,showWirelessInfo())})}
1160 +function showWifiNewProfile(){if(!xxdialogMode){for(var b="",c=1;256>c;c++){var a=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==c&&(a=0);a&&(b+="<option value="+c+">"+c)}QH("c24",b);var b="<option value=-1>"+EscapeHtml("Nenhum")+"</option>",a="<option value=-1>"+EscapeHtml("Nenhum")+"</option>",c;for(c in xxCertificates)xxCertificates[c].TrustedRootCertficate?a+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+
1161 +"</option>":xxCertificates[c].XPrivateKey&&(b+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+"</option>");QH("c50",b);QH("c52",a);c="<option value=32769>WPA3 OWE IEEE 802.1x</option><option value=32768>WPA3 SAE IEEE 802.1x</option>";c+="<option value=7>WPA2 IEEE 802.1x</option>";c+="<option value=5>WPA IEEE 802.1x</option>";c+="<option value=6>WPA2 PSK</option>";c+="<option value=4>WPA PSK</option>";QH("c25",c);c25.value=6;c26.value=
1162 +4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"Adicionar perfil sem fio",3,function(){addWifiProfile()});updateWifiDialog()}}
1163 +function addWifiProfile(){var b,c,a,d={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c26.value,SSID:c23.value,Priority:c24.value};if(4==c25.value||6==c25.value)d.PSKPassPhrase=c28.value;if(5==c25.value||7==c25.value||32768==c25.value||
1164 +32769==c25.value)b={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_IEEE8021xSettings"),ElementName:"8021x-"+c22.value,InstanceID:"8021x-"+c22.value,ActiveInS0:1==Q("c54").value,AuthenticationProtocol:Q("c32").value},""!=Q("c44").value&&(b.RoamingIdentity=Q("c44").value),""!=Q("c34").value&&(b.ServerCertificateName=Q("c34").value,b.ServerCertificateNameComparison=Q("c36").value),
1165 +""!=Q("c40").value&&(b.Username=Q("c40").value),""!=Q("c42").value&&(b.Password=Q("c42").value),""!=Q("c38").value&&(b.Domain=Q("c38").value),3<Q("c32").value&&(b.ProtectedAccessCredential=Q("c46").value,b.PACPassword=Q("c48").value),0<=parseInt(Q("c50").value)&&(c='<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">'+
1166 +xxCertificates[parseInt(Q("c50").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>"),0<=parseInt(Q("c52").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">'+
1167 +xxCertificates[parseInt(Q("c52").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>");console.log("wifiepsettinginput",JSON.stringify(d,null,2));console.log("netAuthProfile",JSON.stringify(b,null,2));console.log("netAuthSettingsClientCert",c);console.log("netAuthSettingsServerCaCert",a);amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},d,b,c,a,removeWifiEntryResponse)}
1168 +function updateWifiDialog(){var b=!0,c=c25.value,a=c26.value;4>c&&(3==a||4==a)&&(c26.value=2);3<c&&(2==a||5==a)&&(c26.value=3);if(32768==c||32769==c)c26.value=4;QV("c27",4==c||6==c);QV("c30",5==c||7==c||32768==c||32769==c);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);0==c22.value.length&&0==c23.value.length&&(b=!1);4!=c&&6!=c||
1169 +!(8>c28.value.length||63<c28.value.length||c28.value!=c29.value)||(b=!1);QE("c106",b);updateNetAuthDialog()}function updateNetAuth2Dialog(){QV("c35",""!=Q("c33").value);QV("c45",3<Q("c32").value);QV("c47",3<Q("c32").value)}
1170 +function editNetAuthProfile(){if(!xxdialogMode){var b="<option value=-1>"+EscapeHtml("Nenhum")+"</option>",c="<option value=-1>"+EscapeHtml("Nenhum")+"</option>",a;for(a in xxCertificates)xxCertificates[a].TrustedRootCertficate?c+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>":xxCertificates[a].XPrivateKey&&(b+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>");QH("c98",b);QH("c100",c);b=amtsysstate.AMT_8021XProfile.responses.Body;
1171 +Q("c78").value=b.Enabled?1:0;Q("c102").value=b.ActiveInS0?1:0;Q("c104").value=b.PxeTimeout;if(b.Enabled){Q("c80").value=b.AuthenticationProtocol;Q("c92").value=b.RoamingIdentity?b.RoamingIdentity:"";Q("c82").value=b.ServerCertificateName?b.ServerCertificateName:"";Q("c84").value=b.ServerCertificateNameComparison?b.ServerCertificateNameComparison:0;Q("c88").value=b.Username?b.Username:
1172 +"";Q("c90").value=b.Password?b.Password:"";Q("c86").value=b.Domain?b.Domain:"";Q("c94").value=b.ProtectedAccessCredential?b.ProtectedAccessCredential:"";Q("c96").value=b.PACPassword?b.PACPassword:"";var d=c=-1;b.ServerCertificateIssuer&&(c=b.ServerCertificateIssuer.ReferenceParameters.SelectorSet.Selector.Value);b.ClientCertificate&&(d=b.ClientCertificate.ReferenceParameters.SelectorSet.Selector.Value);for(a in xxCertificates)xxCertificates[a].InstanceID==
1173 +c&&(Q("c100").value=a),xxCertificates[a].InstanceID==d&&(Q("c98").value=a)}setDialogMode(27,"802.1x Profile",3,function(){setNetAuthProfile()});updateNetAuthDialog()}}
1174 +function updateNetAuthDialog(){QV("c79",1==Q("c78").value);QV("c81",1==Q("c78").value);QV("c83",1==Q("c78").value&&""!=Q("c82").value);QV("c85",1==Q("c78").value);QV("c87",1==Q("c78").value);QV("c89",1==Q("c78").value);QV("c91",1==Q("c78").value);QV("c93",1==Q("c78").value&&
1175 +3<Q("c80").value);QV("c95",1==Q("c78").value&&3<Q("c80").value);QV("c97",1==Q("c78").value);QV("c99",1==Q("c78").value);QV("c101",1==Q("c78").value);QV("c103",1==Q("c78").value)}
1176 +function setNetAuthProfile(){var b=Clone(amtsysstate.AMT_8021XProfile.responses.Body);b.Enabled=1==Q("c78").value;b.Enabled&&(b.ActiveInS0=1==Q("c102").value,b.AuthenticationProtocol=Q("c80").value,""!=Q("c92").value?b.RoamingIdentity=Q("c92").value:delete b.RoamingIdentity,""!=Q("c82").value?(b.ServerCertificateName=Q("c82").value,b.ServerCertificateNameComparison=Q("c84").value):
1177 +(delete b.ServerCertificateName,delete b.ServerCertificateNameComparison),""!=Q("c88").value?b.Username=Q("c88").value:delete b.Username,""!=Q("c90").value?b.Password=Q("c90").value:delete b.Password,""!=Q("c86").value?b.Domain=Q("c86").value:delete b.Domain,3<Q("c80").value?(b.ProtectedAccessCredential=Q("c94").value,b.PACPassword=Q("c96").value):(delete b.ProtectedAccessCredential,delete b.PACPassword),
1178 +0<=parseInt(Q("c98").value)?b.ClientCertificate="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c98").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ClientCertificate,0<=parseInt(Q("c100").value)?b.ServerCertificateIssuer="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+
1179 +amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c100").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ServerCertificateIssuer,b.PxeTimeout=Q("c104").value);amtstack.Put("AMT_8021XProfile",b,setNetAuthProfileEx)}
1180 +function setNetAuthProfileEx(b,c,a,d){200==d?(amtsysstate.AMT_8021XProfile.responses.Body=amtsysstate.AMT_8021XProfile.response=a.Body,updateSystemStatus()):a.Header.WsmanError?messagebox("802.1x Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("802.1x Error","Error, Status = "+d)}
1181 +function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1182 var DMTFCPUStatus="Desconhecido;ativado;Desativado pelo usu\u00e1rio;Desativado pelo BIOS (erro POST);Ocioso;De outros".split(";"),DMTFMemType="Desconhecido;De outros;DRAM;DRAM s\u00edncrona;DRAM de cache;EDO;EDRAM;VRAM;SRAM;RAM;ROM;Instant\u00e2neo;EEPROM;FEPROM;EPROM;CDRAM;3DRAM;SDRAM;SGRAM;RDRAM;DDR;DDR-2;BRAM;FB-DIMM;DDR3;FBD2;DDR4;LPDDR;LPDDR2;LPDDR3;LPDDR4".split(";"),DMTFMemFormFactor=";De outros;Desconhecido;SIMM;trago;Lasca;MERGULHO;ZIP;Cart\u00e3o Propriet\u00e1rio;DIMM;TSOP;Linha de chips;RIMM;SODIMM;SRIMM;FB-DIM".split(";"),
1183 DMTFProcFamilly={191:"Processador Intel&reg; Core &trade; 2 Duo",192:"Processador Intel&reg; Core &trade; 2 Solo",193:"Processador Intel&reg; Core &trade; 2 Extreme",194:"Processador Intel&reg; Core &trade; 2 Quad",195:"Processador m\u00f3vel Intel&reg; Core &trade; 2 Extreme",196:"Processador m\u00f3vel Intel&reg; Core &trade; 2 Duo",197:"Processador m\u00f3vel Intel&reg; Core &trade; 2 Solo",198:"Processador Intel&reg; Core &trade; i7",199:"Processador Intel&reg; Celeron&reg; de n\u00facleo duplo"},
1184 HardwareInventory;
1166 -function processHardware(b,c,a,d){if(200==d){var g;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("Salve \ue051...","SaveHardwareLog()")+" As informa\u00e7\u00f5es de hardware s\u00e3o coletadas no momento da inicializa\u00e7\u00e3o do sistema.");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>Plataforma</h2>"+
1185 +function processHardware(b,c,a,d){if(200==d){var e;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("Salve \ue051...","SaveHardwareLog()")+" As informa\u00e7\u00f5es de hardware s\u00e3o coletadas no momento da inicializa\u00e7\u00e3o do sistema.");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>Plataforma</h2>"+
1186 FullTable({"Modelo de computador":c.Model,Fabricante:c.Manufacturer,"Vers\u00e3o":c.Version,"N\u00famero de s\u00e9rie":c.SerialNumber,"ID do sistema":guidToStr(a.CIM_SystemPackaging.responses[0].PlatformGUID).toLowerCase()},"");b+="<br><h2>Rodap\u00e9</h2>";b+=FullTable({Fabricante:d.Manufacturer,"Nome do Produto":d.Model,"Vers\u00e3o":d.Version,"N\u00famero de s\u00e9rie":d.SerialNumber,"Etiqueta de recurso":d.Tag,"Substitu\u00edvel?":1==d.CanBeFRUed?"Yes":"No"},"");b+="<br><h2>BIOS</h2>";b+=FullTable({Fornecedor:a.CIM_BIOSElement.response.Manufacturer,
1168 -"Vers\u00e3o":v,"Data de lan\u00e7amento":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",{timeZone:"UTC"})},"");b+="<br>";for(g in a.CIM_Processor.responses)c=a.CIM_Processor.responses[g],d=a.CIM_Chip.responses[g],b+="<h2>Processador "+(parseInt(g)+1)+"</h2>",b+=FullTable({Fabricante:trademarks(d.Manufacturer),"Fam\u00edlia":DMTFProcFamilly[c.Family],"Vers\u00e3o":trademarks(d.Version),"Velocidade m\u00e1xima do soquete":c.MaxClockSpeed+" MHz",Status:DMTFCPUStatus[c.CPUStatus]},
1169 -"");b+="<br>";for(g in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[g],b+="<h2>M\u00f3dulo de mem\u00f3ria "+(+g+1)+"</h2>",b+=FullTable({"R\u00f3tulo do banco":c.BankLabel,Fabricante:c.Manufacturer,"N\u00famero de s\u00e9rie":c.SerialNumber,Tamanho:parseInt(c.Capacity/1048576)+" MB","Fator de forma":DMTFMemFormFactor[c.FormFactor],Tipo:DMTFMemType[c.MemoryType],"Etiqueta de recurso":c.Tag,"N\u00famero da pe\u00e7a":c.PartNumber},"");b+="<br>";for(g in a.CIM_MediaAccessDevice.responses)c=
1170 -a.CIM_MediaAccessDevice.responses[g],d=a.CIM_PhysicalPackage.responses[+g+1],b+="<h2>M\u00eddia de armazenamento "+(parseInt(g)+1)+"</h2>",b+=FullTable({Modelo:d.Model,"N\u00famero de s\u00e9rie":""==d.SerialNumber?"Unknown":d.SerialNumber,Tamanho:parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" MB"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(g in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[g].PackageType&&(c=a.CIM_PhysicalPackage.responses[g]);null!=c&&(b+=
1171 -"<h2>Battery</h2>",g=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,Fabricante:c.Manufacturer,"Manufacture date":g,"N\u00famero de s\u00e9rie":c.SerialNumber,Tipo:"De outros;Desconhecido;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],"Design capacity":a.CIM_Battery.response.DesignCapacity+" mWatt-hours","Design voltage":a.CIM_Battery.response.DesignVoltage+" mVolts"},
1187 +"Vers\u00e3o":v,"Data de lan\u00e7amento":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",{timeZone:"UTC"})},"");b+="<br>";for(e in a.CIM_Processor.responses)c=a.CIM_Processor.responses[e],d=a.CIM_Chip.responses[e],b+="<h2>Processador "+(parseInt(e)+1)+"</h2>",b+=FullTable({Fabricante:trademarks(d.Manufacturer),"Fam\u00edlia":DMTFProcFamilly[c.Family],"Vers\u00e3o":trademarks(d.Version),"Velocidade m\u00e1xima do soquete":c.MaxClockSpeed+" MHz",Status:DMTFCPUStatus[c.CPUStatus]},
1188 +"");b+="<br>";for(e in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[e],b+="<h2>M\u00f3dulo de mem\u00f3ria "+(+e+1)+"</h2>",b+=FullTable({"R\u00f3tulo do banco":c.BankLabel,Fabricante:c.Manufacturer,"N\u00famero de s\u00e9rie":c.SerialNumber,Tamanho:parseInt(c.Capacity/1048576)+" MB","Fator de forma":DMTFMemFormFactor[c.FormFactor],Tipo:DMTFMemType[c.MemoryType],"Etiqueta de recurso":c.Tag,"N\u00famero da pe\u00e7a":c.PartNumber},"");b+="<br>";for(e in a.CIM_MediaAccessDevice.responses)c=
1189 +a.CIM_MediaAccessDevice.responses[e],d=a.CIM_PhysicalPackage.responses[+e+1],b+="<h2>M\u00eddia de armazenamento "+(parseInt(e)+1)+"</h2>",b+=FullTable({Modelo:d.Model,"N\u00famero de s\u00e9rie":""==d.SerialNumber?"Unknown":d.SerialNumber,Tamanho:parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" MB"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(e in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[e].PackageType&&(c=a.CIM_PhysicalPackage.responses[e]);null!=c&&(b+=
1190 +"<h2>Battery</h2>",e=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,Fabricante:c.Manufacturer,"Manufacture date":e,"N\u00famero de s\u00e9rie":c.SerialNumber,Tipo:"De outros;Desconhecido;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],"Design capacity":a.CIM_Battery.response.DesignCapacity+" mWatt-hours","Design voltage":a.CIM_Battery.response.DesignVoltage+" mVolts"},
1191 c.OtherIdentifyingInfo&&(a["Other Info"]=c.OtherIdentifyingInfo),b+=FullTable(a,""))}b+="<br>";QH(16,b);updateSystemStatus()}}function SaveHardwareLog(){!xxdialogMode&&HardwareInventory&&SaveJsonFile("IntelAmtHardware","hardware","Informa\u00e7\u00f5es de hardware da Intel AMT",HardwareInventory)}var AmtSystemPowerSchemes=null;function PullPowerPolicy(){amtstack.Enum("AMT_SystemPowerScheme",powerPolicyResponse)}
1192 function powerPolicyResponse(b,c,a,d){AmtSystemPowerSchemes=a;updateSystemStatus()}function showPowerPolicyDlg(b){if(!xxdialogMode){for(var c="",a=0;a<AmtSystemPowerSchemes.length;a++)c+='<input type=radio name=powerpolicy value="'+AmtSystemPowerSchemes[a].InstanceID+'" '+(AmtSystemPowerSchemes[a].SchemeGUID==b?" checked":"")+">"+AmtSystemPowerSchemes[a].Description+"<br>";setDialogMode(11,"Pol\u00edtica de energia Intel&reg; AMT",3,showPowerPolicyDlgOk,c)}}
1193 function showPowerPolicyDlgOk(){for(var b=null,c=0,a=document.getElementsByTagName("input");c<a.length;c++)"powerpolicy"==a[c].name&&a[c].checked&&(b=a[c].value);amtstack.AMT_SystemPowerScheme_SetPowerScheme(showPowerPolicyDlgOkDone,b)}function showPowerPolicyDlgOkDone(b,c,a,d){200==d&&PullSystemStatus()}var xxAccountAdminName,xxAccountRealmInfo,xxAccountEnabledInfo={},xxAccountFetch,showHiddenAccounts=!1;
1194 function PullUserInfo(){xxAccountFetch=1;delete xxAccountAdminName;xxAccountRealmInfo={};amtstack.AMT_AuthorizationService_GetAdminAclEntry(getAdminAclEntryResponse);amtstack.AMT_AuthorizationService_EnumerateUserAclEntries(1,enumerateUserAclEntriesResponse)}function getAdminAclEntryResponse(b,c,a,d){200==d&&(xxAccountRealmInfo[-1]={AccessPermission:999,DigestUsername:a.Body.Username,Realms:null},xxAccountAdminName=a.Body.Username,updateAccounts())}
1176 -function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var g in a.Body.Handles)b=a.Body.Handles[g],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1177 -function getUserAclEntryExResponse(b,c,a,d,g){xxAccountFetch--;200==d&&(a.Body.Handle=g,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[g]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,g){200==d&&(xxAccountEnabledInfo[g]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,g){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(g,getAclEnabledStateResponse,g))}
1178 -function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>Gerencie as contas de usu\u00e1rio Intel&reg; AMT deste computador.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,g=!1,v=0;a.DigestUsername?(d=a.DigestUsername,g="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!g){var n="";if(999!=a.AccessPermission){2==
1179 -v&&(n+="Desativado,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Reinos[c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="Auditor,");n=0<=a.Realms.indexOf(3)?n+"Administrador":1==l?n+"1 regi\u00e3o":n+(l+" reinos")}else n+="Administrador",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!g&&xxAccountAdminName&&(b+=" "+AddButton2("Editar...",
1195 +function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var e in a.Body.Handles)b=a.Body.Handles[e],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1196 +function getUserAclEntryExResponse(b,c,a,d,e){xxAccountFetch--;200==d&&(a.Body.Handle=e,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[e]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,e){200==d&&(xxAccountEnabledInfo[e]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,e){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(e,getAclEnabledStateResponse,e))}
1197 +function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>Gerencie as contas de usu\u00e1rio Intel&reg; AMT deste computador.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,e=!1,v=0;a.DigestUsername?(d=a.DigestUsername,e="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!e){var n="";if(999!=a.AccessPermission){2==
1198 +v&&(n+="Desativado,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Reinos[c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="Auditor,");n=0<=a.Realms.indexOf(3)?n+"Administrador":1==l?n+"1 regi\u00e3o":n+(l+" reinos")}else n+="Administrador",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!e&&xxAccountAdminName&&(b+=" "+AddButton2("Editar...",
1199 "changeAccountButton(event,"+a.Handle+")"));b+='</div><div style=padding-top:3px;width:330px;float:left;overflow-x:hidden title="'+d+'"><b>'+d+"</b></div><div style=padding-top:3px>"+n+"</div></div>"}}c='<div style=float:right;margin-right:8px><a title="Alternar contas ocultas" style=color:gray;cursor:pointer onclick=toggleAccountButton()>'+(showHiddenAccounts?"&#x25B2;":"&#x25BC;")+"</a></div><div>&nbsp;"+AddRefreshButton("xxAccountFetch=999;PullUserInfo()");xxAccountAdminName&&(c+=AddButton("Nova conta",
1181 -"newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1200 +"newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(22,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1201 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"Editar conta",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1202 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"Nova conta",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1184 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,g=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Erro na conta","Par\u00e2metros inv\u00e1lidos");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1185 -l,n,g,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,g,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}
1186 -function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Administrador</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1187 -function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["Apenas local","Apenas rede","Todos (Local e Rede)"];
1188 -function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,g=c.DigestUsername;g||(g=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("Nome",g);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("Estado",1==xxAccountEnabledInfo[b].Enabled?"ativado":"Desativado"));if(g==xxAccountAdminName)a+=addHtmlValue("Permiss\u00e3o","Administrador");else{var a=a+addHtmlValue("Permiss\u00e3o",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v="Administrador",
1189 -0<=c.Realms.indexOf(20)&&(v+="Auditor");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="Nenhum");a+=addHtmlValue("Reinos","")+"<b>"+v+"</b>"}messagebox("Conta"+g,a+"</div>")}}
1190 -function wsmanQuery(){QH(24,"");var b=getSelectedOptions(Q(22)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(23,!1),c&&0<c.length&&amtstack.BatchEnum("Navegador",c,browserResponse,null,!0))}
1191 -function browserResponse(b,c,a,d){QE(23,!0);b="";for(var g in a)c=a[g],b+="<h2>"+g+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(Esvaziar)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>Erro #"+c.status+"</div>"),b+="</div><br>";QH(24,b)}
1203 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Erro na conta","Par\u00e2metros inv\u00e1lidos");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1204 +l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1205 +function updateRealms(b){QV(62,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Administrador</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(63,c)}}
1206 +function updateAccountDialog(){var b=!0;if("none"!=Q(62).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c106",b)}var xxUserPermissions=["Apenas local","Apenas rede","Todos (Local e Rede)"];
1207 +function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,e=c.DigestUsername;e||(e=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("Nome",e);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("Estado",1==xxAccountEnabledInfo[b].Enabled?"ativado":"Desativado"));if(e==xxAccountAdminName)a+=addHtmlValue("Permiss\u00e3o","Administrador");else{var a=a+addHtmlValue("Permiss\u00e3o",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v="Administrador",
1208 +0<=c.Realms.indexOf(20)&&(v+="Auditor");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="Nenhum");a+=addHtmlValue("Reinos","")+"<b>"+v+"</b>"}messagebox("Conta"+e,a+"</div>")}}
1209 +function wsmanQuery(){QH(25,"");var b=getSelectedOptions(Q(23)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(24,!1),c&&0<c.length&&amtstack.BatchEnum("Navegador",c,browserResponse,null,!0))}
1210 +function browserResponse(b,c,a,d){QE(24,!0);b="";for(var e in a)c=a[e],b+="<h2>"+e+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(Esvaziar)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>Erro #"+c.status+"</div>"),b+="</div><br>";QH(25,b)}
1211 function wsmanFilter(){var b=c0.value.toLowerCase(),c;for(c in AllWsman)QV("WSB-"+AllWsman[c],""==b||0<=AllWsman[c].toLowerCase().indexOf(b))}function connectTerminal(){terminal&&(0==terminal.State?(terminal.tlsv1only=amtstack.wsman.comm.tlsv1only,terminal.Start(currentMeshNode._id,16994,"*","*",0)):terminal.Stop())}
1193 -function onTerminalStateChange(b,c){c4.value=0==c?"Conectar":"desconectar";Q(29).textContent=StatusStrs[c];QE(34,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection of not supported.");
1194 -break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(31).value="100x30",terminal.m.Init(100,30)):(Q(31).value="80x25",terminal.m.Init(80,25))}
1195 -var terminalEmulations=["Terminal UTF8","ASCII estendido","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(33).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(32).value=["Intel (F10 = ESC + [OM)","Alternativo (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1196 -function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(30).value="LF",terminal.m.lineFeed="\n"):(Q(30).value="CR + LF",terminal.m.lineFeed="\r\n")}
1212 +function onTerminalStateChange(b,c){c4.value=0==c?"Conectar":"desconectar";Q(30).textContent=StatusStrs[c];QE(35,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection is not supported.");
1213 +break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(32).value="100x30",terminal.m.Init(100,30)):(Q(32).value="80x25",terminal.m.Init(80,25))}
1214 +var terminalEmulations=["Terminal UTF8","ASCII estendido","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(34).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(33).value=["Intel (F10 = ESC + [OM)","Alternativo (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1215 +function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(31).value="LF",terminal.m.lineFeed="\n"):(Q(31).value="CR + LF",terminal.m.lineFeed="\r\n")}
1216 function terminalCaptureToggle(b){if(!xxdialogMode)if(void 0==terminal.m.capture)terminal.m.capture="",c3.value="Stop Capture";else{if(0<terminal.m.capture.length){b="TerminalCapture";var c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);saveAs(data2blob(terminal.m.capture),b+".txt")}delete terminal.m.capture;
1217 c3.value="Come\u00e7ar captura"}}function terminal_FileSelectHandler(b){haltEvent(b);if(3==terminal.State&&null!=b.dataTransfer&&1==b.dataTransfer.files.length){var c=new FileReader;c.onload=terminal_onSetupBinRead;c.readAsText(b.dataTransfer.files[0])}}function terminal_onSetupBinRead(b){d3pastetextarea.value=b.target.result;setDialogMode(3,"Colar",3,termPaste)}var desktopScreenInfo=null,desktopPollTimer=null,webRtcDesktop=null;
1218 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1219 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1201 -function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1202 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1220 +function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&(null==amtsysstate||null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&null!=amtsysstate.IPS_OptInService.response&&0!=amtsysstate.IPS_OptInService.response.OptInRequired)?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&
1221 +null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1222 0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1223 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1224 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1225 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
1226 "\r\n"},webRtcDesktop.webrtc.oniceconnectionstatechange=function(){null==webRtcDesktop||null==webRtcDesktop.webrtc||"disconnected"!=webRtcDesktop.webrtc.iceConnectionState&&"failed"!=webRtcDesktop.webrtc.iceConnectionState||webRtcDesktopReset()},webRtcDesktop.webrtc.createOffer(function(a){webRtcDesktop.webrtcoffer=a;webRtcDesktop.webrtc.setLocalDescription(a,function(){},webRtcDesktopReset)},webRtcDesktopReset,{mandatory:{OfferToReceiveAudio:!1,OfferToReceiveVideo:!1}})):"answer"==a.action&&null!=
1208 -webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=
1209 -setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(42).innerHTML="")}
1227 +webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.m.ReverseMouseWheel=desktopsettings.reverseMouseWheel,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),
1228 +PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(43).innerHTML="")}
1229 function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(desktopScreenInfo=a.IPS_ScreenSettingData.responses.Body,desktopScreenInfo.KVMRSD=a.IPS_KVMRedirectionSettingData.responses.Body,UpdateDesktopDisplayInfo())}
1211 -function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1230 +function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(43).innerHTML=b+"&nbsp;":Q(43).innerHTML=""}
1231 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1213 -function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Conectar":"desconectar";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("\u00c1rea de trabalho remota","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("\u00c1rea de trabalho remota","The device indicated that this type of connection of not supported."):
1214 -5E4==b.disconnectCode?messagebox("\u00c1rea de trabalho remota","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("\u00c1rea de trabalho remota","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
1232 +function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Conectar":"desconectar";var d=3==c&&!urlvars.kvmviewonly;QE(44,d);QE("deskkeys",d);QE("DeskWD",d);QE(45,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("\u00c1rea de trabalho remota","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("\u00c1rea de trabalho remota","The device indicated that this type of connection is not supported."):
1233 +5E4==b.disconnectCode?messagebox("\u00c1rea de trabalho remota","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?a=null!=b.connectTime&&b.connectTime+5E3<Date.now():50002==b.disconnectCode&&messagebox("\u00c1rea de trabalho remota","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
1234 break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1216 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Configura\u00e7\u00f5es da \u00e1rea de trabalho remota",3,showDesktopSettingsChanged))}
1217 -function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1218 -1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1219 -function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1220 -15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1235 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(41).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Configura\u00e7\u00f5es da \u00e1rea de trabalho remota",3,showDesktopSettingsChanged))}
1236 +function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.reverseMouseWheel=d7kvmrmw.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();
1237 +desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1238 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;d7kvmrmw.checked=desktopsettings.reverseMouseWheel;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",
1239 +12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1240 c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1222 -QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1223 -function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1224 -"8px"),center()))}
1225 -function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"Entrada remota do teclado",3,showDeskTypeEx,'<div>Digite o texto e clique em OK para digit\u00e1-lo remotamente usando um teclado em ingl\u00eas dos EUA. Certifique-se de colocar o cursor remoto na posi\u00e7\u00e3o correta antes de continuar.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1241 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(44,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1242 +function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1!=urlvars.kvmonly&&disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(36,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding="8px"),center()))}
1243 +function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(45).blur(),setDialogMode(11,"Entrada remota do teclado",3,showDeskTypeEx,'<div>Digite o texto e clique em OK para digit\u00e1-lo remotamente usando um teclado em ingl\u00eas dos EUA. Certifique-se de colocar o cursor remoto na posi\u00e7\u00e3o correta antes de continuar.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1244 var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
1227 -function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(48).checked||desktop.m.sendcad()}
1245 +function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(49).checked||desktop.m.sendcad()}
1246 var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511,0]],2:[[65511,1],[65362,1],[65362,0],[65511,0]],3:[[65511,1],[108,1],[108,0],[65511,0]],4:[[65511,1],[109,1],[109,0],[65511,0]],5:[[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]],6:[[65470,1],[65470,0]],7:[[65471,1],[65471,0]],8:[[65472,1],[65472,0]],9:[[65473,1],[65473,0]],10:[[65474,1],[65474,0]],11:[[65475,1],[65475,0]],12:[[65476,1],[65476,0]],13:[[65477,1],[65477,0]],14:[[65478,1],[65478,0]],15:[[65479,
1229 -1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]]};
1230 -function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1247 +1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]],25:[[65293,1],[65293,0]]};
1248 +function deskSendKeys(){if(!Q(49).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1249 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1232 -function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1233 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1250 +function dmousedown(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1251 +function dmousemove(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1252 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1253 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1254 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1237 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Raiz</a>",g=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in g)""!=g[v]&&p24filetreelocation.push(g[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var g=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1238 -70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),e="";null!=l.d&&(e=new Date(l.d),e=e.getMonth()+1+"/"+e.getDate()+"/"+e.getFullYear()+" "+e.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1239 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(g+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+e+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1255 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Raiz</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,r;r=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1256 +70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1257 +encodeURIComponent(l.nx)+'")>'+r+"</a></span></div>":(w=r,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+r+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1258 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1259 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1260 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1246,8 +1264,8 @@ d));QE("p24NewFolderButton",0<p24filetreelocation.length||0==d);QE("p24UploadBut
1264 function p24createfolder(){setDialogMode(11,"Nova pasta",3,p24createfolderEx,"<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% />");focusTextBox("p24renameinput");p24fileNameCheck()}function p24createfolderEx(){p24files.sendCtrlMsg(JSON.stringify({action:"mkdir",reqid:1,path:p24filetreelocation.join("/")+"/"+Q("p24renameinput").value}));p24folderup(999)}
1265 function p24deletefile(){var b=p24getFileSelCount();setDialogMode(11,"Excluir",3,p24deletefileEx,1<b?"Delete "+b+" selected items?":"Delete selected item?")}function p24deletefileEx(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);p24files.sendCtrlMsg(JSON.stringify({action:"rm",reqid:1,path:p24filetreelocation.join("/"),delfiles:b}));p24folderup(999)}
1266 function p24renamefile(){for(var b,c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&(b=p24filetree.dir[c[a].value].n);setDialogMode(11,"Renomear",3,p24renamefileEx,'<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% value="'+b+'" />',{action:"rename",path:p24filetreelocation.join("/"),oldname:b});focusTextBox("p24renameinput");p24fileNameCheck()}
1249 -function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c54",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1250 -function p24uploadFile(){setDialogMode(11,"Subir arquivo",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c54",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1267 +function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c106",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1268 +function p24uploadFile(){setDialogMode(11,"Subir arquivo",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c106",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1269 function p24copyFile(b){var c=document.getElementsByName("fd");p24clipboard=[];p24clipboardCut=b;p24clipboardFolder=p24targetpath;for(b=0;b<c.length;b++)c[b].checked&&"3"==c[b].attributes.file.value&&p24clipboard.push(p24filetree.dir[c[b].value].n);p24updateClipview()}
1270 function p24pasteFile(){var b="";null!=p24clipboard&&0<p24clipboard.length&&(b="Confim "+(0==p24clipboardCut?"copy":"move")+" of "+p24clipboard.length+" entrie"+(1<p24clipboard.length?"s":"")+" to this location?");setDialogMode(11,"Colar",3,p24pasteFileEx,b)}
1271 function p24pasteFileEx(){p24files.sendCtrlMsg(JSON.stringify({action:0==p24clipboardCut?"copy":"move",reqid:1,scpath:p24clipboardFolder,dspath:p24targetpath,names:p24clipboard}));p24folderup(999);1==p24clipboardCut&&(p24clipboardFolder=p24clipboard=null,p24clipboardCut=0,p24updateClipview())}
@@ -1271,36 +1289,36 @@ function iderStart2(){if(1!=Q("floppyImageInput").files.length&&1!=Q("cdromImage
1289 function iderStart3(b,c,a){iderStop();ider=CreateAmtRedirect(CreateAmtRemoteIder());ider.onStateChanged=onIderStateChange;ider.m.floppy=b;ider.m.cdrom=c;ider.m.iderStart=a;ider.m.sectorStats=iderSectorStats;ider.tlsv1only=amtstack.wsman.comm.tlsv1only;ider.Start(currentMeshNode._id,16994,"*","*",0);QV("IDERDiskMapButton",!0)}
1290 function iderStop(){ider&&(ider.m.Stop(),ider.onStateChanged=null,ider.m.onDialogPrompt=null,delete ider);iderTimer&&(clearInterval(iderTimer),delete iderTimer);iderToggleDiskMap(!1)}function onIderStateChange(b,c){QE("c2",3!=c);QE("c8",3!=c);QE("c1",3!=c);QE("c7",3!=c);QV(9,3==c);center();3==c?(urlvars.norefresh||(iderTimer=setInterval(onIderTimer,500)),onIderTimer()):iderTimer&&(clearInterval(iderTimer),delete iderTimer)}
1291 function onIderTimer(){ider.m.Update&&ider.m.Update();-1==ider.m.bytesFromAmt?iderStop():QH(10,"<b>"+(ider.m.server?"Servidor":"")+"Sess\u00e3o IDE-R </b>, conectada,"+ider.m.bytesFromAmt+" no,"+ider.m.bytesToAmt+" Fora.")}var heatMapWidth=600,heatMapDividor={};
1274 -function iderSectorStats(b,c,a,d,g){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </b>, os blocos s\u00e3o {0} bytes.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> Disquete </b>, os blocos s\u00e3o {0} bytes.",512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;g/=c;if(0==b)v.height=
1275 -6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+g;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1292 +function iderSectorStats(b,c,a,d,e){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </b>, os blocos s\u00e3o {0} bytes.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> Disquete </b>, os blocos s\u00e3o {0} bytes.",512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;e/=c;if(0==b)v.height=
1293 +6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+e;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1294 function iderToggleDiskMap(b){var c="none"!=QS("iderHeatmap").display;null==b&&(b=!c);xxdialogMode&&(b=!1);QS("iderHeatmap").display=b?"":"none"}function onIderDialogPrompt(b,c,a){iderCodeBlock&&(document.body.removeChild(iderCodeBlock),delete iderCodeBlock);c.js&&(b=document.createElement("script"),b.text=c.js,iderCodeBlock=document.body.appendChild(b));setDialogMode(11,"Redirecionamento de armazenamento",a?a:3,onIderDialogPromptOk,c.html)}
1295 function onIderDialogPromptOk(b){1==b?window.iderServerCall?ider.m.dialogPrompt(window.iderServerCall()):ider.m.dialogPrompt():iderStop()}function iderServerStart(){xxdialogMode||(iderStop(),ider=CreateAmtRemoteServerIder(),null!=ider&&(ider.onStateChanged=onIderStateChange,ider.m.sectorStats=iderSectorStats,ider.m.onDialogPrompt=onIderDialogPrompt,ider.tlsv1only=amtstack.wsman.comm.tlsv1only,ider.Start(currentMeshNode._id,16994,"*","*",0)))}
1296 var xxRemoteAccess=null,xxEnvironementDetection=null,xxCiraServers=null,xxUserInitiatedCira=null,xxUserInitiatedEnabledState={32768:"Desativado",32769:"BIOS ativado",32770:"Ativar sistema operacional",32771:"BIOS e SO ativado"},xxRemoteAccessCredentiaLinks=null,xxMPSUserPass=null,xxPolicies=null;
1297 function PullRemoteAccess(){var b="*AMT_EnvironmentDetectionSettingData AMT_ManagementPresenceRemoteSAP AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule *AMT_UserInitiatedConnectionService AMT_MPSUsernamePassword".split(" ");11<amtversion&&b.push("*IPS_HTTPProxyService","IPS_HTTPProxyAccessPoint");amtstack.BatchEnum(null,b,processRemote1)}
1280 -function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var g in a)200!=a[g].status&&(d=a[g].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1281 -MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(g in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[g],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1298 +function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var e in a)200!=a[e].status&&(d=a[e].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1299 +MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(e in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[e],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1300 "@Name","Name").Value)),b.MpsType=c.MpsType,c=getItem(c.PolicySet.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyRuleName").Value.split(" ")[0],xxPolicies[c].push(b);updateRemoteAccess()}}
1301 function updateRemoteAccess(){if(null!=xxEnvironementDetection){var b,c="Desativado",a=xxRemoteAccess.IPS_HTTPProxyService&&xxRemoteAccess.IPS_HTTPProxyAccessPoint;xxEnvironementDetection.DetectionStrings&&0<xxEnvironementDetection.DetectionStrings.length&&(c="Ativado,"+xxEnvironementDetection.DetectionStrings.length+" "+(1<xxEnvironementDetection.DetectionStrings.length?"domains":"domain"));b=""+TableStart();b+=TableEntry("Detec\u00e7\u00e3o do ambiente",addLink(c,"editEnvironmentDetection()"));
1302 b+=TableEntry("Op\u00e7\u00f5es de inicia\u00e7\u00e3o do usu\u00e1rio",addLinkConditional(xxUserInitiatedEnabledState[xxUserInitiatedCira.EnabledState],"editUserInitiatedCira()",xxAccountAdminName));c="<i>Nenhum</i>";if(0<xxPolicies.User.length){var c="",d;for(d in xxPolicies.User)0<c.length&&(c+=", "),c+=xxPolicies.User[d].AccessInfo,1==xxPolicies.User[d].MpsType&&(c+=" (CILA)")}b+=TableEntry("Conex\u00e3o iniciada pelo usu\u00e1rio",addLinkConditional(c,'editMpsPolicy("User")',xxAccountAdminName));
1285 -c="<i>Nenhum</i>";if(0<xxPolicies.Alert.length)for(d in c="",xxPolicies.Alert)0<c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("Conex\u00e3o iniciada por alerta",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>Nenhum</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var g=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,
1286 -"PolicyRuleName","Peri\u00f3dico");if(g){var v=atob(g.ExtendedData);0==ReadInt(v,0)&&(c+=format(", a cada {0} segundos",ReadInt(v,4)));1==ReadInt(v,0)&&(g=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+g+":"+v+" daily")}b+=TableEntry("Conex\u00e3o peri\u00f3dica",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Gerenciar servidores de gerenciamento remoto Intel&reg; AMT.<br><br>";if(0==
1303 +c="<i>Nenhum</i>";if(0<xxPolicies.Alert.length)for(d in c="",xxPolicies.Alert)0<c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("Conex\u00e3o iniciada por alerta",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>Nenhum</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var e=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,
1304 +"PolicyRuleName","Peri\u00f3dico");if(e){var v=atob(e.ExtendedData);0==ReadInt(v,0)&&(c+=format(", a cada {0} segundos",ReadInt(v,4)));1==ReadInt(v,0)&&(e=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+e+":"+v+" daily")}b+=TableEntry("Conex\u00e3o peri\u00f3dica",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Gerenciar servidores de gerenciamento remoto Intel&reg; AMT.<br><br>";if(0==
1305 xxCiraServers.length)b+="<div style=padding-left:15px><br><i>Nenhum servidor remoto encontrado.</i></div><br>";else for(d in xxCiraServers)c=":"+xxCiraServers[d].Port,xxCiraServers[d].CN&&(c+=", "+xxCiraServers[d].CN),b+="<div class=itemBar onclick=showServerDetails("+d+")><div style=padding-top:3px><b>"+xxCiraServers[d].AccessInfo+"</b>"+EscapeHtml(c)+"</div></div>";if(a)if(b+="<br>Gerenciar proxies HTTP usados \u200b\u200bpara conex\u00f5es de gerenciamento.<br><br>",c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses,
1306 0==c.length)b+="<div style=padding-left:15px><br><i>Nenhum proxy configurado.</i></div><br>";else for(d in c)b+="<div class=itemBar onclick=showProxyDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(c[d].AccessInfo)+":"+c[d].Port+"</b> / "+EscapeHtml(c[d].NetworkDnsSuffix)+"</div></div>";d="";xxAccountAdminName&&(d=AddButton("Adicionar servidor...","AddRemoteAccessServer()"),a&&(d+=AddButton("Adicionar proxy ...","AddRemoteAccessProxy()")));b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+
1289 -d);QH(52,b)}}var xxEditMpsPolicyType;
1290 -function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="Iniciado pelo usu\u00e1rio");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(Nenhum)",g;for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[g].Name?" selected":
1291 -"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>Servidor prim\u00e1rio</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Externo<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA - Interno</select><div>Tipo MPS Prim\u00e1rio</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";
1292 -c+="<option value=-1>(Nenhum)";for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[g].Name?" selected":"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>Servidor secund\u00e1rio</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Externo<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA - Interno</select><div>Tipo MPS secund\u00e1rio</div></div>")}g=
1293 -0;d&&(g=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+g+">";c+="<div>Vida \u00fatil do t\u00fanel (segundos)</div></div>";"Periodic"==b&&(a=0,g=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),g=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),g+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">Peri\u00f3dico, intervalo de tempo<option value=1"+
1294 -(1==a?" selected":"")+">Hora do dia, uma vez ao dia",c+="</select><div>Tipo de gatilho</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+g+"><div id=ttypelabel></div></div>");setDialogMode(11,format("Conex\u00e3o {0}",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1295 -function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c54",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1307 +d);QH(53,b)}}var xxEditMpsPolicyType;
1308 +function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="Iniciado pelo usu\u00e1rio");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(Nenhum)",e;for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[e].Name?" selected":
1309 +"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>Servidor prim\u00e1rio</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Externo<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA - Interno</select><div>Tipo MPS Prim\u00e1rio</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";
1310 +c+="<option value=-1>(Nenhum)";for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[e].Name?" selected":"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>Servidor secund\u00e1rio</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - Externo<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA - Interno</select><div>Tipo MPS secund\u00e1rio</div></div>")}e=
1311 +0;d&&(e=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+e+">";c+="<div>Vida \u00fatil do t\u00fanel (segundos)</div></div>";"Periodic"==b&&(a=0,e=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),e=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),e+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">Peri\u00f3dico, intervalo de tempo<option value=1"+
1312 +(1==a?" selected":"")+">Hora do dia, uma vez ao dia",c+="</select><div>Tipo de gatilho</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+e+"><div id=ttypelabel></div></div>");setDialogMode(11,format("Conex\u00e3o {0}",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1313 +function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c106",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1314 -1!=Q("d2server1").value),QH("ttypelabel",0==Q("d2ttype").value?"Intervalo de disparo (segundos)":"Hora do dia (HH: MM)"),QE("d2ttype",-1!=Q("d2server1").value));QE("d2lifetime",-1!=Q("d2server1").value);b&&(QE("d2server1cira",-1<Q("d2server1").value),1<xxCiraServers.length&&QE("d2server2cira",-1<Q("d2server1").value&&-1<Q("d2server2").value))}
1315 function editMpsPolicyOk(){var b=xxEditMpsPolicyType;"User"==b&&(b="User Initiated");getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",b)?amtstack.Delete("AMT_RemoteAccessPolicyRule",{PolicyRuleName:b},editMpsPolicyOk2):editMpsPolicyOk2()}
1298 -function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var g,v;0<=Q("d2server1").value&&(g='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1316 +function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var e,v;0<=Q("d2server1").value&&(e='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1317 xxCiraServers[Q("d2server1").value].Name+"</Selector></SelectorSet></ReferenceParameters>");0<=Q("d2server1").value&&1<xxCiraServers.length&&0<=Q("d2server2").value&&(v='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1300 -xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?g&&(0==Q("d2server1cira").value?d.push(g):n.push(g),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):g&&(d.push(g),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1318 +xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?e&&(0==Q("d2server1cira").value?d.push(e):n.push(e),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):e&&(d.push(e),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1319 function editEnvironmentDetection(b){1!=b&&(editEnvironmentDetectionTmp=xxEnvironementDetection.DetectionStrings?Clone(xxEnvironementDetection.DetectionStrings):[]);var c="";xxAccountAdminName&&(c+="Digite at\u00e9 5 sufixos de dom\u00ednio da intranet. Se o computador estiver fora desses dom\u00ednios, as portas locais Intel&reg; AMT ser\u00e3o fechadas e as conex\u00f5es do servidor remoto estar\u00e3o ativas.<br><br>");0==editEnvironmentDetectionTmp.length&&(c+="<i>Nenhum dom\u00ednio da intranet, detec\u00e7\u00e3o de ambiente desativada.</i><br>");
1320 for(var a in editEnvironmentDetectionTmp)c+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("Retirar","editEnvironmentDetectionRemove("+a+")")+'</div><div style=padding-top:3px;max-width:260px;overflow:hidden title="'+editEnvironmentDetectionTmp[a]+'"><b>'+editEnvironmentDetectionTmp[a]+"</b></div></div>";xxAccountAdminName&&5>editEnvironmentDetectionTmp.length&&(c+="<br><input id=edInput placeholder=intranet.org style=width:276px onkeyup=edInputChg() maxlength=63><input type=button id=edAdd value=Add style=width:80px;margin-left:5px onclick=editEnvironmentDetectionAdd()>");
1303 -1==b?QH(63,c):setDialogMode(11,"Detec\u00e7\u00e3o de ambiente",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1321 +1==b?QH(64,c):setDialogMode(11,"Detec\u00e7\u00e3o de ambiente",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1322 function editEnvironmentDetectionDlg2(b,c,a,d){200!=d?messagebox("Detec\u00e7\u00e3o de ambiente",format("Falha ao adicionar servidor, status {0}",d)):a.Body.ReturnValue&&0!=a.Body.ReturnValue?messagebox("Detec\u00e7\u00e3o de ambiente",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}function edInputChg(){5>editEnvironmentDetectionTmp.length&&QE("edAdd",0<Q("edInput").value.length)}
1323 function editEnvironmentDetectionAdd(){editEnvironmentDetectionTmp.push(Q("edInput").value);editEnvironmentDetection(1)}function editEnvironmentDetectionRemove(b){editEnvironmentDetectionTmp.splice(b,1);editEnvironmentDetection(1)}
1324 function editUserInitiatedCira(){if(!xxdialogMode){var b="",c;for(c in xxUserInitiatedEnabledState)b+="<input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxUserInitiatedCira.EnabledState==c?"checked":"")+">"+xxUserInitiatedEnabledState[c]+"<br>";setDialogMode(11,"T\u00fanel iniciado pelo usu\u00e1rio",3,editUserInitiatedCiraDlg,b)}}
@@ -1313,7 +1331,7 @@ function showProxyDetails(b){var c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.respo
1331 function showProxyDetailsOk(b,c){var a=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses[c];2==b&&amtstack.Delete("IPS_HTTPProxyAccessPoint",{Name:a.Name},showProxyDetailsOk2)}function showProxyDetailsOk2(b,c,a,d){408==d?messagebox("Remo\u00e7\u00e3o de Proxy HTTP","N\u00e3o foi poss\u00edvel remover o proxy HTTP, acesso negado."):PullRemoteAccess()}
1332 function AddRemoteAccessProxy(){var b;b='<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessProxyUpdate()><option value=2>Nome do host FQDN<option value=3>Endere\u00e7o IPv4<option value=4>Endere\u00e7o IPv6</select><div>Tipo de conex\u00e3o</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>Porta</div></div>';b+=
1333 "<div style=height:26px><input id=d2domain style=float:right;width:200px maxlength=191 onkeyup=AddRemoteAccessProxyUpdate()><div>Sufixo DNS</div></div>";setDialogMode(11,"Adicionar proxy HTTP",3,AddRemoteAccessProxyOk,b);AddRemoteAccessProxyUpdate()}
1316 -function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c54",b);QH("d2typespan",["","","FQDN / nome do host","Endere\u00e7o IPv4","Endere\u00e7o IPv6"][Q("d2type").value])}function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
1334 +function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c106",b);QH("d2typespan",["","","FQDN / nome do host","Endere\u00e7o IPv4","Endere\u00e7o IPv6"][Q("d2type").value])}function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
1335 function AddRemoteAccessProxyOk2(b,c,a,d){200!=d?messagebox("Adicionar servidor proxy","Falha ao adicionar proxy, status"+d):0!=a.Body.ReturnValue?messagebox("Adicionar servidor proxy",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1336 function AddRemoteAccessServer(){var b=[],c;for(c in xxCertificates)xxCertificates[c].XPrivateKey&&b.push(xxCertificates[c]);var a;a="<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()><option value=201>Nome do host FQDN<option value=3>Endere\u00e7o IPv4</select><div>Tipo de conex\u00e3o</div></div><div style=height:26px><input id=d2name style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div id=d2lname></div></div>";a+='<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>Porta do servidor</div></div>';
1337 a+="<div style=height:26px id=d2ucn><input id=d2cn style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Nome comum do servidor</div></div>";a+="<div style=height:26px><select id=d2auth style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()>";0<b.length&&(a+="<option value=1>Certificado");a+="<option value=2>Usu\u00e1rio senha</select><div>Tipo de Autentica\u00e7\u00e3o</div></div>";a+="<span id=d2utype>";a+="<div style=height:26px><input id=d2user style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>Nome do usu\u00e1rio</div></div>";
@@ -1323,85 +1341,88 @@ function AddRemoteAccessServerOk(){var b,c,a,d;1==Q("d2auth").value?b='<Address
1341 "</Selector></SelectorSet></ReferenceParameters>":(c=Q("d2user").value,a=Q("d2pass").value);0<Q("d2cn").value.length&&(d=Q("d2cn").value);amtstack.AMT_RemoteAccessService_AddMpServer(Q("d2name").value,Q("d2type").value,Q("d2port").value,Q("d2auth").value,b,c,a,d,AddRemoteAccessServerOk2)}
1342 function AddRemoteAccessServerOk2(b,c,a,d){200!=d?messagebox("Adicionar servidor da Internet",format("Falha ao adicionar servidor, status {0}",d)):0!=a.Body.ReturnValue?messagebox("Adicionar servidor da Internet",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1343 function AddRemoteAccessServerUpdate(){var b=0!=Q("d2name").value.length;3==Q("d2type").value&&1==b&&(b=0!=Q("d2cn").value.length);2==Q("d2auth").value&&1==b&&(b=0!=Q("d2user").value.length&&passwordcheck(Q("d2pass").value));if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;if(-1!=Q("d2name").value.indexOf(":")||3==Q("d2type").value&&-1!=Q("d2cn").value.indexOf(":"))b=!1;QH("d2lname",201==Q("d2type").value?"nome de anfitri\u00e3o":"Endere\u00e7o IPv4");QV("d2utype",2==Q("d2auth").value);
1326 -QV("d2ucn",3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c54",b)}
1344 +QV("d2ucn",3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c106",b)}
1345 function showEditNameDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_GeneralSettings.response.HostName,a=amtsysstate.AMT_GeneralSettings.response.DomainName;null!=a&&0<a.length&&(c+="."+a);c='<br><div style=height:26px><input id=d11name value="'+c+'" style=float:right;width:200px><div>Nome e dom\u00ednio</div></div>';1==b&&(b=1==amtsysstate.AMT_GeneralSettings.response.SharedFQDN,c+="<div style=height:26px><select id=d11fqdn style=float:right;width:200px><option value=true "+(b?"selected":"")+'>Compartilhado, igual ao SO<option value="false" '+
1346 (b?"":"selected")+">Dedicado, diferente do SO</select><div>Partilha de nomes</div></div>");setDialogMode(11,"Nome do computador",3,editNameDlgOk,c)}}function editNameDlgOk(){var b=Q("d11name").value,c=b.indexOf("."),a="";0<=c&&(a=b.substring(c+1),b=b.substring(0,c));c=Clone(amtsysstate.AMT_GeneralSettings.response);c.HostName=b;c.DomainName=a;Q("d11fqdn")&&(c.SharedFQDN=d11fqdn.value);amtstack.Put("AMT_GeneralSettings",c,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1329 -function computerNameGet(b,c,a,d){200==d&&(amtsysstate.AMT_GeneralSettings.response=a.Body,updateSystemStatus())}function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c36.value=c;c37.value=b.DDNSPeriodicUpdateInterval;c38.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"Cliente DNS din\u00e2mico",3,showEditDnsDlgOk)}}
1330 -function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c36.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c36.value?!0:!1;2==c36.value&&(b.DDNSPeriodicUpdateInterval=c37.value,b.DDNSTTL=c38.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1331 -function showEditDnsDlgChange(){QE("c37",2==c36.value);QE("c38",2==c36.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"Recursos da Intel&reg; AMT",3,featuresDlgOk))}
1332 -function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,g){200!=g?messagebox("Erro","Erro RedirectionService, RequestStateChange"+g):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,g){200!=g?messagebox("Erro","Erro KVMRedirectionSAP, RequestStateChange"+
1333 -g):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("Erro","Erro RedirectionService PUT"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1334 -function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c49.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c50.checked=!c49.checked),c51.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c52.checked=!c51.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1347 +function computerNameGet(b,c,a,d){200==d&&(amtsysstate.AMT_GeneralSettings.response=a.Body,updateSystemStatus())}function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c61.value=c;c62.value=b.DDNSPeriodicUpdateInterval;c63.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"Cliente DNS din\u00e2mico",3,showEditDnsDlgOk)}}
1348 +function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c61.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c61.value?!0:!1;2==c61.value&&(b.DDNSPeriodicUpdateInterval=c62.value,b.DDNSTTL=c63.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1349 +function showEditDnsDlgChange(){QE("c62",2==c61.value);QE("c63",2==c61.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"Recursos da Intel&reg; AMT",3,featuresDlgOk))}
1350 +function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,e){200!=e?messagebox("Erro","Erro RedirectionService, RequestStateChange"+e):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,e){200!=e?messagebox("Erro","Erro KVMRedirectionSAP, RequestStateChange"+
1351 +e):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("Erro","Erro RedirectionService PUT"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1352 +function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c74.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c75.checked=!c74.checked),c76.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c77.checked=!c76.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1353 function showEnableBootServiceDlgOk(){var b=32768+parseInt(document.querySelector("input[name=d26a]:checked").value);15<amtversion&&(b+=parseInt(document.querySelector("input[name=d26b]:checked").value));amtstack.CIM_BootService_RequestStateChange(b,null,showEnableBootServiceDlgResponse,b)}
1336 -function showEnableBootServiceDlgResponse(b,c,a,d,g){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,g),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1337 -function showEnableBootServiceDlgResponse2(b,c,a,d,g){200==d&&a.Body.EnabledState!=g&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"Consentimento do Usu\u00e1rio",3,consentDlgOk)}}
1354 +function showEnableBootServiceDlgResponse(b,c,a,d,e){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,e),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1355 +function showEnableBootServiceDlgResponse2(b,c,a,d,e){200==d&&a.Body.EnabledState!=e&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"Consentimento do Usu\u00e1rio",3,consentDlgOk)}}
1356 function consentDlgOk(){amtsysstate.IPS_OptInService.response.OptInRequired=document.querySelector("input[name=d10]:checked").value;amtstack.Put("IPS_OptInService",amtsysstate.IPS_OptInService.response,function(){amtstack.Get("IPS_OptInService",consentGet,0,1)},0,1)}function consentGet(b,c,a,d){200==d&&PullSystemStatus()}var ipv6addrtype="Endere\u00e7o local do link;Endere\u00e7o local da rede;Endere\u00e7o global;Usu\u00e1rio configurado;N\u00e3o permitido;DAD em andamento;v\u00e1lido;descontinuada;preferido / descontinuado;expirado;colis\u00e3o;n\u00e3o permitido".split(";");
1357 function showIPv6AddrDlg(b,c){if(!xxdialogMode){var a=TableStart();t=c.split(",");for(var d=0;d<t.length;d+=3)a+=TableEntry("<b>"+t[d]+"</b><br><span style=font-size:10px>"+ipv6addrtype[t[d+1]]+","+ipv6addrtype[+t[d+2]+5]+"</span>","");setDialogMode(11,0==b?"Endere\u00e7os IPv6 para interface com fio":"Endere\u00e7os IPv6 para interface sem fio",1,null,a+TableEnd())}}
1340 -function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(69,0==b);QV(70,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 desativado");QH("d21l1","IPv6 ativado, autom\u00e1tico");QH("d21l2","IPv6 ativado, endere\u00e7o autom\u00e1tico + manual");d21o0.checked=!c;d21o1.checked=c&&
1341 -!ipv6manual;d21o2.checked=c&&ipv6manual;c31.value=isIpAddress(a.IPv6Address,"");c33.value=isIpAddress(a.DefaultRouter,"");c34.value=isIpAddress(a.PrimaryDNS,"");c35.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"Suporte IPv6 para interface com fio":"Suporte IPv6 para interface sem fio",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1342 -function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c31.value?"::":c31.value.toLocaleLowerCase(),a.DefaultRouter=""==c33.value?"::":c33.value.toLocaleLowerCase(),
1343 -a.PrimaryDNS=""==c34.value?"::":c34.value.toLocaleLowerCase(),a.SecondaryDNS=""==c35.value?"::":c35.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1344 -"CreationClassName").Value,g=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1345 -d+'</w:Selector><w:Selector Name="DeviceID">'+g+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1346 -b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",g=Clone(c[a]);g.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",g,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Suporte IPv6",format("N\u00e3o foi poss\u00edvel definir o estado IPv6, erro {0}",d))}
1358 +function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(68,0==b);QV(69,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 desativado");QH("d21l1","IPv6 ativado, autom\u00e1tico");QH("d21l2","IPv6 ativado, endere\u00e7o autom\u00e1tico + manual");d21o0.checked=!c;d21o1.checked=c&&
1359 +!ipv6manual;d21o2.checked=c&&ipv6manual;c56.value=isIpAddress(a.IPv6Address,"");c58.value=isIpAddress(a.DefaultRouter,"");c59.value=isIpAddress(a.PrimaryDNS,"");c60.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"Suporte IPv6 para interface com fio":"Suporte IPv6 para interface sem fio",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1360 +function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c56.value?"::":c56.value.toLocaleLowerCase(),a.DefaultRouter=""==c58.value?"::":c58.value.toLocaleLowerCase(),
1361 +a.PrimaryDNS=""==c59.value?"::":c59.value.toLocaleLowerCase(),a.SecondaryDNS=""==c60.value?"::":c60.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1362 +"CreationClassName").Value,e=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1363 +d+'</w:Selector><w:Selector Name="DeviceID">'+e+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1364 +b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",e=Clone(c[a]);e.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",e,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Suporte IPv6",format("N\u00e3o foi poss\u00edvel definir o estado IPv6, erro {0}",d))}
1365 function showPingActionDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,b=(1==b.PingResponseEnabled)+((1==b.RmcpPingResponseEnabled)<<1);d20a.checked=0==b;d20b.checked=1==b;d20c.checked=2==b;d20d.checked=3==b;setDialogMode(20,"Resposta de ping Intel&reg; AMT",3,showPingActionDlgOk)}}
1366 function showPingActionDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response),c=document.querySelector("input[name=d20]:checked").value;b.PingResponseEnabled=0!=(c&1);b.RmcpPingResponseEnabled=0!=(c&2);amtstack.Put("AMT_GeneralSettings",b,PullSystemStatus,0,1)}
1349 -function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(68,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(69,!0);QV(70,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","Configura\u00e7\u00e3o autom\u00e1tica usando o servidor DHCP");QH("d21l2","Configura\u00e7\u00e3o est\u00e1tica usando as configura\u00e7\u00f5es IPv4 abaixo");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=
1350 -!d21o1.checked;c31.value=isIpAddress(b.IPAddress,"");c32.value=isIpAddress(b.SubnetMask,"");c33.value=isIpAddress(b.DefaultGateway,"");c34.value=isIpAddress(b.PrimaryDNS,"");c35.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"Configura\u00e7\u00f5es IPv4",3,showIPSetupDlgOk)}}
1351 -function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6 ativado, endere\u00e7o autom\u00e1tico + manual"==Q("d21l2").innerHTML&&2>c31.value.split(":").length&&(b=!1);QE("c54",b);c31.disabled=c32.disabled=c33.disabled=c34.disabled=c35.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1352 -function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c31.value,b.SubnetMask=c32.value,b.DefaultGateway=c33.value,""!=c34.value&&(b.PrimaryDNS=c34.value),""!=c35.value&&
1353 -(b.SecondaryDNS=c35.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Configura\u00e7\u00f5es IPv4",format("N\u00e3o foi poss\u00edvel definir os par\u00e2metros de rede, erro {0}",d))}amtPowerBootCapabilities=null;
1367 +function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(67,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(68,!0);QV(69,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","Configura\u00e7\u00e3o autom\u00e1tica usando o servidor DHCP");QH("d21l2","Configura\u00e7\u00e3o est\u00e1tica usando as configura\u00e7\u00f5es IPv4 abaixo");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=
1368 +!d21o1.checked;c56.value=isIpAddress(b.IPAddress,"");c57.value=isIpAddress(b.SubnetMask,"");c58.value=isIpAddress(b.DefaultGateway,"");c59.value=isIpAddress(b.PrimaryDNS,"");c60.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"Configura\u00e7\u00f5es IPv4",3,showIPSetupDlgOk)}}
1369 +function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6 ativado, endere\u00e7o autom\u00e1tico + manual"==Q("d21l2").innerHTML&&2>c56.value.split(":").length&&(b=!1);QE("c106",b);c56.disabled=c57.disabled=c58.disabled=c59.disabled=c60.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1370 +function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c56.value,b.SubnetMask=c57.value,b.DefaultGateway=c58.value,""!=c59.value&&(b.PrimaryDNS=c59.value),""!=c60.value&&
1371 +(b.SecondaryDNS=c60.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Configura\u00e7\u00f5es IPv4",format("N\u00e3o foi poss\u00edvel definir os par\u00e2metros de rede, erro {0}",d))}amtPowerBootCapabilities=null;
1372 function showPowerActionDlg(){xxdialogMode||(statusbox("A\u00e7\u00f5es de poder","Verificando recursos ..."),amtstack.Get("AMT_BootCapabilities",powerActionResponse00,0,1))}
1355 -function powerActionResponse00(b,c,a,d){if(200==d){b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(g){}amtPowerBootCapabilities=a.Body;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","Energizar",2);b&1&&(addOption("d5actionSelect","Redefinir",10),addOption("d5actionSelect","Ciclo de energia",5),addOption("d5actionSelect","Desligar",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect","Ligar ao diagn\u00f3stico",300),
1356 -b&1&&addOption("d5actionSelect","Redefinir para diagn\u00f3stico",301));9<amtversion&&b&1&&(addOption("d5actionSelect","Despertar do sistema operacional em modo de espera",500),addOption("d5actionSelect","Economia de energia do SO",501),addOption("d5actionSelect","Soft-off",12),addOption("d5actionSelect","Redefini\u00e7\u00e3o suave",14),addOption("d5actionSelect","Dormir",4),addOption("d5actionSelect","Hibernate",7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&addOption("d5actionSelect","Ligue o BIOS",
1357 -100),b&1&&addOption("d5actionSelect","Redefinir para BIOS",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","Ligue para apagar com seguran\u00e7a",104),b&1&&addOption("d5actionSelect","Redefinir para exclus\u00e3o segura",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",
1373 +function showPowerActionDlg(){if(!xxdialogMode){var b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(c){}amtPowerBootCapabilities=amtsysstate.AMT_BootCapabilities.response;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","Energizar",2);b&1&&(addOption("d5actionSelect","Redefinir",10),addOption("d5actionSelect","Ciclo de energia",5),addOption("d5actionSelect","Desligar",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect",
1374 +"Ligar ao diagn\u00f3stico",300),b&1&&addOption("d5actionSelect","Redefinir para diagn\u00f3stico",301));9<amtversion&&b&1&&(addOption("d5actionSelect","Despertar do sistema operacional em modo de espera",500),addOption("d5actionSelect","Economia de energia do SO",501),addOption("d5actionSelect","Soft-off",12),addOption("d5actionSelect","Redefini\u00e7\u00e3o suave",14),addOption("d5actionSelect","Dormir",4),addOption("d5actionSelect","Hibernate",7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&addOption("d5actionSelect",
1375 +"Ligue o BIOS",100),b&1&&addOption("d5actionSelect","Redefinir para BIOS",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","Ligue para apagar com seguran\u00e7a",104),b&1&&addOption("d5actionSelect","Redefinir para exclus\u00e3o segura",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",
1376 106),b&1&&addOption("d5actionSelect","Reset to Platform Erase",107));b&1&&addOption("d5actionSelect","Redefinir para disquete IDE-R",200);b&2&&addOption("d5actionSelect","Ligue o disquete IDE-R",201);b&1&&addOption("d5actionSelect","Redefinir para CD-ROM IDE-R",202);b&2&&addOption("d5actionSelect","Ligue o CD-ROM IDE-R",203);b&1&&addOption("d5actionSelect","Redefinir para PXE",400);b&2&&addOption("d5actionSelect","Ligue o PXE",401);addOption("d5actionSelect","A\u00e7\u00e3o personalizada ...",999);
1359 -5<amtversion&&addOption("d5actionSelect","Consentimento do usu\u00e1rio ...",998);setDialogMode(5,"A\u00e7\u00f5es de poder",3,powerActionDlgCheck)}else messagebox("A\u00e7\u00e3o de poder",format("N\u00e3o foi poss\u00edvel obter os recursos do sistema, erro {0}",d))}
1360 -function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"A\u00e7\u00e3o de energia conclu\u00edda."):QH(60,format("Erro de a\u00e7\u00e3o de energia # {0}.",g));setDialogMode(1,"A\u00e7\u00e3o de poder",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Confirmar a execu\u00e7\u00e3o do Intel&reg; Remote Secure Erase?<br>Digite a senha de Exclus\u00e3o segura, se necess\u00e1rio.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Senha</div></div><br><div style=color:red><b> AVISO: </b> Isso limpar\u00e1 os dados no sistema remoto.</div>",
1377 +5<amtversion&&addOption("d5actionSelect","Consentimento do usu\u00e1rio ...",998);setDialogMode(5,"A\u00e7\u00f5es de poder",3,powerActionDlgCheck)}}
1378 +function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"A\u00e7\u00e3o de energia conclu\u00edda."):QH(61,format("Erro de a\u00e7\u00e3o de energia # {0}.",e));setDialogMode(1,"A\u00e7\u00e3o de poder",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Confirmar a execu\u00e7\u00e3o do Intel&reg; Remote Secure Erase?<br>Digite a senha de Exclus\u00e3o segura, se necess\u00e1rio.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Senha</div></div><br><div style=color:red><b> AVISO: </b> Isso limpar\u00e1 os dados no sistema remoto.</div>",
1379 rsepass=1,setDialogMode(11,"A\u00e7\u00f5es de poder",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1362 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> AVISO: </b> Isso limpar\u00e1 os dados no sistema remoto.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");
1363 -d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password",
1364 -"<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"A\u00e7\u00f5es de poder",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1365 -function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,g=[1,2,6,25,26,31],v;for(v in g)d&1<<g[v]&&Q("rpef"+g[v]).checked&&(a+=1<<g[v]);d=makeUefiBootParam(1,a,4);g=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),g++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),g++);platfromEraseTLV={tlv:btoa(d),tlvlen:g};c?(statusbox("A\u00e7\u00e3o de poder","Verificando estado ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1380 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> AVISO: </b> Isso limpar\u00e1 os dados no sistema remoto.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&8&&a.push("<label><input id=rpef3 type=checkbox onchange=powerActionDlgRPEValidate()>Verify Storage Erase</label>");
1381 +d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&65536&&a.push("<label><input id=rpef16 type=checkbox onchange=powerActionDlgRPEValidate()>OEM Custom Action</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&
1382 +-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");0<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+
1383 +addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpeeomdata style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("OEM Data (HEX)","<input id=rpeoemdatax style=width:210px maxlength=256 type=input>")+"</div>";setDialogMode(11,"A\u00e7\u00f5es de poder",3,powerActionDlgRPEEx,c,b);QE("c106",!1)}
1384 +function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,3,6,16,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QV("rpeeomdata",b&65536);QE("c106",b)}var platfromEraseTLV=null;
1385 +function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,3,6,16,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);a&65536&&""!=Q("rpeoemdatax").value&&(d+=makeUefiBootParam(20,hex2rstr(Q("rpeoemdatax").value),null,11),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("A\u00e7\u00e3o de poder",
1386 +"Verificando estado ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1387 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("A\u00e7\u00e3o de poder","Verificando estado ...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=!1);13!=currentView&&
1388 10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
1368 -function showAdvPowerDlg(){try{Q("c39").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1389 +function showAdvPowerDlg(){try{Q("c64").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1390 QV("ForceHDBootOption",1==amtPowerBootCapabilities.ForceHardDriveBoot);QV("ForcePXEBootOption",1==amtPowerBootCapabilities.ForcePXEBoot);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);QV("d24dSerialOverLan",1==amtPowerBootCapabilities.SOL);
1391 QV("d24dSecureErase",1==amtPowerBootCapabilities.SecureErase);QV("d24dPlatformErase",null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&0!=(amtsysstate.CIM_BootService.response.EnabledState&2));QV("d24dFirmwareReset",1==amtPowerBootCapabilities.ConfigurationDataReset);QV("d24dLockSleepButton",1==amtPowerBootCapabilities.SleepButtonLock);QV("d24dUserPasswordBypass",1==amtPowerBootCapabilities.UserPasswordBypass);
1371 -QV("c46",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c47",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c48",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);setDialogMode(24,"A\u00e7\u00e3o de energia personalizada",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}
1372 -function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c39").value&&600>Q("c39").value;QE("c41",!b);QE("c43",!b);QE("idd_d24IDERBootDevice",!b);QE("c45",!b);QE("idd_d24RSEPass",!b);QE("c54",!0)}
1373 -function showAdvPowerDlgOk(){var b=Q("c39").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"A\u00e7\u00e3o de energia conclu\u00edda."):QH(60,format("Erro de a\u00e7\u00e3o de energia # {0}.",g));setDialogMode(1,"A\u00e7\u00e3o de poder",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c39").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=
1374 -Q("d24BiosSecureBoot").checked,AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c43").value,AvdPowerDlg.FirmwareVerbosity=Q("c45").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c44").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked,AvdPowerDlg.LockSleepButton=
1392 +QV("c71",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c72",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c73",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);QH("c66",'<option value=0>None</option><option id="ForceDVDBootOption" value=1>Force CD/DVD Boot</option><option id="ForcePXEBootOption" value=2>Force PXE Boot</option><option id="ForceHDBootOption" value=3>Force Hard Disk Boot</option><option id="ForceDiagBootOption" value=4>Force Diagnostic Boot</option>');
1393 +setDialogMode(24,"A\u00e7\u00e3o de energia personalizada",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c64").value&&600>Q("c64").value;QE("c66",!b);QE("c68",!b);QE("idd_d24IDERBootDevice",!b);QE("c70",!b);QE("idd_d24RSEPass",!b);QE("c106",!0)}
1394 +function showAdvPowerDlgOk(){var b=Q("c64").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"A\u00e7\u00e3o de energia conclu\u00edda."):QH(61,format("Erro de a\u00e7\u00e3o de energia # {0}.",e));setDialogMode(1,"A\u00e7\u00e3o de poder",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c64").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=
1395 +Q("d24BiosSecureBoot").checked,AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c68").value,AvdPowerDlg.FirmwareVerbosity=Q("c70").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c69").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked,AvdPowerDlg.LockSleepButton=
1396 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,AvdPowerDlg.PlatformErase=Q("d24PlatformErase").checked,AvdPowerDlg.FirmwareReset=Q("d24FirmwareReset").checked,!0===AvdPowerDlg.SecureErase&&0<Q("d24rsepass").value.length&&
1397 (AvdPowerDlg.RSEPassword=Q("d24rsepass").value),!0===AvdPowerDlg.PlatformErase?powerActionDlgRPE(!0):(statusbox("A\u00e7\u00e3o de poder","Verificando estado ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)))}
1377 -function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("A\u00e7\u00e3o de poder",format("Erro # {0}",d)):4294967295==a.Body.OptInRequired&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(d6ConsentText.value="",setDialogMode(6,"Consentimento do Usu\u00e1rio",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("A\u00e7\u00e3o de poder","Iniciando a inscri\u00e7\u00e3o ..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,
1378 -0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Consentimento do Usu\u00e1rio","N\u00e3o \u00e9 necess\u00e1rio o consentimento do usu\u00e1rio."):(statusbox("A\u00e7\u00e3o de poder","Obtendo configura\u00e7\u00f5es de inicializa\u00e7\u00e3o ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1398 +function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("A\u00e7\u00e3o de poder",format("Erro # {0}",d)):(4294967295==a.Body.OptInRequired||connectDesktopConsent&&0!=a.Body.OptInRequired)&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(amtstack.IPS_OptInService_CancelOptIn(null),d6ConsentText.value="",setDialogMode(6,"Consentimento do Usu\u00e1rio",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("A\u00e7\u00e3o de poder",
1399 +"Iniciando a inscri\u00e7\u00e3o ..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Consentimento do Usu\u00e1rio","N\u00e3o \u00e9 necess\u00e1rio o consentimento do usu\u00e1rio."):(statusbox("A\u00e7\u00e3o de poder","Obtendo configura\u00e7\u00f5es de inicializa\u00e7\u00e3o ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1400 function powerActionResponseC1(b,c,a,d){200!=d?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("A\u00e7\u00e3o de poder",format("Erro #",d)):0!=a.Body.ReturnValue?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("Erro de consentimento do usu\u00e1rio",a.Body.ReturnValueStr.replace(/_/g," ")):(d6ConsentText.value="",setDialogMode(6,"Consentimento do Usu\u00e1rio",11,powerActionSendConsent),checkConsentDisplay(),consentChanged(),amtstack.Enum("CIM_ServiceAvailableToElement",
1401 function(a,b,c,d){errcheck(d,a)||(amtsysstate.CIM_ServiceAvailableToElement.responses=c,updateSystemStatus(),null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState&&amtstack.RequestPowerStateChange(2,function(a,b,c,d){}))}))}
1381 -function powerActionSendConsent(b){0==b?amtstack.IPS_OptInService_CancelOptIn(function(){}):(statusbox("A\u00e7\u00e3o de poder","Enviando consentimento do usu\u00e1rio ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1402 +function powerActionSendConsent(b){console.log("powerActionSendConsent",b);0==b?(amtstack.IPS_OptInService_CancelOptIn(function(){}),connectDesktopConsent=!1,desktop.Stop()):(statusbox("A\u00e7\u00e3o de poder","Enviando consentimento do usu\u00e1rio ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1403 function powerActionResponseC2(b,c,a,d){200!=d?messagebox("A\u00e7\u00e3o de poder",format("Erro # {0}",d)):0!=a.Body.ReturnValue?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Consentimento do Usu\u00e1rio","Consentimento do usu\u00e1rio bem-sucedido."):(statusbox("A\u00e7\u00e3o de poder","Verificando estado ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1383 -function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("A\u00e7\u00e3o de poder",format("Erro # {0}",d));else{b=d5actionSelect.value;var g=a.Body;g.ConfigurationDataReset=!1;delete g.WinREBootEnabled;delete g.UEFILocalPBABootEnabled;delete g.UEFIHTTPSBootEnabled;delete g.SecureBootControlEnabled;delete g.BootguardStatus;delete g.OptionsCleared;delete g.BIOSLastStatus;delete g.UefiBootParametersArray;delete g.RPEEnabled;999==b?(g.BIOSPause=AvdPowerDlg.BIOSPause,g.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1384 -g.BIOSSetup=AvdPowerDlg.BIOSSetup,g.BootMediaIndex=AvdPowerDlg.BootMediaIndex,g.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,g.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,g.IDERBootDevice=AvdPowerDlg.IDERBootDevice,g.LockKeyboard=AvdPowerDlg.LockKeyboard,g.LockPowerButton=AvdPowerDlg.LockPowerButton,g.LockResetButton=AvdPowerDlg.LockResetButton,g.LockSleepButton=AvdPowerDlg.LockSleepButton,g.ReflashBIOS=AvdPowerDlg.ReflashBIOS,g.UseIDER=AvdPowerDlg.UseIDER,g.UseSOL=AvdPowerDlg.UseSOL,
1385 -g.UseSafeMode=AvdPowerDlg.UseSafeMode,g.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=g.SecureErase&&(g.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==g.SecureErase&&AvdPowerDlg.RSEPassword&&(g.RSEPassword=AvdPowerDlg.RSEPassword)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1386 -0!=(amtPowerBootCapabilities.PlatformErase&1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(g.BIOSPause=!1,g.EnforceSecureBoot=!1,g.BIOSSetup=99<b&&104>b,g.BootMediaIndex=0,g.FirmwareVerbosity=0,g.ForcedProgressEvents=!1,g.IDERBootDevice=202==b||203==b?1:0,g.LockKeyboard=!1,g.LockPowerButton=!1,g.LockResetButton=!1,g.LockSleepButton=!1,g.ReflashBIOS=
1387 -!1,g.UseIDER=199<b&&300>b,g.UseSOL=13==currentView&&8!=b&&300>b,g.UseSafeMode=!1,g.UserPasswordBypass=!1,null!=g.SecureErase&&(g.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===g.SecureErase&&0<rsepass.length&&(g.RSEPassword=rsepass)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&
1388 -1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=!1),rsepass=null);console.log("A\u00e7\u00e3o de inicializa\u00e7\u00e3o: "+b);console.log("Definindo as configura\u00e7\u00f5es de inicializa\u00e7\u00e3o: "+ObjectToString2(g));statusbox("A\u00e7\u00e3o de poder","Definindo configura\u00e7\u00f5es de inicializa\u00e7\u00e3o ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,
1389 -function(a,b,c,d){200!=d?messagebox("A\u00e7\u00e3o de poder",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",g,powerActionResponse2,0,1)},0,1)}}
1390 -function powerActionResponse2(b,c,a,d,g){200!=d?messagebox("A\u00e7\u00e3o de poder",format("PUT AMT_BootSettingData, erro # {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("A\u00e7\u00e3o de poder","Definindo a pr\u00f3xima inicializa\u00e7\u00e3o ..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1391 -function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c41.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c41.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c41").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1404 +function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("A\u00e7\u00e3o de poder",format("Erro # {0}",d));else{b=d5actionSelect.value;var e=a.Body;e.ConfigurationDataReset=!1;delete e.WinREBootEnabled;delete e.UEFILocalPBABootEnabled;delete e.UEFIHTTPSBootEnabled;delete e.SecureBootControlEnabled;delete e.BootguardStatus;delete e.OptionsCleared;delete e.BIOSLastStatus;delete e.UefiBootParametersArray;delete e.RPEEnabled;999==b?(e.BIOSPause=AvdPowerDlg.BIOSPause,e.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1405 +e.BIOSSetup=AvdPowerDlg.BIOSSetup,e.BootMediaIndex=AvdPowerDlg.BootMediaIndex,e.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,e.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,e.IDERBootDevice=AvdPowerDlg.IDERBootDevice,e.LockKeyboard=AvdPowerDlg.LockKeyboard,e.LockPowerButton=AvdPowerDlg.LockPowerButton,e.LockResetButton=AvdPowerDlg.LockResetButton,e.LockSleepButton=AvdPowerDlg.LockSleepButton,e.ReflashBIOS=AvdPowerDlg.ReflashBIOS,e.UseIDER=AvdPowerDlg.UseIDER,e.UseSOL=AvdPowerDlg.UseSOL,
1406 +e.UseSafeMode=AvdPowerDlg.UseSafeMode,e.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=e.SecureErase&&(e.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==e.SecureErase&&AvdPowerDlg.RSEPassword&&(e.RSEPassword=AvdPowerDlg.RSEPassword)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1407 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(e.BIOSPause=!1,e.EnforceSecureBoot=!1,e.BIOSSetup=99<b&&104>b,e.BootMediaIndex=0,e.FirmwareVerbosity=0,e.ForcedProgressEvents=!1,e.IDERBootDevice=202==b||203==b?1:0,e.LockKeyboard=!1,e.LockPowerButton=!1,e.LockResetButton=!1,e.LockSleepButton=
1408 +!1,e.ReflashBIOS=!1,e.UseIDER=199<b&&300>b,e.UseSOL=13==currentView&&8!=b&&300>b,e.UseSafeMode=!1,e.UserPasswordBypass=!1,null!=e.SecureErase&&(e.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===e.SecureErase&&0<rsepass.length&&(e.RSEPassword=rsepass)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&
1409 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=!1),rsepass=null);console.log("A\u00e7\u00e3o de inicializa\u00e7\u00e3o: "+b);console.log("Definindo as configura\u00e7\u00f5es de inicializa\u00e7\u00e3o: "+ObjectToString2(e));statusbox("A\u00e7\u00e3o de poder","Definindo configura\u00e7\u00f5es de inicializa\u00e7\u00e3o ...");
1410 +amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,b,c,d){200!=d?messagebox("A\u00e7\u00e3o de poder",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",e,powerActionResponse2,0,1)},0,1)}}
1411 +function powerActionResponse2(b,c,a,d,e){200!=d?messagebox("A\u00e7\u00e3o de poder",format("PUT AMT_BootSettingData, erro # {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("A\u00e7\u00e3o de poder","Definindo a pr\u00f3xima inicializa\u00e7\u00e3o ..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1412 +function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c66.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c66.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c66").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1413 c+"</Selector></SelectorSet></ReferenceParameters>",powerActionResponse3)}var targetPowerAction=0;
1393 -function powerActionResponse3(b,c,a,d){console.log("powerActionResponse3("+c+","+a+","+d+")");if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("A\u00e7\u00e3o de poder","Executando a\u00e7\u00e3o de poder ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==
1394 -b&&(b=AvdPowerDlg.Action);targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("A\u00e7\u00e3o de poder","Pr\u00f3ximo conjunto de a\u00e7\u00f5es de inicializa\u00e7\u00e3o.")}}
1395 -function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"A\u00e7\u00e3o de energia conclu\u00edda."),setDialogMode(1,"A\u00e7\u00e3o de poder",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c54",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}
1414 +function powerActionResponse3(b,c,a,d){if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("A\u00e7\u00e3o de poder","Executando a\u00e7\u00e3o de poder ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==b&&(b=AvdPowerDlg.Action);targetPowerAction=b;11==b&&(b=
1415 +10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("A\u00e7\u00e3o de poder","Pr\u00f3ximo conjunto de a\u00e7\u00f5es de inicializa\u00e7\u00e3o.")}}
1416 +function powerActionResponse4(b,c,a,d){200==d&&(QH(61,"A\u00e7\u00e3o de energia conclu\u00edda."),setDialogMode(1,"A\u00e7\u00e3o de poder",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c106",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}
1417 function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1418 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1419 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1399 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var g=b[c].app?b[c].app:"";a[d][g]||(a[d][g]={});b[c].name&&(a[d][g][b[c].name]=b[c])}xxStorage.content=
1400 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gerenciar o armazenamento Intel&reg; AMT para este computador.<br><br>";var v,n,g="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,e;for(e in b[c][p]){q++;if(c!=v||p!=n)""!=g&&(a+=g,g="<br>"),v=c,n=p,g=""!=c?g+EscapeHtml(c+
1401 -" / "+p):g+"Raiz";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+e+'"',g=g+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+e+'",'+C+")><div style=float:right>"),g=g+(" "+AddButton2("Baixar","DownloadFromStorage("+C+',"'+e+'",event)')),g=g+("</div><div style=padding-top:3px><b>"+EscapeHtml(e)+"</b>, <i>"+b[c][p][e].size+" bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==q&&(wsstack.comm.PerformAjax("",
1402 -function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=g&&(a+=g);0==d&&(a+="<div style=padding-left:15px><br><i>Nenhum arquivo encontrado.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("Envio...","UploadToStorage()"):
1403 -""));QH(55,a)}else QH(55,"N\u00e3o foi poss\u00edvel carregar os dados de armazenamento ...<br/>"+AddButton("Atualizar","PullStorage()"))}
1404 -function showStorageDetails(b,c,a,d){if(!xxdialogMode){var g="",v=xxStorage.content[b][c][a];""!=b&&(g+=addHtmlValue("Fornecedor",b));""!=c&&(g+=addHtmlValue("Inscri\u00e7\u00e3o",c));g+=addHtmlValue("Nome",a);g+=addHtmlValue("Tamanho",v.size+" bytes");v.link&&(g+=addHtmlValue("Liga\u00e7\u00e3o",v.link));setDialogMode(11,"Item de armazenamento",5,showStorageDetailsEx,g,d)}}
1420 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1421 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gerenciar o armazenamento Intel&reg; AMT para este computador.<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var r=0,g;for(g in b[c][p]){r++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+
1422 +" / "+p):e+"Raiz";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+g+'",'+C+")><div style=float:right>"),e=e+(" "+AddButton2("Baixar","DownloadFromStorage("+C+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][p][g].size+" bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==r&&(wsstack.comm.PerformAjax("",
1423 +function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>Nenhum arquivo encontrado.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("Envio...","UploadToStorage()"):
1424 +""));QH(56,a)}else QH(56,"N\u00e3o foi poss\u00edvel carregar os dados de armazenamento ...<br/>"+AddButton("Atualizar","PullStorage()"))}
1425 +function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("Fornecedor",b));""!=c&&(e+=addHtmlValue("Inscri\u00e7\u00e3o",c));e+=addHtmlValue("Nome",a);e+=addHtmlValue("Tamanho",v.size+" bytes");v.link&&(e+=addHtmlValue("Liga\u00e7\u00e3o",v.link));setDialogMode(11,"Item de armazenamento",5,showStorageDetailsEx,e,d)}}
1426 function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}function storageDeleteResponse(b,c){200!=c?messagebox("Armazenamento",format("N\u00e3o foi poss\u00edvel excluir o arquivo (ERR {0}), verifique se o computador est\u00e1 ligado.",c)):PullStorage()}function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}
1427 function DownloadFromStorageEx(b,c,a){200!=c||null==b?console.log(c,"Data = null"):saveAs(data2blob(b),a)}function OpenFromStorage(b,c){if(!xxdialogMode){haltEvent(c);var a=window.open("http://"+wsstack.comm.host+":"+wsstack.comm.port+"/amt-storage/"+b,"_blank","noopener,noreferrer");a.opener=null;a.focus()}}
1428 function PushToStorage(b,c,a){var d=null;7E3<c.length&&(d=[b,c.substring(7E3)],c=c.substring(0,7E3));wsstack.comm.PerformAjax(c,PushToStorageResponse,d,0,"/amt-storage/"+b+(1==a?"?append=":""),"PUT")}function PushToStorageResponse(b,c,a){200!=c?messagebox("Armazenamento",format("N\u00e3o foi poss\u00edvel enviar o arquivo por push (ERR {0}), verifique se o computador est\u00e1 ligado.",c)):null!=a?PushToStorage(a[0],a[1],!0):PullStorage()}
@@ -1412,36 +1433,36 @@ a+="<br><div style=height:16px><input id=mstoragetype placeholder=application/oc
1433 function UploadToStorageEx(b,c){if(c)d=new FileReader,d.onload=UploadToStorageEx2,d.filename=Q("mstoragefile").value,d.readAsBinaryString(c);else{var a=Q("mstoragefile");if(1==a.files.length){var d=new FileReader;d.onload=UploadToStorageEx2;d.filename=a.files[0].name;d.readAsBinaryString(a.files[0])}}}
1434 function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0].name:"");b=b.split(" ").join("");var c=b.split("-");3==c.length&&12>c[0].length&&12>c[1].length&&(Q("mstoragevendor").value=c[0],Q("mstorageapplication").value=c[1],b=c[2]);b=b.split("-").join("");b.endsWith(".gz")&&(b=b.substring(0,b.length-3));b.endsWith(".htm")||b.endsWith(".html")?Q("mstoragetype").value="text/html":b.endsWith(".txt")&&(Q("mstoragetype").value="text/plain");11<b.length&&(b=b.substring(0,11));Q("mstoragefilename").value=
1435 b}
1415 -function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var g=Q("mstoragetype").value;""==g&&(g="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1416 -"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+g+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1436 +function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1437 +"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1438 function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," dias").replace("H"," horas").replace("M"," minutos");b=b.replace(" 1 dia"," 1 dia").replace(" 1 hora"," 1 hora").replace(" 1 minuto "," 1 minuto ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1418 -function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gerenciar alarmes de ativa\u00e7\u00e3o.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,g){if(200==g){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, acordar em "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," \u00e0s"),void 0!=d[c].Interval&&(a+=" e cada"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+=", exclua quando terminar"),
1419 -b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("Editar...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>Nenhum alarme de ativa\u00e7\u00e3o registrado.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("Remova todos os alarmes","RemoveAllAlarms()")+
1420 -AddButton("Adicionar","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
1421 -function prepareAlarmOccurenceTemplate(b,c,a,d,g){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1422 -g+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"Remova todos os alarmes de ativa\u00e7\u00e3o",3,RemoveAllAlarmsEx,"Confirmar a remo\u00e7\u00e3o de todos os alarmes de ativa\u00e7\u00e3o?")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,g,v){0==--b&&PullAlarms()})}
1439 +function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gerenciar alarmes de ativa\u00e7\u00e3o.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, acordar em "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," \u00e0s"),void 0!=d[c].Interval&&(a+=" e cada"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+=", exclua quando terminar"),
1440 +b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("Editar...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>Nenhum alarme de ativa\u00e7\u00e3o registrado.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton2("Remova todos os alarmes","RemoveAllAlarms()",
1441 +xxAlarms?"":"disabled")+AddButton("Adicionar","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(58,b)}},null,!0)}
1442 +function prepareAlarmOccurenceTemplate(b,c,a,d,e){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1443 +e+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"Remova todos os alarmes de ativa\u00e7\u00e3o",3,RemoveAllAlarmsEx,"Confirmar a remo\u00e7\u00e3o de todos os alarmes de ativa\u00e7\u00e3o?")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,e,v){0==--b&&PullAlarms()})}
1444 function showAddAlarm(b){if(!xxdialogMode){QE("d25alarm_name",!b);if(void 0!=b){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime);Q("d25alarm_name").value=c.ElementName;Q("d25alarm_sdate").value=a.getFullYear()+"-"+_fmttimepad(a.getMonth()+1)+"-"+_fmttimepad(a.getDate());Q("d25alarm_stime").value=a.getHours()+":"+_fmttimepad(a.getMinutes())+":"+_fmttimepad(a.getSeconds());if(c.Interval){var a=c.Interval.Interval.replace("P","").replace("T","").replace("D","D,").replace("H","H,").replace("M","M,").split(","),
1424 -d=[0,0,0],g;for(g in a){var v=a[g].length-1;"D"==a[g][v]&&(d[0]=parseInt(a[g].substring(0,v)));"H"==a[g][v]&&(d[1]=parseInt(a[g].substring(0,v)));"M"==a[g][v]&&(d[2]=parseInt(a[g].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1425 -Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"Adicionar novo alarme",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c54",b)}
1426 -function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),g=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],g[0],g[1],g[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",g=Q("d25alarm_interval").value.split("-");3!=g.length&&(g=[0,0,0]);var g=
1427 -"P"+g[0]+"DT"+g[1]+"H"+g[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,g,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("Adicionar alarme",format("Falha ao adicionar alarme. Status: {0}. <br/> Verifique se o alarme \u00e9 para um tempo futuro.",d)):0!=c.Body.ReturnValue?messagebox("Adicionar alarme",format("Falha ao adicionar o alarme {0}. <br/> Verifique se o alarme \u00e9 para um tempo futuro.",
1428 -c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+g+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("Editar alarme",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1445 +d=[0,0,0],e;for(e in a){var v=a[e].length-1;"D"==a[e][v]&&(d[0]=parseInt(a[e].substring(0,v)));"H"==a[e][v]&&(d[1]=parseInt(a[e].substring(0,v)));"M"==a[e][v]&&(d[2]=parseInt(a[e].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1446 +Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"Adicionar novo alarme",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c106",b)}
1447 +function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),e=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],e[0],e[1],e[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",e=Q("d25alarm_interval").value.split("-");3!=e.length&&(e=[0,0,0]);var e=
1448 +"P"+e[0]+"DT"+e[1]+"H"+e[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,e,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("Adicionar alarme",format("Falha ao adicionar alarme. Status: {0}. <br/> Verifique se o alarme \u00e9 para um tempo futuro.",d)):0!=c.Body.ReturnValue?messagebox("Adicionar alarme",format("Falha ao adicionar o alarme {0}. <br/> Verifique se o alarme \u00e9 para um tempo futuro.",
1449 +c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+e+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("Editar alarme",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1450 function showAlertDetails(b){if(!xxdialogMode){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime),a="<div style=text-align:left>"+addHtmlValue("Nome",c.ElementName)+addHtmlValue("Tempo de vig\u00edlia",a.toLocaleString().replace(", "," at "));void 0!=c.Interval&&(a+=addHtmlValue("interno",_fmtinterval(c.Interval.Interval)));a+=addHtmlValue("Depois de acordar",1==c.DeleteOnCompletion?"Excluir alarme":"Manter Alarme")+"</div>";messagebox(format("Alarme {0}",c.ElementName),a);setDialogMode(11,"Alarme"+
1451 c.ElementName,5,showAlertDetailsDelete,a,b)}}function showAlertDetailsDelete(b,c){2==b&&amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,b,c,v){PullAlarms()})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag;
1431 -function setDialogMode(b,c,a,d,g,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c54",!0);QV("c54",a&1);QV("c53",a&2);QV(58,a&2);QV("c55",a&4);c&&QH(59,c);for(c=1;27>c;c++)QV("dialog"+c,c==b);QV("dialog",b);g&&(11==b?QH(63,g):QH(60,g));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1452 +function setDialogMode(b,c,a,d,e,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c106",!0);QV("c106",a&1);QV("c105",a&2);QV(59,a&2);QV("c107",a&4);c&&QH(60,c);for(c=1;28>c;c++)QV("dialog"+c,c==b);QV("dialog",b);e&&(11==b?QH(64,e):QH(61,e));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1453 function dialogclose(b){var c=xxdialogFunc,a=xxdialogButtons,d=xxdialogTag;setDialogMode();(a&8||b)&&c&&c(b,d)}
1433 -function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(41).offsetWidth&&(QS("Desk")["max-width"]=Q(41).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1434 -"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(60,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(60,c);setDialogMode(1,b)}
1435 -function SaveJsonFile(b,c,a,d){var g="",v={},n=new Date;amtsysstate&&(g="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));g+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1436 -n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+g+".json")}var httpErrorTable={200:"Est\u00e1 bem",401:"Erro de autentica\u00e7\u00e3o",408:"Erro de tempo limite",601:"Erro de an\u00e1lise do WSMAN",602:"N\u00e3o foi poss\u00edvel analisar o cabe\u00e7alho de resposta HTTP",603:"Resposta inesperada de enumera\u00e7\u00e3o HTTP",604:"Resposta inesperada de recebimento de HTTP",997:"Regi\u00e3o de resumo inv\u00e1lida"};
1454 +function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(42).offsetWidth&&(QS("Desk")["max-width"]=Q(42).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1455 +"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(61,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(61,c);setDialogMode(1,b)}
1456 +function SaveJsonFile(b,c,a,d){var e="",v={},n=new Date;amtsysstate&&(e="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));e+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1457 +n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+e+".json")}var httpErrorTable={200:"Est\u00e1 bem",401:"Erro de autentica\u00e7\u00e3o",408:"Erro de tempo limite",601:"Erro de an\u00e1lise do WSMAN",602:"N\u00e3o foi poss\u00edvel analisar o cabe\u00e7alho de resposta HTTP",603:"Resposta inesperada de enumera\u00e7\u00e3o HTTP",604:"Resposta inesperada de recebimento de HTTP",997:"Regi\u00e3o de resumo inv\u00e1lida"};
1458 function errcheck(b,c){if(null==wsstack||amtstack!=c)return!0;200!=b&&9!=b&&(setDialogMode(),wsstack.comm.FailAllError=999,amtstack.CancelAllQueries(999),QH(5,httpErrorTable[b]?httpErrorTable[b]:format("Erro # {0}",b)),401==b&&QH(5,'Erro de autentica\u00e7\u00e3o<br /><br /><input type=button value="Set new credentials" onclick=meshcentral2credCallback(true)></input>'),go(100),QS(3).width=0);return 200!=b}
1459 function goiFrame(b,c,a){if(!xxdialogMode){go(c);if(1==b.shiftKey||0==Q(13).src.endsWith(a))Q(13).src=a;QV(14,!1);QV(12,!0)}}function go(b,c){if(!xxdialogMode||1==c){QV(12,!1);QV(14,!0);QV(4,100==b);QV(6,100>b);for(var a=0;80>a;a++){QV("p"+a,a==b);var d=QS("go"+a);d&&(d["background-color"]=a==b?"#abcae1":"");d&&(d["background-color"]=a==b?"gray":"")}currentView=b;center()}}
1439 -function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,g=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:g};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(g=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:g}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(g=parseInt(a[2]));return{host:a[0],http:d,redir:g}}
1460 +function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,e=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:e};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(e=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:e}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(e=parseInt(a[2]));return{host:a[0],http:d,redir:e}}
1461 function addLink(b,c){return"<a style=cursor:pointer;color:blue onclick='"+c+"'>&diams; "+b+"</a>"}function addLinkConditional(b,c,a){return a?addLink(b,c):b}function haltEvent(b){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1}function addOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;Q(b).add(d)}function addDisabledOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;d.disabled=1;Q(b).add(d)}
1441 -function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,g=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:g=1}return 4==c+a+d+g}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("Erro de chamada",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}
1462 +function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,e=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:e=1}return 4==c+a+d+e}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("Erro de chamada",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}
1463 function TableStart2(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><p><td>"}function TableEntry(b,c){return"<tr><td class=r1><p>"+b+"<td class=r1>"+c}function FullTable(b,c){var a=TableStart();for(i in b)i&&b[i]&&(a+=TableEntry(i,b[i]));return a+TableEnd(c)}function TableEnd(b){return"<tr><td colspan=2><p>"+(b?b:"")+"</table>"}function AddButton(b,c){return"<input type=button value='"+b+"' onclick='"+c+"' style=margin:4px>"}
1464 function AddButton2(b,c,a){return"<input type=button value='"+b+"' onclick='"+c+"' "+a+">"}function AddRefreshButton(b){return'<input type=button name=refreshbtn value="Atualizar" onclick=\'refreshButtons(false);'+b+"' style=margin:4px "+(0==refreshButtonsState?"disabled":"")+">"}function MoreStart(){return'<a style=cursor:pointer;color:blue id=morexxx1 onclick=QV("morexxx1",false);QV("morexxx2",true)>&#x25BC; More</a><div id=morexxx2 style=display:none><br><hr>'}
1444 -function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,g=b.options.length;d<g;d++)a=b.options[d],a.selected&&c.push(a.value);return c}function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}
1465 +function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,e=b.options.length;d<e;d++)a=b.options[d],a.selected&&c.push(a.value);return c}function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}
1466 function guidToStr(b){return b.substring(6,8)+b.substring(4,6)+b.substring(2,4)+b.substring(0,2)+"-"+b.substring(10,12)+b.substring(8,10)+"-"+b.substring(14,16)+b.substring(12,14)+"-"+b.substring(16,20)+"-"+b.substring(20)}function getUrlVars(){for(var b,c=[],a=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),d=0;d<a.length;d++)b=a[d].indexOf("="),0<b&&(c[a[d].substring(0,b)]=a[d].substring(b+1,a[d].length));return c}
1467 function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}
1468 function getDocHeight(){return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight&&0!=document.documentElement.clientHeight?document.documentElement.clientHeight:document.getElementsByTagName("body")[0].clientHeight}function addHtmlValue(b,c){return'<div style=height:20px><div style=float:right;width:220px;overflow:hidden><b title="'+c+'">'+c+"</b></div><div>"+b+"</div></div>"}
public/commander-ru.htm
+934 -913
@@ -1,8 +1,8 @@
1 -<!DOCTYPE html><html lang="ru" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><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>Состояние системы</a><p id=go14 class=nav1 onclick=go(14)><a>Удаленный рабочий стол</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>файлы</a><p id=go13 class=nav1 onclick=go(13)><a>Последовательная по локальной сети</a><p id=go2 class=nav1 onclick=go(2)><a>Информация оборудовании</a><p id=go6 class=nav1 onclick=go(6)><a>Журнал событий</a><p id=go15 class=nav1 onclick=go(15)><a>Аудит Журнал</a><p id=go21 class=nav1 onclick=go(21)><a>Место хранения</a><p id=go8 class=nav1 onclick=go(8)><a>Сетевые настройки</a><p id=go17 class=nav1 onclick=go(17)><a>Настройки интернета</a><p id=go16 class=nav1 onclick=go(16)><a>Настройки безопасности</a><p id=go19 class=nav1 onclick=go(19)><a>Присутствие агента</a><p id=go18 class=nav1 onclick=go(18)><a>Защита системы</a><p id=go11 class=nav1 onclick=go(11)><a>Учетные записи пользователей</a><p id=go22 class=nav1 onclick=go(22)><a>Подписки</a><p id=go23 class=nav1 onclick=go(23)><a>Будильник</a><p id=go12 class=nav1 onclick=go(12)><a>Браузер WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Карта диска" onclick=iderToggleDiskMap()><input type=button value="Остановить сеанс IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Флоппи, блоки по 512 байт.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, блоки по 2048 байт.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Прошивка этого компьютера должна быть обновлена,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>пожалуйста, проверьте здесь</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>Состояние системы</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Информация оборудовании</h1><span id=16></span></div><div id=p6 style=display:none><h1>Журнал событий</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Сетевые настройки</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Учетные записи пользователей</h1><span id=21></span></div><div id=p12 style=display:none><h1>Браузер WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><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=запрос style=margin:4px onclick=wsmanQuery()><input type=button value=Очистить style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Фильтр style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Последовательный терминал через локальную сеть</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Порт перенаправления Intel® AMT или функция Serial-over-LAN отключена<span id=26>Нажмите здесь, чтобы включить его.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Удаленный компьютер не включен, нажмите здесь, чтобы выдать команду питания.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Силовые действия ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Начать операцию удаленного монтирования диска" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Начать захват" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Connect onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Отключен.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Переключить то, что отправит ключ возврата" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Размер терминала переключения" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Переключить тип эмуляции клавиш F1 - F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Расширенные Ascii" title="Тип эмуляции терминала" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>возврат на одну позицию<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=послать onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Вставить disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Удаленный рабочий стол</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Порт перенаправления Intel® AMT или функция KVM отключены<span id=37>Нажмите здесь, чтобы включить его.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Удаленный компьютер не включен, нажмите здесь, чтобы выдать команду питания.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Повернуть налево" onclick=drotate(-1)>↺</div><div class=rb title="Повернуть вправо" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Переключить полноэкранный режим" onkeypress="return false" onkeydown="return false" value=Полный onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Сохранить скриншот удаленного рабочего стола" onkeypress="return false" onkeydown="return false" value=Сохранить... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Настройки ..." title="Изменить настройки удаленного рабочего стола" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Начать операцию удаленного монтирования диска" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Изменить состояние питания удаленного компьютера" onkeypress="return false" onkeydown="return false" value="Силовые действия ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Connect onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Отключен.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Выиграть<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + М<option value=20>Win + R<option value=23>Win + Left<option value=24>Win + Right<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=послать onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Тип onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Пустой экран&nbsp;</span><span id=47><input id=48 type=checkbox>Только просмотр&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Аудит Журнал</h1><span id=50></span></div><div id=p16 style=display:none><h1>Настройки безопасности</h1><span id=51></span></div><div id=p17 style=display:none><h1>Настройки интернета</h1><span id=52></span></div><div id=p18 style=display:none><h1>Защита системы</h1><span id=53></span></div><div id=p19 style=display:none><h1>Присутствие агента</h1><span id=54></span></div><div id=p21 style=display:none><h1>Место хранения</h1><span id=55></span></div><div id=p22 style=display:none><h1>Подписка на события</h1><span id=56></span></div><div id=p23 style=display:none><h1>Будильник</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>файлы</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=вверх>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Выбрать все" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rename onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=удалять onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Новая папка" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Загрузить onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Резать onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=копия onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Вставить onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=обновление onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Сортировать по имени<option value=2>Сортировать по размеру<option value=3>Сортировать по дате<option value=4>Спуск по имени<option value=5>Спуск по размеру<option value=6>Сходить по дате</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 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=60 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>имя пользователя</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Пароль*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Подтвердите Пароль</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Местный<option value=1>сеть<option value=2>Любые</select><div>разрешение</div></div><div>Предоставленные разрешения</div><ul id=62 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>* Минимум 8 символов с прописными, строчными, 0-9 и одним из! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Действие силы</div></div><div><span style=color:red>Предупреждение:</span>Некоторые действия с питанием могут привести к потере данных и могут отключить сеансы перенаправления рабочего стола, терминала или диска.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Код согласия</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Основной дисплей<option value=1>Вторичный дисплей<option id=d6ThirdDisplay value=2 style=display:none>Третий дисплей</select><div>Согласие Дисплей</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Кодировка изображения</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Отключено<option value=2>Automatic<option value=3>Включено</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Показать локальный курсор мыши</label><br><label><input type=checkbox id=d7showcad>Показать Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Ограничить частоту кадров</label><br><label><input type=checkbox id=d7noMouseRotate>Не вращайте мышь</label><br></div><div>Другие настройки</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Программное обеспечение KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Качественный</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>пересчет</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=админ style=float:right;width:220px><div style=height:20px>имя пользователя</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>пароль</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Порт перенаправления</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM Remote Desktop</label><label style=display:block><input type=checkbox id=c17>IDE-Перенаправление<br></label><label style=display:block><input type=checkbox id=c18>Последовательная по локальной сети<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Не требуется<br></label><label><input type=radio name=d10 id=c20 value=1>Требуется только для KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Всегда требуется<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Максимум 32 символа"><div title="Максимум 32 символа">Имя профиля</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Максимум 32 символа"><div title="Максимум 32 символа">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>приоритет</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Аутентификация</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Никто</select><div>шифрование</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Длина от 8 до 63 символов"><div title="Длина от 8 до 63 символов">Пароль*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Длина от 8 до 63 символов"><div title="Длина от 8 до 63 символов">Подтвердите Пароль</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Это сохранит все состояние Intel® AMT для этого компьютера в файл. Пароли не будут сохранены, но некоторые конфиденциальные данные могут быть включены.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Отключено<br><input type=radio name=d20 id=d20b value=1>ICMP-ответ<br><input type=radio name=d20 id=d20c value=2>Ответ RMCP<br><input type=radio name=d20 id=d20d value=3>ICMP и RMCP ответ<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Синхронизация IP-адреса операционной системы</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>айпи адрес</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Метка подсети</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>шлюз</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Основной DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Альтернативный DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Отключено<option value=1>Отключено, обновление DHCP<option value=2>Включено</select><div>Динамический DNS-клиент</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Интервал обновления (минуты)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (секунды)</div></div><div style=font-size:10px><br>Интервал по умолчанию составляет 1440 минут, TTL по умолчанию - 900 секунд.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Включите<option value=10>Сброс<option value=5>Силовой цикл<option value=8>Выключить<option id=d24p500 value=500>OS Wake из режима ожидания<option id=d24p501 value=501>ОС энергосбережения<option value=999>Установить параметры загрузки</select><div>Дистанционное управление</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS Pause</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Обеспечить безопасную загрузку</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Настройка биоса</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Форсировать события</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Блокировка кнопки питания</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Кнопка сброса блокировки</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Кнопка блокировки сна</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Блокировка клавиатуры</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Обход пароля BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Перепрошить биос</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Безопасный режим</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Используйте IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Последовательная по локальной сети</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Настройки загрузки</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Никто<option id=ForceDVDBootOption value=1>Force CD / DVD Boot<option id=ForcePXEBootOption value=2>Force PXE Boot<option id=ForceHDBootOption value=3>Принудительная загрузка жесткого диска<option id=ForceDiagBootOption value=4>Принудительный диагностический ботинок</select><div>Загрузочный источник</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Никто<option value=1>Индекс 1<option value=2>Индекс 2<option value=3>Индекс 3<option value=3>Индекс 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Загрузиться с дискеты<option value=1>Загрузиться с CDROM</select><div>Загрузочное устройство IDER</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Системные установки по умолчанию<option id=c46 value=1>Тихо<option id=c47 value=2>Подробный<option id=c48 value=3>Пустой экран</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</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>Название тревоги</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>Дата пробуждения (год-месяц-день)</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>Время пробуждения (час: мин: сек)</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>Интервал (дни-часы-минуты)</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>Держать тревогу<option value=1>Удалить по завершении</select></div><div style=padding-top:4px>После пробуждения</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Включено<br></label><label><input type=radio name=d26b id=c50 value=0>Отключено<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Включено<br></label><label><input type=radio name=d26a id=c52 value=0>Отключено<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Отмена style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=Хорошо style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=удалять style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="ru" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><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>Состояние системы</a><p id=go14 class=nav1 onclick=go(14)><a>Удаленный рабочий стол</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>файлы</a><p id=go13 class=nav1 onclick=go(13)><a>Последовательная по локальной сети</a><p id=go2 class=nav1 onclick=go(2)><a>Информация оборудовании</a><p id=go6 class=nav1 onclick=go(6)><a>Журнал событий</a><p id=go15 class=nav1 onclick=go(15)><a>Аудит Журнал</a><p id=go21 class=nav1 onclick=go(21)><a>Место хранения</a><p id=go8 class=nav1 onclick=go(8)><a>Сетевые настройки</a><p id=go17 class=nav1 onclick=go(17)><a>Настройки интернета</a><p id=go16 class=nav1 onclick=go(16)><a>Настройки безопасности</a><p id=go19 class=nav1 onclick=go(19)><a>Присутствие агента</a><p id=go18 class=nav1 onclick=go(18)><a>Защита системы</a><p id=go11 class=nav1 onclick=go(11)><a>Учетные записи пользователей</a><p id=go22 class=nav1 onclick=go(22)><a>Подписки</a><p id=go23 class=nav1 onclick=go(23)><a>Будильник</a><p id=go12 class=nav1 onclick=go(12)><a>Браузер WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Карта диска" onclick=iderToggleDiskMap()><input type=button value="Остановить сеанс IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Флоппи, блоки по 512 байт.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, блоки по 2048 байт.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Прошивка этого компьютера должна быть обновлена,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>пожалуйста, проверьте здесь</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>Состояние системы</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Информация оборудовании</h1><span id=16></span></div><div id=p6 style=display:none><h1>Журнал событий</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Сетевые настройки</h1><span id=19></span><span id=20></span><span id=21></span></div><div id=p11 style=display:none><h1>Учетные записи пользователей</h1><span id=22></span></div><div id=p12 style=display:none><h1>Браузер WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=23 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=24 type=button value=запрос style=margin:4px onclick=wsmanQuery()><input type=button value=Очистить style=margin:4px onclick="QH(25, '')"><input id=c0 placeholder=Фильтр style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=25></div></div><div id=p13 style=display:none;min-width:780px><h1>Последовательный терминал через локальную сеть</h1><br><div id=26 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Порт перенаправления Intel® AMT или функция Serial-over-LAN отключена<span id=27>Нажмите здесь, чтобы включить его.</span></div></div><div id=28 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Удаленный компьютер не включен, нажмите здесь, чтобы выдать команду питания.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=29></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Силовые действия ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Начать операцию удаленного монтирования диска" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Начать захват" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Connect onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=30>Отключен.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Переключить то, что отправит ключ возврата" onclick="termToggleCr();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Размер терминала переключения" onclick="termToggleSize();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Переключить тип эмуляции клавиш F1 - F10" onclick="termToggleFx();Q(33).blur()"><input id=34 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Расширенные Ascii" title="Тип эмуляции терминала" onclick="termToggleType();Q(34).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>возврат на одну позицию<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=послать onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=35 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Вставить disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=36><h1>Удаленный рабочий стол</h1><br></div><div id=37 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Порт перенаправления Intel® AMT или функция KVM отключены<span id=38>Нажмите здесь, чтобы включить его.</span></div></div><div id=39 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Удаленный компьютер не включен, нажмите здесь, чтобы выдать команду питания.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=40></span>&nbsp;<div class=rb title="Повернуть налево" onclick=drotate(-1)>↺</div><div class=rb title="Повернуть вправо" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Переключить полноэкранный режим" onkeypress="return false" onkeydown="return false" value=Полный onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Сохранить скриншот удаленного рабочего стола" onkeypress="return false" onkeydown="return false" value=Сохранить... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Настройки ..." title="Изменить настройки удаленного рабочего стола" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Начать операцию удаленного монтирования диска" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Изменить состояние питания удаленного компьютера" onkeypress="return false" onkeydown="return false" value="Силовые действия ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Connect onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=41>Отключен.</span></div><tr><td id=42 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onwheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=43 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Выиграть<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + М<option value=20>Win + R<option value=23>Win + Left<option value=24>Win + Right<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12<option value=25>Enter</select><input id=DeskWD type=button value=послать onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=44 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=45 type=button value=Тип onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=46><input id=47 type=checkbox>Пустой экран&nbsp;</span><span id=48><input id=49 type=checkbox>Только просмотр&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=50></span><h1>Аудит Журнал</h1><span id=51></span></div><div id=p16 style=display:none><h1>Настройки безопасности</h1><span id=52></span></div><div id=p17 style=display:none><h1>Настройки интернета</h1><span id=53></span></div><div id=p18 style=display:none><h1>Защита системы</h1><span id=54></span></div><div id=p19 style=display:none><h1>Присутствие агента</h1><span id=55></span></div><div id=p21 style=display:none><h1>Место хранения</h1><span id=56></span></div><div id=p22 style=display:none><h1>Подписка на события</h1><span id=57></span></div><div id=p23 style=display:none><h1>Будильник</h1><span id=58></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>файлы</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=вверх>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Выбрать все" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rename onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=удалять onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Новая папка" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Загрузить onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Резать onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=копия onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Вставить onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=обновление onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Сортировать по имени<option value=2>Сортировать по размеру<option value=3>Сортировать по дате<option value=4>Спуск по имени<option value=5>Спуск по размеру<option value=6>Сходить по дате</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=59 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=60 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=61 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>имя пользователя</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Пароль*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Подтвердите Пароль</div></div><div id=62><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Местный<option value=1>сеть<option value=2>Любые</select><div>разрешение</div></div><div>Предоставленные разрешения</div><ul id=63 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>* Минимум 8 символов с прописными, строчными, 0-9 и одним из! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Действие силы</div></div><div><span style=color:red>Предупреждение:</span>Некоторые действия с питанием могут привести к потере данных и могут отключить сеансы перенаправления рабочего стола, терминала или диска.</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Код согласия</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Основной дисплей<option value=1>Вторичный дисплей<option id=d6ThirdDisplay value=2 style=display:none>Третий дисплей</select><div>Согласие Дисплей</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Кодировка изображения</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Отключено<option value=2>Automatic<option value=3>Включено</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Показать локальный курсор мыши</label><br><label><input type=checkbox id=d7showcad>Показать Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Ограничить частоту кадров</label><br><label><input type=checkbox id=d7noMouseRotate>Не вращайте мышь</label><br><label><input type=checkbox id=d7kvmrmw>Reverse Mouse Wheel</label><br></div><div>Другие настройки</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Программное обеспечение KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Качественный</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>пересчет</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=админ style=float:right;width:220px><div style=height:20px>имя пользователя</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>пароль</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Порт перенаправления</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM Remote Desktop</label><label style=display:block><input type=checkbox id=c17>IDE-Перенаправление<br></label><label style=display:block><input type=checkbox id=c18>Последовательная по локальной сети<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Не требуется<br></label><label><input type=radio name=d10 id=c20 value=1>Требуется только для KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Всегда требуется<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=64></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Максимум 32 символа"><div title="Максимум 32 символа">Имя профиля</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Максимум 32 символа"><div title="Максимум 32 символа">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>приоритет</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Аутентификация</div></div><div style=height:26px><select id=c26 style=float:right;width:200px onclick=updateWifiDialog()><option id=65 value=4>CCMP-AES<option id=66 value=3>TKIP-RC4</select><div>шифрование</div></div><div id=c27><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Длина от 8 до 63 символов"><div title="Длина от 8 до 63 символов">Пароль*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Длина от 8 до 63 символов"><div title="Длина от 8 до 63 символов">Подтвердите Пароль</div></div></div><div id=c30 style=display:none><div id=c31 style=height:26px><select id=c32 style=float:right;width:200px onchange=updateNetAuth2Dialog(event)><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>протокол</div></div><div id=c33 style=height:26px><input id=c34 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Максимум 32 символа"><div title="Максимум 32 символа">Server Name</div></div><div id=c35 style=height:26px><select id=c36 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c37 style=height:26px><input id=c38 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c39 style=height:26px><input id=c40 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">имя пользователя</div></div><div id=c41 style=height:26px><input id=c42 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuth2Dialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">пароль</div></div><div id=c43 style=height:26px><input id=c44 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuth2Dialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c45 style=height:26px><input id=c46 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c47 style=height:26px><input id=c48 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c49 style=height:26px><select id=c50 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Client Certificate</div></div><div id=c51 style=height:26px><select id=c52 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Server Issuer Cert</div></div><div id=c53 style=height:26px><select id=c54 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=1>Включено<option value=0>Отключено</select><div>Active in S0</div></div></div></div><div id=dialog19 style=margin:auto;margin:3px>Это сохранит все состояние Intel® AMT для этого компьютера в файл. Пароли не будут сохранены, но некоторые конфиденциальные данные могут быть включены.<br><br><input id=c55 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Отключено<br><input type=radio name=d20 id=d20b value=1>ICMP-ответ<br><input type=radio name=d20 id=d20c value=2>Ответ RMCP<br><input type=radio name=d20 id=d20d value=3>ICMP и RMCP ответ<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=67><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Синхронизация IP-адреса операционной системы</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=68><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c56 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>айпи адрес</div></div><div style=height:26px id=69><input id=c57 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Метка подсети</div></div><div style=height:26px><input id=c58 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>шлюз</div></div><div style=height:26px><input id=c59 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Основной DNS</div></div><div style=height:26px><input id=c60 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Альтернативный DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c61 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Отключено<option value=1>Отключено, обновление DHCP<option value=2>Включено</select><div>Динамический DNS-клиент</div></div><div style=height:26px><input id=c62 style=float:right;width:200px><div>Интервал обновления (минуты)</div></div><div style=height:26px><input id=c63 style=float:right;width:200px><div>TTL (секунды)</div></div><div style=font-size:10px><br>Интервал по умолчанию составляет 1440 минут, TTL по умолчанию - 900 секунд.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c64 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Включите<option value=10>Сброс<option value=5>Силовой цикл<option value=8>Выключить<option id=d24p500 value=500>OS Wake из режима ожидания<option id=d24p501 value=501>ОС энергосбережения<option value=999>Установить параметры загрузки</select><div>Дистанционное управление</div></div><div style=height:80px><div id=c65 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS Pause</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Обеспечить безопасную загрузку</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Настройка биоса</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Форсировать события</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Блокировка кнопки питания</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Кнопка сброса блокировки</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Кнопка блокировки сна</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Блокировка клавиатуры</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Обход пароля BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Перепрошить биос</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Безопасный режим</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Используйте IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Последовательная по локальной сети</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Настройки загрузки</div></div><div style=height:26px><select id=c66 style=float:right;width:200px onchange=showAdvPowerDlgChange()></select><div>Загрузочный источник</div></div><div id=c67 style=height:26px><select id=c68 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Никто<option value=1>Индекс 1<option value=2>Индекс 2<option value=3>Индекс 3<option value=3>Индекс 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c69 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Загрузиться с дискеты<option value=1>Загрузиться с CDROM</select><div>Загрузочное устройство IDER</div></div><div style=height:26px><select id=c70 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Системные установки по умолчанию<option id=c71 value=1>Тихо<option id=c72 value=2>Подробный<option id=c73 value=3>Пустой экран</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</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>Название тревоги</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>Дата пробуждения (год-месяц-день)</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>Время пробуждения (час: мин: сек)</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>Интервал (дни-часы-минуты)</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>Держать тревогу<option value=1>Удалить по завершении</select></div><div style=padding-top:4px>После пробуждения</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c74 value=2>Включено<br></label><label><input type=radio name=d26b id=c75 value=0>Отключено<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c76 value=1>Включено<br></label><label><input type=radio name=d26a id=c77 value=0>Отключено<br></label></div><div id=dialog27 style=margin:auto;margin:3px><br><div style=height:26px><select id=c78 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>Отключено<option value=1>Включено</select><div>Включено</div></div><div id=c79 style=height:26px><select id=c80 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>протокол</div></div><div id=c81 style=height:26px><input id=c82 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Максимум 32 символа"><div title="Максимум 32 символа">Server Name</div></div><div id=c83 style=height:26px><select id=c84 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c85 style=height:26px><input id=c86 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c87 style=height:26px><input id=c88 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">имя пользователя</div></div><div id=c89 style=height:26px><input id=c90 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuthDialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">пароль</div></div><div id=c91 style=height:26px><input id=c92 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c93 style=height:26px><input id=c94 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c95 style=height:26px><input id=c96 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c97 style=height:26px><select id=c98 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Client Certificate</div></div><div id=c99 style=height:26px><select id=c100 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Server Issuer Cert</div></div><div id=c101 style=height:26px><select id=c102 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>Включено<option value=1>Отключено</select><div>Active in S0</div></div><div id=c103 style=height:26px><input id=c104 style=float:right;width:200px onkeyup=updateNetAuthDialog()><div>PXE Timeout</div></div></div></div><div style=padding:10px;margin-bottom:4px><input id=c105 type=button value=Отмена style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c106 type=button value=Хорошо style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c107 type=button value=удалять style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
5 -$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var g=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==g&&$jscomp.global.Object.defineProperty(b,d,g)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
5 +$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var e=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==e&&$jscomp.global.Object.defineProperty(b,d,e)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
6 String.prototype.endsWith||(String.prototype.endsWith=function(b){return-1!==this.indexOf(b,this.length-b.length)});function Q(b){return document.getElementById(b)}function QS(b){try{return Q(b).style}catch(c){}}function QE(b,c){try{Q(b).disabled=!c}catch(a){}}function QV(b,c){try{QS(b).display=c?"":"none"}catch(a){}}function QA(b,c){Q(b).innerHTML+=c}function QH(b,c){Q(b).innerHTML=c}function inputBoxFocus(b){Q(b).focus();var c=Q(b).value;Q(b).value="";Q(b).value=c}
7 function ReadShort(b,c){return(b.charCodeAt(c)<<8)+b.charCodeAt(c+1)}function ReadShortX(b,c){return(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}function ReadInt(b,c){return 16777216*b.charCodeAt(c)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadSInt(b,c){return(b.charCodeAt(c)<<24)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadIntX(b,c){return 16777216*b.charCodeAt(c+3)+(b.charCodeAt(c+2)<<16)+(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}
8 function ShortToStr(b){return String.fromCharCode(b>>8&255,b&255)}function ShortToStrX(b){return String.fromCharCode(b&255,b>>8&255)}function IntToStr(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}function IntToStrX(b){return String.fromCharCode(b&255,b>>8&255,b>>16&255,b>>24&255)}function MakeToArray(b){return b&&null!=b&&"object"!=typeof b?[b]:b}function SplitArray(b){return b.split(",")}function Clone(b){return JSON.parse(JSON.stringify(b))}
@@ -12,86 +12,86 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a,d){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(d?d:32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,u,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.floppyReady)return g.floppyReady=!0,g.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.cdromReady)return g.cdromReady=!0,g.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}g.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,u);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),g.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 -d=0;switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}g.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),u&1);return}g.SendCommandEndResponse(1,5,c,36,0);break;case 27:g.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==g.floppy||176==c&&null==g.cdrom)return g.SendCommandEndResponse(1,
18 -2,c,58,0),-1;g.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}g.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),u&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.floppy&&(d=(g.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.cdrom&&(d=(g.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);g.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),u&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,F,d);a(c,F,d,u);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);g.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return g.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?g.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -u&1):0==N&&(H?g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),u&1):g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),u&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=r;if(16==v||N&&16>v)H+=K;if(30==
22 -v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=A;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));g.SendDataToHost(c,!0,H,u&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");g.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=g.floppy?d=2:176==c&&null!=g.cdrom&&(d=2);g.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),u&1);break;case 76:g.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),g.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),g.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;F=0;160==c?null!=g.floppy&&(F=g.floppy.size>>9):null!=g.cdrom&&(F=g.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?y:R:z;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?q:l:D;break;case 26:176==c&&(H=e);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?g.SendCommandEndResponse(0,5,c,32,0):g.SendDataToHost(c,!0,H,u&1);break;case 81:g.SendDataToHost(c,!0,E,u&1);break;case 172:g.SendDataToHost(c,!0,O,u&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),g.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 -b,x,e){var c=null,y=0;160==a&&(c=g.floppy,null!=g.floppy&&(y=g.floppy.size>>9));176==a&&(c=g.cdrom,null!=g.cdrom&&(y=g.cdrom.size>>11));if(0>x||b+x>y)return g.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return g.SendCommandEndResponse(1,0,a,0,0),0;null!=c&&(g.sectorStats&&g.sectorStats(1,160==a?0:1,y,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==u?H.push({media:c,dev:a,lba:b,len:x,fr:e}):(u=c,T=a,P=b,F=x,d(e)))}function d(a){var b=F,x=P;F>g.iderinfo.readbfr&&(b=g.iderinfo.readbfr);F-=b;P+=b;var e=
26 -new FileReader;e.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));g.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(u=null,N?(g.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),u=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};e.readAsBinaryString?e.readAsBinaryString(u.slice(x,x+b)):e.readAsArrayBuffer(u.slice(x,x+b))}var g={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,q,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,q);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),q&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),q&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);e.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),q&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,F,d);a(c,F,d,q);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);e.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +q&1):0==N&&(H?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),q&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),q&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=u;if(16==v||N&&16>v)H+=K;if(30==
22 +v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=z;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));e.SendDataToHost(c,!0,H,q&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),q&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;F=0;160==c?null!=e.floppy&&(F=e.floppy.size>>9):null!=e.cdrom&&(F=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?A:R:y;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?r:l:D;break;case 26:176==c&&(H=g);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,H,q&1);break;case 81:e.SendDataToHost(c,!0,E,q&1);break;case 172:e.SendDataToHost(c,!0,O,q&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 +b,x,c){var g=null,p=0;160==a&&(g=e.floppy,null!=e.floppy&&(p=e.floppy.size>>9));176==a&&(g=e.cdrom,null!=e.cdrom&&(p=e.cdrom.size>>11));if(0>x||b+x>p)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,p,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==q?H.push({media:g,dev:a,lba:b,len:x,fr:c}):(q=g,T=a,P=b,F=x,d(c)))}function d(a){var b=F,x=P;F>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);F-=b;P+=b;var c=
26 +new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));e.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(q=null,N?(e.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),q=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(q.slice(x,x+b)):c.readAsArrayBuffer(q.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
27 iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,
28 -0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),e=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 -18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),r=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 -0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),A=String.fromCharCode(1,5,3,0),y=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),z=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);g.xxStateChange=function(a){b("IDER-StateChange",a);
31 -0==a&&g.Stop();3==a&&g.Start()};g.Start=function(){b("IDER-Start");b(g.floppy,g.cdrom);g.bytesToAmt=0;g.bytesFromAmt=0;g.inSequence=0;g.outSequence=0;H=[];g.SendCommand(64,ShortToStrX(g.rx_timeout)+ShortToStrX(g.tx_timeout)+ShortToStrX(g.heartbeat)+IntToStrX(g.version));g.sectorStats&&(g.sectorStats(0,0,g.floppy?g.floppy.size>>9:0),g.sectorStats(0,1,g.cdrom?g.cdrom.size>>11:0))};g.Stop=function(){b("IDER-Stop");g.parent.Stop()};g.ProcessData=function(a){g.bytesFromAmt+=a.length;g.acc+=a;null!=v&&
32 -v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",g.acc.length,rstr2hex(g.acc));;){a=g.ProcessDataEx();if(0==a)break;if(g.inSequence!=ReadIntX(g.acc,4)){b("ERROR: Out of sequence",g.inSequence,ReadIntX(g.acc,4));g.Stop();break}g.inSequence++;g.acc=g.acc.substring(a)}};g.SendCommand=function(a,x,e,c){null==x&&(x="");e=50<a&&1==e?2:0;c&&(e+=1);x=String.fromCharCode(a,0,0,e)+IntToStrX(g.outSequence++)+x;g.parent.xxSend(x);g.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 -"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};g.SendCommandEndResponse=function(a,b,x,e,c){a?g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,e,c),!0)};g.SendDataToHost=function(a,b,x,e){var c=e?0:x.length;1==b?g.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,e):g.SendCommand(84,
34 -String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,e)};g.SendGetDataFromHost=function(a,b){g.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};g.SendDisableEnableFeatures=function(a,b){null==b&&(b="");g.SendCommand(72,String.fromCharCode(a)+b)};g.ProcessDataEx=function(){if(8>g.acc.length)return 0;switch(g.acc.charCodeAt(0)){case 65:if(30>g.acc.length)break;var a=g.acc.charCodeAt(29);
35 -if(g.acc.length<30+a)break;g.iderinfo={};g.iderinfo.major=g.acc.charCodeAt(8);g.iderinfo.minor=g.acc.charCodeAt(9);g.iderinfo.fwmajor=g.acc.charCodeAt(10);g.iderinfo.fwminor=g.acc.charCodeAt(11);g.iderinfo.readbfr=ReadShortX(g.acc,16);g.iderinfo.writebfr=ReadShortX(g.acc,18);g.iderinfo.proto=g.acc.charCodeAt(21);g.iderinfo.iana=ReadIntX(g.acc,25);b(g.iderinfo);0!=g.iderinfo.proto&&(b("Unknown proto",g.iderinfo.proto),g.Stop());8192<g.iderinfo.readbfr&&(b("Illegal read buffer size",g.iderinfo.readbfr),
36 -g.Stop());8192<g.iderinfo.writebfr&&(b("Illegal write buffer size",g.iderinfo.writebfr),g.Stop());0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),g.Stop(),8;case 68:return g.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>g.acc.length)break;a=g.acc.charCodeAt(8);null===u?(g.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 -a));return 9;case 73:if(13>g.acc.length)break;var a=g.acc.charCodeAt(8),x=ReadIntX(g.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:g.enabled=x&2?!0:!1;b("IDER Status: "+g.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>g.acc.length)break;b("IDER: ABORT",g.acc.charCodeAt(8));
38 -return 11;case 75:return 8;case 80:if(28>g.acc.length)break;var a=g.acc.charCodeAt(14)&16?176:160,x=g.acc.charCodeAt(14),e=g.acc.substring(16,28),y=g.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(e),y,x);c(a,e,y,x);return 28;case 83:if(14>g.acc.length)break;a=ReadShortX(g.acc,9);if(g.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",g.acc[0]),g.Stop()}return 0};
39 -var H=[],N=!1,u=null,T,P,F;return g},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 -a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,g,v,n){b("SIDER-Start",a,d,g,v,n);c.host=a;c.port=d;c.user=g;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==g?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+g:"")+"&tls1only="+
41 -c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(g){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
28 +0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),r=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 +18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 +0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);
31 +0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;H=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&
32 +v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 +"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,
34 +String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);
35 +if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),
36 +e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===q?(e.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 +a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));
38 +return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),d=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),d,x);c(a,g,d,x);return 28;case 83:if(14>e.acc.length)break;a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};
39 +var H=[],N=!1,q=null,T,P,F;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 +a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+
41 +c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
42 b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);break;
43 -default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,g){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){e.socketState=2;e.socketParseState=0;e.socketAccumulator="";e.socketHeader=null;e.socketData="";
44 -for(i in e.pendingAjaxCall)e.sendRequest(e.pendingAjaxCall[i][0],e.pendingAjaxCall[i][3],e.pendingAjaxCall[i][4])}function p(a){var b=e.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(e.socketAccumulator=b+a;;){if(0==e.socketParseState){b=e.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;e.socketHeader=e.socketAccumulator.substring(0,b).split("\r\n");if(null==e.amtVersion)for(var c in e.socketHeader)0==e.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 -(e.amtVersion=e.socketHeader[c].substring(46));e.socketAccumulator=e.socketAccumulator.substring(b+4);e.socketParseState=1;e.socketData="";e.socketXHeader={Directive:e.socketHeader[0].split(" ")};for(c in e.socketHeader)0!=c&&(b=e.socketHeader[c].indexOf(":"),e.socketXHeader[e.socketHeader[c].substring(0,b).toLowerCase()]=e.socketHeader[c].substring(b+2))}if(1==e.socketParseState){b=-1;if(void 0==e.socketXHeader.connection||"close"!=e.socketXHeader.connection.toLowerCase()||void 0!=e.socketXHeader["transfer-encoding"]&&
46 -"chunked"==e.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=e.socketXHeader["content-length"]){b=parseInt(e.socketXHeader["content-length"]);if(e.socketAccumulator.length<b)break;a=e.socketAccumulator.substring(0,b);e.socketAccumulator=e.socketAccumulator.substring(b);e.socketData=a;b=0}else{var p=e.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(e.socketAccumulator.substring(0,p),16);if(isNaN(b)){e.websocket&&e.websocket.close();break}if(e.socketAccumulator.length<p+2+b+2)break;
47 -a=e.socketAccumulator.substring(p+2,p+2+b);e.socketAccumulator=e.socketAccumulator.substring(p+2+b+2);e.socketData+=a}else b=0;if(0==b){p=e.socketXHeader;b=e.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++e.authcounter){if(e.challengeParams=e.parseDigest(p["www-authenticate"]),null!=e.challengeParams.qop){b=e.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 -e.challengeParams.qop="auth-int":e.challengeParams.qop="auth"}}else p=e.pendingAjaxCall.shift(),e.authcounter=0,e.ActiveAjaxCount--,e.gotNextMessages(b,"success",{status:a},p),e.PerformNextAjax();e.socketParseState=0;e.socketHeader=null}}}}function q(a){0==e.inDataCount&&(e.tlsv1only=1-e.tlsv1only);e.socketState=0;null!=e.socket&&(e.socket.close(),e.socket=null);if(0<e.pendingAjaxCall.length){a=e.pendingAjaxCall.shift();var b=a[5];e.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var e={PendingAjax:[],
49 -ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};e.host=b;e.port=c;e.user=a;e.pass=d;e.tls=g;e.tlsv1only=0;e.inDataCount=0;e.amtVersion=null;e.digestRealmMatch=null;e.digestRealm=null;e.PerformAjax=function(a,b,c,p,d,h){e.ActiveAjaxCount<e.MaxActiveAjaxCount&&0==e.PendingAjax.length?e.PerformAjaxEx(a,b,c,d,h):1==p?e.PendingAjax.unshift([a,b,c,d,h]):e.PendingAjax.push([a,b,c,d,h])};e.PerformNextAjax=function(){if(!(e.ActiveAjaxCount>=
50 -e.MaxActiveAjaxCount||0==e.PendingAjax.length)){var a=e.PendingAjax.shift();e.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);e.PerformNextAjax()}};e.PerformAjaxEx=function(a,b,c,p,d){if(0!=e.FailAllError)e.gotNextMessagesError({status:e.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),e.ActiveAjaxCount++,e.PerformAjaxExNodeJS(a,b,c,p,d)};e.pendingAjaxCall=[];e.PerformAjaxExNodeJS=function(a,b,c,p,d){e.PerformAjaxExNodeJS2(a,
51 -b,c,p,d,5)};e.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=e.FailAllError?(e.ActiveAjaxCount--,999!=e.FailAllError&&e.gotNextMessages(null,"error",{status:0==e.FailAllError?408:e.FailAllError},[a,b,c,p,d]),e.PerformNextAjax()):(e.pendingAjaxCall.push([a,b,c,p,d,h]),0==e.socketState?e.xxConnectHttpSocket():2==e.socketState&&e.sendRequest(a,p,d))};e.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=e.challengeParams){e.digestRealm=e.challengeParams.realm;
52 -if(e.digestRealmMatch&&e.digestRealm!=e.digestRealmMatch){e.FailAllError=997;e.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(e.user+":"+e.challengeParams.realm+":"+e.pass)+":"+e.challengeParams.nonce+":"+n(e.noncecounter)+":"+d+":"+e.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==e.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+e.renderDigest({username:e.user,realm:e.challengeParams.realm,nonce:e.challengeParams.nonce,uri:b,qop:e.challengeParams.qop,
53 -response:c,nc:n(e.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+e.host+":"+e.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==e.socketState&&null!=e.socket&&e.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{e.socket.send(b.buffer)}catch(h){}}};e.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var e=b.trim().split("=");a[e[0]]=e[1].replace(RegExp('"',"g"),"");return a},{})};e.renderDigest=function(a){var b=
54 -[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,e){return b+","+("nc"==e||"qop"==e?e+"="+a[e]:e+'="'+a[e]+'"')},"").substring(1)};e.xxConnectHttpSocket=function(){e.inDataCount=0;e.socketState=1;e.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+e.host+"&port="+e.port+"&tls="+e.tls+"&tls1only="+e.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 -typeof d?"&serverauth=1&user="+a:""));e.socket.binaryType="arraybuffer";e.socket.onopen=l;e.socket.onmessage=p;e.socket.onclose=q};e.gotNextMessages=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](a,c.status,p[2])};e.gotNextMessagesError=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](e,null,{Header:{HttpError:a.status}},a.status,p[2])};e.CancelAllQueries=function(a){for(;0<e.PendingAjax.length;){var b=
56 -e.PendingAjax.shift();b[1](null,a,b[2])}null!=e.websocket&&(e.websocket.close(),e.websocket=null,e.socketState=0)};return e},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
43 +default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){g.socketState=2;g.socketParseState=0;g.socketAccumulator="";g.socketHeader=null;g.socketData="";
44 +for(i in g.pendingAjaxCall)g.sendRequest(g.pendingAjaxCall[i][0],g.pendingAjaxCall[i][3],g.pendingAjaxCall[i][4])}function p(a){var b=g.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(g.socketAccumulator=b+a;;){if(0==g.socketParseState){b=g.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;g.socketHeader=g.socketAccumulator.substring(0,b).split("\r\n");if(null==g.amtVersion)for(var c in g.socketHeader)0==g.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 +(g.amtVersion=g.socketHeader[c].substring(46));g.socketAccumulator=g.socketAccumulator.substring(b+4);g.socketParseState=1;g.socketData="";g.socketXHeader={Directive:g.socketHeader[0].split(" ")};for(c in g.socketHeader)0!=c&&(b=g.socketHeader[c].indexOf(":"),g.socketXHeader[g.socketHeader[c].substring(0,b).toLowerCase()]=g.socketHeader[c].substring(b+2))}if(1==g.socketParseState){b=-1;if(void 0==g.socketXHeader.connection||"close"!=g.socketXHeader.connection.toLowerCase()||void 0!=g.socketXHeader["transfer-encoding"]&&
46 +"chunked"==g.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=g.socketXHeader["content-length"]){b=parseInt(g.socketXHeader["content-length"]);if(g.socketAccumulator.length<b)break;a=g.socketAccumulator.substring(0,b);g.socketAccumulator=g.socketAccumulator.substring(b);g.socketData=a;b=0}else{var p=g.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(g.socketAccumulator.substring(0,p),16);if(isNaN(b)){g.websocket&&g.websocket.close();break}if(g.socketAccumulator.length<p+2+b+2)break;
47 +a=g.socketAccumulator.substring(p+2,p+2+b);g.socketAccumulator=g.socketAccumulator.substring(p+2+b+2);g.socketData+=a}else b=0;if(0==b){p=g.socketXHeader;b=g.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++g.authcounter){if(g.challengeParams=g.parseDigest(p["www-authenticate"]),null!=g.challengeParams.qop){b=g.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 +g.challengeParams.qop="auth-int":g.challengeParams.qop="auth"}}else p=g.pendingAjaxCall.shift(),g.authcounter=0,g.ActiveAjaxCount--,g.gotNextMessages(b,"success",{status:a},p),g.PerformNextAjax();g.socketParseState=0;g.socketHeader=null}}}}function r(a){0==g.inDataCount&&(g.tlsv1only=1-g.tlsv1only);g.socketState=0;null!=g.socket&&(g.socket.close(),g.socket=null);if(0<g.pendingAjaxCall.length){a=g.pendingAjaxCall.shift();var b=a[5];g.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var g={PendingAjax:[],
49 +ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};g.host=b;g.port=c;g.user=a;g.pass=d;g.tls=e;g.tlsv1only=0;g.inDataCount=0;g.amtVersion=null;g.digestRealmMatch=null;g.digestRealm=null;g.PerformAjax=function(a,b,c,p,d,h){g.ActiveAjaxCount<g.MaxActiveAjaxCount&&0==g.PendingAjax.length?g.PerformAjaxEx(a,b,c,d,h):1==p?g.PendingAjax.unshift([a,b,c,d,h]):g.PendingAjax.push([a,b,c,d,h])};g.PerformNextAjax=function(){if(!(g.ActiveAjaxCount>=
50 +g.MaxActiveAjaxCount||0==g.PendingAjax.length)){var a=g.PendingAjax.shift();g.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);g.PerformNextAjax()}};g.PerformAjaxEx=function(a,b,c,p,d){if(0!=g.FailAllError)g.gotNextMessagesError({status:g.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),g.ActiveAjaxCount++,g.PerformAjaxExNodeJS(a,b,c,p,d)};g.pendingAjaxCall=[];g.PerformAjaxExNodeJS=function(a,b,c,p,d){g.PerformAjaxExNodeJS2(a,
51 +b,c,p,d,5)};g.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=g.FailAllError?(g.ActiveAjaxCount--,999!=g.FailAllError&&g.gotNextMessages(null,"error",{status:0==g.FailAllError?408:g.FailAllError},[a,b,c,p,d]),g.PerformNextAjax()):(g.pendingAjaxCall.push([a,b,c,p,d,h]),0==g.socketState?g.xxConnectHttpSocket():2==g.socketState&&g.sendRequest(a,p,d))};g.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=g.challengeParams){g.digestRealm=g.challengeParams.realm;
52 +if(g.digestRealmMatch&&g.digestRealm!=g.digestRealmMatch){g.FailAllError=997;g.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(g.user+":"+g.challengeParams.realm+":"+g.pass)+":"+g.challengeParams.nonce+":"+n(g.noncecounter)+":"+d+":"+g.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==g.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+g.renderDigest({username:g.user,realm:g.challengeParams.realm,nonce:g.challengeParams.nonce,uri:b,qop:g.challengeParams.qop,
53 +response:c,nc:n(g.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+g.host+":"+g.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==g.socketState&&null!=g.socket&&g.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{g.socket.send(b.buffer)}catch(h){}}};g.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};g.renderDigest=function(a){var b=
54 +[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+","+("nc"==c||"qop"==c?c+"="+a[c]:c+'="'+a[c]+'"')},"").substring(1)};g.xxConnectHttpSocket=function(){g.inDataCount=0;g.socketState=1;g.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+g.host+"&port="+g.port+"&tls="+g.tls+"&tls1only="+g.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 +typeof d?"&serverauth=1&user="+a:""));g.socket.binaryType="arraybuffer";g.socket.onopen=l;g.socket.onmessage=p;g.socket.onclose=r};g.gotNextMessages=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](a,c.status,p[2])};g.gotNextMessagesError=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](g,null,{Header:{HttpError:a.status}},a.status,p[2])};g.CancelAllQueries=function(a){for(;0<g.PendingAjax.length;){var b=
56 +g.PendingAjax.shift();b[1](null,a,b[2])}null!=g.websocket&&(g.websocket.close(),g.websocket=null,g.socketState=0)};return g},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
57 function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;
58 d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?
59 d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,
60 0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):d.Stop(2);
61 -else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),e=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),q=q+(e+
62 -1),e=0,e=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(e=n[q],e=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),w="00000002:"+C+":"+e+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(q+=e.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 -p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(e.length)+e);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
61 +else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var r=0,p=n[r],l=a(new Uint8Array(n.buffer.slice(r+1,r+1+p))),r=r+(p+1),g=n[r],p=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),r=r+(g+
62 +1),g=0,g=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[r],g=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),w="00000002:"+C+":"+g+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));r=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(r+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(r)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 +p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
64 break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;
65 break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&
66 1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+
67 "/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=
68 --1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,g,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
68 +-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
69 b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b="",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";
70 var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";
71 -b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,g,v);q.PerformAjax=function(a,b,c,p,d){null==d&&(d="");q.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" '+
72 -d+"><Header><a:Action>"+a,function(a,c,e){var p=q.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(q,p.Header.ResourceURI,p,c,e)}else b(q,null,{Header:{HttpError:c}},601,e)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,h,g,l,B){var x="",A="";
73 -g="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 -B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",A='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=g&&(g="<a:ReferenceParameters><m:arg>"+g+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+
75 -"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+g+"</e:NotifyTo>"+A+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=
76 -function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 -q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=q.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var g in b)if(b.hasOwnProperty(g)&&0!==g.indexOf("__")&&0!==g.indexOf("@")&&null!=b[g]&&"function"!==typeof b[g])if("object"===typeof b[g]&&
78 -b[g].ReferenceParameters){a+="<r:"+g+"><a:Address>"+b[g].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[g].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[g].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+g+">"}else if(Array.isArray(b[g]))for(B=0;B<b[g].length;B++)a+=
79 -"<r:"+g+">"+b[g][B].toString()+"</r:"+g+">";else a+="<r:"+g+">"+b[g].toString()+"</r:"+g+">";b=a+("</r:"+h+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var h=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
80 -p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var g in b)a+="<g:"+g+">"+b[g]+"</g:"+g+">";q.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
81 -p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>",b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,
82 -h){var g="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])g+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else g+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,g,p,d,k,h)};q.ExecMethodXml=function(a,b,c,d,m,k,h){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
83 -p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>',
84 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var g=a.getElementsByTagName("Body")[0];g||(g=a.getElementsByTagName("a:Body")[0]);
86 -if(!g)return null;if(0<g.childNodes.length){k=g.childNodes[0].localName;var q=k.indexOf("_OUTPUT");-1!=q&&q==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(g.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",g,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
87 -function AmtStackCreateService(b){function c(){var a=e.GetPendingActions();C<a&&(C=a);null!=e.onProcessChanged&&w!=a&&(w=a,e.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,z,h,k){200!=z?(c(e,a,null,z,h),g(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?e.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,e,p,z){d(a,p,c,e,[],z,h,k)}):(c(e,a,null,603,h),g(1))}function d(a,b,p,h,z,E,k,m){if(200!=E)p(e,a,null,E,k),g(1);else if(null==b||"PullResponse"!=b.Header.Method)p(e,
88 -a,null,604,k),g(1);else{for(var r in b.Body.Items)if(b.Body.Items[r]instanceof Array)for(var q in b.Body.Items[r])"function"!=typeof b.Body.Items[r][q]&&z.push(b.Body.Items[r][q]);else"function"!=typeof b.Body.Items[r]&&z.push(b.Body.Items[r]);b.Body.EnumerationContext?e.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,e,A){d(a,e,p,c,z,A,k,1)}):(g(1),p(e,a,z,E,k),c())}}function g(a){e.ActiveEnumsCount-=a;e.ActiveEnumsCount>=e.MaxActiveEnumsCount||0==e.PendingEnums.length?c():(a=e.PendingEnums.shift(),
89 -e.Enum(a[0],a[1],a[2]),g(0))}function v(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]),function(b,c,p,d){null==p||200!=d?a.callback(e,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](e,null,d[2]);else e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,z){if(200!=d||"0"!=c.Body.ReturnValue)z[0](e,
90 -null,z[2]);else{var h,m,g;b=z[2];d=new Date;var r=c.Body.RecordArray;"string"===typeof r&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in r){a=null;try{a=window.atob(r[h])}catch(q){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){g={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),
91 -EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)g.EventData.push(a.charCodeAt(m));g.EntityStr=k[g.Entity];g.Desc=p(g.EventSensorType,g.EventOffset,g.EventData,g.Entity);g.EntityStr||(g.EntityStr="Unknown");b.push(g)}}if(1!=c.Body.NoMoreRecords)e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[z[0],b,z[2]]);else z[0](e,b,z[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435";
92 -if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",r[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",
93 -h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";
94 -if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==a&&170==c[0])return"\u0410\u0433\u0435\u043d\u0442 \u0441\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u043e\u0439"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u043d\u0430"+e.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"\u0421\u043b\u0443\u0447\u0430\u0439 \u0432\u0442\u043e\u0440\u0436\u0435\u043d\u0438\u044f";
71 +b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var r={NextMessageId:1,Address:"/wsman"};r.comm=CreateWsmanComm(b,c,a,d,e,v);r.PerformAjax=function(a,b,c,p,d){null==d&&(d="");r.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" '+
72 +d+"><Header><a:Action>"+a,function(a,c,g){var p=r.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(r,p.Header.ResourceURI,p,c,g)}else b(r,null,{Header:{HttpError:c}},601,g)},c,p)};r.CancelAllQueries=function(a){r.comm.CancelAllQueries(a)};r.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};r.ExecSubscribe=function(a,b,c,d,m,k,h,e,l,B){var x="",z="";
73 +e="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 +B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=e&&(e="<a:ReferenceParameters><m:arg>"+e+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+r.Address+
75 +"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+e+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";r.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};r.ExecUnSubscribe=
76 +function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";r.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};r.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 +r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=r.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var e in b)if(b.hasOwnProperty(e)&&0!==e.indexOf("__")&&0!==e.indexOf("@")&&null!=b[e]&&"function"!==typeof b[e])if("object"===typeof b[e]&&
78 +b[e].ReferenceParameters){a+="<r:"+e+"><a:Address>"+b[e].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[e].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[e].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+e+">"}else if(Array.isArray(b[e]))for(B=0;B<b[e].length;B++)a+=
79 +"<r:"+e+">"+b[e][B].toString()+"</r:"+e+">";else a+="<r:"+e+">"+b[e].toString()+"</r:"+e+">";b=a+("</r:"+h+">")}else b="";r.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};r.ExecCreate=function(a,b,c,d,m,k){var h=r.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
80 +p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";r.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};r.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
81 +p(b)+"</Header><Body /></Envelope>";r.PerformAjax(a,c,d,m)};r.ExecGet=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>",b,c,p)};r.ExecMethod=function(a,b,c,p,d,k,
82 +h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])e+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";r.ExecMethodXml(a,b,e,p,d,k,h)};r.ExecMethodXml=function(a,b,c,d,m,k,h){r.PerformAjax(a+"/"+b+"</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
83 +p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};r.ExecEnum=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>',
84 +b,c,p)};r.ExecPull=function(a,b,c,p,d){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 +c,p,d)};r.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var e=a.getElementsByTagName("Body")[0];e||(e=a.getElementsByTagName("a:Body")[0]);
86 +if(!e)return null;if(0<e.childNodes.length){k=e.childNodes[0].localName;var r=k.indexOf("_OUTPUT");-1!=r&&r==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(e.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",e,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return r};
87 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();C<a&&(C=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,g,p,y){d(a,p,c,g,[],y,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,p,h,y,E,k,m){if(200!=E)p(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(g,
88 +a,null,604,k),e(1);else{for(var u in b.Body.Items)if(b.Body.Items[u]instanceof Array)for(var r in b.Body.Items[u])"function"!=typeof b.Body.Items[u][r]&&y.push(b.Body.Items[u][r]);else"function"!=typeof b.Body.Items[u]&&y.push(b.Body.Items[u]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,p,c,y,z,k,1)}):(e(1),p(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
89 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
90 +null,y[2]);else{var h,m,e;b=y[2];d=new Date;var u=c.Body.RecordArray;"string"===typeof u&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in u){a=null;try{a=window.atob(u[h])}catch(r){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){e={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),
91 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)e.EventData.push(a.charCodeAt(m));e.EntityStr=k[e.Entity];e.Desc=p(e.EventSensorType,e.EventOffset,e.EventData,e.Entity);e.EntityStr||(e.EntityStr="Unknown");b.push(e)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435";
92 +if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("One Click Recovery: {0}",u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("One Click Recovery: {0}",h[c[2]]):
93 +format("One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";
94 +if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==a&&170==c[0])return"\u0410\u0433\u0435\u043d\u0442 \u0441\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u043e\u0439"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u043d\u0430"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"\u0421\u043b\u0443\u0447\u0430\u0439 \u0432\u0442\u043e\u0440\u0436\u0435\u043d\u0438\u044f";
95 if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0430\u043d\u0441 Serial Over LAN \u0431\u044b\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d.";if(1==c[2])return"\u0421\u0435\u0430\u043d\u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043f\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0431\u044b\u043b \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d.";
96 if(2==c[2])return"\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0430\u043d\u0441 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f IDE \u0431\u044b\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d.";if(3==c[2])return"\u0421\u0435\u0430\u043d\u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f IDE \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0431\u044b\u043b \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d."}if(36==
97 a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u0430\u044f"),4294967293==a?"\u0424\u0438\u043b\u044c\u0442\u0440 \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d"+b+" \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.":4294967292==a?"\u0424\u0438\u043b\u044c\u0442\u0440 \u0432\u0441\u0435\u0445 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d"+
@@ -102,71 +102,71 @@ if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"\u041f\u043e\u043b\u0
102 if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"\u041e\u0448\u0438\u0431\u043a\u0430 HWA: \u043e\u0431\u0449\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430"}return 6==a?"\u041e\u0448\u0438\u0431\u043a\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438"+(c[1]+(c[2]<<8))+" \u0440\u0430\u0437. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0442\u0430\u043a\u043e\u0432\u0430\u043d\u0430.":30==a?"\u041d\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0433\u043e \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044f":
103 32==a?"\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043b\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b":
104 37==a?"\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 (\u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e).":"\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0442\u0438\u043f \u0434\u0430\u0442\u0447\u0438\u043a\u0430 #"+
105 -a}function q(a,b,c,p,d){if(200!=p)d[0](e,[],p);else{var h,k,m=d[1],g=new Date,r;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),
106 -b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>\u041c\u0435\u0441\u0442\u043d\u044b\u0439</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM \u043f\u043e\u0440\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e</i>",h=5);r=ReadInt(a,h);b.Time=new Date(1E3*(r+60*g.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);
107 -r=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+r);h+=r;r=a.charCodeAt(h++);b.Ex=a.substring(h,h+r);b.ExStr=e.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)e.AMT_AuditLog_ReadRecords(m.length+1,q,[d[0],m]);else d[0](e,m,p)}}var e={};e.wsman=b;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;
108 -e.ActiveEnumsCount=0;e.MaxActiveEnumsCount=1;e.onProcessChanged=null;var C=0,w=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,b,p,d,z,h,k,m,g,r){e.wsman.ExecSubscribe(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,y,A,z)},0,h,k,m,g,r);c()};e.UnSubscribe=function(a,b,p,d,z){e.wsman.ExecUnSubscribe(e.CompleteName(a),function(d,z,h,k){c();b(e,a,h,k,p)},
109 -0,d,z);c()};e.Get=function(a,b,p,d){e.wsman.ExecGet(e.CompleteName(a),function(d,h,k,m){c();b(e,a,k,m,p)},0,d);c()};e.Put=function(a,b,p,d,z,h){e.wsman.ExecPut(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z,h);c()};e.Create=function(a,b,p,d,z){e.wsman.ExecCreate(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Delete=function(a,b,p,d,z){e.wsman.ExecDelete(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Exec=function(a,b,p,d,z,h,k){e.wsman.ExecMethod(e.CompleteName(a),
110 -b,p,function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.ExecWithXml=function(a,b,p,d,z,h,k){e.wsman.ExecMethodXml(e.CompleteName(a),b,execArgumentsToXml(p),function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.Enum=function(b,p,d,h){e.ActiveEnumsCount<e.MaxActiveEnumsCount?(e.ActiveEnumsCount++,e.wsman.ExecEnum(e.CompleteName(b),function(e,d,y,h,k){c();a(b,y,p,d,h,k)},d,h)):e.PendingEnums.push([b,p,d,h]);c()};e.BatchEnum=function(a,b,p,d,z,h){z={_pending:b.length};
111 -e.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],g=e.Enum;"*"==m[0]&&(g=e.Get,m=m.substring(1));g(m,function(b,z,A,h,k){e.PendingBatchOperations--;c();k[2][z]={response:null==A?null:A.Body,responses:A,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(e,e,a,k[2],h,d))},[a,b,z,g==e.Get?"Get":"Enum"],h)}};e.BatchGet=function(a,b,p,e,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:e,pri:d});c()};e.CompleteName=function(a){if(0==a.indexOf("AMT_"))return e.pfx[0]+a;if(0==
112 -a.indexOf("CIM_"))return e.pfx[1]+a;if(0==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,b){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>',
113 -null,null,b)};e.RequestOSPowerStateChange=function(a,b){e.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
114 -null,null,b)};e.SetBootConfigRole=function(a,b){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>',
115 -a,b)};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,b){e.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
116 -k,m,g){e.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,g)};e.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){e.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};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=
117 -function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){e.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};e.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA",
118 -"DeleteAllActions",{_method_dummy:a},b)};e.AMT_AuditLog_ClearLog=function(a){e.Exec("AMT_AuditLog","ClearLog",{},a)};e.AMT_AuditLog_RequestStateChange=function(a,b,c){e.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_AuditLog_ReadRecords=function(a,b,c){e.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};e.AMT_AuditLog_SetAuditLock=function(a,b,c,p){e.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};e.AMT_AuditLog_ExportAuditLogSignature=
119 -function(a,b){e.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};e.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){e.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule",
120 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){e.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};e.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){e.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};e.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService",
121 -"GetUserAclEntryEx",{Handle:a},b,c)};e.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){e.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};e.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){e.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};e.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
122 -{Username:a,DigestPassword:b},c)};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,b,c,p){e.Exec("AMT_AuthorizationService",
123 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};e.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){e.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};e.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_EndpointAccessControlService_GetPosture=function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};e.AMT_EndpointAccessControlService_GetPostureHash=
124 -function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};e.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){e.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};e.AMT_EndpointAccessControlService_GetEacOptions=function(a){e.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};e.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
125 -PostureHashAlgorithm:b},c)};e.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};e.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};e.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){e.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};e.AMT_GeneralSettings_AMTAuthenticate=
126 -function(a,b){e.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};e.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){e.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};e.AMT_KerberosSettingData_GetCredentialCacheState=function(a){e.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};e.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){e.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
127 -b)};e.AMT_MessageLog_CancelIteration=function(a,b){e.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};e.AMT_MessageLog_RequestStateChange=function(a,b,c){e.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_MessageLog_ClearLog=function(a){e.Exec("AMT_MessageLog","ClearLog",{},a)};e.AMT_MessageLog_GetRecords=function(a,b,c,p){e.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};e.AMT_MessageLog_GetRecord=function(a,
128 -b,c){e.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};e.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){e.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};e.AMT_MessageLog_PositionToFirstRecord=function(a,b){e.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};e.AMT_MessageLog_FreezeLog=function(a,b){e.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};e.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){e.Exec("AMT_PublicKeyManagementService",
129 -"AddCRL",{Url:a,SerialNumbers:b},c)};e.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){e.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};e.AMT_PublicKeyManagementService_AddCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddKey=
130 -function(a,b){e.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};e.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};e.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};e.AMT_PublicKeyManagementService_GenerateKeyPair=
131 -function(a,b,c){e.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};e.AMT_RedirectionService_RequestStateChange=function(a,b){e.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};e.AMT_RedirectionService_TerminateSession=function(a,b){e.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};e.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,g){e.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
132 -Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},g)};e.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){e.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};e.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){e.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){e.Exec("AMT_SetupAndConfigurationService",
133 -"CommitChanges",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_Unprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};e.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
134 -e.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};e.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){e.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};e.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){e.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){e.Exec("AMT_SetupAndConfigurationService",
135 -"GetProvisioningAuditRecord",{},a)};e.AMT_SetupAndConfigurationService_GetUuid=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};e.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){e.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};e.AMT_SystemDefensePolicy_GetTimeout=
136 -function(a){e.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};e.AMT_SystemDefensePolicy_SetTimeout=function(a,b){e.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};e.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){e.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};e.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){e.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};e.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
137 -function(a,b){e.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};e.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){e.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};e.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){e.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WebUIService_RequestStateChange=function(a,b,c){e.Exec("AMT_WebUIService",
138 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
139 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};e.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};e.CIM_Account_RequestStateChange=function(a,b,c){e.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
140 -c)};e.CIM_AccountManagementService_CreateAccount=function(a,b,c){e.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};e.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){e.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};e.CIM_BootService_SetBootConfigRole=function(a,b,c){e.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};e.CIM_BootService_RequestStateChange=function(a,b,c,p){e.Exec("CIM_BootService","RequestStateChange",
141 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};e.CIM_Card_ConnectorPower=function(a,b,c){e.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};e.CIM_Card_IsCompatible=function(a,b){e.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};e.CIM_Chassis_IsCompatible=function(a,b){e.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};e.CIM_Fan_SetSpeed=function(a,b){e.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};e.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){e.Exec("CIM_KVMRedirectionSAP",
142 -"RequestStateChange",{RequestedState:a},c)};e.CIM_MediaAccessDevice_LockMedia=function(a,b){e.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};e.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){e.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_MediaAccessDevice_Reset=function(a){e.Exec("CIM_MediaAccessDevice","Reset",{},a)};e.CIM_MediaAccessDevice_EnableDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};e.CIM_MediaAccessDevice_OnlineDevice=
143 -function(a,b){e.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};e.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};e.CIM_MediaAccessDevice_SaveProperties=function(a){e.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};e.CIM_MediaAccessDevice_RestoreProperties=function(a){e.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};e.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){e.Exec("CIM_MediaAccessDevice","RequestStateChange",
144 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_PhysicalFrame_IsCompatible=function(a,b){e.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};e.CIM_PhysicalPackage_IsCompatible=function(a,b){e.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};e.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){e.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.CIM_PowerSupply_SetPowerState=function(a,
145 -b,c){e.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_PowerSupply_Reset=function(a){e.Exec("CIM_PowerSupply","Reset",{},a)};e.CIM_PowerSupply_EnableDevice=function(a,b){e.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};e.CIM_PowerSupply_OnlineDevice=function(a,b){e.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};e.CIM_PowerSupply_QuiesceDevice=function(a,b){e.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};e.CIM_PowerSupply_SaveProperties=function(a){e.Exec("CIM_PowerSupply",
146 -"SaveProperties",{},a)};e.CIM_PowerSupply_RestoreProperties=function(a){e.Exec("CIM_PowerSupply","RestoreProperties",{},a)};e.CIM_PowerSupply_RequestStateChange=function(a,b,c){e.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Processor_SetPowerState=function(a,b,c){e.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Processor_Reset=function(a){e.Exec("CIM_Processor","Reset",{},a)};e.CIM_Processor_EnableDevice=function(a,b){e.Exec("CIM_Processor",
147 -"EnableDevice",{Enabled:a},b)};e.CIM_Processor_OnlineDevice=function(a,b){e.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};e.CIM_Processor_QuiesceDevice=function(a,b){e.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Processor_SaveProperties=function(a){e.Exec("CIM_Processor","SaveProperties",{},a)};e.CIM_Processor_RestoreProperties=function(a){e.Exec("CIM_Processor","RestoreProperties",{},a)};e.CIM_Processor_RequestStateChange=function(a,b,c){e.Exec("CIM_Processor","RequestStateChange",
148 -{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RecordLog_ClearLog=function(a){e.Exec("CIM_RecordLog","ClearLog",{},a)};e.CIM_RecordLog_RequestStateChange=function(a,b,c){e.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RedirectionService_RequestStateChange=function(a,b,c){e.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Sensor_SetPowerState=function(a,b,c){e.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
149 -c)};e.CIM_Sensor_Reset=function(a){e.Exec("CIM_Sensor","Reset",{},a)};e.CIM_Sensor_EnableDevice=function(a,b){e.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};e.CIM_Sensor_OnlineDevice=function(a,b){e.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};e.CIM_Sensor_QuiesceDevice=function(a,b){e.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Sensor_SaveProperties=function(a){e.Exec("CIM_Sensor","SaveProperties",{},a)};e.CIM_Sensor_RestoreProperties=function(a){e.Exec("CIM_Sensor","RestoreProperties",
150 -{},a)};e.CIM_Sensor_RequestStateChange=function(a,b,c){e.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_StatisticalData_ResetSelectedStats=function(a,b){e.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};e.CIM_Watchdog_KeepAlive=function(a){e.Exec("CIM_Watchdog","KeepAlive",{},a)};e.CIM_Watchdog_SetPowerState=function(a,b,c){e.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Watchdog_Reset=function(a){e.Exec("CIM_Watchdog",
151 -"Reset",{},a)};e.CIM_Watchdog_EnableDevice=function(a,b){e.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};e.CIM_Watchdog_OnlineDevice=function(a,b){e.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};e.CIM_Watchdog_QuiesceDevice=function(a,b){e.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};e.CIM_Watchdog_SaveProperties=function(a){e.Exec("CIM_Watchdog","SaveProperties",{},a)};e.CIM_Watchdog_RestoreProperties=function(a){e.Exec("CIM_Watchdog","RestoreProperties",{},a)};e.CIM_Watchdog_RequestStateChange=
152 -function(a,b,c){e.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_WiFiPort_SetPowerState=function(a,b,c){e.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_WiFiPort_Reset=function(a){e.Exec("CIM_WiFiPort","Reset",{},a)};e.CIM_WiFiPort_EnableDevice=function(a,b){e.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};e.CIM_WiFiPort_OnlineDevice=function(a,b){e.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};e.CIM_WiFiPort_QuiesceDevice=function(a,
153 -b){e.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};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,b,c){e.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){e.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
154 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};e.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};e.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){e.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},h)};e.IPS_HostBasedSetupService_UpgradeClientToAdmin=
155 -function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};e.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){e.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};e.IPS_KVMRedirectionSettingData_TerminateSession=function(a){e.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){e.Exec("IPS_KVMRedirectionSettingData",
156 -"DataChannelRead",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){e.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};e.IPS_OptInService_StartOptIn=function(a){e.Exec("IPS_OptInService","StartOptIn",{},a)};e.IPS_OptInService_CancelOptIn=function(a){e.Exec("IPS_OptInService","CancelOptIn",{},a)};e.IPS_OptInService_SendOptInCode=function(a,b){e.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};e.IPS_OptInService_StartService=function(a){e.Exec("IPS_OptInService",
157 -"StartService",{},a)};e.IPS_OptInService_StopService=function(a){e.Exec("IPS_OptInService","StopService",{},a)};e.IPS_OptInService_RequestStateChange=function(a,b,c){e.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){e.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.IPS_ProvisioningRecordLog_RequestStateChange=
158 -function(a,b,c){e.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_ProvisioningRecordLog_ClearLog=function(a,b){e.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};e.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){e.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};e.IPS_SecIOService_RequestStateChange=function(a,b,c){e.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
159 -TimeoutPeriod:b},c)};e.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){e.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};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",
160 -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",
161 -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",
162 -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",
163 -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,b){e.AMT_MessageLog_PositionToFirstRecord(n,
164 -[a,b,[]])};var D="\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e. ; \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u200b\u200b\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. ; \u041d\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0432\u043e \u0432\u0441\u0435\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u043b \u043d\u0435\u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c\u044b\u0439 \u0441\u0431\u043e\u0439. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u044b\u0439 \u0441\u0431\u043e\u0439 \u0436\u0435\u0441\u0442\u043a\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 / \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 ATAPI / IDE. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u044b\u0439 \u0441\u0431\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u0434\u0438\u0441\u043a\u0435\u0442\u0430 \u0421\u0431\u043e\u0439 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0436\u0435\u0441\u0442\u043a\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 PS / 2 \u0438\u043b\u0438 USB-\u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b. ; \u0421\u044a\u0435\u043c\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0432\u0438\u0434\u0435\u043e. ; \u041d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u0432\u0438\u0434\u0435\u043e\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. ; \u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b (BIOS) \u041f\u0417\u0423. ; \u041d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 (\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043f\u0438\u0442\u0430\u043d\u0438\u0435\u043c \u0438\u043c\u0435\u044e\u0442 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044e) ; \u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430".split(";"),
105 +a}function r(a,b,c,p,d){if(200!=p)d[0](g,[],p);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),
106 +b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>\u041c\u0435\u0441\u0442\u043d\u044b\u0439</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM \u043f\u043e\u0440\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);
107 +u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,r,[d[0],m]);else d[0](g,m,p)}}var g={};g.wsman=b;g.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/"];g.PendingEnums=[];g.PendingBatchOperations=0;
108 +g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var C=0,w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,p,d,y,h,k,m,e,u){g.wsman.ExecSubscribe(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,A,z,y)},0,h,k,m,e,u);c()};g.UnSubscribe=function(a,b,p,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,p)},
109 +0,d,y);c()};g.Get=function(a,b,p,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,p)},0,d);c()};g.Put=function(a,b,p,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,p,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,p,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,p,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),
110 +b,p,function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,p,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,p,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(g,d,A,h,k){c();a(b,A,p,d,h,k)},d,h)):g.PendingEnums.push([b,p,d,h]);c()};g.BatchEnum=function(a,b,p,d,y,h){y={_pending:b.length};
111 +g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],e=g.Enum;"*"==m[0]&&(e=g.Get,m=m.substring(1));e(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(g,g,a,k[2],h,d))},[a,b,y,e==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,p,g,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:g,pri:d});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==
112 +a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.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>',
113 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
114 +null,null,b)};g.SetBootConfigRole=function(a,b){g.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>',
115 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
116 +k,m,e){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,e)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
117 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
118 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,p){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};g.AMT_AuditLog_ExportAuditLogSignature=
119 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule",
120 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
121 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
122 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){g.Exec("AMT_AuthorizationService",
123 +"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
124 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
125 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
126 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
127 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,p){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};g.AMT_MessageLog_GetRecord=function(a,
128 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
129 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
130 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
131 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,e){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
132 +Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},e)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
133 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
134 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
135 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
136 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
137 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
138 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){console.log(JSON.stringify({WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},null,2));g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=
139 +function(a,b,c,p,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},
140 +b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,
141 +Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,p){g.Exec("CIM_BootService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c,p,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan",
142 +"SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=
143 +function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",
144 +{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",
145 +{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply",
146 +"QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply","SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor",
147 +"Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor","EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=
148 +function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,
149 +b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=
150 +function(a){g.Exec("CIM_Sensor","RestoreProperties",{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},
151 +c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog","Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog",
152 +"RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",
153 +{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){g.Exec("IPS_HostBasedSetupService",
154 +"Setup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,
155 +DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=
156 +function(a){g.Exec("IPS_KVMRedirectionSettingData","DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};
157 +g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService","StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,
158 +Time:c,TimeoutPeriod:p},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=
159 +function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",
160 +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",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",
161 +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",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",
162 +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",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",
163 +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",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",
164 +4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,[a,b,[]])};var D="\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e. ; \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u200b\u200b\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. ; \u041d\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0432\u043e \u0432\u0441\u0435\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u043b \u043d\u0435\u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c\u044b\u0439 \u0441\u0431\u043e\u0439. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u044b\u0439 \u0441\u0431\u043e\u0439 \u0436\u0435\u0441\u0442\u043a\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 / \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 ATAPI / IDE. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u044b\u0439 \u0441\u0431\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u0434\u0438\u0441\u043a\u0435\u0442\u0430 \u0421\u0431\u043e\u0439 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0436\u0435\u0441\u0442\u043a\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 PS / 2 \u0438\u043b\u0438 USB-\u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b. ; \u0421\u044a\u0435\u043c\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0432\u0438\u0434\u0435\u043e. ; \u041d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u0432\u0438\u0434\u0435\u043e\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. ; \u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b (BIOS) \u041f\u0417\u0423. ; \u041d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 (\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043f\u0438\u0442\u0430\u043d\u0438\u0435\u043c \u0438\u043c\u0435\u044e\u0442 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044e) ; \u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430".split(";"),
165 m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS 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(";"),
166 k="\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e ; \u0414\u0440\u0443\u0433\u043e\u0435 ; \u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e ; \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 ; \u0414\u0438\u0441\u043a ; \u041f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0439\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 ; \u041c\u043e\u0434\u0443\u043b\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f ; \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430 ; \u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0430\u043c\u044f\u0442\u0438 ; \u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 ; \u0411\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f ; \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043b\u0430\u0442\u0443 ; \u041f\u043b\u0430\u0442\u0430 \u043f\u0435\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 ; \u041f\u043b\u0430\u0442\u0430 \u0437\u0430\u0434\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 ; \u041f\u043b\u0430\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0438\u0442\u0430\u043d\u0438\u044f ; \u0417\u0430\u0434\u043d\u044f\u044f \u043f\u0430\u043d\u0435\u043b\u044c \u043f\u0440\u0438\u0432\u043e\u0434\u0430 ; \u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u043f\u043b\u0430\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043b\u0430\u0442\u0430 ; \u0414\u0440\u0443\u0433\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430 ; \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430 ; \u0411\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f ; \u0411\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f ; \u041f\u043b\u0430\u0442\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0438\u0442\u0430\u043d\u0438\u0435\u043c ; \u041f\u043b\u0430\u0442\u0430 \u0437\u0430\u0434\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u0448\u0430\u0441\u0441\u0438 ; \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0435 \u0448\u0430\u0441\u0441\u0438 ; \u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0448\u0430\u0441\u0441\u0438 ; \u041e\u0442\u0441\u0435\u043a \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0434\u0430 ; \u041e\u0442\u0441\u0435\u043a \u0434\u043b\u044f \u0434\u0438\u0441\u043a\u043e\u0432 ; \u041e\u0442\u0441\u0435\u043a \u0434\u043b\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0439\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 ; \u041e\u0442\u0441\u0435\u043a \u0434\u043b\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 ; \u0412\u0435\u043d\u0442\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u043e\u0435 \u043e\u0445\u043b\u0430\u0436\u0434\u0435\u043d\u0438\u0435 ; \u0411\u043b\u043e\u043a \u043e\u0445\u043b\u0430\u0436\u0434\u0435\u043d\u0438\u044f ; \u041a\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 ; \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u0430\u043c\u044f\u0442\u0438 ; \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 ; BIOS ; Intel (r) ME ; \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u0448\u0438\u043d\u0430 ; \u0413\u0440\u0443\u043f\u043f\u0430 ; Intel (r) ME ; \u0412\u043d\u0435\u0448\u043d\u044f\u044f \u0441\u0440\u0435\u0434\u0430 ; \u0411\u0430\u0442\u0430\u0440\u0435\u044f ; \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0431\u043b\u0435\u0439\u0434 ; \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f ; \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 / \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0430\u043c\u044f\u0442\u0438 ; \u041c\u043e\u0434\u0443\u043b\u044c \u0432\u0432\u043e\u0434\u0430 / \u0432\u044b\u0432\u043e\u0434\u0430 ; \u041c\u043e\u0434\u0443\u043b\u044c \u0432\u0432\u043e\u0434\u0430 / \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 ; \u041f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f ; \u041a\u0430\u043d\u0430\u043b IPMI ; \u0428\u0438\u043d\u0430 PCI ; \u0428\u0438\u043d\u0430 PCI Express ; \u0428\u0438\u043d\u0430 SCSI ; \u0428\u0438\u043d\u0430 SATA / SAS ; \u0428\u0438\u043d\u0430 \u043b\u0438\u0446\u0435\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430".split(";");
167 -e.RealmNames=";; \u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 ;; \u0410\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 ; \u0423\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 ; \u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 ; \u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 ; \u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 ; \u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u0430 ; \u0423\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u0430 ; \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c ; \u0412\u0440\u0435\u043c\u044f \u0441\u0435\u0442\u0438 ; \u041e\u0431\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f ; \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 ; EIT ; LocalUN ; \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 ; \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 Admin ; \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 ; \u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 ; \u041e\u0431\u043b\u0430\u0441\u0442\u044c ACL ;;; \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430".split(";");
168 -e.WatchdogCurrentStates={1:"\u041d\u0435 \u043d\u0430\u0447\u0430\u0442\u043e",2:"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f",4:"\u0411\u0435\u0433",8:"\u0418\u0441\u0442\u0435\u043a\u0448\u0438\u0439",16:"\u043f\u043e\u0434\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0439"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),
169 -r=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),K={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},B={16:"\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438",17:"RCO",18:"\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f",
167 +g.RealmNames=";; \u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 ;; \u0410\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 ; \u0423\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 ; \u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 ; \u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 ; \u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 ; \u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u0430 ; \u0423\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u0430 ; \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c ; \u0412\u0440\u0435\u043c\u044f \u0441\u0435\u0442\u0438 ; \u041e\u0431\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f ; \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 ; EIT ; LocalUN ; \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 ; \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 Admin ; \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 ; \u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 ; \u041e\u0431\u043b\u0430\u0441\u0442\u044c ACL ;;; \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430".split(";");
168 +g.WatchdogCurrentStates={1:"\u041d\u0435 \u043d\u0430\u0447\u0430\u0442\u043e",2:"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f",4:"\u0411\u0435\u0433",8:"\u0418\u0441\u0442\u0435\u043a\u0448\u0438\u0439",16:"\u043f\u043e\u0434\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0439"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),
169 +u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),K={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},B={16:"\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438",17:"RCO",18:"\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f",
170 19:"\u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438",20:"\u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438",21:"\u0421\u0435\u0442\u0435\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f",22:"\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0438",
171 23:"\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430",24:"\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u043e \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u043c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u044f\u043c",25:"\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f",
172 26:"\u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0430\u0433\u0435\u043d\u0442\u043e\u0432",27:"\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0442\u0438",28:"EAC",29:"KVM",30:"\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0443\u0447\u0430\u0441\u0442\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",
@@ -191,110 +191,110 @@ r=";No network connection available;Name resolution of URI failed;Connect to URI
191 2801:"EAC \u0432\u043a\u043b\u044e\u0447\u0435\u043d",2802:"EAC \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d",2803:"\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0441\u0430\u043d\u043a\u0438 EAC",2804:"\u041e\u043f\u0446\u0438\u0438 \u043d\u0430\u0431\u043e\u0440\u0430 EAC",2900:"\u041e\u043f\u0446\u0438\u044f KVM \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430",2901:"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 KVM \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",
192 2902:"\u041f\u0430\u0440\u043e\u043b\u044c KVM \u0438\u0437\u043c\u0435\u043d\u0435\u043d",2903:"\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 KVM \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e",2904:"\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 KVM \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c",3E3:"\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u044f",
193 3001:"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u044f \u0421\u043e\u0431\u044b\u0442\u0438\u0435",3002:"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};
194 -e.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a ME","\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a MEBx"][b.charCodeAt(0)];if(1606==a){var c=["\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e","\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e"][b.charCodeAt(0)];
194 +g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a ME","\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a MEBx"][b.charCodeAt(0)];if(1606==a){var c=["\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e","\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e"][b.charCodeAt(0)];
195 0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"\u0414\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0443\u043b\u044c\u0442"+["NOAUTH","ServerAuth","\u0432\u0437\u0430\u0438\u043c\u043e\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438"][b.charCodeAt(0)]+", \u041c\u0435\u0441\u0442\u043d\u044b\u0439"+["NOAUTH","ServerAuth","\u0432\u0437\u0430\u0438\u043c\u043e\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438"][b.charCodeAt(1)]:
196 -1617==a?e.RealmNames[ReadInt(b,0)]+","+["NOAUTH","Auth","\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","\u041c\u0435\u0441\u0442\u043d\u044b\u0439 \u041c\u042d\u0418","\u041c\u0435\u0441\u0442\u043d\u044b\u0439 WSMAN","\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 WSAMN"][b.charCodeAt(0)]:1900==a?"\u041e\u0442"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \u0432"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,
197 -12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"\u041e\u0442"+["\u041d\u0438\u043a\u0442\u043e","KVM","\u0412\u0441\u0435"][b.charCodeAt(0)]+" \u0432"+["\u041d\u0438\u043a\u0442\u043e","KVM","\u0412\u0441\u0435"][b.charCodeAt(1)]:3001==a?["\u0443\u0441\u043f\u0435\u0445","\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c 3 \u0440\u0430\u0437\u0430"][b.charCodeAt(0)]:null};e.GetAuditLog=function(a){e.AMT_AuditLog_ReadRecords(1,
198 -q,[a,[]])};return e}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
199 -function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",g=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+g+v+">"));return a+("</r:"+b+">")}
196 +1617==a?g.RealmNames[ReadInt(b,0)]+","+["NOAUTH","Auth","\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","\u041c\u0435\u0441\u0442\u043d\u044b\u0439 \u041c\u042d\u0418","\u041c\u0435\u0441\u0442\u043d\u044b\u0439 WSMAN","\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 WSAMN"][b.charCodeAt(0)]:1900==a?"\u041e\u0442"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \u0432"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,
197 +12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"\u041e\u0442"+["\u041d\u0438\u043a\u0442\u043e","KVM","\u0412\u0441\u0435"][b.charCodeAt(0)]+" \u0432"+["\u041d\u0438\u043a\u0442\u043e","KVM","\u0412\u0441\u0435"][b.charCodeAt(1)]:3001==a?["\u0443\u0441\u043f\u0435\u0445","\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c 3 \u0440\u0430\u0437\u0430"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,
198 +r,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
199 +function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">";if("string"==typeof c)a+=c;else for(var v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
200 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
201 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
202 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
203 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function g(a,b){var c,p,e,d,x,h,k,m,g,q=b&&b.split("/"),w=r.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){q=q.slice(0,q.length-1);a=a.split("/");x=a.length-1;r.nodeIdCompat&&A.test(a[x])&&(a[x]=a[x].replace(A,""));a=q.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
204 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((q||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(q)for(g=q.length;0<g;--g)if(e=w[q.slice(0,g).join("/")])if(e=e[p]){d=e;h=x;break}if(d)break;!k&&l&&l[p]&&(k=l[p],m=x)}!d&&k&&(d=k,h=m);d&&(c.splice(0,h,d),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return g(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
205 -a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function e(a){return function(){return r&&r.config&&r.config[a]||{}}}var C,w,D,m,k={},h={},r={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,A=/\.js$/;D=function(a,b){var c,d=q(a),e=d[0];a=d[1];e&&(e=g(e,b),c=p(e));e?a=c&&c.normalize?c.normalize(a,n(b)):g(a,b):(a=g(a,b),d=q(a),
206 -e=d[0],a=d[1],e&&(c=p(e)));return{f:e?e+"!"+a:a,n:a,pr:e,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:e(a)}}};C=function(a,b,c,e){var x,g,A,r,q=[];g=typeof c;var w;e=e||a;if("undefined"===g||"function"===g){b=!b.length&&c.length?["require","exports","module"]:b;for(r=0;r<b.length;r+=1)if(A=D(b[r],e),g=A.f,"require"===g)q[r]=m.require(a);else if("exports"===g)q[r]=m.exports(a),
207 -w=!0;else if("module"===g)x=q[r]=m.module(a);else if(B.call(k,g)||B.call(h,g)||B.call(K,g))q[r]=p(g);else if(A.p)A.p.load(A.n,v(e,!0),l(g),{}),q[r]=k[g];else throw Error(a+" missing "+g);b=c?c.apply(k[a],q):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,e,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){r=a;r.deps&&w(r.deps,r.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
208 -typeof c&&(c=e,e=x);e?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(e.isArrayBuffer(a)||e.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
209 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var e=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)e.nextTick=process.nextTick,e.setImmediate="function"===typeof setImmediate?setImmediate:e.nextTick;else if("function"===typeof setImmediate)e.setImmediate=setImmediate,e.nextTick=function(a){return setImmediate(a)};
210 -else{e.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];e.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
211 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var d=e.setImmediate;e.setImmediate=function(e){15<Date.now()-b?(b=Date.now(),d(e)):(a.push(e),1===a.length&&p.setAttribute("a",c=!c))}}e.nextTick=e.setImmediate}})();e.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};e.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};e.isArrayBufferView=function(a){return a&&
212 -e.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};e.ByteBuffer=c;e.ByteStringBuffer=c;e.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};e.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};e.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};e.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
213 -e.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};e.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};e.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(e.encodeUtf8(a))};e.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
214 -255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
215 -8&255))};e.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};e.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};e.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
216 -e.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};e.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};e.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
217 -16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};e.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24Le=
218 -function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};e.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};e.ByteStringBuffer.prototype.getSignedInt=
219 -function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};e.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
220 -a)};e.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};e.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};e.ByteStringBuffer.prototype.copy=function(){var a=e.createBuffer(this.data);a.read=this.read;return a};e.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};e.ByteStringBuffer.prototype.clear=
221 -function(){this.data="";this.read=0;return this};e.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};e.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.ByteStringBuffer.prototype.toString=function(){return e.decodeUtf8(this.bytes())};e.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
222 -0;this.growSize=b.growSize||1024;var c=e.isArrayBuffer(a),p=e.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};e.DataBuffer.prototype.length=function(){return this.write-this.read};e.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
223 -e.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),p=new Uint8Array(this.length()+b);p.set(c);this.data=new DataView(p.buffer);return this};e.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};e.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
224 -return this};e.DataBuffer.prototype.putBytes=function(a,b){if(e.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var d=new Uint8Array(this.data.buffer,this.write);d.set(c);this.write+=p;return this}if(e.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),d=new Uint8Array(this.data.buffer),d.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof e.DataBuffer||"object"===typeof a&&"number"===
225 -typeof a.read&&"number"===typeof a.write&&e.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),d=new Uint8Array(a.data.byteLength,this.write),d.set(c),this.write+=c.byteLength,this;a instanceof e.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.hex.decode(a,c,this.write),this;if("base64"===
226 -b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=e.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=e.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
227 -b);}throw Error("Invalid parameter: "+a);};e.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};e.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};e.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};e.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
228 -e.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};e.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};e.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};e.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
229 -a,!0);this.write+=4;return this};e.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};e.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};e.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};e.DataBuffer.prototype.getInt24=
230 -function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};e.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};e.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};e.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};e.DataBuffer.prototype.getInt32Le=function(){var a=
231 -this.data.getInt32(this.read,!0);this.read+=4;return a};e.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};e.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
232 -e.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};e.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};e.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};e.DataBuffer.prototype.copy=function(){return new e.DataBuffer(this)};e.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
233 -new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};e.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};e.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};e.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
234 -this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return e.binary.raw.encode(b);if("hex"===a)return e.binary.hex.encode(b);if("base64"===a)return e.binary.base64.encode(b);if("utf8"===a)return e.text.utf8.decode(b);if("utf16"===a)return e.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};e.createBuffer=function(a,b){void 0!==a&&"utf8"===
235 -(b||"raw")&&(a=e.encodeUtf8(a));return new e.ByteBuffer(a)};e.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};e.xorBytes=function(a,b,c){for(var p="",e="",d="",h=0,k=0;0<c;--c,++h)e=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(p+=d,d="",k=0),d+=String.fromCharCode(e),++k;return p+d};e.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};e.bytesToHex=
236 -function(a){return e.createBuffer(a).toHex()};e.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var d=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];e.encode64=function(a,b){for(var c="",p="",e,d,h,k=0;k<a.length;)e=
237 -a.charCodeAt(k++),d=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,b)+"\r\n",c=c.substr(b));return p+
238 -c};e.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,p,e,h,k=0;k<a.length;)c=d[a.charCodeAt(k++)-43],p=d[a.charCodeAt(k++)-43],e=d[a.charCodeAt(k++)-43],h=d[a.charCodeAt(k++)-43],b+=String.fromCharCode(c<<2|p>>4),64!==e&&(b+=String.fromCharCode((p&15)<<4|e>>2),64!==h&&(b+=String.fromCharCode((e&3)<<6|h)));return b};e.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};e.decodeUtf8=function(a){return decodeURIComponent(escape(a))};e.binary={raw:{},hex:{},base64:{}};
239 -e.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};e.binary.raw.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(a.length));for(var e=c=c||0,d=0;d<a.length;++d)p[e++]=a.charCodeAt(d);return b?e-c:p};e.binary.hex.encode=e.bytesToHex;e.binary.hex.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var e=0,d=c;a.length&1&&(e=1,p[d++]=parseInt(a[0],16));for(;e<a.length;e+=2)p[d++]=parseInt(a.substr(e,2),16);return b?d-c:p};e.binary.base64.encode=
240 -function(a,b){for(var c="",p="",e,d,h,k=0;k<a.byteLength;)e=a[k++],d=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,
241 -b)+"\r\n",c=c.substr(b));return p+c};e.binary.base64.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var e,h,k,m,g=0,r=c;g<a.length;)e=d[a.charCodeAt(g++)-43],h=d[a.charCodeAt(g++)-43],k=d[a.charCodeAt(g++)-43],m=d[a.charCodeAt(g++)-43],p[r++]=e<<2|h>>4,64!==k&&(p[r++]=(h&15)<<4|k>>2,64!==m&&(p[r++]=(k&3)<<6|m));return b?r-c:p.subarray(0,r)};e.text={utf8:{},utf16:{}};e.text.utf8.encode=function(a,b,c){a=e.encodeUtf8(a);
242 -var p=b;p||(p=new Uint8Array(a.length));for(var d=c=c||0,h=0;h<a.length;++h)p[d++]=a.charCodeAt(h);return b?d-c:p};e.text.utf8.decode=function(a){return e.decodeUtf8(String.fromCharCode.apply(null,a))};e.text.utf16.encode=function(a,b,c){var p=b;p||(p=new Uint8Array(2*a.length));for(var e=new Uint16Array(p.buffer),d=c=c||0,h=c,k=0;k<a.length;++k)e[h++]=a.charCodeAt(k),d+=2;return b?d-c:p};e.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};e.deflate=function(a,
243 -b,c){b=e.decode64(a.deflate(e.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};e.inflate=function(a,b,c){a=a.inflate(e.encode64(b)).rval;return null===a?null:e.decode64(a)};var g=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=e.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
244 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(e.decode64(c)));return c},m=function(a,b,c,p){var e=l(a,b);null===e&&(e={});e[c]=p;g(a,b,e)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var p=l(a,b);if(null!==p&&c in p){delete p[c];c=!0;for(var e in p){c=!1;break}c&&(p=null);g(a,b,p)}},r=function(a,b){g(a,b,null)},K=function(a,b,
245 -c){var p=null;"undefined"===typeof c&&(c=["web","flash"]);var e,d=!1,h=null,k;for(k in c){e=c[k];try{if("flash"===e||"both"===e){if(null===b[0])throw Error("Flash local storage not available.");p=a.apply(this,b);d="flash"===e}if("web"===e||"both"===e)b[0]=localStorage,p=a.apply(this,b),d=!0}catch(m){h=m}if(d)break}if(!d)throw h;return p};e.setItem=function(a,b,c,p,e){K(m,arguments,e)};e.getItem=function(a,b,c,p){return K(k,arguments,p)};e.removeItem=function(a,b,c,p){K(h,arguments,p)};e.clearItems=
246 -function(a,b,c){K(r,arguments,c)};e.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;e.getQueryVariables=function(a){var b=function(a){var b=
247 -{};a=a.split("&");for(var c=0;c<a.length;c++){var p=a[c].indexOf("="),e;0<p?(e=a[c].substring(0,p),p=a[c].substring(p+1)):(e=a[c],p=null);e in b||(b[e]=[]);e in Object.prototype||null===p||b[e].push(unescape(p))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};e.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
248 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:e.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};e.makeRequest=function(a){var b=e.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var p;"undefined"===typeof a?p=b.query:(p=b.query[a])&&"undefined"!==typeof c&&(p=p[c]);return p},getQueryLast:function(a,b){var p=c.getQuery(a);return p?p[p.length-1]:b}};return c};e.makeLink=function(a,
249 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};e.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var p=0,e=b.length;p<e;){var d=b[p++];if(p==e)a[d]=c;else{var h=d in a;if(!h||h&&"object"!==typeof a[d]||h&&null===a[d])a[d]={};a=a[d]}}};e.getPath=function(a,b,c){for(var p=0,e=b.length,d=!0;d&&p<e&&"object"===typeof a&&null!==a;){var h=b[p++];(d=h in a)&&(a=a[h])}return d?a:c};e.deletePath=function(a,b){if("object"===
250 -typeof a&&null!==a)for(var c=0,p=b.length;c<p;){var e=b[c++];if(c==p)delete a[e];else{if(!(e in a)||"object"!==typeof a[e]||null===a[e])break;a=a[e]}}};e.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};e.format=function(a){var b=/%./g,c,p,e=0,d=[];for(p=0;c=b.exec(a);)switch(p=a.substring(p,b.lastIndex-2),0<p.length&&d.push(p),p=b.lastIndex,c=c[0][1],c){case "s":case "o":e<arguments.length?d.push(arguments[e++ +1]):d.push("<?>");break;case "%":d.push("%");break;default:d.push("<#"+
251 -c+"?>")}d.push(a.substring(p));return d.join("")};e.formatNumber=function(a,b,c,p){var e=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;p=void 0===p?".":p;c=0>a?"-":"";var d=parseInt(a=Math.abs(+a||0).toFixed(e),10)+"",h=3<d.length?d.length%3:0;return c+(h?d.substr(0,h)+p:"")+d.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+p)+(e?b+Math.abs(a-d).toFixed(e).slice(2):"")};e.formatSize=function(a){return a=1073741824<=a?e.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?e.formatNumber(a/1048576,2,".","")+
252 -" MiB":1024<=a?e.formatNumber(a/1024,0)+" KiB":e.formatNumber(a,0)+" bytes"};e.bytesFromIP=function(a){return-1!==a.indexOf(".")?e.bytesFromIPv4(a):-1!==a.indexOf(":")?e.bytesFromIPv6(a):null};e.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=e.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};e.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
253 -2*(8-a.length+b),p=e.createBuffer(),d=0;8>d;++d)if(a[d]&&0!==a[d].length){var h=e.hexToBytes(a[d]);2>h.length&&p.putByte(0);p.putBytes(h)}else p.fillWithByte(0,c),c=0;return p.getBytes()};e.bytesToIP=function(a){return 4===a.length?e.bytesToIPv4(a):16===a.length?e.bytesToIPv6(a):null};e.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};e.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,d=0;d<a.length;d+=
254 -2){for(var h=e.bytesToHex(a[d]+a[d+1]);"0"===h[0]&&"0"!==h;)h=h.substr(1);if("0"===h){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(h)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};e.estimateCores=function(a,b){function c(a,k,m){if(0===k){var g=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);e.cores=
255 -Math.max(1,g);URL.revokeObjectURL(h);return b(null,e.cores)}p(m,function(b,p){a.push(d(m,p));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],e=0;e<a;++e){var z=new Worker(h);z.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(z)}for(e=0;e<a;++e)c[e].postMessage(e)}function d(a,b){for(var c=[],p=0;p<a;++p)for(var e=b[p],h=c[p]=[],z=0;z<a;++z)if(p!==z){var k=b[z];(e.st>k.st&&e.st<k.et||k.st>e.st&&k.st<e.et)&&h.push(z)}return c.reduce(function(a,
256 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in e&&!a.update)return b(null,e.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return e.cores=navigator.hardwareConcurrency,b(null,e.cores);if("undefined"===typeof Worker)return e.cores=1,b(null,e.cores);if("undefined"===typeof Blob)return e.cores=2,b(null,e.cores);var h=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
257 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var q=0;q<g.length;++q)g[q](c);
258 -return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
203 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,g,x,h,k,m,e,r=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){r=r.slice(0,r.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=r.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
204 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((r||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(r)for(e=r.length;0<e;--e)if(d=w[r.slice(0,e).join("/")])if(d=d[p]){g=d;h=x;break}if(g)break;!k&&l&&l[p]&&(k=l[p],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
205 +a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function r(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var C,w,D,m,k={},h={},u={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=r(a),g=d[0];a=d[1];g&&(g=e(g,b),c=p(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=r(a),
206 +g=d[0],a=d[1],g&&(c=p(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};C=function(a,b,c,g){var x,e,z,u,r=[];e=typeof c;var w;g=g||a;if("undefined"===e||"function"===e){b=!b.length&&c.length?["require","exports","module"]:b;for(u=0;u<b.length;u+=1)if(z=D(b[u],g),e=z.f,"require"===e)r[u]=m.require(a);else if("exports"===e)r[u]=m.exports(a),
207 +w=!0;else if("module"===e)x=r[u]=m.module(a);else if(B.call(k,e)||B.call(h,e)||B.call(K,e))r[u]=p(e);else if(z.p)z.p.load(z.n,v(g,!0),l(e),{}),r[u]=k[e];else throw Error(a+" missing "+e);b=c?c.apply(k[a],r):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
208 +typeof c&&(c=g,g=x);g?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(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(b){for(var p=
209 +0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.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)};
210 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
211 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}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&&
212 +d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
213 +d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
214 +255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
215 +8&255))};d.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};d.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};d.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
216 +d.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};d.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};d.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
217 +16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};d.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24Le=
218 +function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};d.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};d.ByteStringBuffer.prototype.getSignedInt=
219 +function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
220 +a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
221 +function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
222 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
223 +d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
224 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
225 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
226 +b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
227 +b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
228 +d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
229 +a,!0);this.write+=4;return this};d.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};d.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};d.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};d.DataBuffer.prototype.getInt24=
230 +function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};d.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};d.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};d.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};d.DataBuffer.prototype.getInt32Le=function(){var a=
231 +this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};d.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
232 +d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
233 +new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
234 +this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
235 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
236 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
237 +a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
238 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
239 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
240 +function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
241 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,u=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[u++]=p<<2|g>>4,64!==h&&(d[u++]=(g&15)<<4|h>>2,64!==k&&(d[u++]=(h&3)<<6|k));return b?u-c:d.subarray(0,u)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
242 +var p=b;p||(p=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)p[y++]=a.charCodeAt(h);return b?y-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
243 +b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
244 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},K=function(a,b,
245 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){K(m,arguments,p)};d.getItem=function(a,b,c,d){return K(k,arguments,d)};d.removeItem=function(a,b,c,d){K(h,arguments,d)};d.clearItems=
246 +function(a,b,c){K(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;d.getQueryVariables=function(a){var b=function(a){var b=
247 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
248 +0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
249 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
250 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
251 +c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
252 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
253 +2*(8-a.length+b),p=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&p.putByte(0);p.putBytes(k)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,h=0;h<a.length;h+=
254 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],e=b.length;m&&e===m.end+1?(m.end=e,m.end-m.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:e,end:e})}b.push(k)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,e){if(0===m){var u=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
255 +Math.max(1,u);URL.revokeObjectURL(k);return b(null,d.cores)}p(e,function(b,d){a.push(h(e,d));c(a,m-1,e)})}function p(a,b){for(var c=[],d=[],g=0;g<a;++g){var h=new Worker(k);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(g=0;g<a;++g)c[g].postMessage(g)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],g=c[d]=[],y=0;y<a;++y)if(d!==y){var k=b[y];(p.st>k.st&&p.st<k.et||k.st>p.st&&k.st<p.et)&&g.push(y)}return c.reduce(function(a,
256 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
257 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var r=0;r<e.length;++r)e[r](c);
258 +return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
259 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
260 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
261 this.mode.start(c)};c.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()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
262 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
263 -c.defined.cipher=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
264 -4<b.length){var d=b;b=a.util.createBuffer();for(var e=0;e<d.length;++e)b.putByte(d[e])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function g(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
262 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
263 +c.defined.cipher=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
264 +4<b.length){var d=b;b=a.util.createBuffer();for(var g=0;g<d.length;++g)b.putByte(d[g])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
265 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
266 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.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);
267 this._outBlock=Array(this._ints)};w.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=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
268 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
269 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
270 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32()^this._outBlock[d],b.putInt32(this._inBlock[d]);else{var e=(this.blockSize-p)%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]);
271 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
272 -p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32(),b.putInt32(this._inBlock[d]^this._outBlock[d]);else{var e=(this.blockSize-p)%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);
273 -if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
274 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)b.putInt32(a.getInt32()^this._outBlock[d]),this._inBlock[d]=this._outBlock[d];else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(d=0;d<this._ints;++d)this._partialOutput.putInt32(a.getInt32()^
275 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
276 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var g=0;g<
277 -this._ints;++g)b.putInt32(a.getInt32()^this._outBlock[g]);else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);0<q&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
270 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
271 +if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
272 +d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
273 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
274 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
275 +this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
276 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var e=0;e<
277 +this._ints;++e)b.putInt32(a.getInt32()^this._outBlock[e]);else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);0<r&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<r&&!c)return b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
278 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
279 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.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,
280 -this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(g(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=g(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
281 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var g=0;g<this._ints;++g)b.putInt32(this._outBlock[g]^=a.getInt32());this._cipherLength+=this.blockSize}else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();
282 -for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);if(0===q||c){c?(g=p%this.blockSize,this._cipherLength+=g,this._partialOutput.truncate(this.blockSize-g)):this._cipherLength+=this.blockSize;for(g=0;g<this._ints;++g)this._outBlock[g]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),
283 -this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
284 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var e=this._aDataLength.concat(g(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,e);e=[];this.cipher.encrypt(this._j0,e);for(var q=0;q<
285 -this._ints;++q)this.tag.putInt32(this._s[q]^e[q]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],p=b.slice(0),d=0;128>d;++d)a[d/32|0]&1<<31-d%32&&(c[0]^=p[0],c[1]^=p[1],c[2]^=p[2],c[3]^=p[3]),this.pow(p,p);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,p=3;0<p;--p)b[p]=a[p]>>>1|(a[p-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
286 -[0,0,0,0],c=0;32>c;++c){var p=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=p[0];b[1]^=p[1];b[2]^=p[2];b[3]^=p[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,p=4*c,c=16*c,d=Array(c),e=0;e<c;++e){var g=[0,0,0,0];g[e/p|0]=1<<b-1<<(p-1-e%p)*b;d[e]=this.generateSubHashTable(this.multiply(g,a),b)}return d};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
287 -p=c>>>1,d=Array(c);d[p]=a.slice(0);for(var e=p>>>1;0<e;)this.pow(d[2*e],d[e]=[]),e>>=1;for(e=2;e<p;){for(var g=1;g<e;++g){var q=d[e],w=d[g];d[e+g]=[q[0]^w[0],q[1]^w[1],q[2]^w[2],q[3]^w[3]]}e*=2}d[0]=[0,0,0,0];for(e=p+1;e<c;++e)g=d[e^p],d[e]=[a[0]^g[0],a[1]^g[1],a[2]^g[2],a[3]^g[3]];return d}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=
288 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
289 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);r=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,e,g,k,q,u,b=0;256>b;++b){q=p^p<<1^p<<2^p<<3^p<<4;q=q>>8^q&255^99;h[c]=q;r[q]=c;u=a[q];e=a[c];g=a[e];k=a[g];u^=u<<24^q<<16^q<<8^q;g=(e^g^k)<<24^(c^
290 -k)<<16^(c^g^k)<<8^c^e^k;for(var w=0;4>w;++w)B[w][c]=u,x[w][q]=g,u=u<<24|u>>>8,g=g<<24|g>>>8;0===c?c=p=1:(c=e^a[a[a[e^k]]],p^=a[a[p]])}}function g(a,b){for(var c=a.slice(0),p,d=1,e=c.length,m=k*(e+6+1),q=e;q<m;++q)p=c[q-1],0===q%e?(p=h[p>>>16&255]<<24^h[p>>>8&255]<<16^h[p&255]<<8^h[p>>>24]^K[d]<<24,d++):6<e&&4===q%e&&(p=h[p>>>24]<<24^h[p>>>16&255]<<16^h[p>>>8&255]<<8^h[p&255]),c[q]=c[q-e]^p;if(b){for(var d=x[0],e=x[1],r=x[2],w=x[3],l=c.slice(0),m=c.length,q=0,F=m-k;q<m;q+=k,F-=k)if(0===q||q===m-k)l[q]=
291 -c[F],l[q+1]=c[F+3],l[q+2]=c[F+2],l[q+3]=c[F+1];else for(var B=0;B<k;++B)p=c[F+B],l[q+(3&-B)]=d[h[p>>>24]]^e[h[p>>>16&255]]^r[h[p>>>8&255]]^w[h[p&255]];c=l}return c}function w(a,b,c,p){var d=a.length/4-1,e,g,k,m,q;p?(e=x[0],g=x[1],k=x[2],m=x[3],q=r):(e=B[0],g=B[1],k=B[2],m=B[3],q=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[p?3:1]^a[1];C=b[2]^a[2];b=b[p?1:3]^a[3];for(var n=3,v=1;v<d;++v)L=e[w>>>24]^g[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=e[l>>>24]^g[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=e[C>>>24]^
292 -g[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=e[b>>>24]^g[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=q[w>>>24]<<24^q[l>>>16&255]<<16^q[C>>>8&255]<<8^q[b&255]^a[++n];c[p?3:1]=q[l>>>24]<<24^q[C>>>16&255]<<16^q[b>>>8&255]<<8^q[w&255]^a[++n];c[2]=q[C>>>24]<<24^q[b>>>16&255]<<16^q[w>>>8&255]<<8^q[l&255]^a[++n];c[p?1:3]=q[b>>>24]<<24^q[w>>>16&255]<<16^q[l>>>8&255]<<8^q[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
293 -a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;e.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!1,mode:p});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,p){a=l({key:a,output:c,decrypt:!0,mode:p});a.start(b);return a};a.aes.createDecryptionCipher=
280 +this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
281 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var e=0;e<this._ints;++e)b.putInt32(this._outBlock[e]^=a.getInt32());this._cipherLength+=this.blockSize}else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();
282 +for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(0===r||c){c?(e=p%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<r&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),
283 +this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
284 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var u=0;u<
285 +this._ints;++u)this.tag.putInt32(this._s[u]^g[u]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
286 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),g=0;g<c;++g){var e=[0,0,0,0];e[g/d|0]=1<<b-1<<(d-1-g%d)*b;p[g]=this.generateSubHashTable(this.multiply(e,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
287 +d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(p[2*g],p[g]=[]),g>>=1;for(g=2;g<d;){for(var e=1;e<g;++e){var r=p[g],w=p[e];p[g+e]=[r[0]^w[0],r[1]^w[1],r[2]^w[2],r[3]^w[3]]}g*=2}p[0]=[0,0,0,0];for(g=d+1;g<c;++g)e=p[g^d],p[g]=[a[0]^e[0],a[1]^e[1],a[2]^e[2],a[3]^e[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=
288 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
289 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,g,e,k,r,q,b=0;256>b;++b){r=p^p<<1^p<<2^p<<3^p<<4;r=r>>8^r&255^99;h[c]=r;u[r]=c;q=a[r];g=a[c];e=a[g];k=a[e];q^=q<<24^r<<16^r<<8^r;e=(g^e^k)<<24^(c^
290 +k)<<16^(c^e^k)<<8^c^g^k;for(var w=0;4>w;++w)B[w][c]=q,x[w][r]=e,q=q<<24|q>>>8,e=e<<24|e>>>8;0===c?c=p=1:(c=g^a[a[a[g^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,g=c.length,m=k*(g+6+1),r=g;r<m;++r)d=c[r-1],0===r%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^K[p]<<24,p++):6<g&&4===r%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[r]=c[r-g]^d;if(b){for(var p=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),m=c.length,r=0,F=m-k;r<m;r+=k,F-=k)if(0===r||r===m-k)l[r]=
291 +c[F],l[r+1]=c[F+3],l[r+2]=c[F+2],l[r+3]=c[F+1];else for(var B=0;B<k;++B)d=c[F+B],l[r+(3&-B)]=p[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,g,e,k,m,r;d?(g=x[0],e=x[1],k=x[2],m=x[3],r=u):(g=B[0],e=B[1],k=B[2],m=B[3],r=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[d?3:1]^a[1];C=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)L=g[w>>>24]^e[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^e[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=g[C>>>24]^
292 +e[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^e[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=r[w>>>24]<<24^r[l>>>16&255]<<16^r[C>>>8&255]<<8^r[b&255]^a[++n];c[d?3:1]=r[l>>>24]<<24^r[C>>>16&255]<<16^r[b>>>8&255]<<8^r[w&255]^a[++n];c[2]=r[C>>>24]<<24^r[b>>>16&255]<<16^r[w>>>8&255]<<8^r[l&255]^a[++n];c[d?1:3]=r[b>>>24]<<24^r[w>>>16&255]<<16^r[l>>>8&255]<<8^r[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
293 +a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;g.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
294 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
295 -c;for(var c=a.util.createBuffer(),e=0;e<d.length;++e)c.putByte(d[e])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,e=0;e<h;++e)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=g(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return g(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
296 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,r,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
297 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
295 +c;for(var c=a.util.createBuffer(),g=0;g<d.length;++g)c.putByte(d[g])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,g=0;g<h;++g)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
296 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
297 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
298 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
299 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
300 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -308,336 +308,336 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
308 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
309 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
310 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
311 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var q=0;q<g.length;++q)g[q](c);return c.oids}},
312 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
313 -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};c.create=function(b,c,d,e){if(a.util.isArray(e)){for(var h=[],g=0;g<e.length;++g)void 0!==e[g]&&h.push(e[g]);e=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(e),value:e}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,g){void 0===g&&(g=!0);
314 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,r=d(b);if(b.length()<r){if(g)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+r,m;r=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<r){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===r-(b.read-
315 -x))++x,--r}catch(A){}b.read=x}if(l)if(l=[],void 0===r)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,g))}else for(x=b.length();0<r;)l.push(c.fromDer(b,g)),r-=x-b.length(),x=b.length();else{if(void 0===r){if(g)throw Error("Non-constructed ASN.1 object of indefinite length.");r=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<r;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(r)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
316 -e=b.tagClass|b.type,g=a.util.createBuffer();if(b.composed){b.constructed?e|=32:g.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&g.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)g.putInt16(b.value.charCodeAt(h));else g.putBytes(b.value);d.putByte(e);if(127>=g.length())d.putByte(g.length()&127);else{h=g.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(g);
317 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,e,h,g,q=2;q<b.length;++q){d=!0;e=[];h=parseInt(b[q],10);do g=h&127,h>>>=7,d||(g|=128),e.push(g),d=!1;while(0<h);for(d=e.length-1;0<=d;--d)c.putByte(e[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var e=0;0<b.length();)d=b.getByte(),e<<=7,d&128?e+=d&127:(c+="."+(e+d),e=0);
318 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,e=parseInt(a.substr(4,2),10),p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,e);b.setUTCHours(p,g,q,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
319 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,e=parseInt(a.substr(6,2),10),p=parseInt(a.substr(8,2),10),g=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),x=0,l=0,y=!1;"Z"===a.charAt(a.length-1)&&(y=!0);var R=a.length-5,z=a.charAt(R);if("+"===z||"-"===z)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===z&&(l*=-1),y=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
320 -10));y?(b.setUTCFullYear(c,d,e),b.setUTCHours(p,g,q,x),b.setTime(+b+l)):(b.setFullYear(c,d,e),b.setHours(p,g,q,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
311 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var r=0;r<e.length;++r)e[r](c);return c.oids}},
312 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
313 +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};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
314 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
315 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
316 +g=b.tagClass|b.type,e=a.util.createBuffer();if(b.composed){b.constructed?g|=32:e.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&e.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)e.putInt16(b.value.charCodeAt(h));else e.putBytes(b.value);d.putByte(g);if(127>=e.length())d.putByte(e.length()&127);else{h=e.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(e);
317 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,r=2;r<b.length;++r){d=!0;g=[];h=parseInt(b[r],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
318 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),r=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(r=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(g,e,r,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
319 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),r=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
320 +10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(g,e,r,x),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(g,e,r,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
321 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
322 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,e,g){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)g&&(b.tagClass!==d.tagClass&&g.push("["+d.name+'] Expected tag class "'+d.tagClass+
323 -'", got "'+b.tagClass+'"'),b.type!==d.type&&g.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var r=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[r]&&((h=c.validate(b.value[r],d.value[l],e,g))?++r:d.value[l].optional&&(h=!0)),!h&&g&&g.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
324 -b.value.length+'"');h&&e&&(d.capture&&(e[d.capture]=b.value),d.captureAsn1&&(e[d.captureAsn1]=b))}else g&&g.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var g=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,e){var k="";d=d||0;e=e||2;0<d&&(k+="\n");for(var h="",r=0;r<d*e;++r)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
322 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
323 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
324 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
325 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
326 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
327 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",r=0;r<b.value.length;++r)void 0!==b.value[r]&&(l+=1,B+=c.prettyPrint(b.value[r],d+1,e),r+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
328 -c.Type.OCTETSTRING?(g.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:g.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
329 -c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<g.length;++q)g[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
327 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,B+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
328 +c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
329 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var r=0;r<e.length;++r)e[r](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
330 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[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];m=[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];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
331 -Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var e,p,h,g,z,E,q,l=c.length();64<=l;){p=a.h0;h=a.h1;g=a.h2;z=a.h3;for(q=0;16>q;++q)b[q]=c.getInt32Le(),e=z^h&(g^z),e=p+e+k[q]+b[q],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;32>q;++q)e=g^z&(h^g),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;48>q;++q)e=h^g^z,e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;64>q;++q)e=g^(h|~z),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;a.h0=a.h0+p|0;a.h1=a.h1+h|0;a.h2=a.h2+g|0;a.h3=
332 -a.h3+z|0;l-=64}}var g=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=g;g.create=function(){h||c();var b=null,g=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);g=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
333 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],z=m.fullMessageLength.length-1;0<=z;--z)m.fullMessageLength[z]+=q[1],q[1]=q[0]+(m.fullMessageLength[z]/4294967296>>>0),m.fullMessageLength[z]>>>=0,q[0]=q[1]/4294967296>>>0;g.putBytes(c);d(b,k,g);(2048<g.read||0===g.length())&&g.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(g.bytes());c.putBytes(l.substr(0,
334 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,q=0,z=m.fullMessageLength.length-1;0<=z;--z)h=8*m.fullMessageLength[z]+q,q=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=
335 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
336 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,A,y,w,z=d.length();64<=z;){p=a.h0;g=a.h1;q=a.h2;l=a.h3;A=a.h4;for(w=0;16>w;++w)e=d.getInt32(),b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;20>w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;32>
337 -w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;40>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;60>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g&q|l&(g^q),e=(p<<5|p>>>27)+y+A+2400959708+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;80>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>
338 -27)+y+A+3395469782+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;a.h0=a.h0+p|0;a.h1=a.h1+g|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+A|0;z-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),e=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
339 -0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,e=0;e<c;++e)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var w=g.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
340 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],A=0;A<h.fullMessageLength.length;++A)w=8*h.fullMessageLength[A+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
341 -h4:b.h4};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var g=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
342 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,y,w,z,E,O,H,C,u,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
343 -for(;64>l;++l)e=b[l-2],e=(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10,p=b[l-15],p=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,b[l]=e+b[l-7]+p+b[l-16]|0;y=a.h0;w=a.h1;z=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;u=a.h7;for(l=0;64>l;++l)e=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),g=C^O&(H^C),p=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),q=y&w|z&(y^w),e=u+e+g+n[l]+b[l],p+=q,u=C,C=H,H=O,O=E+e|0,E=z,z=w,w=y,y=e+p|0;a.h0=a.h0+y|0;a.h1=a.h1+w|0;a.h2=a.h2+z|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+u|0;v-=
344 -64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.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,
345 -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],l=!0);var b=null,d=a.util.createBuffer(),e=Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,
346 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){r.messageLength=0;r.fullMessageLength=r.messageLength64=[];for(var c=r.messageLengthSize/4,e=0;e<c;++e)r.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return r}};r.start();r.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var x=g.length;r.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=r.fullMessageLength.length-
347 -1;0<=w;--w)r.fullMessageLength[w]+=x[1],x[1]=x[0]+(r.fullMessageLength[w]/4294967296>>>0),r.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return r};r.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,r.blockLength-(r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize&r.blockLength-1)));a.util.createBuffer();for(var w,x,A=8*r.fullMessageLength[0],y=0;y<r.fullMessageLength.length;++y)w=
348 -8*r.fullMessageLength[y+1],x=w/4294967296>>>0,A+=x,l.putInt32(A>>>0),A=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return r};var g=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
349 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
350 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,k,q,z,E,l,w,C,u,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)q=b[S-2],w=q[0],q=q[1],e=((w>>>19|q<<13)^(q>>>29|w<<3)^w>>>6)>>>0,p=((w<<13|q>>>19)^(q<<3|w>>>29)^(w<<26|q>>>6))>>>0,q=b[S-15],w=q[0],q=q[1],g=((w>>>1|q<<31)^(w>>>8|q<<24)^w>>>7)>>>0,k=((w<<31|q>>>1)^(w<<24|q>>>8)^(w<<25|q>>>7))>>>0,w=b[S-7],C=b[S-
351 -16],q=p+w[1]+k+C[1],b[S][0]=e+w[0]+g+C[0]+(q/4294967296>>>0)>>>0,b[S][1]=q>>>0;w=a[0][0];C=a[0][1];u=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)e=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,q=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,p=(ba^D&(J^ba))>>>0,z=(W^V&(aa^W))>>>0,g=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
352 -E=(w&u|v&(w^u))>>>0,l=(C&n|F&(C^n))>>>0,q=G+q+z+m[S][1]+b[S][1],e=I+e+p+m[S][0]+b[S][0]+(q/4294967296>>>0)>>>0,p=q>>>0,q=k+l,g=g+E+(q/4294967296>>>0)>>>0,k=q>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,q=L+p,D=Y+e+(q/4294967296>>>0)>>>0,V=q>>>0,Y=v,L=F,v=u,F=n,u=w,n=C,q=p+k,w=e+g+(q/4294967296>>>0)>>>0,C=q>>>0;q=a[0][1]+C;a[0][0]=a[0][0]+w+(q/4294967296>>>0)>>>0;a[0][1]=q>>>0;q=a[1][1]+n;a[1][0]=a[1][0]+u+(q/4294967296>>>0)>>>0;a[1][1]=q>>>0;q=a[2][1]+F;a[2][0]=a[2][0]+v+(q/4294967296>>>0)>>>0;a[2][1]=q>>>0;
353 -q=a[3][1]+L;a[3][0]=a[3][0]+Y+(q/4294967296>>>0)>>>0;a[3][1]=q>>>0;q=a[4][1]+V;a[4][0]=a[4][0]+D+(q/4294967296>>>0)>>>0;a[4][1]=q>>>0;q=a[5][1]+aa;a[5][0]=a[5][0]+J+(q/4294967296>>>0)>>>0;a[5][1]=q>>>0;q=a[6][1]+W;a[6][0]=a[6][0]+ba+(q/4294967296>>>0)>>>0;a[6][1]=q>>>0;q=a[7][1]+G;a[7][0]=a[7][0]+I+(q/4294967296>>>0)>>>0;a[7][1]=q>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var g=a.sha384=a.sha512.sha384=a.sha512.sha384||
354 -{};g.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=g;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
331 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var p,g,h,e,y,E,r,l=c.length();64<=l;){g=a.h0;h=a.h1;e=a.h2;y=a.h3;for(r=0;16>r;++r)b[r]=c.getInt32Le(),p=y^h&(e^y),p=g+p+k[r]+b[r],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;32>r;++r)p=e^y&(h^e),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;48>r;++r)p=h^e^y,p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;64>r;++r)p=e^(h|~y),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;a.h0=a.h0+g|0;a.h1=a.h1+h|0;a.h2=a.h2+e|0;a.h3=
332 +a.h3+y|0;l-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
333 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var r=c.length;m.messageLength+=r;for(var r=[r/4294967296>>>0,r>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=r[1],r[1]=r[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,r[0]=r[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
334 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,r=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+r,r=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
335 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
336 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;r=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;32>
337 +w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&r|l&(e^r),p=(g<<5|g>>>27)+A+z+2400959708+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>
338 +27)+A+z+3395469782+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+r|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
339 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
340 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
341 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
342 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,A,w,y,E,O,H,C,q,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
343 +for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=p+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;q=a.h7;for(l=0;64>l;++l)p=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),e=C^O&(H^C),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),r=A&w|y&(A^w),p=q+p+e+n[l]+b[l],g+=r,q=C,C=H,H=O,O=E+p|0,E=y,y=w,w=A,A=p+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+q|0;v-=
344 +64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.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,
345 +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],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
346 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
347 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
348 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
349 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
350 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,k,r,y,E,l,w,C,q,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)r=b[S-2],w=r[0],r=r[1],p=((w>>>19|r<<13)^(r>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|r>>>19)^(r<<3|w>>>29)^(w<<26|r>>>6))>>>0,r=b[S-15],w=r[0],r=r[1],e=((w>>>1|r<<31)^(w>>>8|r<<24)^w>>>7)>>>0,k=((w<<31|r>>>1)^(w<<24|r>>>8)^(w<<25|r>>>7))>>>0,w=b[S-7],C=b[S-
351 +16],r=g+w[1]+k+C[1],b[S][0]=p+w[0]+e+C[0]+(r/4294967296>>>0)>>>0,b[S][1]=r>>>0;w=a[0][0];C=a[0][1];q=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)p=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,r=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(J^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
352 +E=(w&q|v&(w^q))>>>0,l=(C&n|F&(C^n))>>>0,r=G+r+y+m[S][1]+b[S][1],p=I+p+g+m[S][0]+b[S][0]+(r/4294967296>>>0)>>>0,g=r>>>0,r=k+l,e=e+E+(r/4294967296>>>0)>>>0,k=r>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,r=L+g,D=Y+p+(r/4294967296>>>0)>>>0,V=r>>>0,Y=v,L=F,v=q,F=n,q=w,n=C,r=g+k,w=p+e+(r/4294967296>>>0)>>>0,C=r>>>0;r=a[0][1]+C;a[0][0]=a[0][0]+w+(r/4294967296>>>0)>>>0;a[0][1]=r>>>0;r=a[1][1]+n;a[1][0]=a[1][0]+q+(r/4294967296>>>0)>>>0;a[1][1]=r>>>0;r=a[2][1]+F;a[2][0]=a[2][0]+v+(r/4294967296>>>0)>>>0;a[2][1]=r>>>0;
353 +r=a[3][1]+L;a[3][0]=a[3][0]+Y+(r/4294967296>>>0)>>>0;a[3][1]=r>>>0;r=a[4][1]+V;a[4][0]=a[4][0]+D+(r/4294967296>>>0)>>>0;a[4][1]=r>>>0;r=a[5][1]+aa;a[5][0]=a[5][0]+J+(r/4294967296>>>0)>>>0;a[5][1]=r>>>0;r=a[6][1]+W;a[6][0]=a[6][0]+ba+(r/4294967296>>>0)>>>0;a[6][1]=r>>>0;r=a[7][1]+G;a[7][0]=a[7][0]+I+(r/4294967296>>>0)>>>0;a[7][1]=r>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
354 +{};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
355 3609767458],[1899447441,602891725],[3049323471,3964484399],[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],
356 [1555081692,3175218132],[1996064986,2198950837],[2554220882,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,
357 106217008],[3516065817,3606008344],[3600352804,1432725776],[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],
358 [3515267271,566280711],[3940187606,3454069534],[4118630271,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]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
359 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,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,
360 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],e=null,g=a.util.createBuffer(),x=Array(80),A=0;80>A;++A)x[A]=Array(2);var y={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){y.messageLength=
361 -0;y.fullMessageLength=y.messageLength128=[];for(var b=y.messageLengthSize/4,c=0;c<b;++c)y.fullMessageLength.push(0);g=a.util.createBuffer();e=Array(d.length);for(c=0;c<d.length;++c)e[c]=d[c].slice(0);return y}};y.start();y.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;y.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=y.fullMessageLength.length-1;0<=k;--k)y.fullMessageLength[k]+=h[1],h[1]=h[0]+(y.fullMessageLength[k]/4294967296>>>0),y.fullMessageLength[k]>>>=0,h[0]=
362 -h[1]/4294967296>>>0;g.putBytes(b);c(e,x,g);(2048<g.read||0===g.length())&&g.compact();return y};y.digest=function(){var d=a.util.createBuffer();d.putBytes(g.bytes());d.putBytes(l.substr(0,y.blockLength-(y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize&y.blockLength-1)));a.util.createBuffer();for(var z,k,m=8*y.fullMessageLength[0],r=0;r<y.fullMessageLength.length;++r)z=8*y.fullMessageLength[r+1],k=z/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=z;z=Array(e.length);for(r=0;r<e.length;++r)z[r]=
363 -e[r].slice(0);c(z,x,d);d=a.util.createBuffer();k="SHA-512"===b?z.length:"SHA-384"===b?z.length-2:z.length-4;for(r=0;r<k;++r)d.putInt32(z[r][0]),r===k-1&&"SHA-512/224"===b||d.putInt32(z[r][1]);return d};return y};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
364 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
365 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md}},l=a;a=function(b,
366 -c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,g={start:function(g,m){if(null!==g)if("string"===typeof g)if(g=g.toLowerCase(),g in a.md.algorithms)b=
367 -a.md.algorithms[g].create();else throw Error('Unknown hash algorithm "'+g+'"');else b=g;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
368 -d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};g.digest=g.getMac;return g}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
369 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<g.length;++q)g[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],e=function(a,
370 -b){return" "+b},p=0;p<a.values.length;++p)d.push(a.values[p].replace(/^(\S+\r\n)/,e));b+=d.join(",")+"\r\n";d=0;a=-1;for(p=0;p<b.length;++p,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=p-a-1,a=-1,++p;else if(" "===b[p]||"\t"===b[p]||","===b[p])a=p;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var e="-----BEGIN "+b.type+"-----\r\n",g;b.procType&&(g={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
371 -e+=c(g));b.contentDomain&&(g={name:"Content-Domain",values:[b.contentDomain]},e+=c(g));b.dekInfo&&(g={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&g.values.push(b.dekInfo.parameters),e+=c(g));if(b.headers)for(g=0;g<b.headers.length;++g)e+=c(b.headers[g]);b.procType&&(e+="\r\n");e+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return e+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
372 -e=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,g=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var q={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(q);if(h[2]){for(var l=h[2].split(g),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var A=l[x];if(!/\s/.test(A[0]))break;h+=A;B=x}if(h=h.match(e)){for(var x={name:h[1],values:[]},A=h[2].split(","),y=0;y<A.length;++y)x.values.push(A[y].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
373 -"Content-Domain"!==x.name)if(q.dekInfo||"DEK-Info"!==x.name)q.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:A[0],parameters:A[1]||null}}else q.contentDomain=A[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
374 -q.procType={version:A[0],type:A[1]}}}++B}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
375 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
376 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,e){var p=32===a.length?3:9;e=3===p?e?[30,-2,-2]:[0,32,2]:e?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=b[0],q=b[1];b=(g>>>4^q)&252645135;q^=b;g^=b<<4;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(g>>>1^q)&1431655765;for(var q=q^b,g=g^b<<1,g=g<<1|g>>>31,q=q<<1|q>>>31,H=0;H<p;H+=3){for(var C=e[H+1],u=e[H+2],T=e[H];T!=C;T+=u){var P=q^a[T],F=(q>>>4|q<<28)^a[T+1];b=g;
377 -g=q;q=b^(n[P>>>24&63]|k[P>>>16&63]|r[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=g;g=q;q=b}g=g>>>1|g<<31;q=q>>>1|q<<31;b=(g>>>1^q)&1431655765;q^=b;g^=b<<1;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(g>>>4^q)&252645135;c[0]=g^b<<4;c[1]=q^b}function g(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var g=
378 -null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;e.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return g({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return g({key:a,
360 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
361 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
362 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
363 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
364 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
365 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md}},l=a;a=function(b,
366 +c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
367 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
368 +d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
369 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var r=0;r<e.length;++r)e[r](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
370 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
371 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
372 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var r={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(r);if(h[2]){for(var l=h[2].split(e),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;B=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(r.procType)if(r.contentDomain||
373 +"Content-Domain"!==x.name)if(r.dekInfo||"DEK-Info"!==x.name)r.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');r.dekInfo={algorithm:z[0],parameters:z[1]||null}}else r.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
374 +r.procType={version:z[0],type:z[1]}}}++B}if("ENCRYPTED"===r.procType&&!r.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
375 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
376 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,g){var p=32===a.length?3:9;g=3===p?g?[30,-2,-2]:[0,32,2]:g?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],r=b[1];b=(e>>>4^r)&252645135;r^=b;e^=b<<4;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(e>>>1^r)&1431655765;for(var r=r^b,e=e^b<<1,e=e<<1|e>>>31,r=r<<1|r>>>31,H=0;H<p;H+=3){for(var C=g[H+1],q=g[H+2],T=g[H];T!=C;T+=q){var P=r^a[T],F=(r>>>4|r<<28)^a[T+1];b=e;
377 +e=r;r=b^(n[P>>>24&63]|k[P>>>16&63]|u[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=e;e=r;r=b}e=e>>>1|e<<31;r=r>>>1|r<<31;b=(e>>>1^r)&1431655765;r^=b;e^=b<<1;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(e>>>4^r)&252645135;c[0]=e^b<<4;c[1]=r^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
378 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
379 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
380 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[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],
381 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],r=[0,268435456,8,268435464,0,268435456,
380 +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],
381 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],r=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
382 8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],F=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],B=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],L=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
383 1,C=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],K=0,D,W=0;W<n;W++){var I=b.getInt32(),G=b.getInt32();D=(I>>>4^G)&252645135;G^=D;I^=D<<4;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>2^G)&858993459;G^=D;I^=D<<2;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=(G>>>8^I)&16711935;I^=D;G^=D<<8;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=I<<8|G>>>20&240;for(var I=G<<24|G<<8&16711680|G>>>8&65280|G>>>24&240,G=D,S=0;S<v.length;++S){v[S]?(I=I<<2|I>>>26,G=G<<2|G>>>26):(I=I<<1|I>>>27,G=G<<1|G>>>27);
384 -var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|e[I>>>20&15]|g[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|q[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|r[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
384 +var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|g[I>>>20&15]|e[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|r[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|u[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
385 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[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,
386 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,
387 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[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,
388 8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[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],h=[256,34078976,34078720,1107296512,
389 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,
390 -524288,0,1074266112,34078976,1073742080],r=[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,
390 +524288,0,1074266112,34078976,1073742080],u=[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,
391 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[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,
392 67108866,67110912,2048,2097154],B=[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,
393 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<g.length;++q)g[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,
394 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,g;e&&!a.disableNativeCode&&(g=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,q){function l(){if(N>A)return q(null,z);n.start(null,
395 -null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();u=2;B()}function B(){if(u<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++u,a.util.setImmediate(B);z+=N<A?E:E.substr(0,y);++N;l()}"function"===typeof h&&(q=h,h=null);if(e&&!a.disableNativeCode&&g.pbkdf2&&(null===h||"object"!==typeof h)&&(4<g.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),q?4===g.pbkdf2Sync.length?g.pbkdf2(b,
396 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):g.pbkdf2(b,c,d,k,h,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===g.pbkdf2Sync.length?g.pbkdf2Sync(b,c,d,k).toString("binary"):g.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
397 -if(q)return q(b);throw b;}var A=Math.ceil(k/x),y=k-(A-1)*x,n=a.hmac.create();n.start(h,b);var z="",E,O,H;if(!q){for(var N=1;N<=A;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var u=2;u<=d;++u)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;z+=N<A?E:E.substr(0,y)}return z}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
398 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
399 -"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
400 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function g(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
401 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)e.putInt32(k[h])}catch(z){if(!("undefined"!==typeof QuotaExceededError&&z instanceof QuotaExceededError))throw z;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
402 -e.putByte(String.fromCharCode(k&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),q=0;32>q;++q)h[q]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(g(k.key,h(k.seed)));k.seed=z(g(k.key,k.seed));
403 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,q=k.plugin.formatKey,z=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var z=c(k.key,
404 -k.seed);k.generated+=z.length;q.putBytes(z);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,g(a))}catch(c){b(c)}},k.seedFileSync=g);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
393 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var r=0;r<e.length;++r)e[r](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
394 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},g="undefined"!==typeof process&&process.versions&&process.versions.node,e;g&&!a.disableNativeCode&&(e=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,r){function l(){if(N>z)return r(null,y);n.start(null,
395 +null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();q=2;B()}function B(){if(q<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++q,a.util.setImmediate(B);y+=N<z?E:E.substr(0,A);++N;l()}"function"===typeof h&&(r=h,h=null);if(g&&!a.disableNativeCode&&e.pbkdf2&&(null===h||"object"!==typeof h)&&(4<e.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),r?4===e.pbkdf2Sync.length?e.pbkdf2(b,
396 +c,d,k,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):e.pbkdf2(b,c,d,k,h,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):4===e.pbkdf2Sync.length?e.pbkdf2Sync(b,c,d,k).toString("binary"):e.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
397 +if(r)return r(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,n=a.hmac.create();n.start(h,b);var y="",E,O,H;if(!r){for(var N=1;N<=z;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var q=2;q<=d;++q)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;y+=N<z?E:E.substr(0,A)}return y}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
398 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
399 +"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,g=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(g=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
400 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function e(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var g=
401 +a.util.createBuffer();if(c)for(;g.length()<b;){var h=Math.max(1,Math.min(b-g.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)g.putInt32(k[h])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(g.length()<b)for(c=Math.floor(65536*Math.random());g.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
402 +g.putByte(String.fromCharCode(k&255));return g.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),r=0;32>r;++r)h[r]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function g(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(g)});l=e(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=r(e(k.key,h(k.seed)));k.seed=y(e(k.key,k.seed));
403 +a.util.setImmediate(g)}if(!d)return k.generateSync(b);var e=k.plugin.cipher,h=k.plugin.increment,r=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;g()};k.generateSync=function(b){var c=k.plugin.cipher,g=k.plugin.increment,e=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var r=a.util.createBuffer();r.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
404 +k.seed);k.generated+=y.length;r.putBytes(y);k.key=e(c(k.key,g(k.seed)));k.seed=h(c(k.key,k.seed))}return r.getBytes(b)};g?(k.seedFile=function(a,b){g.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return g.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,e(a))}catch(c){b(c)}},k.seedFileSync=e);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
405 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
406 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<g.length;++q)g[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
407 -0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},g=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
408 -b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,g,!1);l.putInt32(g[0]);l.putInt32(g[1]);l.putInt32(g[2]);l.putInt32(g[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
409 -process.versions.node,h=null;if("undefined"!==typeof window){var r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(h=function(a){return r.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
410 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<g.length;++q)g[q](c);
411 -return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
406 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var r=0;r<e.length;++r)e[r](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
407 +0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
408 +b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
409 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
410 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var r=0;r<e.length;++r)e[r](c);
411 +return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
412 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,
413 -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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
414 -1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var g=function(b,c,g){var k=!1,h=null,q=null,l=null,n,x,A,y,v=[];b=a.rc2.expandKey(b,c);for(A=0;64>A;A++)v.push(b.getInt16Le());g?(n=function(a){for(A=0;4>A;A++){a[A]+=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);var b=a[A],c=d[A];a[A]=b<<c&65535|(b&65535)>>16-c;y++}},x=function(a){for(A=0;4>A;A++)a[A]+=v[a[(A+3)%4]&63]}):(n=function(a){for(A=3;0<=A;A--){var b=a[A],c=d[A];a[A]=
415 -(b&65535)>>c|b<<16-c&65535;a[A]-=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);y--}},x=function(a){for(A=3;0<=A;A--)a[A]-=v[a[(A+3)%4]&63]});var z=null;return z={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();q=c||new a.util.createBuffer;l=b;z.output=q},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(A=0;4>A;A++){var c=h.getInt16Le();null!==l&&(g?c^=l.getInt16Le():l.putInt16Le(c));
416 -b.push(c&65535)}y=g?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(A=0;4>A;A++)null!==l&&(g?l.putInt16Le(b[A]):b[A]^=l.getInt16Le()),q.putInt16Le(b[A])}},finish:function(a){var b=!0;if(g)if(a)b=a(8,h,!g);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,z.update());!g&&(b=0===h.length())&&(a?b=a(8,q,!g):(a=q.length(),c=q.at(a-1),c>a?b=!1:q.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
417 -a.rc2.createEncryptionCipher=function(a,b){return g(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return g(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
418 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
419 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function g(a,b,c,d,e,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+e;e=Math.floor(h/67108864);c.data[d++]=h&67108863}return e}function l(a,b,c,d,e,p){var g=b&32767;for(b>>=15;0<=--p;){var h=this.data[a]&32767,z=this.data[a++]>>15,k=b*h+z*g,h=g*h+((k&32767)<<15)+c.data[d]+(e&1073741823);e=(h>>>30)+(k>>>15)+b*z+(e>>>30);c.data[d++]=h&1073741823}return e}function n(a,b,
420 -c,d,e,g){var p=b&16383;for(b>>=14;0<=--g;){var h=this.data[a]&16383,z=this.data[a++]>>14,k=b*h+z*p,h=p*h+((k&16383)<<14)+c.data[d]+e;e=(h>>28)+(k>>14)+b*z;c.data[d++]=h&268435455}return e}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function r(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
421 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function A(a,b){return a^b}function y(a,b){return a&~b}function R(){}function z(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
422 -navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=g,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],u;H=48;for(u=0;9>=u;++u)N[H++]=u;H=97;for(u=10;36>u;++u)N[H++]=u;H=65;for(u=10;36>u;++u)N[H++]=u;r.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};r.prototype.revert=function(a){return a};r.prototype.reduce=
423 -function(a){a.divRemTo(this.m,null,a)};r.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};r.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
413 +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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var g=b,e=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=e;128>n;n++)g.putByte(c[g.at(n-
414 +1)+g.at(n-e)&255]);g.setAt(128-l,c[g.at(128-l)&h]);for(n=127-l;0<=n;n--)g.setAt(n,c[g.at(n+1)^g.at(n+l)]);return g};var e=function(b,c,e){var k=!1,h=null,r=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
415 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();r=c||new a.util.createBuffer;l=b;y.output=r},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
416 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),r.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,r,!e):(a=r.length(),c=r.at(a-1),c>a?b=!1:r.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
417 +a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
418 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
419 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,g,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+g;g=Math.floor(h/67108864);c.data[d++]=h&67108863}return g}function l(a,b,c,d,g,e){var p=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,y=this.data[a++]>>15,k=b*h+y*p,h=p*h+((k&32767)<<15)+c.data[d]+(g&1073741823);g=(h>>>30)+(k>>>15)+b*y+(g>>>30);c.data[d++]=h&1073741823}return g}function n(a,b,
420 +c,d,g,e){var p=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,y=this.data[a++]>>14,k=b*h+y*p,h=p*h+((k&16383)<<14)+c.data[d]+g;g=(h>>28)+(k>>14)+b*y;c.data[d++]=h&268435455}return g}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
421 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
422 +navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=e,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],q;H=48;for(q=0;9>=q;++q)N[H++]=q;H=97;for(q=10;36>q;++q)N[H++]=q;H=65;for(q=10;36>q;++q)N[H++]=q;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
423 +function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
424 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
425 -c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var e=a.length,p=!1,g=0;0<=--e;){var h=8==d?a[e]&255:m(a,e);0>h?"-"==a.charAt(e)&&(p=!0):(p=!1,0==g?this.data[this.t++]=h:g+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-g)-1)<<g,this.data[this.t++]=
426 -h>>this.DB-g):this.data[this.t-1]|=h<<g,g+=d,g>=this.DB&&(g-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<g&&(this.data[this.t-1]|=(1<<this.DB-g)-1<<g));this.clamp();p&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
427 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,e=(1<<d)-1,g=Math.floor(a/this.DB),p=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+g+1]=this.data[h]>>d|p,p=(this.data[h]&e)<<c;for(h=g-1;0<=h;--h)b.data[h]=0;b.data[g]=p;b.t=this.t+g+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,e=this.DB-d,g=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var p=
428 -c+1;p<this.t;++p)b.data[p-c-1]|=(this.data[p]&g)<<e,b.data[p-c]=this.data[p]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&g)<<e);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
429 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),e=a.abs(),g=d.t;for(b.t=g+e.t;0<=--g;)b.data[g]=0;for(g=0;g<e.t;++g)b.data[g+d.t]=d.am(0,e.data[g],b,g,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
430 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,g){var p=a.abs();if(!(0>=p.t)){var z=this.abs();if(z.t<p.t)null!=b&&b.fromInt(0),null!=g&&this.copyTo(g);else{null==g&&(g=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),z.lShiftTo(l,g)):(p.copyTo(k),z.copyTo(g));p=k.t;z=k.data[p-1];if(0!=z){var E=z*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),u=this.FV/E,E=(1<<this.F1)/E,y=1<<this.F2,r=g.t,x=r-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=g.compareTo(w)&&
431 -(g.data[g.t++]=1,g.subTo(w,g));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=g.data[--r]==z?this.DM:Math.floor(g.data[r]*u+(g.data[r-1]+y)*E);if((g.data[r]+=k.am(0,O,g,x,0,p))<O)for(k.dlShiftTo(x,w),g.subTo(w,g);g.data[r]<--O;)g.subTo(w,g)}null!=b&&(g.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));g.t=p;g.clamp();0<l&&g.rShiftTo(l,g);0>m&&c.ZERO.subTo(g,g)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
432 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var g=d(),p=d(),z=b.convert(this),k=h(a)-1;for(z.copyTo(g);0<=--k;)if(b.sqrTo(g,p),0<(a&1<<k))b.mulTo(p,z,g);else var m=g,g=p,p=m;return b.revert(g)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
425 +c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var g=a.length,e=!1,p=0;0<=--g;){var h=8==d?a[g]&255:m(a,g);0>h?"-"==a.charAt(g)&&(e=!0):(e=!1,0==p?this.data[this.t++]=h:p+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-p)-1)<<p,this.data[this.t++]=
426 +h>>this.DB-p):this.data[this.t-1]|=h<<p,p+=d,p>=this.DB&&(p-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<p&&(this.data[this.t-1]|=(1<<this.DB-p)-1<<p));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
427 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,g=(1<<d)-1,p=Math.floor(a/this.DB),e=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+p+1]=this.data[h]>>d|e,e=(this.data[h]&g)<<c;for(h=p-1;0<=h;--h)b.data[h]=0;b.data[p]=e;b.t=this.t+p+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,g=this.DB-d,p=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var e=
428 +c+1;e<this.t;++e)b.data[e-c-1]|=(this.data[e]&p)<<g,b.data[e-c]=this.data[e]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&p)<<g);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,g=Math.min(a.t,this.t);c<g;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
429 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),g=a.abs(),e=d.t;for(b.t=e+g.t;0<=--e;)b.data[e]=0;for(e=0;e<g.t;++e)b.data[e+d.t]=d.am(0,g.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
430 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,e){var p=a.abs();if(!(0>=p.t)){var y=this.abs();if(y.t<p.t)null!=b&&b.fromInt(0),null!=e&&this.copyTo(e);else{null==e&&(e=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),y.lShiftTo(l,e)):(p.copyTo(k),y.copyTo(e));p=k.t;y=k.data[p-1];if(0!=y){var E=y*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),q=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=e.t,x=u-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=e.compareTo(w)&&
431 +(e.data[e.t++]=1,e.subTo(w,e));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=e.data[--u]==y?this.DM:Math.floor(e.data[u]*q+(e.data[u-1]+A)*E);if((e.data[u]+=k.am(0,O,e,x,0,p))<O)for(k.dlShiftTo(x,w),e.subTo(w,e);e.data[u]<--O;)e.subTo(w,e)}null!=b&&(e.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));e.t=p;e.clamp();0<l&&e.rShiftTo(l,e);0>m&&c.ZERO.subTo(e,e)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
432 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var e=d(),p=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(e);0<=--k;)if(b.sqrTo(e,p),0<(a&1<<k))b.mulTo(p,y,e);else var l=e,e=p,p=l;return b.revert(e)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
433 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 b=(1<<a)-1,c,d=!1,e="",g=this.t,p=this.DB-g*this.DB%a;if(0<g--)for(p<this.DB&&0<(c=this.data[g]>>p)&&(d=!0,e="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=g;)p<a?(c=(this.data[g]&(1<<p)-1)<<a-p,c|=this.data[--g]>>(p+=this.DB-a)):(c=this.data[g]>>(p-=a)&b,0>=p&&(p+=this.DB,--g)),0<c&&(d=!0),d&&(e+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?e:"0"};c.prototype.negate=function(){var a=
434 d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
435 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new r(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=z;R.prototype.revert=z;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
435 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
436 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)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var T=[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,
437 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],P=67108864/T[T.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
438 -b),c=k(b),g=d(),p=d(),h="";for(this.divRemTo(c,g,p);0<g.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,g.divRemTo(c,g,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,z=0;z<a.length;++z){var k=m(a,z);0>k?"-"==a.charAt(z)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
438 +b),c=k(b),e=d(),p=d(),h="";for(this.divRemTo(c,e,p);0<e.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,e.divRemTo(c,e,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
439 this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var e=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<e?d[0]&(1<<e)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,e,g=Math.min(a.t,this.t);for(d=
440 0;d<g;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){e=a.s&this.DM;for(d=g;d<this.t;++d)c.data[d]=b(this.data[d],e);c.t=this.t}else{e=this.s&this.DM;for(d=g;d<a.t;++d)c.data[d]=b(e,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
441 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
442 0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var e;for(e=c.t-this.t;d<e;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(e=Math.min(a.t,b);d<e;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
443 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var z=1;z++<d&&0!=
443 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var y=1;y++<d&&0!=
444 p.compareTo(b);)if(p=p.modPowInt(2,this),0==p.compareTo(c.ONE))return!1;if(0!=p.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.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]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
445 function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,e=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[e++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==e&&
446 -(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,A,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
447 -y,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
446 +(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
447 +A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
448 0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,e=0;0!=d;)d&=d-1,++e;a+=e}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
449 -y)};c.prototype.flipBit=function(a){return this.changeBit(a,A)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
450 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),g,p=k(1),z;if(0>=c)return p;g=18>c?1:48>c?3:144>c?4:768>c?5:6;z=8>c?new r(b):b.isEven()?new E(b):new v(b);var m=[],l=3,q=g-1,u=(1<<g)-1;m[1]=z.convert(this);if(1<g)for(c=d(),z.sqrTo(m[1],c);l<=u;)m[l]=d(),z.mulTo(c,m[l-2],m[l]),l+=2;for(var y=a.t-1,x,w=!0,O=d(),c=h(a.data[y])-1;0<=y;){c>=q?x=a.data[y]>>c-q&u:(x=(a.data[y]&(1<<c+1)-1)<<q-c,0<y&&(x|=a.data[y-1]>>this.DB+c-q));for(l=g;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--y);
451 -if(w)m[x].copyTo(p),w=!1;else{for(;1<l;)z.sqrTo(p,O),z.sqrTo(O,p),l-=2;0<l?z.sqrTo(p,O):(l=p,p=O,O=l);z.mulTo(O,m[x],p)}for(;0<=y&&0==(a.data[y]&1<<c);)z.sqrTo(p,O),l=p,p=O,O=l,0>--c&&(c=this.DB-1,--y)}return z.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),g=k(1),p=k(0),h=k(0),z=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(g.isEven()&&p.isEven()||(g.addTo(this,g),p.subTo(a,p)),g.rShiftTo(1,
452 -g)):p.isEven()||p.subTo(a,p),p.rShiftTo(1,p);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&z.isEven()||(h.addTo(this,h),z.subTo(a,z)),h.rShiftTo(1,h)):z.isEven()||z.subTo(a,z),z.rShiftTo(1,z);0<=d.compareTo(e)?(d.subTo(e,d),b&&g.subTo(h,g),p.subTo(z,p)):(e.subTo(d,e),b&&h.subTo(g,h),z.subTo(p,z))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=z.compareTo(a))return z.subtract(a);if(0>z.signum())z.addTo(a,z);else return z;return 0>z.signum()?z.add(a):z};c.prototype.pow=function(a){return this.exp(a,
449 +A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
450 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),e,p=k(1),y;if(0>=c)return p;e=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var l=[],m=3,r=e-1,q=(1<<e)-1;l[1]=y.convert(this);if(1<e)for(c=d(),y.sqrTo(l[1],c);m<=q;)l[m]=d(),y.mulTo(c,l[m-2],l[m]),m+=2;for(var A=a.t-1,x,w=!0,O=d(),c=h(a.data[A])-1;0<=A;){c>=r?x=a.data[A]>>c-r&q:(x=(a.data[A]&(1<<c+1)-1)<<r-c,0<A&&(x|=a.data[A-1]>>this.DB+c-r));for(m=e;0==(x&1);)x>>=1,--m;0>(c-=m)&&(c+=this.DB,--A);
451 +if(w)l[x].copyTo(p),w=!1;else{for(;1<m;)y.sqrTo(p,O),y.sqrTo(O,p),m-=2;0<m?y.sqrTo(p,O):(m=p,p=O,O=m);y.mulTo(O,l[x],p)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(p,O),m=p,p=O,O=m,0>--c&&(c=this.DB-1,--A)}return y.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),p=k(1),g=k(0),h=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(p.isEven()&&g.isEven()||(p.addTo(this,p),g.subTo(a,g)),p.rShiftTo(1,
452 +p)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&y.isEven()||(h.addTo(this,h),y.subTo(a,y)),h.rShiftTo(1,h)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(e)?(d.subTo(e,d),b&&p.subTo(h,p),g.subTo(y,g)):(e.subTo(d,e),b&&h.subTo(p,h),y.subTo(g,y))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
453 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
454 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
455 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<g.length;++l)g[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
454 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
455 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<e.length;++l)e[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
456 0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var l=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+l);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
457 v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
458 v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
459 2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
460 -0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs1}},
461 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?g(a,b,p,h):d(a,b,p,h)}function d(b,c,g,k){var m=l(b,c),z=0,q=n(m.bitLength());"millerRabinTests"in
462 -g&&(q=g.millerRabinTests);var r=10;"maxBlockTime"in g&&(r=g.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(q))return k(null,m);m.dAddOffset(h[z++%8],0)}while(0>r||+new Date-v<r);a.util.setImmediate(function(){d(b,c,g,k)})}function g(b,c,h,m){function q(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}z.bitLength()>b&&(z=l(b,c));h=z.toString(16);e.target.postMessage({hex:h,workLoad:r});
463 -z.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var z=l(b,c),E=h.workers,r=h.workLoad||100,n=30*r/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;q()});q()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(r).byteValue(),0);return c}
464 -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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],r=new k(null);r.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
465 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
466 -0;l<g.length;++l)g[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
460 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
461 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?e(a,b,p,h):d(a,b,p,h)}function d(b,c,e,k){var m=l(b,c),y=0,r=n(m.bitLength());"millerRabinTests"in
462 +e&&(r=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(r))return k(null,m);m.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,m){function r(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}y.bitLength()>b&&(y=l(b,c));h=y.toString(16);e.target.postMessage({hex:h,workLoad:u});
463 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;r()});r()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
464 +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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
465 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
466 +0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
467 Error("Message is too long for PKCS#1 v1.5 padding."),g.length=b.length,g.max=d-11,g;g.putByte(0);g.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var h=0;h<d;++h)g.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),h=0;h<d;++h)e=l.charCodeAt(h),0===e?++k:g.putByte(e);d=k}g.putByte(0);g.putBytes(b);return g}function d(b,c,e,g){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var h=b.getByte(),k=b.getByte();if(0!==h||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
468 -typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function g(b,c,d){function e(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
469 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var g=b.p;b.p=b.q;b.q=g}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,e()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,e()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
470 -(g=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,g,b.p,b.q,g.mod(b.p1),g.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);e()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
471 -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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,r=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
468 +typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
469 +b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,r,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
470 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var r={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(r.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
471 +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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
472 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},B={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
473 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
474 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
475 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},A=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
476 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},y=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
475 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
476 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
477 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
478 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
479 -b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,g,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
480 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,g).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,g):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
479 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
480 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,e):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
481 c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:g,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},g=+new Date,p,k=0;null===a.keys&&
482 -(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(r[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
482 +(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
483 null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(p=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,p,a.p,a.q,
484 p.mod(a.p1),p.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});p=+new Date;k+=p-g;g=p}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
485 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var e=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(e,0),e.keys;g(e,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,g){var l={n:b,e:g,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
485 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var g=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(g,0),g.keys;e(g,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
486 b,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+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
487 -l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,g,k,l,m,q,r){var x={n:b,e:c,d:g,p:k,q:l,dP:m,dQ:q,qInv:r,decrypt:function(b,c,g){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,g)}};else if(-1!==["RAW","NONE",
488 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:y},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
487 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,l,m,r,u){var x={n:b,e:c,d:e,p:k,q:l,dP:m,dQ:r,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
488 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
489 [k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,B,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
490 -c.errors=d,c;var e,g,l,q,y,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();y=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
491 -16),new m(e,16),new m(g,16),new m(l,16),new m(q,16),new m(y,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
492 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,A,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
490 +c.errors=d,c;var e,g,l,r,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();r=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
491 +16),new m(e,16),new m(g,16),new m(l,16),new m(r,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
492 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
493 c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
494 -!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||
495 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<g.length;++l)g[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
496 -b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var g=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encryptionOid"},
497 -{name:"AlgorithmIdentifier.parameters",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
498 -tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:g.Class.UNIVERSAL,
499 -type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"salt"},
500 -{name:"pkcs-12PbeParams.iterations",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var e=a.random.getBytesSync(d.saltSize),h=d.count,k=g.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var z,q;switch(d.algorithm){case "aes128":z=m=16;d=n["aes128-CBC"];q=a.aes.createEncryptionCipher;break;case "aes192":m=24;
501 -z=16;d=n["aes192-CBC"];q=a.aes.createEncryptionCipher;break;case "aes256":m=32;z=16;d=n["aes256-CBC"];q=a.aes.createEncryptionCipher;break;case "des":z=m=8;d=n.desCBC;q=a.des.createEncryptionCipher;break;default:throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;}var v=a.pkcs5.pbkdf2(c,e,h,m);c=a.random.getBytesSync(z);h=q(v);h.start(c);h.update(g.toDer(b));h.finish();b=h.output.getBytes();e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,
502 -g.Type.OID,!1,g.oidToDer(n.pkcs5PBES2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n.pkcs5PBKDF2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(d).getBytes()),g.create(g.Class.UNIVERSAL,
503 -g.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(e),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(g.toDer(b)),h.finish(),b=h.output.getBytes(),e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,
504 -!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]);else throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[e,g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,e={},h=[];if(!g.validate(b,m,e,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=g.derToOid(e.encryptionOid);
505 -h=l.pbe.getCipher(h,e.encryptionParams,c);e=a.util.createBuffer(e.encryptedData);h.update(e);h.finish()&&(d=g.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:g.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
506 -b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return g.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var e,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
507 -h=24;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
508 -e.substr(0,8),h);c=k(c);c.start(e);c.update(g.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(e).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,e=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==e.type&&"PRIVATE KEY"!==e.type&&"RSA PRIVATE KEY"!==e.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".'),
509 -d.headerType=d,d;if(e.procType&&"ENCRYPTED"===e.procType.type){var h,k;switch(e.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
510 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+e.dekInfo.algorithm+'".'),d.algorithm=e.dekInfo.algorithm,d;}var m=a.util.hexToBytes(e.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(e.body));if(k.finish())d=k.output.getBytes();else return d}else d=
511 -e.body;d="ENCRYPTED PRIVATE KEY"===e.type?l.decryptPrivateKeyInfo(g.fromDer(d),c):g.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,q=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var u=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,q);
512 -var C=q*Math.ceil(u/q);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%u));C=q*Math.ceil(b/q);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<q;l++)D.putByte(C.at(l%m));var Y=Math.ceil(u/q)+Math.ceil(b/q),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(q)),
494 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
495 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
496 +b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
497 +{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"}]},k={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",
498 +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,
499 +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"}]}]},h={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"},
500 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var g=a.random.getBytesSync(d.saltSize),h=d.count,k=e.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,r;switch(d.algorithm){case "aes128":y=m=16;d=n["aes128-CBC"];r=a.aes.createEncryptionCipher;break;case "aes192":m=24;
501 +y=16;d=n["aes192-CBC"];r=a.aes.createEncryptionCipher;break;case "aes256":m=32;y=16;d=n["aes256-CBC"];r=a.aes.createEncryptionCipher;break;case "des":y=m=8;d=n.desCBC;r=a.des.createEncryptionCipher;break;default:throw g=Error("Cannot encrypt private key. Unknown encryption algorithm."),g.algorithm=d.algorithm,g;}var v=a.pkcs5.pbkdf2(c,g,h,m);c=a.random.getBytesSync(y);h=r(v);h.start(c);h.update(e.toDer(b));h.finish();b=h.output.getBytes();g=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
502 +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,
503 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(g),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(e.toDer(b)),h.finish(),b=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,
504 +!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,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,g={},h=[];if(!e.validate(b,m,g,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=e.derToOid(g.encryptionOid);
505 +h=l.pbe.getCipher(h,g.encryptionParams,c);g=a.util.createBuffer(g.encryptedData);h.update(g);h.finish()&&(d=e.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
506 +b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var g,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
507 +h=24;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
508 +g.substr(0,8),h);c=k(c);c.start(g);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(g).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,g=a.pem.decode(b)[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".'),
509 +d.headerType=d,d;if(g.procType&&"ENCRYPTED"===g.procType.type){var h,k;switch(g.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
510 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+g.dekInfo.algorithm+'".'),d.algorithm=g.dekInfo.algorithm,d;}var m=a.util.hexToBytes(g.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(g.body));if(k.finish())d=k.output.getBytes();else return d}else d=
511 +g.body;d="ENCRYPTED PRIVATE KEY"===g.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,r=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var q=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,r);
512 +var C=r*Math.ceil(q/r);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%q));C=r*Math.ceil(b/r);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<r;l++)D.putByte(C.at(l%m));var Y=Math.ceil(q/r)+Math.ceil(b/r),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(r)),
513 V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);L.putBuffer(ea)}v=L;n.putBuffer(C)}n.truncate(n.length()-g);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
514 -"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var e={};b=[];if(!g.validate(c,k,e,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=g.derToOid(e.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=g.derToOid(e.encOid);if(b!==l.oids["aes128-CBC"]&&
515 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=e.kdfSalt;var m=a.util.createBuffer(e.kdfIterationCount),m=m.getInt(m.length()<<3),q;switch(l.oids[b]){case "aes128-CBC":q=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":q=24;h=a.aes.createDecryptionCipher;break;
516 -case "aes256-CBC":q=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":q=24;h=a.des.createDecryptionCipher;break;case "desCBC":q=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,q);e=e.encIv;h=h(b);h.start(e);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var e={},k=[];if(!g.validate(c,h,e,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(e.salt),e=a.util.createBuffer(e.iterations),
517 -e=e.getInt(e.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,e,m);d=l.pbe.generatePkcs12Key(d,k,2,e,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
518 -typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
519 -0;l<g.length;++l)g[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
520 -a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var g={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
514 +"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var g={};b=[];if(!e.validate(c,k,g,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=e.derToOid(g.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=e.derToOid(g.encOid);if(b!==l.oids["aes128-CBC"]&&
515 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=g.kdfSalt;var m=a.util.createBuffer(g.kdfIterationCount),m=m.getInt(m.length()<<3),r;switch(l.oids[b]){case "aes128-CBC":r=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":r=24;h=a.aes.createDecryptionCipher;break;
516 +case "aes256-CBC":r=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":r=24;h=a.des.createDecryptionCipher;break;case "desCBC":r=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,r);g=g.encIv;h=h(b);h.start(g);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
517 +g=g.getInt(g.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,g,m);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
518 +typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
519 +0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
520 +a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
521 tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",
522 -tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(g)};d.encryptedDataValidator={name:"EncryptedData",
523 -tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(g)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
522 +tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(e)};d.encryptedDataValidator={name:"EncryptedData",
523 +tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(e)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
524 captureAsn1:"digestAlgorithms"},a,{name:"SignedData.Certificates",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,capture:"signerInfos",optional:!0,value:[{name:"SignerInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:c.Class.UNIVERSAL,
525 type:c.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
526 value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,
527 constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]}]}]};d.recipientInfoValidator={name:"RecipientInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,
528 constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
529 -value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
530 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
531 -["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var g=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());g.putBuffer(b.digest())}g.truncate(g.length()-d);return g.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
532 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
533 -Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
534 -{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
535 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,g=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,x=Math.ceil(v/8),A=b.digest().getBytes();
536 -if(x<g+m+2)throw Error("Message is too long to encrypt.");var y;y=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(A);n.putBytes(y);c.start();c.update(n.getBytes());A=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-g-2);n.putByte(1);n.putBytes(y);var R=n.getBytes(),z=x-g-1,E=d.generate(A,z);y="";for(n=0;n<z;n++)y+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;y=String.fromCharCode(y.charCodeAt(0)&~v)+y.substr(1);
537 -return y+A+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<g+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-g-1,v=k.substr(0,n);k=k.substr(n,g);var y=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&y))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),z="";for(q=0;q<n;q++)z+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
538 -z=String.fromCharCode(z.charCodeAt(0)&~y)+z.substr(1);l=l-g-m-2;for(q=0;q<l;q++)if(0!==z.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==z.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=z.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,
539 -module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
529 +value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
530 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
531 +["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var e=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());e.putBuffer(b.digest())}e.truncate(e.length()-d);return e.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
532 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
533 +Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
534 +{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
535 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,r){var n,v=r-1,x=Math.ceil(v/8),z=b.digest().getBytes();
536 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
537 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var r;r=l-1;l=Math.ceil(r/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-r&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(r=0;r<n;r++)y+=String.fromCharCode(v.charCodeAt(r)^R.charCodeAt(r));
538 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(r=0;r<l;r++)if(0!==y.charCodeAt(r))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
539 +module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
540 ["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
541 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function g(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
542 -v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===r.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
541 +var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
542 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
543 typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
544 (e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
545 -"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in r?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
545 +"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
546 d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
547 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
548 -d.extension=b,d;return b}function n(a,b){switch(a){case r["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
548 +d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
549 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
550 !1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
551 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},r=h.oids,v={};v.CN=r.commonName;v.commonName="CN";v.C=r.countryName;v.countryName="C";v.L=r.localityName;v.localityName="L";v.ST=r.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=r.organizationName;v.organizationName="O";v.OU=r.organizationalUnitName;v.organizationalUnitName="OU";v.E=r.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
551 +h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
552 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
553 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
554 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
555 {name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},B,{name:"Certificate.TBSCertificate.issuerUniqueID",
556 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
557 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
558 -{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},A={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
558 +{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
559 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
560 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
561 -tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},y={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
561 +tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
562 tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},B,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
563 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
564 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in r&&(g.name=r[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
565 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in r&&(p.name=r[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===r.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==r["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:r.sha1},mgf:{algorithmOid:r.mgf1,hash:{algorithmOid:r.sha1}},
566 -saltLength:20});c={};a=[];if(!k.validate(b,A,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
564 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
565 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
566 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
567 b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
568 return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
569 body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
570 break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
571 c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
572 -null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){g([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){g(a);
573 -b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){g(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
574 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
575 -e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in r)switch(r[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
576 -e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case r.sha1WithRSAEncryption:l=void 0;break;case r["RSASSA-PSS"]:d=r[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=r[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
577 -e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=r[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
578 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=r.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
579 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,x,e,l))throw e=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),e.errors=l,e;if("string"!==typeof e.certSignature){for(var l="\x00",m=0;m<e.certSignature.length;++m)l+=k.toDer(e.certSignature[m]).getBytes();e.certSignature=l}var l=k.derToOid(e.publicKeyOid),y=h.createCertificate();y.version=e.certVersion?e.certVersion.charCodeAt(0):
580 -0;m=a.util.createBuffer(e.certSerialNumber);y.serialNumber=m.toHex();y.signatureOid=a.asn1.derToOid(e.certSignatureOid);y.signatureParameters=R(y.signatureOid,e.certSignatureParams,!0);y.siginfo.algorithmOid=a.asn1.derToOid(e.certinfoSignatureOid);y.siginfo.parameters=R(y.siginfo.algorithmOid,e.certinfoSignatureParams,!1);m=a.util.createBuffer(e.certSignature);++m.read;y.signature=m.getBytes();m=[];void 0!==e.certValidity1UTCTime&&m.push(k.utcTimeToDate(e.certValidity1UTCTime));void 0!==e.certValidity2GeneralizedTime&&
581 -m.push(k.generalizedTimeToDate(e.certValidity2GeneralizedTime));void 0!==e.certValidity3UTCTime&&m.push(k.utcTimeToDate(e.certValidity3UTCTime));void 0!==e.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(e.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
582 -y.validity.notBefore=m[0];y.validity.notAfter=m[1];y.tbsCertificate=e.tbsCertificate;if(d){y.md=null;if(y.signatureOid in r)switch(l=r[y.signatureOid],l){case "sha1WithRSAEncryption":y.md=a.md.sha1.create();break;case "md5WithRSAEncryption":y.md=a.md.md5.create();break;case "sha256WithRSAEncryption":y.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":y.md=a.md.sha512.create();break;case "RSASSA-PSS":y.md=a.md.sha256.create()}if(null===y.md)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
583 -e.signatureOid=y.signatureOid,e;m=k.toDer(y.tbsCertificate);y.md.update(m.getBytes())}m=a.md.sha1.create();y.issuer.getField=function(a){return c(y.issuer,a)};y.issuer.addField=function(a){g([a]);y.issuer.attributes.push(a)};y.issuer.attributes=h.RDNAttributesAsArray(e.certIssuer,m);e.certIssuerUniqueId&&(y.issuer.uniqueId=e.certIssuerUniqueId);y.issuer.hash=m.digest().toHex();m=a.md.sha1.create();y.subject.getField=function(a){return c(y.subject,a)};y.subject.addField=function(a){g([a]);y.subject.attributes.push(a)};
584 -y.subject.attributes=h.RDNAttributesAsArray(e.certSubject,m);e.certSubjectUniqueId&&(y.subject.uniqueId=e.certSubjectUniqueId);y.subject.hash=m.digest().toHex();y.extensions=e.certExtensions?h.certificateExtensionsFromAsn1(e.certExtensions):[];l===h.oids.rsaEncryption&&(y.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo));return y};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
585 -return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in r)if(c.name=r[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
572 +null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
573 +b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
574 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
575 +e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
576 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
577 +e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
578 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
579 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),q=h.createCertificate();q.version=g.certVersion?g.certVersion.charCodeAt(0):
580 +0;m=a.util.createBuffer(g.certSerialNumber);q.serialNumber=m.toHex();q.signatureOid=a.asn1.derToOid(g.certSignatureOid);q.signatureParameters=R(q.signatureOid,g.certSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;q.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
581 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
582 +q.validity.notBefore=m[0];q.validity.notAfter=m[1];q.tbsCertificate=g.tbsCertificate;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===q.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
583 +g.signatureOid=q.signatureOid,g;m=k.toDer(q.tbsCertificate);q.md.update(m.getBytes())}m=a.md.sha1.create();q.issuer.getField=function(a){return c(q.issuer,a)};q.issuer.addField=function(a){e([a]);q.issuer.attributes.push(a)};q.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(q.issuer.uniqueId=g.certIssuerUniqueId);q.issuer.hash=m.digest().toHex();m=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};
584 +q.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(q.subject.uniqueId=g.certSubjectUniqueId);q.subject.hash=m.digest().toHex();q.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return q};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
585 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
586 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
587 -k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in r?c[r[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
588 -g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,y,e,l))throw e=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),e.errors=l,e;if("string"!==typeof e.csrSignature){for(var l=
589 -"\x00",m=0;m<e.csrSignature.length;++m)l+=k.toDer(e.csrSignature[m]).getBytes();e.csrSignature=l}l=k.derToOid(e.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var u=h.createCertificationRequest();u.version=e.csrVersion?e.csrVersion.charCodeAt(0):0;u.signatureOid=a.asn1.derToOid(e.csrSignatureOid);u.signatureParameters=R(u.signatureOid,e.csrSignatureParams,!0);u.siginfo.algorithmOid=a.asn1.derToOid(e.csrSignatureOid);u.siginfo.parameters=R(u.siginfo.algorithmOid,
590 -e.csrSignatureParams,!1);l=a.util.createBuffer(e.csrSignature);++l.read;u.signature=l.getBytes();u.certificationRequestInfo=e.certificationRequestInfo;if(d){u.md=null;if(u.signatureOid in r)switch(l=r[u.signatureOid],l){case "sha1WithRSAEncryption":u.md=a.md.sha1.create();break;case "md5WithRSAEncryption":u.md=a.md.md5.create();break;case "sha256WithRSAEncryption":u.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":u.md=a.md.sha512.create();break;case "RSASSA-PSS":u.md=a.md.sha256.create()}if(null===
591 -u.md)throw e=Error("Could not compute certification request digest. Unknown signature OID."),e.signatureOid=u.signatureOid,e;l=k.toDer(u.certificationRequestInfo);u.md.update(l.getBytes())}l=a.md.sha1.create();u.subject.getField=function(a){return c(u.subject,a)};u.subject.addField=function(a){g([a]);u.subject.attributes.push(a)};u.subject.attributes=h.RDNAttributesAsArray(e.certificationRequestInfoSubject,l);u.subject.hash=l.digest().toHex();u.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo);
592 -u.getAttribute=function(a){return c(u,a)};u.addAttribute=function(a){g([a]);u.attributes.push(a)};u.attributes=h.CRIAttributesAsArray(e.certificationRequestInfoAttributes||[]);return u};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
593 -null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){g([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){g(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){g(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
594 -e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in r)switch(r[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
595 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case r["RSASSA-PSS"]:c=r[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=r[b.signatureParameters.mgf.algorithmOid];
596 -if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=r[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
587 +k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
588 +g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
589 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var q=h.createCertificationRequest();q.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;q.signatureOid=a.asn1.derToOid(g.csrSignatureOid);q.signatureParameters=R(q.signatureOid,g.csrSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,
590 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;q.signature=l.getBytes();q.certificationRequestInfo=g.certificationRequestInfo;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===
591 +q.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=q.signatureOid,g;l=k.toDer(q.certificationRequestInfo);q.md.update(l.getBytes())}l=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};q.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);q.subject.hash=l.digest().toHex();q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
592 +q.getAttribute=function(a){return c(q,a)};q.addAttribute=function(a){e([a]);q.attributes.push(a)};q.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return q};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
593 +null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
594 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
595 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
596 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
597 h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
598 k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
599 !1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
600 return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
601 return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
602 -h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return g.certs[b.hash]||
603 -null}var g={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in g.certs?(c=g.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):g.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
604 -for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)g.addCertificate(b[l]);return g};h.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"};
605 -h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var q=c.shift(),y=null,r=!1;if(g<q.validity.notBefore||g>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:g};if(null===k){y=c[0]||b.getIssuer(q);null===y&&q.isIssuer(q)&&(r=!0,y=q);if(y){var n=y;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){y=n.shift();
606 -try{x=y.verify(q)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||y&&!r||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&y&&!q.isIssuer(y)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<q.extensions.length;++x){var w=q.extensions[x];!w.critical||w.name in n||(k=
607 -{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||y&&!r)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
608 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
609 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
610 -c.defined.x509=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
611 -[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function g(b,c,h,q){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
612 -for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],r,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},u=null,u=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(u.tagClass!==m.Class.UNIVERSAL||u.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");u=d(u).value;break;case k.oids.encryptedData:var A=q,x={},B=[];if(!m.validate(u,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
613 -b.errors=B,b;u=m.derToOid(x.contentType);if(u!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=u,b;u=m.derToOid(x.encAlgorithm);u=k.pbe.getCipher(u,x.encParameter,A);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);u.update(x);if(!u.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");u=u.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
614 -l(u,h,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var q,r,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
615 -k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:q=A;r=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
616 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(x,q,g,h))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=h,a;r()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
617 -a.pkcs12||{},r={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
618 -r,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
602 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
603 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
604 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.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"};
605 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var r=c.shift(),A=null,u=!1;if(g<r.validity.notBefore||g>r.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:r.validity.notBefore,notAfter:r.validity.notAfter,now:g};if(null===k){A=c[0]||b.getIssuer(r);null===A&&r.isIssuer(r)&&(u=!0,A=r);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
606 +try{x=A.verify(r)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(r)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&A&&!r.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<r.extensions.length;++x){var w=r.extensions[x];!w.critical||w.name in n||(k=
607 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=r.getExtension("basicConstraints"),r=r.getExtension("keyUsage"),null!==r&&(r.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
608 +null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==r&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));r=null===k?!0:k.error;l=d?d(r,m,e):r;if(!0===l)k=null;else{!0===r&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
609 +if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
610 +c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
611 +[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,r){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
612 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},q=null,q=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(q.tagClass!==m.Class.UNIVERSAL||q.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");q=d(q).value;break;case k.oids.encryptedData:var z=r,x={},B=[];if(!m.validate(q,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
613 +b.errors=B,b;q=m.derToOid(x.contentType);if(q!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=q,b;q=m.derToOid(x.encAlgorithm);q=k.pbe.getCipher(q,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);q.update(x);if(!q.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");q=q.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
614 +l(q,h,r);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var r,u,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
615 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:r=z;u=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
616 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==r&&!m.validate(x,r,g,h))throw a=Error("Cannot read PKCS#12 "+r.name),a.errors=h,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
617 +a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
618 +u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
619 tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},B={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
620 value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
621 -capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},A={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
622 -h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var r={};if(!m.validate(b,v,r,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:r.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
623 -(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==r.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=r.version.charCodeAt(0),l;if(m.derToOid(r.contentType)!==k.oids.data)throw l=
624 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(r.contentType),l;b=r.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(r.mac){var w=null,A=0,u=m.derToOid(r.macAlgorithm);switch(u){case k.oids.sha1:w=a.md.sha1.create();A=20;break;case k.oids.sha256:w=a.md.sha256.create();A=32;break;case k.oids.sha384:w=a.md.sha384.create();A=48;break;case k.oids.sha512:w=a.md.sha512.create();
625 -A=64;break;case k.oids.md5:w=a.md.md5.create(),A=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+u);var u=new a.util.ByteBuffer(r.macSalt),B="macIterations"in r?parseInt(a.util.bytesToHex(r.macIterations),16):1,A=h.generateKey(n,u,3,B,A,w),u=a.hmac.create();u.start(w,A);u.update(b.value);if(u.getMac().getBytes()!==r.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}g(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
626 -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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(q)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);q=[];null!==
627 -g&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
628 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));g=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],n=0;n<q.length;++n){c=q[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
629 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
621 +capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
622 +h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
623 +(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
624 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var w=null,z=0,q=m.derToOid(u.macAlgorithm);switch(q){case k.oids.sha1:w=a.md.sha1.create();z=20;break;case k.oids.sha256:w=a.md.sha256.create();z=32;break;case k.oids.sha384:w=a.md.sha384.create();z=48;break;case k.oids.sha512:w=a.md.sha512.create();
625 +z=64;break;case k.oids.md5:w=a.md.md5.create(),z=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+q);var q=new a.util.ByteBuffer(u.macSalt),B="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,z=h.generateKey(n,q,3,B,z,w),q=a.hmac.create();q.start(w,z);q.update(b.value);if(q.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
626 +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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var r=a.util.isArray(c)?c[0]:c;"string"===typeof r&&(r=k.certificateFromPem(r));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(r)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);r=[];null!==
627 +g&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
628 +0<r.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,r));g=[];r=[];null!==c&&(r=a.util.isArray(c)?c:[c]);for(var u=[],n=0;n<r.length;++n){c=r[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
629 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);u.push(c)}0<u.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,u),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
630 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
631 [m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var v;e.useMac&&(g=a.md.sha1.create(),v=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,v,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),v=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
632 !0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,v.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
633 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
634 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
635 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var g=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
636 -g.headerType=b.type;throw g;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,g){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:g})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
637 -typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
633 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
634 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
635 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
636 +e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
637 +typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
638 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var g=a.util.createBuffer(),h=b.length>>1,l=h+(b.length&1),k=b.substr(0,l),l=b.substr(h,l);b=a.util.createBuffer();h=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);h.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
639 -for(var q=0;q<m;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
640 -a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},g=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
639 +for(var r=0;r<m;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(r=0;r<c;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
640 +a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
641 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
642 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
643 certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};m.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};m.CipherSuites={};m.getCipherSuite=function(a){var b=null,c;for(c in m.CipherSuites){var d=m.CipherSuites[c];if(d.id[0]===a.charCodeAt(0)&&d.id[1]===a.charCodeAt(1)){b=d;break}}return b};
@@ -648,41 +648,41 @@ send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protoco
648 b.session.compressionMethod=g?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.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,
649 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
650 (a.expect=B,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
651 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:z,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
651 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
652 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
653 !1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
654 -l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:z:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:z)):b.error(b,{message:e?"No server certificate provided.":
655 -"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=r;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
654 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
655 +"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
656 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
657 try{var g=b.session.sp;g.pre_master_secret=d.decrypt(c);var h=b.session.clientHelloVersion;if(h.major!==g.pre_master_secret.charCodeAt(0)||h.minor!==g.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){g.pre_master_secret=a.random.getBytes(48)}b.expect=O;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
658 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
659 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(g){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=O;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
660 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
661 -return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=y;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
661 +return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
662 data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=B;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
663 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:H;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var g=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
664 e.putBuffer(b.session.sha1.digest());var h=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,h?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(g);b.session.sha1.update(g);if(b.session.resuming&&h||!b.session.resuming&&!h)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
665 -data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?A:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
665 +data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?z:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
666 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
667 "Bad certificate.";break;case m.Alert.Description.unsupported_certificate:d="Unsupported certificate.";break;case m.Alert.Description.certificate_revoked:d="Certificate revoked.";break;case m.Alert.Description.certificate_expired:d="Certificate expired.";break;case m.Alert.Description.certificate_unknown:d="Certificate unknown.";break;case m.Alert.Description.illegal_parameter:d="Illegal parameter.";break;case m.Alert.Description.unknown_ca:d="Unknown certificate authority.";break;case m.Alert.Description.access_denied:d=
668 "Access denied.";break;case m.Alert.Description.decode_error:d="Decode error.";break;case m.Alert.Description.decrypt_error:d="Decrypt error.";break;case m.Alert.Description.export_restriction:d="Export restriction.";break;case m.Alert.Description.protocol_version:d="Unsupported protocol version.";break;case m.Alert.Description.insufficient_security:d="Insufficient security.";break;case m.Alert.Description.internal_error:d="Internal error.";break;case m.Alert.Description.user_canceled:d="User canceled.";
669 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt24();if(g>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var h=d.bytes(g+
670 4);d.read+=4;e in J[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(h),b.session.sha1.update(h)),J[b.entity][b.expect][e](b,c,g)):
671 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt16(),d=d.getBytes(g);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||g>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
672 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,r=3,v=4,B=5,x=6,A=7,y=8,R=1,z=2,E=3,O=4,H=5,N=6,u=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];ea[m.ConnectionEnd.server]=[[u,P,F,u,L],[u,
673 -P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[u,u,m.handleServerHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,P,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,L,u,u,u,u,u,u],
674 -[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];J[m.ConnectionEnd.server]=[[u,m.handleClientHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,P,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleClientKeyExchange,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleCertificateVerify,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,
675 -u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
672 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,B=5,x=6,z=7,A=8,R=1,y=2,E=3,O=4,H=5,N=6,q=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];ea[m.ConnectionEnd.server]=[[q,P,F,q,L],[q,
673 +P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[q,q,m.handleServerHello,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,P,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,L,q,q,q,q,q,q],
674 +[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q]];J[m.ConnectionEnd.server]=[[q,m.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,P,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.handleClientKeyExchange,q,q,q,q],[q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,m.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,
675 +q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[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]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
676 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};g&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
677 cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
678 a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
679 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=g;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
679 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
680 }return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
681 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
682 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
681 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var r=a.util.createBuffer();
682 +n(r,2,k);n(l,2,r);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
683 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var g=
684 -null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(q.bytes(),!1));
685 -var y=a.util.createBuffer();n(y,3,q);e.putBuffer(y)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
684 +null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var r=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(r.bytes(),!1));
685 +var u=a.util.createBuffer();n(u,3,r);e.putBuffer(u)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(q){return b.error(b,{message:"Could not send certificate list.",cause:q,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
686 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
687 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(g){b.error(b,{message:"Could not get private key.",cause:g,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
688 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var g=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(g))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -704,199 +704,199 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_versio
704 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_message}})),c.record.ready=!0));c=b}if(!h.fail&&null!==h.record&&h.record.ready)if(b=h.record,d=b.type-m.ContentType.change_cipher_spec,e=ea[h.entity][h.expect],d in e)e[d](h,b);else m.handleUnexpected(h,b)}return c};h.prepare=function(b){m.queue(h,m.createRecord(h,{type:m.ContentType.application_data,data:a.util.createBuffer(b)}));return m.flush(h)};h.prepareHeartbeatRequest=function(b,c){b instanceof a.util.ByteBuffer&&
705 (b=b.bytes());"undefined"===typeof c&&(c=b.length);h.expectedHeartbeatPayload=b;m.queue(h,m.createRecord(h,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_request,b,c)}));return m.flush(h)};h.close=function(a){if(!h.fail&&h.sessionCache&&h.session){var b={id:h.session.id,version:h.session.version,sp:h.session.sp};b.sp.keys=null;h.sessionCache.setSession(b.id,b)}if(h.open){h.open=!1;h.input.clear();if(h.isConnected||h.handshaking)h.isConnected=h.handshaking=!1,
706 m.queue(h,m.createAlert(h,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(h);h.closed(h)}h.reset(a)};return h};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
707 -return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<g.length;++l)g[l](c);return c.tls}},
708 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,g,l){g=g.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
709 -g?l.keys.server_write_key:l.keys.client_write_key),iv:g?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",g?l.keys.client_write_key:l.keys.server_write_key),iv:g?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var e=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
710 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(g)&&(b.fragment=k.output,b.length=b.fragment.length(),e=!0);return e}function g(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
711 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,q=a.random.getBytesSync(g),y=e.output.length();y>=g?(b.fragment=e.output.getBytes(y-g),q=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
712 -b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;y=a.hmac.create();y.start("SHA1",e);y.update(q);q=y.digest().getBytes();y.start(null,null);y.update(g);g=y.digest().getBytes();return q===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
707 +return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
708 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
709 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
710 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
711 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,r=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),r=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
712 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(r);r=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return r===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
713 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
714 -20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<g.length;++l)g[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
715 -typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
716 -a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
717 -function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<g.length;++l)g[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
718 -(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<q;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var g=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(g.getBytesSync(h)),
719 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));h-=q.length;0<h&&(q=a.util.fillString(String.fromCharCode(0),h)+q);h=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:h,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
720 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<g.length;++l)g[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
721 -"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],g=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var g=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):g<=c[m.level].index&&
714 +20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
715 +typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
716 +a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
717 +function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
718 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,r=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<r;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),r;do r=(new d(a.util.bytesToHex(e.getBytesSync(h)),
719 +16)).mod(c.n);while(r.equals(d.ZERO));r=a.util.hexToBytes(r.toString(16));h-=r.length;0<h&&(r=a.util.fillString(String.fromCharCode(0),h)+r);h=c.encrypt(r,"NONE");r=b.generate(r,l);return{encapsulation:h,key:r}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
720 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
721 +"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
722 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
723 a.log.logMessage({timestamp:new Date,level:b,category:c,message:d,arguments:e})}})(n[l]);a.log.makeLogger=function(b){b={flags:0,f:b};a.log.setLevel(b,"none");return b};a.log.setLevel=function(b,c){var d=!1;if(b&&!(b.flags&a.log.LEVEL_LOCKED))for(var e=0;e<a.log.levels.length;++e)if(c==a.log.levels[e]){b.level=c;d=!0;break}return d};a.log.lock=function(b,c){b.flags="undefined"===typeof c||c?b.flags|a.log.LEVEL_LOCKED:b.flags&~a.log.LEVEL_LOCKED};a.log.addLogger=function(a){d.push(a)};if("undefined"!==
724 -typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},g=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else g=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};g=a.log.makeLogger(g);a.log.setLevel(g,"debug");a.log.addLogger(g)}else console={log:function(){}};
725 -null!==g&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(g,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(g));a.log.consoleLogger=g}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
726 -c.defined.log=!0;for(var l=0;l<g.length;++l)g[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!r.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
727 -b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:r.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
728 -r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.encryptedContent.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]),r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function g(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
729 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.digestAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(r.create(r.Class.UNIVERSAL,
730 -r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.signatureAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]));c.value.push(r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=r.create(r.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
731 -r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?r.utcTimeToDate(e):r.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?r.create(r.Class.UNIVERSAL,r.Type.UTCTIME,!1,r.dateToUtcTime(e)):
732 -r.create(r.Class.UNIVERSAL,r.Type.GENERALIZEDTIME,!1,r.dateToGeneralizedTime(e))}return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[c])])}function m(b){return[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,
733 -r.Type.OCTETSTRING,!1,b.parameter.getBytes())]),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!r.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(r.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
734 -0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:r.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
724 +typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},e=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else e=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};e=a.log.makeLogger(e);a.log.setLevel(e,"debug");a.log.addLogger(e)}else console={log:function(){}};
725 +null!==e&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(e,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(e));a.log.consoleLogger=e}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
726 +c.defined.log=!0;for(var l=0;l<e.length;++l)e[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!u.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
727 +b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:u.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
728 +u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.encryptedContent.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]),u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function e(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
729 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.digestAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(u.create(u.Class.UNIVERSAL,
730 +u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.signatureAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]));c.value.push(u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=u.create(u.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
731 +u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?u.utcTimeToDate(e):u.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?u.create(u.Class.UNIVERSAL,u.Type.UTCTIME,!1,u.dateToUtcTime(e)):
732 +u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
733 +u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
734 +0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
735 c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
736 -break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var r=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
737 -b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=r.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:r.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!r.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=r.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
736 +break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
737 +b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
738 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
739 -c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
740 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.signerInfos));return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),
739 +c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
740 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
741 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
742 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
743 -signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(r.create(r.Class.CONTEXT_SPECIFIC,
744 -0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(g).getBytes()),r.create(r.Class.UNIVERSAL,
745 -r.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=r.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=r.toDer(d);h.getByte();r.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
746 -}else{e.authenticatedAttributesAsn1=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=r.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
742 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var r=c[m];if(!l&&r.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&r.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
743 +signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
744 +0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
745 +u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
746 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var r=e.authenticatedAttributes[m];r.type===a.pki.oids.messageDigest?r.value=c[e.digestAlgorithm].digest():r.type!==a.pki.oids.signingTime||r.value||(r.value=k);h.value.push(n(r));e.authenticatedAttributesAsn1.value.push(n(r))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
747 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
748 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,
749 -!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,g(b.recipients)),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
748 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
749 +!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
750 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
751 }h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
752 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
753 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
754 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
755 -Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function g(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
756 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=g(w.bytes()),b.truncate(b.length()-
757 -x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(g("\x00\x00\x00\x00",l)),x.putBuffer(g("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=g("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
758 -h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,g){g=g||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+g};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
759 -function(b,g){g=g||{};var l=g.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===g.encoding)return l=l.toHex(),g.delimiter?l.match(/.{2}/g).join(g.delimiter):l;if("binary"===g.encoding)return l.getBytes();if(g.encoding)throw Error('Unknown encoding "'+g.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
760 -(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<g.length;++l)g[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
761 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var g={};a.debug.set("forge.task","queues",g);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
754 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
755 +Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
756 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
757 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
758 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
759 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
760 +(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
761 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
762 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
763 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
764 -this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",g)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
764 +this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
765 (c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
766 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
767 this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
768 a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
769 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in g?0===g[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):g[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(g[b.type].shift(),0===g[b.type].length?delete g[b.type]:g[b.type][0].start()):a.log.error("forge.task",
770 -"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in g?g[a.type].push(b):(g[b.type]=[b],m(b))};a.task.cancel=function(a){a in g&&(g[a]=[g[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
771 -a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<g.length;++l)g[l](c);return c.task}},
772 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
773 -return}var g,v=function(a,b){b.exports=function(b){var c=g.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){g="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
769 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
770 +"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
771 +a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
772 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
773 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
774 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});
775 -function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var g=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),g=g.substring(0,g.length-24),v=0;v<c.length;v++)if(g===c[v].DERKey||g==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
776 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),g=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(g,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
777 -var e=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,e,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,g){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,g)}
778 -function amtcert_createCertificate(b,c,a,d,g){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
779 -value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==g?g={name:"extKeyUsage",serverAuth:!0}:g.name="extKeyUsage",
780 -n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},g,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
781 -function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,g=b.length;d<g;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
775 +function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),e=e.substring(0,e.length-24),v=0;v<c.length;v++)if(e===c[v].DERKey||e==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
776 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),r=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(r).getBytes();
777 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
778 +function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
779 +value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
780 +n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
781 +function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,e=b.length;d<e;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
782 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
783 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
784 -require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var g="";a.on("data",function(a){null!=g&&(g+=a.toString("binary"));5E5<g.length&&(g=null)});a.on("end",function(){certUrlCache[b]={data:btoa(g),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,g)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
785 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,e,k,m,q){var r=a[b++];q={};var u=0,B=0;if(0==r){if(2==h.bpp)for(e=0;e<m;e++)n(a[b++]+(a[b++]<<8),e);else for(e=0;e<m;e++)v(a[b++],e);g(h.spare,c,d)}else if(1==r)h.graymode?(r=a[b++],h.lowcolor&&(r<<=4),h.canvas.fillStyle="rgb("+r+","+r+","+r+")"):(r=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(r&224)+","+((r&28)<<3)+","+D((r&3)<<6):(r>>8&248)+","+(r>>3&252)+","+
786 -((r&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,e,k);else if(1<r&&17>r){k=4;B=15;if(2==h.bpp){for(e=0;e<r;e++)q[e]=a[b++]+(a[b++]<<8);2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)n(q[r>>e&B],u++)}else{for(e=0;e<r;e++)q[e]=a[b++];2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)v(q[r>>e&B],u++)}g(h.spare,c,d)}else if(128==r){if(2==h.bpp)for(;u<m&&b<a.byteLength;){r=a[b++]+(a[b++]<<8);B=1;do B+=e=a[b++];while(255==e);if(0==
787 -h.rotation)p(r,u,B),u+=B;else for(;0<=--B;)n(r,u++)}else for(;u<m&&b<a.byteLength;){r=a[b++];B=1;do B+=e=a[b++];while(255==e);if(0==h.rotation)l(r,u,B),u+=B;else for(;0<=--B;)v(r,u++)}g(h.spare,c,d)}else if(129<r){if(2==h.bpp)for(e=0;e<r-128;e++)q[e]=a[b++]+(a[b++]<<8);else for(e=0;e<r-128;e++)q[e]=a[b++];for(;u<m&&b<a.byteLength;){B=1;e=a[b++];r=q[e%128];if(127<e){do B+=e=a[b++];while(255==e)}if(0==h.rotation)2==h.bpp?p(r,u,B):l(r,u,B),u+=B;else if(2==h.bpp)for(;0<=--B;)n(r,u++);else for(;0<=--B;)v(r,
788 -u++)}g(h.spare,c,d)}}function g(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
784 +require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
785 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,r){var u=a[b++];r={};var q=0,B=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
786 +((u&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;B=15;if(2==h.bpp){for(g=0;g<u;g++)r[g]=a[b++]+(a[b++]<<8);2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(r[u>>g&B],q++)}else{for(g=0;g<u;g++)r[g]=a[b++];2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(r[u>>g&B],q++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;q<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);B=1;do B+=g=a[b++];while(255==g);if(0==
787 +h.rotation)p(u,q,B),q+=B;else for(;0<=--B;)n(u,q++)}else for(;q<m&&b<a.byteLength;){u=a[b++];B=1;do B+=g=a[b++];while(255==g);if(0==h.rotation)l(u,q,B),q+=B;else for(;0<=--B;)v(u,q++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)r[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)r[g]=a[b++];for(;q<m&&b<a.byteLength;){B=1;g=a[b++];u=r[g%128];if(127<g){do B+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?p(u,q,B):l(u,q,B),q+=B;else if(2==h.bpp)for(;0<=--B;)n(u,q++);else for(;0<=--B;)v(u,
788 +q++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
789 h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
790 b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
791 -1]=e,h.spare.data[b+2]=a,b+=4}function q(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function e(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
792 -2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):r[c.code];
793 -null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
794 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
795 -0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
796 -h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var e=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)e=12,h.state=1,h.parent&&delete h.parent.connectTime,
797 -h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)e=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){e=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;e=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
791 +1]=e,h.spare.data[b+2]=a,b+=4}function r(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
792 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];null!=c&&h.sendkey(c,
793 +a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);173==c&&(d=45);186==c&&
794 +(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=0;h.spareh2=0;
795 +h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=h.rwidth=
796 +h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
797 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
798 h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
799 0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
800 -50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);e=4;break;case 2:e=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)e=0;else if(b=l.getUint32(4)+8,c.byteLength<b)e=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
800 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
801 0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
802 -h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}e=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),e=l.getUint16(4),q=l.getUint16(6),p=e*q,r=l.getUint32(8);if(17>r){if(1>e||64<e||1>q||
803 -64<q)return console.log("Invalid tile size ("+e+","+q+"), disconnecting."),h.Stop();if(h.sparew!=e||h.spareh!=q){h.sparew=h.sparew2=e;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=e;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==r){h.canvas.canvas.width=h.rwidth=h.width=e;h.canvas.canvas.height=h.rheight=
804 -h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));e=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==r){r=12;e=12+p*h.bpp;if(h.acc.byteLength<e)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(r,!0),w),r+=2;else for(w=0;w<p;w++)v(h.acc[r++],w);g(h.spare,b,c)}else if(16==r){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
805 -16+w)break;r=16;if(5<w&&0==h.acc[r]&&l.getUint16(r+1,!0)==w-5)d(h.acc,r+5,b,c,e,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(r,r+w-0)))),0<l.length){for(var r=l,N=new Uint8Array(r.length),u=0,C=r.length;u<C;++u)N[u]=r.charCodeAt(u);d(N,0,b,c,e,q,p,l.length)}else console.log("Invalid deflate data");e=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==e)break;h.acc=e!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(e)):
802 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),r=l.getUint16(6),p=g*r,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>r||
803 +64<r)return console.log("Invalid tile size ("+g+","+r+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=r){h.sparew=h.sparew2=g;h.spareh=h.spareh2=r;if(1==h.rotation||3==h.rotation)h.sparew2=r,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
804 +h.height=r;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
805 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,r,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,N=new Uint8Array(u.length),q=0,C=u.length;q<C;++q)N[q]=u.charCodeAt(q);d(N,0,b,c,g,r,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
806 null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
807 function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
808 -h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,C(0,0),w(0,0));h.width=h.canvas.canvas.width;
809 -h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var r={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
809 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
810 NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
811 F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
812 h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
813 h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var K=!1,B=!1;h.GrabMouseInput=function(){if(1!=K){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;K=!0}};h.UnGrabMouseInput=function(){if(0!=K){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;K=!1}};h.GrabKeyInput=function(){1!=B&&(document.onkeyup=
814 h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,B=!0)};h.UnGrabKeyInput=function(){0!=B&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,B=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
815 0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){h.ReverseMouseWheel&&(b*=-1);var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/
816 -Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,g=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-g[0])*d;h.my=(event.pageY-g[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=q(h.mx,h.my),h.my=e(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
816 +Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=r(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
817 h.mNagleTimer=null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=
818 -0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;
819 -a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,g="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?g:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");
820 -a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&
821 -a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var g=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<g&&0!=a.State)for(a.PendingOperations.push([g,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];
822 -if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&
823 -255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),g=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),n=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,n,b,e,g,n,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);
824 -a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();
825 -if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,e=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,
826 -4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),e=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+
827 -q+" Y="+e);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,e);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,e);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,
828 -4));break;case 11:c=0;q={};e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<e)for(c=((b.charCodeAt(6+2*e)&255)<<8)+(b.charCodeAt(7+2*e)&255),n=0;n<e;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,
829 -4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);g=v[b];d&&(a.CanvasId.style.cursor=g)}return w+D}}};a.MouseButton=
830 -{NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,
831 -Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?
832 -d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,
833 -a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,
834 -67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,g;for(g in a.TouchArray)g==b?e=c:1==a.TouchArray[g].f?(e=65542,a.TouchArray[g].f=3):e=2==a.TouchArray[g].f?262144:131078,d+=String.fromCharCode(g)+a.intToStr(e)+a.shortToStr(a.TouchArray[g].x)+a.shortToStr(a.TouchArray[g].y),2==a.TouchArray[g].f&&
835 -delete a.TouchArray[g];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,g=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-g[0])*e,d=(c.pageY-
836 -g[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var n=g=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?g=a.MouseButton.LEFT:2==c.which?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT:c.button&&(0==c.button?g=a.MouseButton.LEFT:1==c.button?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?n=-120*c.detail:c.wheelDelta&&(n=3*c.wheelDelta));var v="",v=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,
837 -a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,n/256&255,n&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?g:2*g&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(v),a.Alternate=1):a.Alternate=0:a.send(v)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",
838 -b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,
839 -a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&
840 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&
841 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&
842 -(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&
843 -a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};
844 -a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,g=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]=
845 -{x:e,y:g});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
846 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<
847 -b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/
848 -a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=
849 -a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
850 -null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=
851 -null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;
852 -if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||
853 -3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,
854 -0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};
855 -a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;
856 -d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var g=new FileReader,v=!1,n=[];g.readAsBinaryString?g.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:g.readAsBinaryString(new Blob([n.shift()]))}:g.readAsArrayBuffer&&(g.onloadend=function(a){d.xxOnSocketData(a.target.result);
857 -0==n.length?v=!1:g.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(g.readAsBinaryString)v=!0,g.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,g.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=
858 -function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=
859 -a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");
860 -d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(u[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<
861 -b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){y[m][D]=a;A[m][D]=(e<<6)+(C<<12)+q}function g(){for(var a=(e<<6)+(C<<12)+q,b=D;b<l.width;b++)y[m][b]=" ",A[m][b]=a}function v(a){for(var b=(e<<6)+(C<<12)+q,c=0;c<l.width;c++)y[a][c]=" ",A[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)y[b]=y[b+a],A[b]=A[b+a];for(b=E[1]-a+1;b<=
862 -E[1];b++)for(y[b]=[],A[b]=[],a=0;a<l.width;a++)y[b][a]=" ",A[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,e=7,C=0,w=!0,D=0,m=0,k=0,h=0,r=0,K=[],B=0,x=0,A=[],y=[],R=!1,z=!0,E,O=!1,H=[],
863 -N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){y[c]=[];A[c]=[];for(var d=0;d<l.width;d++)y[c][d]=" ",A[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=
864 -decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(r){case 0:switch(n){case 27:r=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":r=2;break;case "(":r=4;break;case ")":r=5;break;case "]":r=6;break;case "=":O=!0;r=0;break;case ">":O=!1;r=0;break;case "7":k=D;h=m;r=0;break;case "8":D=k;m=h;r=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var u=0;u<l.width;u++)y[n][u]=y[n-1][u],A[n][u]=A[n-1][u];for(n=
865 -E[0]+1-1;n>E[0]-1;n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;r=0;break;default:console.log("unknown terminal short code",p),r=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,u=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(z=!1);break;case "h":25==n[0]&&(z=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==u&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==
866 -u&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==u&&(0==n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==u&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==u&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==u&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==u&&(p=n[0]);for(J=D;J<l.width-p;J++)y[m][J]=y[m][J+p],A[m][J]=A[m][J+p];for(J=l.width-p;J<l.width;J++)y[m][J]=" ",A[m][J]=448;break;case "L":J=1;1==u&&(J=n[0]);0==J&&(J=1);
867 -for(n=E[1];n>=m+J;n--)y[n]=y[n-J],A[n]=A[n-J];for(n=m;n<m+J;n++)for(y[n]=[],A[n]=[],p=0;p<l.width;p++)y[n][p]=" ",A[n][p]=448;break;case "J":if(1==u&&2==n[0])l.TermClear((C<<12)+(e<<6)),m=D=0,H=[];else if(0==u||1==u&&0==n[0])for(g(),J=m+1;J<l.height;J++)v(J);else if(1==u&&1==n[0])for(g(),J=0;J<m-1;J++)v(J);break;case "H":2==u?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<u;J++)n[J]&&0!=n[J]?1==n[J]?
868 -8>e&&(e+=8):2==n[J]||22==n[J]?8<=e&&(e-=8):7==n[J]?q=2:27==n[J]?q=0:30<=n[J]&&37>=n[J]?(p=8<=e,e=n[J]-30,p&&8>=e&&(e+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?e=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,e=7,q=0);break;case "K":if(0!=u&&(1!=u||n[0]&&0!=n[0])){if(1==u)if(1==n[0])for(n=(e<<6)+(C<<12)+q,u=0;u<D;u++)y[m][u]=" ",A[m][u]=n;else 2==n[0]&&v(m)}else g();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==u&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-
869 -1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=E[1]);break;case "S":p=1;1==u&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "M":p=1;1==u&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "T":p=1;1==u&&(p=n[0]);for(n=E[1];n>E[0]+
870 -p;n--)for(u=0;u<l.width;u++)y[n][u]=y[n-p][u],A[n][u]=A[n-p][u];for(n=E[0]+p;n>E[0];n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "X":p=1;J=D;R=m;for(1==u&&(p=n[0]);0<p&&R<l.height;)y[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}r=0}break;case 4:r=0;break;case 5:r=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(u=parseInt(n[0]),(0==u||2==u)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,
871 -l.title=n[1]);r=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var u=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
872 -9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,
873 -9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)y[b][c]=" ",A[b][c]=a;H=[]};l.TermResetScreen=function(){q=0;e=7;C=0;w=z=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);
874 -N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};
875 -l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,
876 -79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,
877 -91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;
878 -var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
879 -a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=A[b][h],D==h&&m==b&&z&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=y[b][h],d){case "&":a+="&amp;";
818 +0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=
819 +700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
820 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
821 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
822 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
823 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
824 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
825 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,r=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
826 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),r=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+r+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
827 +a.ProcessPictureMsg(c,r,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(r,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;r={};g=((b.charCodeAt(4)&255)<<8)+
828 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);r[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,r,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
829 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
830 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
831 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&
832 +7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==
833 +a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&
834 +a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+
835 +a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
836 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
837 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
838 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
839 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
840 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
841 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
842 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
843 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
844 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
845 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
846 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
847 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
848 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
849 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
850 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
851 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
852 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
853 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
854 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
855 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
856 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
857 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
858 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
859 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
860 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(q[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
861 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(C<<12)+r}function e(){for(var a=(g<<6)+(C<<12)+r,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(C<<12)+r,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
862 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),r=0,g=7,C=0,w=!0,D=0,m=0,k=0,h=0,u=0,K=[],B=0,x=0,z=[],A=[],R=!1,y=!0,E,O=!1,H=[],N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
863 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=
864 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":O=!0;u=0;break;case ">":O=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var q=0;q<l.width;q++)A[n][q]=A[n-1][q],z[n][q]=z[n-1][q];for(n=E[0]+1-1;n>E[0]-1;n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;u=0;break;
865 +default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,q=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==q&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==q&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==q&&(0==
866 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==q&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==q&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==q&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==q&&(p=n[0]);for(J=D;J<l.width-p;J++)A[m][J]=A[m][J+p],z[m][J]=z[m][J+p];for(J=l.width-p;J<l.width;J++)A[m][J]=" ",z[m][J]=448;break;case "L":J=1;1==q&&(J=n[0]);0==J&&(J=1);for(n=E[1];n>=m+J;n--)A[n]=A[n-J],z[n]=z[n-J];for(n=m;n<m+J;n++)for(A[n]=[],
867 +z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==q&&2==n[0])l.TermClear((C<<12)+(g<<6)),m=D=0,H=[];else if(0==q||1==q&&0==n[0])for(e(),J=m+1;J<l.height;J++)v(J);else if(1==q&&1==n[0])for(e(),J=0;J<m-1;J++)v(J);break;case "H":2==q?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<q;J++)n[J]&&0!=n[J]?1==n[J]?8>g&&(g+=8):2==n[J]||22==n[J]?8<=g&&(g-=8):7==n[J]?r=2:27==n[J]?r=0:30<=n[J]&&
868 +37>=n[J]?(p=8<=g,g=n[J]-30,p&&8>=g&&(g+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?g=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,g=7,r=0);break;case "K":if(0!=q&&(1!=q||n[0]&&0!=n[0])){if(1==q)if(1==n[0])for(n=(g<<6)+(C<<12)+r,q=0;q<D;q++)A[m][q]=" ",z[m][q]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==q&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
869 +E[1]);break;case "S":p=1;1==q&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "M":p=1;1==q&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "T":p=1;1==q&&(p=n[0]);for(n=E[1];n>E[0]+p;n--)for(q=0;q<l.width;q++)A[n][q]=A[n-p][q],z[n][q]=z[n-p][q];for(n=
870 +E[0]+p;n>E[0];n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "X":p=1;J=D;R=m;for(1==q&&(p=n[0]);0<p&&R<l.height;)A[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(q=parseInt(n[0]),(0==q||2==q)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=
871 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var q=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
872 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
873 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;H=[]};l.TermResetScreen=function(){r=0;g=7;C=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
874 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
875 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
876 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
877 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
878 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
879 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
880 break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<H.length&&(H=H.slice(H.length-800));c=H.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
881 l.Init();return l},ZLIB=ZLIB||{};
882 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
883 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
884 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,x,A,B,D,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=A=1;15>=p;p++)if(A<<=1,A-=M[p],0>A)return-1;if(0<A&&(0==
885 -b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(q=0;q<n;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=r,fa=K,ga=ca=0,U=-1}q=D=0;p=d;S=c;n=w;x=0;W=-1;B=1<<w;I=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[q]<U?G.val=e[q]:e[q]>U?(G.op=fa[ga+e[q]],G.val=Z[ca+e[q]]):G.op=96;A=1<<p-x;d=C=1<<n;do C-=A,m[S+(D>>>x)+C]=G;while(0!=C);for(A=1<<p-1;D&A;)A>>>=1;
886 -0!=A?(D&=A-1,D+=A):D=0;q++;if(0==--M[p]){if(p==v)break;p=g[l+e[q]]}if(p>w&&(D&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(A=1<<n;n+x<v;){A-=M[n+x];if(0>=A)break;n++;A<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=D&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=D&&(m[S+D]={op:64,bits:p-x,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function g(){var a;this.total=this.check=
884 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,r,v,w,x,z,D,B,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(r=0;r<n;r++)M[g[l+r]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
885 +b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(r=0;r<n;r++)0!=g[l+r]&&(e[x[g[l+r]]++]=r);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=u,fa=K,ga=ca=0,U=-1}r=B=0;p=d;S=c;n=w;x=0;W=-1;D=1<<w;I=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[r]<U?G.val=e[r]:e[r]>U?(G.op=fa[ga+e[r]],G.val=Z[ca+e[r]]):G.op=96;z=1<<p-x;d=C=1<<n;do C-=z,m[S+(B>>>x)+C]=G;while(0!=C);for(z=1<<p-1;B&z;)z>>>=1;
886 +0!=z?(B&=z-1,B+=z):B=0;r++;if(0==--M[p]){if(p==v)break;p=g[l+e[r]]}if(p>w&&(B&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(z=1<<n;n+x<v;){z-=M[n+x];if(0>=z)break;n++;z<<=1}D+=1<<n;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:p-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
887 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
888 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function e(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function C(a,b){return a.hold&
889 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
888 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function r(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!r(a))return!1;return!0}function C(a,b){return a.hold&
889 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
890 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
891 -e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new g;ZLIB.inflateReset(b,
892 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,g,h,k,r,u=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);g={};n(a,g);h=g.have;k=g.left;
893 -P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!e(g,16))break a;if(d.wrap&2&&35615==g.hold){d.check=a.checksum_function(0,null,0,0);v(a,g.hold);p(g);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(g,8)<<8)+(g.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(g,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(g,4);u=C(g,4)+8;if(0==d.wbits)d.wbits=u;else if(u>d.wbits){a.msg="invalid window size";d.mode=
894 -29;break}d.dmax=1<<u;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=g.hold&512?9:11;p(g);break;case 1:if(!e(g,16))break a;d.flags=g.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=g.hold>>>8&1);d.flags&512&&v(a,g.hold);p(g);d.mode=2;case 2:if(!e(g,32))break a;null!==d.head&&(d.head.time=g.hold);d.flags&512&&(r=g.hold,a.state.check=a.checksum_function(a.state.check,
895 -[r&255,r>>>8&255,r>>>16&255,r>>>24&255],0,4));p(g);d.mode=3;case 3:if(!e(g,16))break a;null!==d.head&&(d.head.xflags=g.hold&255,d.head.os=g.hold>>>8);d.flags&512&&v(a,g.hold);p(g);d.mode=4;case 4:if(d.flags&1024){if(!e(g,16))break a;d.length=g.hold;null!==d.head&&(d.head.extra_len=g.hold);d.flags&512&&v(a,g.hold);p(g);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(r=d.length,r>g.have&&(r=g.have),r&&(null!==d.head&&null!==d.head.extra&&(u=d.head.extra_len-
896 -d.length,d.head.extra+=a.input_data.substring(g.next,g.next+(u+r>d.head.extra_max?d.head.extra_max-u:r))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r)),g.have-=r,g.next+=r,d.length-=r),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==g.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");r=0;do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=u,d.length++)}while(r<g.have);d.flags&
897 -512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==g.have)break a;r=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=u,d.length++)}while(r<g.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=
898 -r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!e(g,16))break a;if(g.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(g)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!e(g,32))break a;a.adler=d.check=m(g.hold);p(g);d.mode=10;case 10:if(0==d.havedict)return l(g),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
899 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(g);d.mode=26;break}if(!e(g,3))break a;d.last=C(g,1);w(g,1);switch(C(g,2)){case 0:d.mode=13;break;case 1:r=d;u=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
891 +e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
892 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,q=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
893 +P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);q=C(e,4)+8;if(0==d.wbits)d.wbits=q;else if(q>d.wbits){a.msg="invalid window size";d.mode=
894 +29;break}d.dmax=1<<q;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
895 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(q=d.head.extra_len-
896 +d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(q+u>d.head.extra_max?d.head.extra_max-q:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=q,d.length++)}while(u<e.have);d.flags&
897 +512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=q,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
898 +u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
899 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=C(e,1);w(e,1);switch(C(e,2)){case 0:d.mode=13;break;case 1:u=d;q=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
900 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
901 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
902 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -919,28 +919,28 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
919 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
920 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
921 {op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
922 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);r.lencode=0;r.distcode=512;for(u=0;512>u;u++)r.codes[u]=B[u];for(u=0;32>u;u++)r.codes[u+512]=x[u];r.lenbits=9;r.distbits=5;
923 -d.mode=19;if(c==ZLIB.Z_TREES){w(g,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(g,2);break;case 13:D(g);if(!e(g,32))break a;if((g.hold&65535)!=(g.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=g.hold&65535;p(g);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(r=d.length){r>g.have&&(r=g.have);r>g.left&&(r=g.left);if(0==r)break a;a.output_data+=a.input_data.substring(g.next,g.next+r);a.next_out+=r;g.have-=
924 -r;g.next+=r;g.left-=r;d.length-=r;break}d.mode=11;break;case 16:if(!e(g,14))break a;d.nlen=C(g,5)+257;w(g,5);d.ndist=C(g,5)+1;w(g,5);d.ncode=C(g,4)+4;w(g,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!e(g,3))break a;r=C(g,3);d.lens[A[d.have++]]=r;w(g,3)}for(;19>d.have;)d.lens[A[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
925 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(16>r.val)w(g,r.bits),d.lens[d.have++]=r.val;else{if(16==r.val){if(!e(g,r.bits+2))break a;w(g,r.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}u=d.lens[d.have-1];r=3+C(g,2);w(g,2)}else if(17==r.val){if(!e(g,r.bits+3))break a;w(g,r.bits);u=0;r=3+C(g,3);w(g,3)}else{if(!e(g,r.bits+7))break a;w(g,r.bits);u=0;r=11+C(g,7);w(g,7)}if(d.have+r>d.nlen+d.ndist){a.msg=
926 -"invalid bit length repeat";d.mode=29;break}for(;r--;)d.lens[d.have++]=u}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=g.have&&258<=g.left){l(g);r=a;var F=K=u=void 0,Y=void 0,L=void 0,
927 -ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,u=r.state,K=r.input_data,F=r.next_in,Y=F+r.avail_in-5,L=r.next_out,ea=L-(k-r.avail_out),V=L+(r.avail_out-257),J=u.wsize,aa=u.whave,ba=u.wnext,W=u.window,I=u.hold,G=u.bits,S=u.codes,Z=u.lencode,ca=u.distcode,fa=(1<<u.lenbits)-1,ga=(1<<u.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
928 -G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)r.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
929 -u.sane){r.msg="invalid distance too far back";u.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,r.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)r.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);r.output_data+=r.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),X-=3;X&&(r.output_data+=r.output_data.charAt(U++),
930 -1<X&&(r.output_data+=r.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{r.msg="invalid distance code";u.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?u.mode=11:(r.msg="invalid literal/length code",u.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;r.next_in=F;r.next_out=L;r.avail_in=F<Y?5+(Y-F):5-(F-Y);r.avail_out=L<V?257+(V-L):257-(L-V);u.hold=I;u.bits=G;n(a,g);11==d.mode&&(d.back=-1);
931 -break}for(d.back=0;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(r.op&&0==(r.op&240)){for(u=r;;){r=d.codes[d.lencode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;d.length=r.val;if(0==r.op){d.mode=25;break}if(r.op&32){d.back=-1;d.mode=11;break}if(r.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=r.op&15;d.mode=21;case 21:if(d.extra){if(!e(g,d.extra))break a;
932 -d.length+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){r=d.codes[d.distcode+C(g,d.distbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(0==(r.op&240)){for(u=r;;){r=d.codes[d.distcode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;if(r.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=r.val;d.extra=r.op&15;d.mode=23;case 23:if(d.extra){if(!e(g,d.extra))break a;
933 -d.offset+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==g.left)break a;r=k-g.left;if(d.offset>r){r=d.offset-r;if(r>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}r>d.wnext?(r-=d.wnext,u=d.wsize-r):u=d.wnext-r;K=-1;r>d.length&&(r=d.length)}else u=-1,K=a.next_out-d.offset,r=d.length;r>g.left&&(r=g.left);g.left-=r;d.length-=r;if(0<=u)a.output_data+=d.window.substring(u,u+r),a.next_out+=r;else{a.next_out+=r;do a.output_data+=a.output_data.charAt(K++);while(--r)}0==
934 -d.length&&(d.mode=20);break;case 25:if(0==g.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;g.left--;d.mode=20;break;case 26:if(d.wrap){if(!e(g,32))break a;k-=g.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=g.left;if((d.flags?g.hold:m(g.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(g)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!e(g,32))break a;if(g.hold!=(d.total&4294967295)){a.msg="incorrect length check";
935 -d.mode=29;break}p(g)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(g);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))g=a.state,r=a.output_data.length,null===g.window&&(g.window=""),0==g.wsize&&(g.wsize=1<<g.wbits),g.window=r>=g.wsize?a.output_data.substring(r-g.wsize):g.whave+r<g.wsize?g.window+a.output_data:g.window.substring(g.whave-(g.wsize-r))+a.output_data,g.whave=g.window.length,
936 -g.wnext=g.whave<g.wsize?g.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
922 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(q=0;512>q;q++)u.codes[q]=B[q];for(q=0;32>q;q++)u.codes[q+512]=x[q];u.lenbits=9;u.distbits=5;
923 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
924 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=C(e,5)+257;w(e,5);d.ndist=C(e,5)+1;w(e,5);d.ncode=C(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=C(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
925 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}q=d.lens[d.have-1];u=3+C(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);q=0;u=3+C(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);q=0;u=11+C(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
926 +"invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=q}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var F=K=q=void 0,Y=void 0,L=void 0,
927 +ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,q=u.state,K=u.input_data,F=u.next_in,Y=F+u.avail_in-5,L=u.next_out,ea=L-(k-u.avail_out),V=L+(u.avail_out-257),J=q.wsize,aa=q.whave,ba=q.wnext,W=q.window,I=q.hold,G=q.bits,S=q.codes,Z=q.lencode,ca=q.distcode,fa=(1<<q.lenbits)-1,ga=(1<<q.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
928 +G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)u.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
929 +q.sane){u.msg="invalid distance too far back";q.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)u.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);u.output_data+=u.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),X-=3;X&&(u.output_data+=u.output_data.charAt(U++),
930 +1<X&&(u.output_data+=u.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{u.msg="invalid distance code";q.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?q.mode=11:(u.msg="invalid literal/length code",q.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;u.next_in=F;u.next_out=L;u.avail_in=F<Y?5+(Y-F):5-(F-Y);u.avail_out=L<V?257+(V-L):257-(L-V);q.hold=I;q.bits=G;n(a,e);11==d.mode&&(d.back=-1);
931 +break}for(d.back=0;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(u.op&&0==(u.op&240)){for(q=u;;){u=d.codes[d.lencode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
932 +d.length+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+C(e,d.distbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(0==(u.op&240)){for(q=u;;){u=d.codes[d.distcode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
933 +d.offset+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,q=d.wsize-u):q=d.wnext-u;K=-1;u>d.length&&(u=d.length)}else q=-1,K=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=q)a.output_data+=d.window.substring(q,q+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(K++);while(--u)}0==
934 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
935 +d.mode=29;break}p(e)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
936 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
937 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
938 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
939 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
940 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
941 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;a%=65521;n%=65521}return a|n<<16}function c(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b[c],65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),
942 a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b[c++],n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=
943 -a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,g,v){return"string"===typeof d?b(a,d,g,v):c(a,d,g,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
943 +a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,e,v){return"string"===typeof d?b(a,d,e,v):c(a,d,e,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
944 65521);131042<=v&&(v-=131042);65521<=v&&(v-=65521);return c|v<<16}})();"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-crc32.js");
945 (function(){function b(a,b){var c,n=0;for(c=0;b;)b&1&&(c^=a[n]),b>>=1,n++;return c}function c(a,c){var v;for(v=0;32>v;v++)a[v]=b(c,c[v])}var a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,
946 3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,
@@ -949,32 +949,32 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
949 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
950 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
951 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
952 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,g,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^g}})();
953 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),g=b.webkitRequestFileSystem,v=b.requestFileSystem||g||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
954 -b.chrome?c():setTimeout(c,500)},q=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(g){n(g)}}},e=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},C=function(n,m,k){k||(n=e(n));var h=this;k=n.type;var r=!1,w,B,x=function(){q(h,["writestart","progress","write","writeend"])},A=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
955 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(r||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},y=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},z;h.readyState=h.INIT;m||(m="download");if(a)w=
956 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(z=n.slice||n.webkitSlice,n=z.call(n,0,n.size,"application/octet-stream"),r=!0);g&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||g)B=b;v?(l+=n.size,v(b.TEMPORARY,l,y(function(a){a.root.getDirectory("saved",C,y(function(a){var b=function(){a.getFile(m,C,y(function(a){a.createWriter(y(function(b){b.onwriteend=
957 -function(b){B.location.href=a.toURL();h.readyState=h.DONE;q(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&A()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),A)}),A)};a.getFile(m,{create:!1},y(function(a){a.remove();b()}),y(function(a){a.code===a.NOT_FOUND_ERR?b():A()}))}),A)}),A)):A()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
958 -b,c){c||(a=e(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
952 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,r;if(0>=v)return a;p=Array(32);r=Array(32);r[0]=3988292384;for(n=l=1;32>n;n++)r[n]=l,l<<=1;c(p,r);c(r,p);do{c(p,r);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(r,p);v&1&&(a=b(r,a));v>>=1}while(0!=v);return a^e}})();
953 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
954 +b.chrome?c():setTimeout(c,500)},r=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(g){n(g)}}},g=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},C=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){r(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
955 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
956 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",C,A(function(a){var b=function(){a.getFile(m,C,A(function(a){a.createWriter(A(function(b){b.onwriteend=
957 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;r(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
958 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;r(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
959 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
960 -var version="0.9.3",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
960 +var version="0.9.7",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
961 null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Loading ...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetAuth NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
962 StatusStrs=["Disconnected","\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 ...","\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c...","\u0421\u0432\u044f\u0437\u0430\u043d\u044b"],t,t2,rsepass=null;
963 -function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
964 -applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
965 -haltEvent,!1);document.addEventListener("dragleave",haltEvent,!1);document.addEventListener("drop",documentFileSelectHandler,!1);Q("p16").addEventListener("dragover",haltEvent,!1);Q("p16").addEventListener("dragleave",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",
966 -p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
963 +function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(23).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
964 +urlvars.kvmenc&&(c=parseInt(urlvars.kvmenc),"number"==typeof c&&(desktopsettings.encflags=c));urlvars.kvmdec&&(c=parseInt(urlvars.kvmdec),"number"==typeof c&&(desktopsettings.decimationMode=c));applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(34).value=terminalEmulations[terminal.m.terminalEmulation];Q(31).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",
965 +haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);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",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);
966 +document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
967 function documentFileSelectHandler(b){haltEvent(b);for(var c=!0,a=0;a<b.dataTransfer.files.length;a++)0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".img")&&0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".iso")&&(c=!1);1==c&&null!=b.dataTransfer&&0<currentView&&100>currentView&&(1==b.dataTransfer.files.length||2==b.dataTransfer.files.length)?(a=c=null,b.dataTransfer.files[0].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[0]),b.dataTransfer.files[0].name.toLowerCase().endsWith(".img")&&
968 (c=b.dataTransfer.files[0]),2==b.dataTransfer.files.length&&(b.dataTransfer.files[1].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[1]),b.dataTransfer.files[1].name.toLowerCase().endsWith(".img")&&(c=b.dataTransfer.files[1])),null==c&&null==a||iderStart3(c,a,1)):null!=b.dataTransfer&&1==b.dataTransfer.files.length&&(c=b.dataTransfer.files[0].name.toLowerCase(),21==currentView&&UploadToStorage(b.dataTransfer.files[0],c))}
969 function connectButtonfunction(){wsstack&&0!=wsstack.socketState?disconnect():meshcentral2credCallback()}function connectButtonfunctionEx(){currentMeshNode=parent.getCurrentNode();connect(currentMeshNode._id,16992,null,null,0);Q("xconnectbutton1").value="\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c"}function getCurrentMeshNode(){return currentMeshNode}function setConnectionState(b){QE("xconnectbutton1",b);0==b&&disconnect()}function setFrameHeight(b){}
970 function setAuthCallback(b){meshcentral2credCallback=b}function setUrlVar(b,c){urlvars||(urlvars={});urlvars[b]=c}function cleanup(){c3.value="\u041d\u0430\u0447\u0430\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0442";terminal.m.capture&&delete terminal.m.capture;terminal.Stop();desktop.disconnectCode=0;desktop.Stop()}
971 -function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
972 -function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
973 -function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
974 -function connect(b,c,a,d,g,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,g);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(28,"");QH(39,"");amtversion=amtversionmin=amtFirstPull=
975 -0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(21,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(49,"");
976 -QH(50,LoadingHtml);xxCertificates=null;QH(51,LoadingHtml);QH(24,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(52,LoadingHtml);QH(54,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
977 -!1;QH(53,LoadingHtml);QE(43,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(48,!1),Q(48).checked=!0);QE(44,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
971 +function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
972 +function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
973 +function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
974 +function connect(b,c,a,d,e,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,e);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(29,"");QH(40,"");amtversion=amtversionmin=amtFirstPull=
975 +0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(22,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(50,"");
976 +QH(51,LoadingHtml);xxCertificates=null;QH(52,LoadingHtml);QH(25,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(53,LoadingHtml);QH(55,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
977 +!1;QH(54,LoadingHtml);QE(44,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(49,!1),Q(49).checked=!0);QE(45,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
978 function disconnect(){null!=desktopPollTimer&&(clearInterval(desktopPollTimer),desktopPollTimer=null);fullscreen&&deskToggleFull();iderStop();StopDefenseStatsTimer();dialogclose(0);amtstack&&(amtstack.onProcessChanged=null,amtstack.CancelAllQueries(999),amtstack=null);cleanup();wsstack=null;delete amtstack;onProcessChanged(0,1);go(101);Q("xconnectbutton1").value="Connect";QH(5,"Disconnected");go(100)}
979 function onProcessChanged(b,c){QS(3).width=100*b/c+"%";0==b&&refreshButtons(!0);0==b&&amtstack&&(0<amtversion&&0==(amtFirstPull&64)?(amtFirstPull|=64,PullPowerPolicy(),subscriptionsFilters=null,PullEventSubscriptions(),PullWatchdog(),5<amtversion&&(PullCertificates(),PullRemoteAccess())):0==(amtFirstPull&1)?PullHardware():0==(amtFirstPull&16)?PullEventLog():0==(amtFirstPull&32)&&PullAuditLog())}
980 function checkAmtVersion(b){var c=b.split(".");b=parseInt(c[0]);var a=parseInt(c[1]),c=parseInt(c[2]),c=1E3*a+c,d=0;5>=b||12<=b?d=1:6==b&&2061<=c?d=1:7==b&&1091<=c?d=1:8==b&&1071<=c?d=1:9==b?5>a&&1041<=c?d=1:5061<=c&&(d=1):10==b&&55<=c?d=1:11==b&&(5>a&&25<=c?d=1:6027<=c&&(d=1));return 0==d}
@@ -983,47 +983,48 @@ function processSystemVersion(b,c,a,d){if(200==d||400==d){if(200==d){amtlogicale
983 1==urlvars.sol&&(go(13),connectTerminal())}else errcheck(d,b)}var refreshButtonsState=!0;function refreshButtons(b){if(refreshButtonsState!=b){refreshButtonsState=b;for(var c=0,a=document.getElementsByTagName("input");c<a.length;c++)"refreshbtn"==a[c].name&&(a[c].disabled=!b)}}
984 function PullPowerState(){amtstack&&0==amtstack.GetPendingActions()&&amtsysstate&&amtsysstate.CIM_ServiceAvailableToElement&&amtstack.Enum("CIM_ServiceAvailableToElement",function(b,c,a,d){200==d&&(amtsysstate.CIM_ServiceAvailableToElement.responses=a,9<amtversion&&null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?
985 amtstack.Get("IPS_PowerManagementService",function(a,b,c,d){200==d&&(amtsysstate.IPS_PowerManagementService.response=c.Body,updateSystemStatus())}):updateSystemStatus())})}
986 -function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c=["CIM_ServiceAvailableToElement","*AMT_GeneralSettings","AMT_EthernetPortSettings","*AMT_RedirectionService","CIM_ElementSettingData"];5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");15<amtversion&&1==amtstack.wsman.comm.xtls&&
987 -c.push("*CIM_BootService");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
986 +function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c="CIM_ServiceAvailableToElement *AMT_GeneralSettings AMT_EthernetPortSettings *AMT_RedirectionService CIM_ElementSettingData *AMT_BootCapabilities".split(" ");5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");
987 +15<amtversion&&c.push("*CIM_BootService");2<amtversion&&c.push("*AMT_8021XProfile");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
988 function processSystemStatus(b,c,a,d){if(void 0==a.IPS_ScreenConfigurationService||400==a.IPS_ScreenConfigurationService.status)a.IPS_ScreenConfigurationService=null;if(void 0==a.IPS_KVMRedirectionSettingData||400==a.IPS_KVMRedirectionSettingData.status)a.IPS_KVMRedirectionSettingData=null;if(void 0==a.CIM_KVMRedirectionSAP||400==a.CIM_KVMRedirectionSAP.status)a.CIM_KVMRedirectionSAP=null;if(void 0==a.IPS_OptInService||400==a.IPS_OptInService.status)a.IPS_OptInService=null;void 0!=a.AMT_RedirectionService&&
989 -200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var g in a)null!=a[g]&&a[g].status>d&&(d=a[g].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}
989 +200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var e in a)null!=a[e]&&a[e].status>d&&(d=a[e].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}
990 function syncClock(){xxdialogMode||setDialogMode(11,"\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0430\u0441\u044b",3,syncClockEx,"\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0430\u0441\u044b Intel AMT \u0441 \u044d\u0442\u0438\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c?")}
991 function syncClockEx(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(b,c,a,d){200!=d?messagebox("","\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u0441\u0442\u0430\u0442\u0443\u0441 ="+d):0!=a.Body.ReturnValue?messagebox("","\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u043e\u0448\u0438\u0431\u043a\u0430: "+
992 a.Body.ReturnValueStr):(b=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(a.Body.Ta0,b,b,function(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}))})}var DMTFPowerStates=";;\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c;\u041b\u0435\u0433\u043a\u0438\u0439 \u0441\u043e\u043d;\u0413\u043b\u0443\u0431\u043e\u043a\u0438\u0439 \u0441\u043e\u043d;\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f;\u0412\u044b\u043a\u043b - \u0416\u0435\u0441\u0442\u043a\u0438\u0439;Hibernate (Off soft);Soft off;\u0426\u0438\u043a\u043b \u043f\u0438\u0442\u0430\u043d\u0438\u044f (Off-Hard);\u0421\u0431\u0440\u043e\u0441 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0448\u0438\u043d\u044b;\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 (NMI);\u041d\u0435\u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u0439;Off - \u043c\u044f\u0433\u043a\u0430\u044f \u0438\u0437\u044f\u0449\u043d\u0430\u044f;Off - \u0416\u0435\u0441\u0442\u043a\u0438\u0439 \u0438\u0437\u044f\u0449\u043d\u044b\u0439;\u041c\u0430\u0441\u0442\u0435\u0440 \u0430\u0432\u0442\u043e\u0431\u0443\u0441 \u0441\u0431\u0440\u043e\u0441\u0438\u043b \u0438\u0437\u044f\u0449\u043d\u044b\u0439;\u0421\u0438\u043b\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b (\u0412\u044b\u043a\u043b. - \u041c\u044f\u0433\u043a\u0438\u0439 \u0438\u0437\u044f\u0449\u043d\u044b\u0439);\u0421\u0438\u043b\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b (\u0412\u044b\u043a\u043b. - \u0416\u0435\u0441\u0442\u043a\u0438\u0439 \u0438\u0437\u044f\u0449\u043d\u044b\u0439);\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 (INIT)".split(";");
993 -function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),g="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c"==
994 -n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439",", \u041e\u0442 \u0431\u0430\u0442\u0430\u0440\u0435\u0438"][v.PowerSource]);d+=TableEntry("\u0421\u0438\u043b\u0430",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;
993 +function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c"==
994 +n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(29,n),QH(40,n));v.PowerSource&&(n+=[", \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439",", \u041e\u0442 \u0431\u0430\u0442\u0430\u0440\u0435\u0438"][v.PowerSource]);d+=TableEntry("\u0421\u0438\u043b\u0430",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;
995 null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>\u041d\u0438\u043a\u0442\u043e</i>":EscapeHtml(c);d+=TableEntry("\u0418\u043c\u044f \u0438 \u0434\u043e\u043c\u0435\u043d",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?d+=TableEntry("\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u044b",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u044b",
996 guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 (ACM)",
997 4==l.ProvisioningMode&&(n=" \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c (CCM)",b=9));d+=TableEntry("Intel&reg; ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&
998 -(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),e=amtfeatures[3]=void 0;
999 -5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),e=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(g+="\u041f\u043e\u0440\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f");q&&(g+=", \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c");
1000 -n&&(g+=", IDE-Redirect");e&&(g+=", \u041a\u0432\u043c");""==g&&(g=" \u041d\u0438\u043a\u0442\u043e");d+=TableEntry("\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438",addLinkConditional(g.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,g="\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439",
1001 -7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(g=["\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439","\u0412\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439","3-\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439"][n.DefaultScreen]),g='<span title="'+format("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: {0}",
1002 -g.toLowerCase())+'">'+g+"</span>",1==n.Is5900PortEnabled&&(g+="\u041f\u043e\u0440\u0442 5900 \u0432\u043a\u043b\u044e\u0447\u0435\u043d"),1==n.OptInPolicy&&(g+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438":"\u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0431\u043e\u0440")),g+=","+n.SessionTimeout+" \u043c\u0438\u043d\u0443\u0442"+(0<n.SessionTimeout?"s":"")+" \u0442\u0430\u0439\u043c-\u0430\u0443\u0442 \u0441\u0435\u0430\u043d\u0441\u0430",
1003 -9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(g+="\u0414\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0433\u0430\u0448\u0435\u043d\u0438\u0435"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b",addLinkConditional(g,"showDesktopSettingsDlg()",
1004 -xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!e);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(g="\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(g="\u041d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f"),
1005 -1==p&&(g="\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f KVM"),4294967295==p&&(g="\u0412\u0441\u0435\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(g=addLinkConditional(g,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",
1006 -g));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(g={0:"\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439",1:"\u0414\u0440\u0443\u0433\u043e\u0439",2:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e",3:"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",4:"\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435",5:"\u041d\u0435\u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u0439",6:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u043d\u043e \u0432 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435",
1007 -7:"\u0412 \u0442\u0435\u0441\u0442\u0435",8:"\u041e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439",9:"\u0417\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435",10:"\u043d\u0430\u0447\u0430\u043b\u043e",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(g[32768]="OCR & RPE Disabled",g[32769]="OCR Enabled, RPE Disabled"),n=g[amtsysstate.CIM_BootService.response.EnabledState]?g[amtsysstate.CIM_BootService.response.EnabledState]:
1008 -"\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)if(g[C].SettingData&&1==g[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==g[C].SettingData.ReferenceParameters.ResourceURI)for(p=g[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,
1009 -q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("\u042d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430",addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),
1010 -"syncClock()",xxAccountAdminName)));g=AddRefreshButton("PullSystemStatus()")+" ";g+=AddButton("\u0421\u0438\u043b\u043e\u0432\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f ...","showPowerActionDlg()")+" ";g+=AddButton("\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435...","saveEntireAmtState()")+" ";d+=TableEnd(g);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
1011 -QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0441\u0435\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u0442\u0430\u043d\u0435\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439.");
1012 -d=d+"<br><h2>\u043e\u0431\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438</h2>"+TableStart();g="";"<i>\u041d\u0438\u043a\u0442\u043e</i>"!=c&&(1==v.SharedFQDN&&(g=", \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u0441 \u041e\u0421"),0==v.SharedFQDN&&(g="\u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u041e\u0421"));d+=TableEntry("\u0418\u043c\u044f \u0438 \u0434\u043e\u043c\u0435\u043d",addLinkConditional(c+g,"showEditNameDlg(1)",xxAccountAdminName));
998 +(QV(28,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(39,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,r=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;
999 +5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(e+="\u041f\u043e\u0440\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f");r&&(e+=", \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c");
1000 +n&&(e+=", IDE-Redirect");g&&(e+=", \u041a\u0432\u043c");""==e&&(e=" \u041d\u0438\u043a\u0442\u043e");d+=TableEntry("\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439",
1001 +7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439","\u0412\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439","3-\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439"][n.DefaultScreen]),e='<span title="'+format("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: {0}",
1002 +e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+="\u041f\u043e\u0440\u0442 5900 \u0432\u043a\u043b\u044e\u0447\u0435\u043d"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438":"\u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0431\u043e\u0440")),e+=","+n.SessionTimeout+" \u043c\u0438\u043d\u0443\u0442"+(0<n.SessionTimeout?"s":"")+" \u0442\u0430\u0439\u043c-\u0430\u0443\u0442 \u0441\u0435\u0430\u043d\u0441\u0430",
1003 +9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+="\u0414\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0433\u0430\u0448\u0435\u043d\u0438\u0435"),QV(46,n),Q(47).checked=!1):QV(46,!1),d+=TableEntry("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b",addLinkConditional(e,"showDesktopSettingsDlg()",
1004 +xxAccountAdminName)));QV(26,!p||!r);QV(27,xxAccountAdminName);QV(37,!p||!g);QV(38,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(e="\u041d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f"),
1005 +1==p&&(e="\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f KVM"),4294967295==p&&(e="\u0412\u0441\u0435\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",
1006 +e));null!=amtsysstate.AMT_BootCapabilities.response.PlatformErase&&0<amtsysstate.AMT_BootCapabilities.response.PlatformErase&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439",1:"\u0414\u0440\u0443\u0433\u043e\u0439",2:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e",3:"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",4:"\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435",
1007 +5:"\u041d\u0435\u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u0439",6:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u043d\u043e \u0432 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435",7:"\u0412 \u0442\u0435\u0441\u0442\u0435",8:"\u041e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439",9:"\u0417\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435",10:"\u043d\u0430\u0447\u0430\u043b\u043e",32768:"OCR Disabled",32769:"OCR Enabled",
1008 +32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:"\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,
1009 +C=0;C<e.length;C++)if(e[C].SettingData&&1==e[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[C].SettingData.ReferenceParameters.ResourceURI)for(p=e[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,r=0;r<AmtSystemPowerSchemes.length;r++)AmtSystemPowerSchemes[r].SchemeGUID==p&&(d+=TableEntry("\u042d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430",addLinkConditional(AmtSystemPowerSchemes[r].Description.split(":")[1],
1010 +'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("\u0421\u0438\u043b\u043e\u0432\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f ...","showPowerActionDlg()")+" ";e+=AddButton("\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435...",
1011 +"saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0441\u0435\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u0442\u0430\u043d\u0435\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439.");
1012 +d=d+"<br><h2>\u043e\u0431\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438</h2>"+TableStart();e="";"<i>\u041d\u0438\u043a\u0442\u043e</i>"!=c&&(1==v.SharedFQDN&&(e=", \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u0441 \u041e\u0421"),0==v.SharedFQDN&&(e="\u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u041e\u0421"));d+=TableEntry("\u0418\u043c\u044f \u0438 \u0434\u043e\u043c\u0435\u043d",addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));
1013 c="\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e";1==v.DDNSUpdateEnabled?c="\u0412\u043a\u043b\u044e\u0447\u0435\u043d \u043a\u0430\u0436\u0434\u044b\u0439"+v.DDNSPeriodicUpdateInterval+" \u043c\u0438\u043d\u0443\u0442, TTL"+v.DDNSTTL+" \u043c\u0438\u043d\u0443\u0442":1==v.DDNSUpdateByDHCPServerEnabled&&(c="\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 DHCP-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c");d+=TableEntry("\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 DNS",
1014 addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"\u0411\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441":"\u041f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441")+
1015 -"</h2>";d+=TableStart();d+=TableEntry("\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0441\u044b\u043b\u043a\u0438",1==c.LinkIsUp?"\u0421\u0441\u044b\u043b\u043a\u0430 \u0432\u0432\u0435\u0440\u0445":"\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);g=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&g.push("S0 / AC"),14==c.LinkPolicy[C]&&g.push("Sx / AC"),16==c.LinkPolicy[C]&&g.push("S0 / DC"),
1016 -224==c.LinkPolicy[C]&&g.push("Sx / DC");0==g.length&&g.push("");d+=TableEntry("\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0441\u0441\u044b\u043b\u043e\u043a",addLinkConditional(0==g.length?"\u041d\u0435\u0442 \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438":"\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432: "+g.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("MAC-\u0430\u0434\u0440\u0435\u0441",c.MACAddress));amtwirelessif==
1015 +"</h2>";d+=TableStart();d+=TableEntry("\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0441\u044b\u043b\u043a\u0438",1==c.LinkIsUp?"\u0421\u0441\u044b\u043b\u043a\u0430 \u0432\u0432\u0435\u0440\u0445":"\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);e=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&e.push("S0 / AC"),14==c.LinkPolicy[C]&&e.push("Sx / AC"),16==c.LinkPolicy[C]&&e.push("S0 / DC"),
1016 +224==c.LinkPolicy[C]&&e.push("Sx / DC");0==e.length&&e.push("");d+=TableEntry("\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0441\u0441\u044b\u043b\u043e\u043a",addLinkConditional(0==e.length?"\u041d\u0435\u0442 \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438":"\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432: "+e.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("MAC-\u0430\u0434\u0440\u0435\u0441",c.MACAddress));amtwirelessif==
1017 a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("\u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("\u0420\u0430\u0434\u0438\u043e \u0413\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u043e",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+
1018 ", SSID: "+(s?s:"<i>\u041d\u0438\u043a\u0442\u043e</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e":"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",
1019 -"showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e":"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",
1020 -"showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("\u041e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u043f\u0438\u043d\u0433",addLinkConditional(["\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e","ICMP-\u043e\u0442\u0432\u0435\u0442","\u041e\u0442\u0432\u0435\u0442 RMCP","ICMP \u0438 RMCP \u043e\u0442\u0432\u0435\u0442"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",
1021 -xxAccountAdminName)),g=1==c.DHCPEnabled?"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c DHCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430":"\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 IP-\u0430\u0434\u0440\u0435\u0441",1==c.IpSyncEnabled&&(g+=", IP sync with OS"),d+=TableEntry("\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 IPv4",addLinkConditional(g,
1022 -"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("\u0410\u0434\u0440\u0435\u0441 IPv4",isIpAddress(c.IPAddress,"\u041d\u0438\u043a\u0442\u043e"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("\u0428\u043b\u044e\u0437 / \u043c\u0430\u0441\u043a\u0430 IPv4",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"\u041d\u0438\u043a\u0442\u043e")));g=c.PrimaryDNS;isIpAddress(g)&&(c.SecondaryDNS&&(g+=" / "+c.SecondaryDNS),d+=TableEntry("\u0421\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u043d IPv4",
1023 -g));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",w,g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)g[C].SettingData&&g[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==g[C].IsCurrent);1==w&&(p=(g=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?
1019 +"showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e":
1020 +"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("\u041e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u043f\u0438\u043d\u0433",addLinkConditional(["\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e","ICMP-\u043e\u0442\u0432\u0435\u0442","\u041e\u0442\u0432\u0435\u0442 RMCP","ICMP \u0438 RMCP \u043e\u0442\u0432\u0435\u0442"][v.PingResponseEnabled+
1021 +(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-FAST/TLS".split(" "),p="\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",amtsysstate.AMT_8021XProfile.responses.Body.Enabled&&(p="\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e,"+e[amtsysstate.AMT_8021XProfile.responses.Body.AuthenticationProtocol]),d+=TableEntry("802.1x",addLinkConditional(p,"editNetAuthProfile()",xxAccountAdminName)),
1022 +e=1==c.DHCPEnabled?"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c DHCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430":"\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 IP-\u0430\u0434\u0440\u0435\u0441",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 IPv4",addLinkConditional(e,"showIPSetupDlg()",
1023 +xxAccountAdminName)));d+=TableEntry("\u0410\u0434\u0440\u0435\u0441 IPv4",isIpAddress(c.IPAddress,"\u041d\u0438\u043a\u0442\u043e"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("\u0428\u043b\u044e\u0437 / \u043c\u0430\u0441\u043a\u0430 IPv4",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"\u041d\u0438\u043a\u0442\u043e")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("\u0421\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u043d IPv4",
1024 +e));if(5<amtversion&&200==amtsysstate.IPS_IPv6PortSettings.status){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",w,e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)e[C].SettingData&&e[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[C].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?
1025 "\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438 \u0440\u0443\u0447\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430":"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u0430");d+=TableEntry("\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 IPv6",addLinkConditional(p,
1026 "showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("\u0410\u0434\u0440\u0435\u0441 IPv6",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("\u0410\u0434\u0440\u0435\u0441 IPv6","\u041d\u0438\u043a\u0442\u043e");
1026 -isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e IPv6",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(g=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(g+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("\u0421\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u043d IPv6",g))}}d+=TableEnd()}}1!=
1027 +isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e IPv6",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("\u0421\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u043d IPv6",e))}}d+=TableEnd()}}1!=
1028 urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
1029 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
1030 "")+">Available in S0/DC - Powered on & on battery</label><br>";a+="<label><input type=checkbox id=d11p4 value=224 "+(0<=c.LinkPolicy.indexOf(224)?"checked":"")+">Available in Sx/DC - Sleeping & on battery</label><br>";setDialogMode(11,"\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0441\u0441\u044b\u043b\u043e\u043a",3,showLinkPolicyDlgEx,a,b)}}
@@ -1033,17 +1034,17 @@ function showAuthCsme(){if(!xxdialogMode){var b;b="<div style=margin-top:8px>Int
1034 for(var c in amtstack.amtauth.Certificates){var a=amtstack.amtauth.Certificates[c];b+="<tr><td style=width:32px;vertical-align:top><img src=images-commander/cert1.png height=32 width=32 />";b+="<td style=padding-bottom:6px><b>"+EscapeHtml(a.subject.getField("CN").value)+(!0===a.xTrusted?", <span style=color:#080>\u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0439</span>":"")+"</b><br />";a.subject.getField("OU")&&(b+=EscapeHtml(a.subject.getField("OU").value)+"<br />");b+=amtstack.amtauth.CertificatesDer[c].length+
1035 " \u0431\u0430\u0439\u0442,<a style=cursor:pointer;color:blue onclick=downloadAuthCert("+c+")>\u0421\u043a\u0430\u0447\u0430\u0442\u044c</a>";a.xCrl&&(b+="<br />CRL "+a.xCrl.length+" \u0431\u0430\u0439\u0442,<a style=cursor:pointer;color:blue onclick=downloadCertCrl("+c+")>\u0421\u043a\u0430\u0447\u0430\u0442\u044c</a>")}setDialogMode(11,"Authentic CSME",1,null,b+"</table><div>")}}
1036 function downloadCertCrl(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.Certificates[b].xCrl),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".crl")}function downloadAuthCert(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.CertificatesDer[b]),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".cer")}var IntelAmtEntireState,IntelAmtEntireStateCalls;
1036 -function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c30.value="amtstate"+b+".json";setDialogMode(19,"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 Intel&reg; AMT",
1037 +function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c55.value="amtstate"+b+".json";setDialogMode(19,"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 Intel&reg; AMT",
1038 3,saveEntireAmtStateOk)}}
1038 -function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(60,"Fetching entire state, please wait...");setDialogMode(1,"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 Intel&reg; AMT",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);
1039 +function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(61,"Fetching entire state, please wait...");setDialogMode(1,"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 Intel&reg; AMT",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);
1040 amtstack.GetMessageLog(saveEntireAmtStateOk4)}function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}
1040 -function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c30.value))}
1041 +function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c55.value))}
1042 function showDesktopSettingsDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_KVMRedirectionSettingData.response,c;c="<div style=text-align:left><div style=height:26px;margin-top:4px><select id=subddisplay style=float:right;width:200px><option value=0>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439</option><option value=1>\u0412\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439</option>";9<amtversion&&(c+="<option value=2>3-\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439</option>");
1043 c+='</select><div style=padding-top:4px>\u0414\u0438\u0441\u043f\u043b\u0435\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e</div></div><div style=height:26px;margin-top:4px><input id=subsessiontimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>\u0422\u0430\u0439\u043c-\u0430\u0443\u0442 \u0441\u0435\u0430\u043d\u0441\u0430 (\u043c\u0438\u043d\u0443\u0442\u044b)</div></div>';1==b.OptInPolicy&&(c+='<div style=height:26px;margin-top:4px><input id=suboptintimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>\u0422\u0430\u0439\u043c-\u0430\u0443\u0442 (\u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445)</div></div>');
1044 c+="<div style=height:26px;margin-top:4px><select id=subdlegacy style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f</option><option value=1>\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e, Legacy KVM \u0437\u0440\u0438\u0442\u0435\u043b\u0435\u0439</option></select><div style=padding-top:4px>\u041f\u043e\u0440\u0442 5900</div></div>";
1045 c+="<div style=height:26px;margin-top:4px id=subspassx><input id=subspass type=password autocomplete=off style=float:right;width:200px maxlength=8 onkeyup=showDesktopSettingsDlgUpdate()><div style=padding-top:4px>5900 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 (8 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432)</div></div>";9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(c+='<div style=height:26px;margin-top:4px><select id=subsb style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e</option><option value=1>\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e</option></select><div style=padding-top:4px title="\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0435 \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f">\u0413\u0430\u0448\u0435\u043d\u0438\u0435 \u044d\u043a\u0440\u0430\u043d\u0430</div></div>');
1046 c+="</div>";setDialogMode(11,"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430",3,showDesktopSettingsDlgOk,c);Q("subddisplay").value=b.DefaultScreen;Q("subsessiontimeout").value=b.SessionTimeout;1==b.OptInPolicy&&(Q("suboptintimeout").value=b.OptInPolicyTimeout);Q("subdlegacy").value=1==b.Is5900PortEnabled?1:0;9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&
1046 -(Q("subsb").value=amtsysstate.IPS_ScreenConfigurationService.response.EnabledState);showDesktopSettingsDlgUpdate()}}function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c54",b)}
1047 +(Q("subsb").value=amtsysstate.IPS_ScreenConfigurationService.response.EnabledState);showDesktopSettingsDlgUpdate()}}function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c106",b)}
1048 function showDesktopSettingsDlgOk(){var b=Clone(amtsysstate.IPS_KVMRedirectionSettingData.response);b.DefaultScreen=Q("subddisplay").value;b.SessionTimeout=Q("subsessiontimeout").value;b.Is5900PortEnabled=1==Q("subdlegacy").value;1==b.OptInPolicy&&(b.OptInPolicyTimeout=Q("suboptintimeout").value);1==b.Is5900PortEnabled&&(b.RFBPassword=Q("subspass").value);amtstack.Put("IPS_KVMRedirectionSettingData",b,showDesktopSettingsDlgOk2);b=Clone(amtsysstate.IPS_ScreenConfigurationService.response);b.EnabledState=
1049 parseInt(Q("subsb").value);amtstack.Put("IPS_ScreenConfigurationService",b,showDesktopSettingsDlgOk3)}
1050 function showDesktopSettingsDlgOk2(b,c,a,d){200==d?PullSystemStatus():messagebox("\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430",format("\u041e\u0448\u0438\u0431\u043a\u0430 {0}, \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.",d))}
@@ -1051,19 +1052,19 @@ function showDesktopSettingsDlgOk3(b,c,a,d){200!=d?messagebox("\u043e\u0448\u043
1052 d)):amtstack.Get("IPS_ScreenConfigurationService",function(a,b,c,d){200==d&&(amtsysstate.IPS_ScreenConfigurationService.response=c.Body,updateSystemStatus())},0,1)}function PullEventLog(b){1==b&&xxdialogMode||(amtFirstPull|=16,amtstack.Enum("AMT_MessageLog",processMessageLog0),amtstack.GetMessageLog(processMessageLog1))}var processMessageLog0responses=null;
1053 function processMessageLog0(b,c,a,d){200==d&&(d&&QV("go6",!0),a&&(processMessageLog0responses=a),b="",c="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>",null!=processMessageLog0responses&&(b=1==processMessageLog0responses[0].IsFrozen?AddButton("\u0420\u0430\u0437\u043c\u043e\u0440\u043e\u0437\u0438\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b","FreezeLog(0)"):AddButton("Freeze Log","FreezeLog(1)")),c+=TableEnd('<div style=float:right><input id=eventFilter placeholder="\u0424\u0438\u043b\u044c\u0442\u0440" style=margin:4px onkeyup=eventFilter()>&nbsp;</div><div>&nbsp;'+
1054 AddRefreshButton("PullEventLog(1)")+AddButton("\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b","ClearLog()")+AddButton("\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c...","SaveEventLog()")+b),QH(17,c+"<br>"))}function SaveEventLog(){xxdialogMode||null==eventmessages||SaveJsonFile("IntelAmtEventlog","events","Intel AMT Event Log",eventmessages)}var eventmessages=null;
1054 -function processMessageLog1(b,c){eventmessages=c;var a,d=0,g;g="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a</b><td class=r1><b>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&
1055 -(v=3);g+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}g+=TableEnd(0==
1056 -d?"&nbsp;":"");QH(18,g+"<br>");processMessageLog0()}function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}
1057 -function ClearLog(b){xxdialogMode||(QH(60,"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439?"),setDialogMode(1,"\u0416\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439",3,ClearLogEx))}
1055 +function processMessageLog1(b,c){eventmessages=c;var a,d=0,e;e="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a</b><td class=r1><b>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&
1056 +(v=3);e+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}e+=TableEnd(0==
1057 +d?"&nbsp;":"");QH(18,e+"<br>");processMessageLog0()}function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}
1058 +function ClearLog(b){xxdialogMode||(QH(61,"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439?"),setDialogMode(1,"\u0416\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439",3,ClearLogEx))}
1059 function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("\u0416\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439","\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c, \u043e\u0448\u0438\u0431\u043a\u0430: "+d):PullEventLog()})}
1060 function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("\u0412\u0440\u0435\u043c\u044f",c.Time.toLocaleString());a+=addHtmlValue("\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",c.Desc);a+=MoreStart();a+=addHtmlValue("\u0410\u0434\u0440\u0435\u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430",c.DeviceAddress);a+=addHtmlValue("\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c",
1060 -c.Entity);a+=addHtmlValue("\u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438",c.EntityInstance);var d="",g;for(g in c.EventData)0<d.length&&(d+=","),d+=c.EventData[g];a+=addHtmlValue("\u0414\u0430\u043d\u043d\u044b\u0435",d);a+=addHtmlValue("\u043e\u0444\u0441\u0435\u0442",c.EventOffset);a+=addHtmlValue("\u0422\u0438\u043f \u0434\u0430\u0442\u0447\u0438\u043a\u0430",c.EventSensorType);a+=addHtmlValue("\u0421\u0442\u0440\u043e\u0433\u043e\u0441\u0442\u044c",
1061 +c.Entity);a+=addHtmlValue("\u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438",c.EntityInstance);var d="",e;for(e in c.EventData)0<d.length&&(d+=","),d+=c.EventData[e];a+=addHtmlValue("\u0414\u0430\u043d\u043d\u044b\u0435",d);a+=addHtmlValue("\u043e\u0444\u0441\u0435\u0442",c.EventOffset);a+=addHtmlValue("\u0422\u0438\u043f \u0434\u0430\u0442\u0447\u0438\u043a\u0430",c.EventSensorType);a+=addHtmlValue("\u0421\u0442\u0440\u043e\u0433\u043e\u0441\u0442\u044c",
1062 c.EventSeverity);a+=addHtmlValue("\u0422\u0438\u043f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430",c.EventSourceType);a+=addHtmlValue("\u0422\u0438\u043f",c.EventType);a+=addHtmlValue("\u041d\u043e\u043c\u0435\u0440 \u0434\u0430\u0442\u0447\u0438\u043a\u0430",c.SensorNumber);a+=MoreEnd();a+="</div>";messagebox(format("\u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u2116 {0} \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438",b+1),a)}}
1063 function eventFilter(){var b=Q("eventFilter").value.toLowerCase(),c;for(c in eventmessages)QV("xamtevent"+c,""==b||0<=eventmessages[c].Desc.toLowerCase().indexOf(b)||0<=eventmessages[c].EntityStr.toLowerCase().indexOf(b))}var subscriptionsFilters=null,subscriptionsListeners=null;
1064 function PullEventSubscriptions(){null==subscriptionsFilters&&amtstack.Enum("CIM_FilterCollection",processEventSubscriptions0);amtstack.BatchEnum(null,["CIM_ListenerDestination","CIM_FilterCollectionSubscription"],processEventSubscriptions1)}function processEventSubscriptions0(b,c,a,d){408!=d&&400!=d&&(d&&errcheck(d,b)||(subscriptionsFilters=a))}
1064 -function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0430\u043c\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439.<br><br>";for(var g in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[g].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)",
1065 -"&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[g],b+='<div class=itemBar onclick="showSubscriptionDetails('+g+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b.</i></div><br>");g="<div>&nbsp;"+
1066 -AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(g+=AddButton("\u041d\u043e\u0432\u0430\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430","newSubscriptionButton()"));b+="<br><td class=r1>"+TableEnd(g+"</div>");QH(56,b)}}var subscriptionDeliveryModes={2:"\u041e\u0442 \u0441\u0435\u0431\u044f",3:"\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0441 ACK",4:"\u041c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u044f",5:"\u0422\u044f\u043d\u0443\u0442\u044c"};
1065 +function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0430\u043c\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439.<br><br>";for(var e in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[e].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)",
1066 +"&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[e],b+='<div class=itemBar onclick="showSubscriptionDetails('+e+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b.</i></div><br>");e="<div>&nbsp;"+
1067 +AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(e+=AddButton("\u041d\u043e\u0432\u0430\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430","newSubscriptionButton()"));b+="<br><td class=r1>"+TableEnd(e+"</div>");QH(57,b)}}var subscriptionDeliveryModes={2:"\u041e\u0442 \u0441\u0435\u0431\u044f",3:"\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0441 ACK",4:"\u041c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u044f",5:"\u0422\u044f\u043d\u0443\u0442\u044c"};
1068 function showSubscriptionDetails(b){if(!xxdialogMode){var c=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[b].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),a=subscriptionsListeners.CIM_ListenerDestination.responses[b],d;d="<div style=text-align:left>"+addHtmlValue("\u041f\u0443\u043d\u043a\u0442 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f",a.Destination);d+=addHtmlValue("\u0424\u0438\u043b\u044c\u0442\u0440",c);d+=addHtmlValue("\u0420\u0435\u0436\u0438\u043c \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438",
1069 subscriptionDeliveryModes[a.DeliveryMode]);setDialogMode(11,"\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430"+(b+1),xxAccountAdminName?5:1,deleteSubscriptionButton,d+"</div>",b)}}
1070 function deleteSubscriptionButton(b,c){2==b&&amtstack.UnSubscribe("CIM_FilterCollectionSubscription",PullEventSubscriptions,null,1,{Filter:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_FilterCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+subscriptionsListeners.CIM_FilterCollectionSubscription.responses[c].Filter.ReferenceParameters.SelectorSet.Selector.Value+
@@ -1073,23 +1074,23 @@ function newSubscriptionButton(){if(!xxdialogMode&&null!=subscriptionsFilters){v
1074 '<option value="'+subscriptionsFilters[c].InstanceID+'">'+subscriptionsFilters[c].CollectionName.substring(13)+"</option>";b+="</select><div style=padding-top:4px>\u0424\u0438\u043b\u044c\u0442\u0440</div></div>";b+='<div style=height:26px;margin-top:4px><input id=suburl style=float:right;width:260px maxlength=253 onkeyup=newSubscriptionUpdate() value="http://"><div style=padding-top:4px>URL</div></div>';b+="<div style=height:26px;margin-top:4px><select id=subauth style=float:right;width:260px onchange=newSubscriptionUpdate()><option value=0>\u041d\u0438\u043a\u0442\u043e</option><option value=1>\u0434\u0430\u0439\u0434\u0436\u0435\u0441\u0442</option></select><div style=padding-top:4px>\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f</div></div>";
1075 b+="<div style=height:26px;margin-top:4px id=subxuser><input id=subuser style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>\u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f</div></div>";b+="<div style=height:26px;margin-top:4px id=subxpass><input id=subpass style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>\u043f\u0430\u0440\u043e\u043b\u044c</div></div>";
1076 b+="<div style=height:26px;margin-top:4px><input id=subargs style=float:right;width:260px maxlength=128><div style=padding-top:4px>\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b</div></div>";setDialogMode(11,"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}
1076 -function newSubscriptionUpdate(){QE("c54",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1077 +function newSubscriptionUpdate(){QE("c106",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1078 function newSubscriptionButtonOk(){var b=0==Q("subuser").value.length?void 0:Q("subuser").value,c=0==Q("subpass").value.length?void 0:Q("subpass").value;amtstack.Subscribe("CIM_FilterCollection",Q("subtype").value,Q("suburl").value,newSubscriptionButtonOk2,null,1,{InstanceID:Q("subfilter").value},0<Q("subargs").value.length?Q("subargs").value:null,b,c)}function newSubscriptionButtonOk2(b,c,a,d){200==d&&PullEventSubscriptions()}
1079 function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AMT_AuditLog",processAuditLog0))}var auditLog=null,auditLogEnabledStates="\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439;\u0414\u0440\u0443\u0433\u043e\u0439;\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e;\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e;\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435;\u041d\u0435\u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u0439;\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u043d\u043e \u0432 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435;\u0412 \u0442\u0435\u0441\u0442\u0435;\u041e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439;\u0417\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435;\u043d\u0430\u0447\u0430\u043b\u043e".split(";");
1079 -function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e":"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e",c&2&&(b+=", \u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d"),c&4&&(b+=", \u041f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043d\u044b\u0439"),c&8&&(b+=", \u041f\u043e\u043b\u043d\u044b\u0439"),c&16&&(b+=", \u041d\u0435\u0442 \u043a\u043b\u044e\u0447\u0430"),c="<h1>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0430\u0443\u0434\u0438\u0442\u0430</h1>"+
1080 +function processAuditLog0(b,c,a,d){200==d&&a&&0<a.length&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e":"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e",c&2&&(b+=", \u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d"),c&4&&(b+=", \u041f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043d\u044b\u0439"),c&8&&(b+=", \u041f\u043e\u043b\u043d\u044b\u0439"),c&16&&(b+=", \u041d\u0435\u0442 \u043a\u043b\u044e\u0447\u0430"),c="<h1>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0430\u0443\u0434\u0438\u0442\u0430</h1>"+
1081 TableStart(),c+=TableEntry("\u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439",b),c+=TableEntry("\u041c\u0435\u0441\u0442\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f",a[0].CurrentNumberOfRecords+" \u0437\u0430\u043f\u0438\u0441\u044c (\u044b),"+a[0].PercentageFree+"% \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e"),c+=TableEntry("\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0438",
1081 -2==a[0].OverwritePolicy?"\u0417\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u043d\u044b\u0439":"\u041d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442"),c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1082 +2==a[0].OverwritePolicy?"\u0417\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u043d\u044b\u0439":"\u041d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442"),c+=TableEnd(),QH(50,c),amtstack.GetAuditLog(processAuditLog1))}
1083 function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="\u0424\u0438\u043b\u044c\u0442\u0440" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c...","SaveAuditLog()")+AddButton("\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b",
1083 -"ClearAuditLog()"))+"<br>");if(0==c.length)d="\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0430\u0443\u0434\u0438\u0442\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b.";else{var g=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>\u0412\u0440\u0435\u043c\u044f</b><td class=r1 style=width:260px><b>\u0438\u043d\u0438\u0446\u0438\u0430\u0442\u043e\u0440</b><td class=r1><b>Action</b>";
1084 -for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;g++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1085 -minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==g?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","\u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 Intel AMT",auditLog)}
1086 -function ClearAuditLog(b){QH(60,"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430?");setDialogMode(1,"\u0410\u0443\u0434\u0438\u0442 \u0416\u0443\u0440\u043d\u0430\u043b",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}
1084 +"ClearAuditLog()"))+"<br>");if(0==c.length)d="\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0430\u0443\u0434\u0438\u0442\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b.";else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>\u0412\u0440\u0435\u043c\u044f</b><td class=r1 style=width:260px><b>\u0438\u043d\u0438\u0446\u0438\u0430\u0442\u043e\u0440</b><td class=r1><b>Action</b>";
1085 +for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1086 +minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(51,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","\u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 Intel AMT",auditLog)}
1087 +function ClearAuditLog(b){QH(61,"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430?");setDialogMode(1,"\u0410\u0443\u0434\u0438\u0442 \u0416\u0443\u0440\u043d\u0430\u043b",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}
1088 function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("\u0410\u0443\u0434\u0438\u0442 \u0416\u0443\u0440\u043d\u0430\u043b","\u041e\u0448\u0438\u0431\u043a\u0430: "+d)}
1089 function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("\u0412\u0440\u0435\u043c\u044f",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("\u0438\u043d\u0438\u0446\u0438\u0430\u0442\u043e\u0440",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("\u0410\u0434\u0440\u0435\u0441",a.NetAddress));d+=addHtmlValue("\u0437\u0430\u044f\u0432\u043a\u0430",a.AuditApp);d+=addHtmlValue("\u0421\u043e\u0431\u044b\u0442\u0438\u0435",a.Event);if(null!=
1089 -a.ExStr)d+=addHtmlValue("\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435",a.ExStr);else if(0<a.Ex.length){var g="";for(c in a.Ex)0<g.length&&(g+=","),g+=a.Ex.charCodeAt(c);""!=g&&(d+=addHtmlValue("\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445",g));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("\u0421\u0442\u0440\u043e\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445",a.Ex.substring(2)))}messagebox("\u0410\u0443\u0434\u0438\u0442 \u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u2116"+
1090 +a.ExStr)d+=addHtmlValue("\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=","),e+=a.Ex.charCodeAt(c);""!=e&&(d+=addHtmlValue("\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445",e));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("\u0421\u0442\u0440\u043e\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445",a.Ex.substring(2)))}messagebox("\u0410\u0443\u0434\u0438\u0442 \u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u2116"+
1091 (b+1)+" \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;function PullCertificates(){amtstack.BatchEnum(null,["AMT_PublicKeyCertificate","AMT_PublicPrivateKeyPair","AMT_TLSSettingData","AMT_TLSCredentialContext"],processCerts1)}
1091 -function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var g in xxCertificates)xxCertificates[g].InstanceID==b&&(xxTlsCurrentCert=
1092 -g)}for(g in xxCertificates)xxCertificates[g].TrustedRootCertficate=1==xxCertificates[g].TrustedRootCertficate,xxCertificates[g].X509Certificate=window.atob(xxCertificates[g].X509Certificate),xxCertificates[g].XIssuer=parseCertName(xxCertificates[g].Issuer),xxCertificates[g].XSubject=parseCertName(xxCertificates[g].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1092 +function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var e in xxCertificates)xxCertificates[e].InstanceID==b&&(xxTlsCurrentCert=
1093 +e)}for(e in xxCertificates)xxCertificates[e].TrustedRootCertficate=1==xxCertificates[e].TrustedRootCertficate,xxCertificates[e].X509Certificate=window.atob(xxCertificates[e].X509Certificate),xxCertificates[e].XIssuer=parseCertName(xxCertificates[e].Issuer),xxCertificates[e].XSubject=parseCertName(xxCertificates[e].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1094 function parseCertName(b){var c={},a=b.split(","),d;for(d in a)b=a[d].indexOf("="),c[a[d].substring(0,b)]=a[d].substring(b+1);return c}
1095 function getTlsSecurityState(b){if(0==xxTlsSettings[b].Enabled)return"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e";var c=(1==xxTlsSettings[b].MutualAuthentication?"Mutual-auth TLS":"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 TLS")+(1==xxTlsSettings[b].AcceptNonSecureConnections?" \u0438 \u043d\u0435 TLS":"");1==xxTlsSettings[b].MutualAuthentication&&xxTlsSettings[b].TrustedCN&&
1096 (b=MakeToArray(xxTlsSettings[b].TrustedCN),0<b.length&&(c+=", "+(1<b.length?"Trusted names":"Trusted name")+": "+b.join(", ")+"."));return c}
@@ -1097,7 +1098,7 @@ function updateCertificates(){if(null!=xxCertificates){var b="Intel(r) AMT LMS T
1098 addLinkConditional(getTlsSecurityState(b),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEnd(),a=a+("<br>"+TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438 Intel&reg; AMT \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430.<br><br>");if(0==xxCertificates.length&&0==xxCertPrivateKeys.length)a+=
1099 "<div style=padding-left:15px><br><i>\u0421\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b.</i></div><br>";else{for(var d in xxCertificates)b="",xxCertificates[d].TrustedRootCertficate&&(b="\u0414\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0440\u0435\u043d\u044c"),xxCertificates[d].XPrivateKey&&(b="\u0417\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447"),d==xxTlsCurrentCert&&(b+=", \u0421\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 TLS"),
1100 a+="<div class=itemBar onclick=showCertDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(xxCertificates[d].XSubject.CN)+"</b><i>"+b+"</i></div></div>";for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>\u041d\u0435\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u043f\u0430\u0440\u0430 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 #"+
1100 -d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 ...","addCertButton()")+AddButton("\u0412\u044b\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 ...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(51,a)}}
1101 +d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 ...","addCertButton()")+AddButton("\u0412\u044b\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 ...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(52,a)}}
1102 function showKeyPairDetails(b){setDialogMode(11,"\u041f\u0430\u0440\u0430 \u043a\u043b\u044e\u0447\u0435\u0439"+b,5,function(c){2==c&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertPrivateKeys[b].InstanceID},PullCertificates,0,1)},"\u042d\u0442\u043e \u043f\u0430\u0440\u0430 \u043a\u043b\u044e\u0447\u0435\u0439 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e / \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043d\u0438 \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0443. \u042d\u0442\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.")}
1103 var xxCertSubjectNames={CN:"\u0420\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f",O:"\u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f",OU:"\u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u041e\u0440\u0433",S:"\u0428\u0442\u0430\u0442 / \u043f\u0440\u043e\u0432\u0438\u043d\u0446\u0438\u044f",ST:"\u0428\u0442\u0430\u0442 / \u043f\u0440\u043e\u0432\u0438\u043d\u0446\u0438\u044f",L:"\u041c\u0435\u0441\u0442\u043e\u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435",
1104 C:"\u0421\u0442\u0440\u0430\u043d\u0430",SN:"\u0424\u0430\u043c\u0438\u043b\u0438\u044f",GN:"\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f"};
@@ -1107,36 +1108,35 @@ a+='<br><div style="border-bottom:1px solid gray"><i>\u042d\u043c\u0438\u0442\u0
1108 function(){},0,1),amtstack.Delete("AMT_PublicKeyCertificate",xxCertificates[b],certificateRemoved,0,1))},a)}}function downloadCert(b){saveAs(data2blob(xxCertificates[b].X509Certificate),xxCertificates[b].XSubject.CN+".cer")}function cert_FileSelectHandler(b){haltEvent(b);1==b.dataTransfer.files.length&&(b.dataTransfer.files[0].name.toLowerCase().endsWith(".p12")?issueCertButton(b.dataTransfer.files):addCertButton(b.dataTransfer.files))}var xxDragDropCertFiles=null;
1109 function addCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen onchange=addCertButtonUpdate() type=file style=float:right;width:260px accept=".cer,.pem">',xxDragDropCertFiles&&(b='<input style=float:right;width:260px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b="<div style=height:10px></div>"+("<div style=height:26px;margin-top:4px>"+b+"<div style=padding-top:4px>\u0424\u0430\u0439\u043b \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430</div></div>")+
1110 "<div style=height:26px;margin-top:4px><select id=certtype style=float:right;width:260px><option value=1>\u0421\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f</option><option value=0>\u0426\u0435\u043f\u043d\u043e\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442</option></select><div style=padding-top:4px>\u0422\u0438\u043f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430</div></div>",
1110 -setDialogMode(11,"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c54",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1111 +setDialogMode(11,"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c106",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1112 function addCertButtonOk2(b){b=b.target.result;var c=b.indexOf("-----BEGIN CERTIFICATE-----");0<=c?(b=b.substring(c+27),c=b.indexOf("-----END CERTIFICATE-----"),0<=c&&(b=b.substring(0,c)),b=b.replace(/\r\n/g,"")):b=btoa(b);1==getSelectElement("certtype").value?amtstack.AMT_PublicKeyManagementService_AddTrustedRootCertificate(b,certificateAdded):amtstack.AMT_PublicKeyManagementService_AddCertificate(b,certificateAdded)}
1113 function issueCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen type=file style=float:right;width:230px onchange=issueCertButtonUpdate() accept=".p12">',xxDragDropCertFiles&&(b='<input style=float:right;width:230px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b=""+("<div styleheight:26px;margin-top:14px>"+b+"<div style=padding-top:4px>Certificate file</div></div>")+"<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certopenpass type=password autocomplete=off style=float:right;width:230px><div style=padding-top:4px>\u041f\u0430\u0440\u043e\u043b\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430</div></div>",
1114 b+='<br><div style="border-bottom:1px solid gray"><i>\u0421\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 Intel&reg; AMT</i></div>',b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certcn style=float:right;width:230px><div style=padding-top:4px>\u0420\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certo style=float:right;width:230px><div style=padding-top:4px>\u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f</div></div>",
1115 b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certst style=float:right;width:230px><div style=padding-top:4px>\u0428\u0442\u0430\u0442 / \u043f\u0440\u043e\u0432\u0438\u043d\u0446\u0438\u044f</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certc style=float:right;width:230px><div style=padding-top:4px>\u0421\u0442\u0440\u0430\u043d\u0430</div></div>",b+='<div>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430</div><ul 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">',
1116 b+="<li><label><input type=checkbox id=d11_cu4 checked>TLS-\u0441\u0435\u0440\u0432\u0435\u0440 (HTTPS)</label></li>",b+="<li><label><input type=checkbox id=d11_cu5>\u041a\u043b\u0438\u0435\u043d\u0442 TLS (HTTPS)</label></li>",b+="<li><label><input type=checkbox id=d11_cu6>\u0417\u0430\u0449\u0438\u0442\u0430 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b</label></li>",b+="<li><label><input type=checkbox id=d11_cu7>\u041f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430</label></li>",
1117 b+="<li><label><input type=checkbox id=d11_cu8>\u041e\u0442\u043c\u0435\u0442\u043a\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438</label></li>",b+="</ul>",setDialogMode(11,"\u0412\u044b\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442",3,issueCertButtonOk,b),issueCertButtonUpdate())}
1117 -function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c54",c)}
1118 +function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c106",c)}
1119 function issueCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length?(b=new FileReader,b.onload=issueCertButtonOk2,b.readAsBinaryString(c[0])):issueCertButtonOk3(null)}
1120 function issueCertButtonOk2(b){0==amtcert_loadP12File(b.target.result,Q("certopenpass").value,issueCertButtonOk3)&&messagebox("\u0412\u044b\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442","\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c / \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442.")}
1121 function issueCertButtonOk3(b,c,a){xxCaPrivateKey=b;xxCaSubjectAttributes=c;amtstack.AMT_PublicKeyManagementService_GenerateKeyPair(0,2048,GenerateKeyPairResponse)}
1122 function GenerateKeyPairResponse(b,c,a,d){200!=d?messagebox("\u0412\u044b\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442","\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447\u0435\u0439. \u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u043b: "+d):0!=a.Body.ReturnValue?messagebox("\u0412\u044b\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442",
1123 "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447\u0435\u0439,"+a.Body.ReturnValueStr):amtstack.Enum("AMT_PublicPrivateKeyPair",GenerateKeyPairResponse2,a.Body.KeyPair.ReferenceParameters.SelectorSet.Selector.Value)}
1123 -function GenerateKeyPairResponse2(b,c,a,d,g){if(200!=d)messagebox("\u0412\u044b\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442","\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447\u0435\u0439. \u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u043b: "+d);else{b=null;for(var v in a)a[v].InstanceID==g&&(b=a[v].DERKey);
1124 -a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};g={CN:"\u041d\u0435\u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in g={},xxCaSubjectAttributes)g[xxCaSubjectAttributes[v].shortName]=xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&
1125 -(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,g,v);null==v?messagebox("\u0412\u044b\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442","\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442."):
1124 +function GenerateKeyPairResponse2(b,c,a,d,e){if(200!=d)messagebox("\u0412\u044b\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442","\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447\u0435\u0439. \u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u043b: "+d);else{b=null;for(var v in a)a[v].InstanceID==e&&(b=a[v].DERKey);
1125 +a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};e={CN:"\u041d\u0435\u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in e={},xxCaSubjectAttributes)e[xxCaSubjectAttributes[v].shortName]=xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&
1126 +(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,e,v);null==v?messagebox("\u0412\u044b\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442","\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442."):
1127 (v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,v.length-25),GenerateKeyPairResponse4))}}
1128 function GenerateKeyPairResponse4(b,c,a,d){200!=d?messagebox("\u0412\u044b\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442","\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447\u0435\u0439. \u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u043b: "+d):PullCertificates()}
1129 function certificateAdded(b,c,a,d){200!=d||0!=a.Body.ReturnValue?messagebox("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442","\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442, \u043e\u0448\u0438\u0431\u043a\u0430"+(200!=d?d:a.Body.ReturnValueStr)):PullCertificates()}
1130 function certificateRemoved(b,c,a,d){200!=d?messagebox("\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442","\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442, \u043e\u0448\u0438\u0431\u043a\u0430"+d):PullCertificates()}
1131 function getInputElement(b){var c=document.getElementsByTagName("input");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}function getSelectElement(b){var c=document.getElementsByTagName("select");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}
1131 -function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>\u041d\u0435\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430, TLS \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d</option>";for(var c in xxCertificates)0!=xxCertificates[c].TrustedRootCertficate||!xxCertificates[c].XPrivateKey||null!=xxTlsCurrentCert&&xxTlsCurrentCert!=c||(b+=
1132 -"<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";b+="<option value=2>Mutual-auth TLS only</option><option value=3>Mutual-auth, non-TLS allowed</option>";
1133 -b+='</select><div style=padding-top:4px>Security</div></div><div style=height:26px id=d11rcn title="\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u0449\u0438\u0445 \u0438\u043c\u0435\u043d \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435."><input id=d11_rcn style=float:right;width:260px onkeyup=showSetTlsSecurityDlgUpdate() placeholder="\u0438\u043c\u044f1, \u0438\u043c\u044f2"><div style=padding-top:4px>\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 CN\'s</div></div>';
1132 +function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>\u041d\u0435\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430, TLS \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d</option>";for(var c in xxCertificates)0==xxCertificates[c].TrustedRootCertficate&&xxCertificates[c].XPrivateKey&&(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+
1133 +"</option>");b+="</select><div style=padding-top:4px>\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";b+="<option value=2>Mutual-auth TLS only</option><option value=3>Mutual-auth, non-TLS allowed</option>";b+='</select><div style=padding-top:4px>Security</div></div><div style=height:26px id=d11rcn title="\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u0449\u0438\u0445 \u0438\u043c\u0435\u043d \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435."><input id=d11_rcn style=float:right;width:260px onkeyup=showSetTlsSecurityDlgUpdate() placeholder="\u0438\u043c\u044f1, \u0438\u043c\u044f2"><div style=padding-top:4px>\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 CN\'s</div></div>';
1134 setDialogMode(11,"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 TLS",3,showSetTlsSecurityDlgOk,b);if(0==xxTLSCredentialContext.length||0==xxTlsSettings[0].Enabled||0==xxTlsSettings[1].Enabled)getSelectElement("tlscert").value=-1;else for(c in b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value,xxCertificates)xxCertificates[c].InstanceID==b&&(getSelectElement("tlscert").value=c);c=1-("Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1);
1135 getSelectElement("tlsremote").value=(1==xxTlsSettings[c].MutualAuthentication?2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}
1136 -function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c54",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1136 +function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c106",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1137 function showSetTlsSecurityDlgOk(){var b=getSelectElement("tlscert").value,c=getSelectElement("tlsremote").value,a=Clone(xxTlsSettings);setTlsSecurityPendingCalls=0;setTlsSecurityDeleteCredentialContext=null;if(-1!=b){if(0<xxTLSCredentialContext.length){var d=Clone(xxTLSCredentialContext[0]);d.ElementInContext.ReferenceParameters.SelectorSet.Selector.Value=xxCertificates[b].InstanceID;amtstack.Put("AMT_TLSCredentialContext",d,setTlsSecurityResponse,0,1)}else amtstack.Create("AMT_TLSCredentialContext",
1138 {ElementInContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[b].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",ElementProvidingContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_TLSProtocolEndpointCollection")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters>'},
1139 -setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,g=1-d;a[g].Enabled=-1!=b;a[g].MutualAuthentication=2<=c;a[g].AcceptNonSecureConnections=1==c%2;a[g].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1139 +setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,e=1-d;a[e].Enabled=-1!=b;a[e].MutualAuthentication=2<=c;a[e].AcceptNonSecureConnections=1==c%2;a[e].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1140 b,c,d){200!=d?messagebox("","\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u0441\u0442\u0430\u0442\u0443\u0441 ="+d):0!=c.Body.ReturnValue?messagebox("","\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u043e\u0448\u0438\u0431\u043a\u0430: "+c.Body.ReturnValueStr):(a=Math.round((new Date).getTime()/
1141 1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(c.Body.Ta0,a,a,function(){setTlsSecurityResponse()}))}));setTlsSecurityPendingCalls+=2;amtstack.Put("AMT_TLSSettingData",a[0],setTlsSecurityResponse,0,1,a[0]);amtstack.Put("AMT_TLSSettingData",a[1],setTlsSecurityResponse,0,1,a[1]);statusbox("\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 TLS","\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 ...")}
1142 function splitDomains(b){b=b.split(",");if(0!=b.length){for(var c in b)if(b[c]=b[c].trim(),0<=b[c].indexOf(" ")||0==b[c].length)return;if(!(4<b.length))return b}}
@@ -1144,7 +1144,7 @@ function setTlsSecurityResponse(b,c,a,d){if(b){if(200!=d){messagebox("","\u041d\
1144 function setTlsSecurityResponse2(b,c,a,d){200!=d?messagebox("","\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c TLS, \u0441\u0442\u0430\u0442\u0443\u0441 ="+d):0!=a.Body.ReturnValue?messagebox("","\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c TLS, \u043e\u0448\u0438\u0431\u043a\u0430: "+
1145 a.Body.ReturnValueStr):setTimeout(setTlsSecurityResponse3,2E3)}function setTlsSecurityResponse3(){null!=setTlsSecurityDeleteCredentialContext&&amtstack.Delete("AMT_TLSCredentialContext",setTlsSecurityDeleteCredentialContext,function(){});PullCertificates();setDialogMode();amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}var xxWatchdog=null;
1146 function PullWatchdog(){amtstack.BatchEnum(null,["*AMT_AgentPresenceCapabilities","AMT_AgentPresenceWatchdog","AMT_AgentPresenceWatchdogAction","AMT_StateTransitionCondition","CIM_ConcreteDependency"],PullWatchdogResponse)}
1147 -function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var g in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[g],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1147 +function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var e in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[e],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1148 "@Name","PolicyConditionName").Value,d=getItem(xxWatchdog.AMT_AgentPresenceWatchdog.responses,"DeviceID",d),a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,"PolicyConditionName",a),d.transitions||(d.transitions=[]),d.transitions.push(a)),c&&"AMT_StateTransitionCondition"==c.Value&&(a=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyConditionName").Value,b=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyActionName").Value,a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,
1149 "PolicyConditionName",a),b=getItem(xxWatchdog.AMT_AgentPresenceWatchdogAction.responses,"PolicyActionName",b),a.actions||(a.actions=[]),a.actions.push(b));updateWatchdog();QV("go19",!0)}}
1150 var watchdogEnabledStates="\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439;\u0414\u0440\u0443\u0433\u043e\u0439;\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e;\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e;\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435;\u041d\u0435\u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u0439;\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u043d\u043e \u0432 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435;\u0412 \u0442\u0435\u0441\u0442\u0435;\u041e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439;\u0417\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435;\u043d\u0430\u0447\u0430\u043b\u043e".split(";"),watchdogMonitoredEntity=
@@ -1153,21 +1153,21 @@ function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableE
1153 xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0430\u0433\u0435\u043d\u0442\u0430 Intel&reg; AMT.<br><br>";if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||
1154 0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>\u0410\u0433\u0435\u043d\u0442 \u043f\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044e \u0437\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));
1155 a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 ..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f ..." onclick=deleteWatchdogActions(event,'+
1156 -c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",g;for(g in a.transitions){var v=a.transitions[g];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : \u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+
1157 -AddButton("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u043e\u0439 \u0442\u0430\u0439\u043c\u0435\u0440 ...","AddWatchdog()"));b+="<br>";QH(54,b)}}function getWatchdogTransitionStr(b){if(31==b)return"\u041b\u044e\u0431\u043e\u0439 \u0448\u0442\u0430\u0442";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1156 +c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : \u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+
1157 +AddButton("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u043e\u0439 \u0442\u0430\u0439\u043c\u0435\u0440 ...","AddWatchdog()"));b+="<br>";QH(55,b)}}function getWatchdogTransitionStr(b){if(31==b)return"\u041b\u044e\u0431\u043e\u0439 \u0448\u0442\u0430\u0442";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1158 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441\u0443\u0431\u044a\u0435\u043a\u0442",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("\u0422\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435",
1159 amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435",watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0437\u0430\u043f\u0443\u0441\u043a\u0430",b.StartupInterval+" \u0441\u0435\u043a\u0443\u043d\u0434 (\u044b)");c+=addHtmlValue("\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0442\u0430\u0439\u043c-\u0430\u0443\u0442\u0430",
1160 b.TimeoutInterval+" \u0441\u0435\u043a\u0443\u043d\u0434 (\u044b)");setDialogMode(11,format("\u0421\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u043e\u0439 \u0442\u0430\u0439\u043c\u0435\u0440 {0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
1161 function AddWatchdog(){var b;b="<div style=height:26px;margin-top:4px><input id=wgname style=float:right;width:240px maxlength=16 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>\u0438\u043c\u044f</div></div>"+('<div style=height:26px;margin-top:4px><input id=wgguid style=float:right;width:240px maxlength=36 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px title="\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e DeviceID">'+
1162 addLink("\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430","GenerateWatchdogGuid()")+"</div></div>");b+="<div style=height:26px;margin-top:4px><input id=wgstart style=float:right;width:240px maxlength=8 placeholder=3600 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>\u0417\u0430\u043f\u0443\u0441\u043a (\u0441\u0435\u043a\u0443\u043d\u0434)</div></div>";b+="<div style=height:26px;margin-top:4px><input id=wgtimeout style=float:right;width:240px maxlength=8 placeholder=60 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>\u0422\u0430\u0439\u043c-\u0430\u0443\u0442 (\u0441\u0435\u043a\u0443\u043d\u0434\u044b)</div></div>";
1163 setDialogMode(11,"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u0436",3,AddWatchdogOk,b);AddWatchdogUpdate()}function GenerateWatchdogGuid(){var b,c="";for(b=0;16>b;b++)c+=String.fromCharCode(random(255));Q("wgguid").value=guidToStr(rstr2hex(c));AddWatchdogUpdate()}
1164 -function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var g=a.charCodeAt(d);45!=g&&(48<=g&&57>=g||97<=g&&102>=g?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1164 +function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var e=a.charCodeAt(d);45!=e&&(48<=e&&57>=e||97<=e&&102>=e?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1165 function AddWatchdogOk(){var b=Q("wgtimeout").value,c=Q("wgstart").value;""==b&&(b=60);""==c&&(c=3600);b={CreationClassName:0,DeviceID:btoa(hex2rstr(guidToStr(Q("wgguid").value.replace(/-/g,"")).replace(/-/g,""))),StartupInterval:c,SystemCreationClassName:0,SystemName:0,TimeoutInterval:b,MonitoredEntityDescription:Q("wgname").value};amtstack.Create("AMT_AgentPresenceWatchdog",b,AddWatchdogOk2)}
1166 function AddWatchdogOk2(b,c,a,d){200!=d?messagebox("\u0421\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u0430\u044f \u0441\u043e\u0431\u0430\u043a\u0430","\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u043e\u0439 \u0442\u0430\u0439\u043c\u0435\u0440, \u043e\u0448\u0438\u0431\u043a\u0430 #"+d):PullWatchdog()}
1167 function addWatchdogAction(b,c){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d;d="<table><td style=width:180px>\u041e\u0442<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsa"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";d+="<td>\u043a<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsb"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";setDialogMode(11,"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c Watchdog Action",
1168 3,addWatchdogActionOk,d+"</table><br>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435<br><input id=wgsevent type=checkbox checked onclick=addWatchdogActionUpdate()>\u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0436\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439<br />",a);addWatchdogActionUpdate();haltEvent(b)}
1169 function addWatchdogActionUpdate(){var b=0,c=0,a;for(a in amtstack.WatchdogCurrentStates)1==Q("wgsa"+a).checked&&(b+=parseInt(a)),1==Q("wgsb"+a).checked&&(c+=parseInt(a));QE("dlgOkButton",0<b&&0<c&&1==Q("wgsevent").checked)}
1170 -function addWatchdogActionOk(b,c){var a=0,d=0,g;for(g in amtstack.WatchdogCurrentStates)1==Q("wgsa"+g).checked&&(a+=parseInt(g)),1==Q("wgsb"+g).checked&&(d+=parseInt(g));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
1170 +function addWatchdogActionOk(b,c){var a=0,d=0,e;for(e in amtstack.WatchdogCurrentStates)1==Q("wgsa"+e).checked&&(a+=parseInt(e)),1==Q("wgsb"+e).checked&&(d+=parseInt(e));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
1171 function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Watchdog Action","\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043e\u0448\u0438\u0431\u043a\u0430 #"+d):PullWatchdog()}
1172 function deleteWatchdogActions(b,c){setDialogMode(11,"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f",3,deleteWatchdogActionsOk,"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u043e\u0433\u043e \u0442\u0430\u0439\u043c\u0435\u0440\u0430?",
1173 xxWatchdog.AMT_AgentPresenceWatchdog.responses[c]);haltEvent(b)}function deleteWatchdogActionsOk(b,c){amtstack.AMT_AgentPresenceWatchdog_DeleteAllActions(deleteWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
@@ -1176,18 +1176,18 @@ var xxSystemDefense=null,xxSystemDefenceLinkedPolicy={},xxUpdatingDefenseStats=!
1176 1:"\u0411\u0440\u043e\u0441\u044c, \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0439",2:"\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438",3:"\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0442\u044c",4:"\u041a\u0430\u043f\u043b\u044f"},xxSystemDefenceFilters={HdrProtocolID:1,HdrDestAddress:2,HdrDestMask:2,HdrSrcAddress:2,HdrSrcMask:2,HdrSrcPortStart:1,HdrSrcPortEnd:1,HdrDestPortStart:1,HdrDestPortEnd:1,HdrSrcAddressEndOfRange:2,"HdrDestAddressEndOfRange ":2,
1177 TCPFlagsOn:3,TCPFlagsOff:3};function PullSystemDefense(){amtFirstPull|=4;amtstack.BatchEnum(null,["AMT_SystemDefensePolicy","AMT_NetworkPortSystemDefensePolicy","AMT_Hdr8021Filter","AMT_IPHeadersFilter","AMT_NetworkFilter"],PullSystemDefenseResponse)}function PullSystemDefenseResponse(b,c,a,d){200==d&&(xxSystemDefense=a,updateSystemDefense(),QV("go18",!0),urlvars.norefresh&&UpdateDefenseStats())}
1178 function updateSystemDefense(){if(null!=xxSystemDefense){var b="";xxSystemDefenceLinkedPolicy={};for(var c in xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses){var a=xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses[c],d=+getItem(a.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value.substring(27),a=getItem(xxSystemDefense.AMT_SystemDefensePolicy.responses,"InstanceID",a.Dependent.ReferenceParameters.SelectorSet.Selector.Value);xxSystemDefenceLinkedPolicy[d]=
1179 -a}b+=TableStart();c="<i>\u041d\u0438\u043a\u0442\u043e</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("\u041f\u0440\u043e\u0432\u043e\u0434\u043d\u0430\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],g;for(g in a)d=a[g],d=1==d?d+" \u043f\u0430\u043a\u0435\u0442":d+" \u043f\u0430\u043a\u0435\u0442\u044b",
1180 -b+=TableEntry((0==c?"\u041f\u0440\u043e\u0432\u043e\u0434\u043d\u0430\u044f":"\u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439")+g,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430\u043c\u0438 \u0437\u0430\u0449\u0438\u0442\u044b Intel&reg; AMT.<br><br>";if(0==xxSystemDefense.AMT_SystemDefensePolicy.responses.length)b+=
1179 +a}b+=TableStart();c="<i>\u041d\u0438\u043a\u0442\u043e</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("\u041f\u0440\u043e\u0432\u043e\u0434\u043d\u0430\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],e;for(e in a)d=a[e],d=1==d?d+" \u043f\u0430\u043a\u0435\u0442":d+" \u043f\u0430\u043a\u0435\u0442\u044b",
1180 +b+=TableEntry((0==c?"\u041f\u0440\u043e\u0432\u043e\u0434\u043d\u0430\u044f":"\u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439")+e,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430\u043c\u0438 \u0437\u0430\u0449\u0438\u0442\u044b Intel&reg; AMT.<br><br>";if(0==xxSystemDefense.AMT_SystemDefensePolicy.responses.length)b+=
1181 "<div style=padding-left:15px><i>\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0437\u0430\u0449\u0438\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b.</i></div><br>";else for(c in xxSystemDefense.AMT_SystemDefensePolicy.responses)a=xxSystemDefense.AMT_SystemDefensePolicy.responses[c],d="",a.FilterCreationHandles&&(a.FilterCreationHandles=MakeToArray(a.FilterCreationHandles),d=a.FilterCreationHandles.length,d=", "+d+" filter"+(1<d?
1182 "s":"")),b+="<div class=itemBar onclick=showPolicyDetails("+c+")><div style=padding-top:3px><b>"+EscapeHtml(a.PolicyName)+"</b>"+d+"</div></div>";b+="<tr><td class=r1 style=padding-left:15px><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c\u0438 \u0437\u0430\u0449\u0438\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b Intel&reg; AMT.<br><br>";if(0==xxSystemDefense.AMT_Hdr8021Filter.responses.length&&0==xxSystemDefense.AMT_IPHeadersFilter.responses.length)b+=
1183 "<div style=padding-left:15px><i>\u0424\u0438\u043b\u044c\u0442\u0440\u044b \u0437\u0430\u0449\u0438\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b.</i></div><br>";else{for(c in xxSystemDefense.AMT_Hdr8021Filter.responses)a=xxSystemDefense.AMT_Hdr8021Filter.responses[c],(d=xxSystemDefenceFilterEthernetTypes[a.HdrProtocolID8021])||(d="\u0412\u0441\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b Ethernet"+a.HdrProtocolID8021),d+=
1184 ", "+xxSystemDefenceFilterDesc[a.FilterProfile],2==a.FilterProfile&&(d+=" \u0432"+a.FilterProfileData+" \u043f\u0430\u043a\u0435\u0442 / \u0441\u0435\u043a"),1==a.ActionEventOnMatch&&(d+="\u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0430 \u043c\u0430\u0442\u0447"),b+="<div class=itemBar onclick=showFilterDetails(0,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>";for(c in xxSystemDefense.AMT_IPHeadersFilter.responses){a=
1185 -xxSystemDefense.AMT_IPHeadersFilter.responses[c];(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="\u0412\u0441\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b Ethernet"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" \u0432"+a.FilterProfileData+" \u043f\u0430\u043a\u0435\u0442 / \u0441\u0435\u043a");1==a.ActionEventOnMatch&&(d+="\u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0430 \u043c\u0430\u0442\u0447");var v=0;for(g in xxSystemDefenceFilters)a[g]&&
1185 +xxSystemDefense.AMT_IPHeadersFilter.responses[c];(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="\u0412\u0441\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b Ethernet"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" \u0432"+a.FilterProfileData+" \u043f\u0430\u043a\u0435\u0442 / \u0441\u0435\u043a");1==a.ActionEventOnMatch&&(d+="\u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0430 \u043c\u0430\u0442\u0447");var v=0;for(e in xxSystemDefenceFilters)a[e]&&
1186 v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440 ...","AddDefenseFilter()")+AddButton("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 ...",
1187 -"AddDefensePolicy()"));QH(53,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}function StopDefenseStatsTimer(){null!=xxFilterStatisticsTimer&&(clearInterval(xxFilterStatisticsTimer),xxFilterStatisticsTimer=null);xxFilterStatisticsTimerActive=!1}
1187 +"AddDefensePolicy()"));QH(54,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}function StopDefenseStatsTimer(){null!=xxFilterStatisticsTimer&&(clearInterval(xxFilterStatisticsTimer),xxFilterStatisticsTimer=null);xxFilterStatisticsTimerActive=!1}
1188 function UpdateDefenseStats(b){if(b||1!=xxFilterStatisticsTimerActive)xxFilterStatisticsTimerActive=!0,b=b?b:0,xxSystemDefenceLinkedPolicy[b]?amtstack.AMT_SystemDefensePolicy_UpdateStatistics('<a:Address></a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+b+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",!1,UpdateDefenseStats2,b,0,{InstanceID:xxSystemDefenceLinkedPolicy[b].InstanceID}):
1189 -(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,g){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,g):StopDefenseStatsTimer()}
1190 -function UpdateDefenseStats3(b,c,a,d,g){b=0;if(200==d){xxFilterStatistics[g]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[g][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1189 +(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,e){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,e):StopDefenseStatsTimer()}
1190 +function UpdateDefenseStats3(b,c,a,d,e){b=0;if(200==d){xxFilterStatistics[e]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[e][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1191 function changeDefaultPolicy(b){if(!xxdialogMode){var c;c="<div style=height:26px;margin-top:4px><select id=policySelection style=float:right;width:266px><option value=-1>\u041d\u0438\u043a\u0442\u043e";for(var a in xxSystemDefense.AMT_SystemDefensePolicy.responses)c+="<option value="+a+(xxSystemDefenceLinkedPolicy[b]&&xxSystemDefense.AMT_SystemDefensePolicy.responses[a].InstanceID==xxSystemDefenceLinkedPolicy[b].InstanceID?" selected":"")+">"+xxSystemDefense.AMT_SystemDefensePolicy.responses[a].PolicyName;
1192 setDialogMode(11,"\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0437\u0430\u0449\u0438\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e",3,changeDefaultPolicyOk,c+"</select><div style=padding-top:4px>\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e</div></div>",b)}}
1193 function changeDefaultPolicyOk(b,c){var a=Q("policySelection").value,d=xxSystemDefenceLinkedPolicy[c];d&&amtstack.Delete("AMT_NetworkPortSystemDefensePolicy",'<w:SelectorSet><w:Selector Name="Antecedent"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">CIM_EthernetPort</w:Selector><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+
@@ -1202,19 +1202,19 @@ b+="<div style=height:26px;margin-top:4px><select id=filterprofile style=float:r
1202 b+="<div style=height:26px;margin-top:4px id=filterdatadiv><input id=filterdata style=float:right;width:260px maxlength=8 onkeyup=AddDefenseFilterUpdate()><div style=padding-top:4px>\u041f\u0430\u043a\u0435\u0442\u043e\u0432 / \u0441\u0435\u043a\u0443\u043d\u0434\u0443</div></div>";b+="<div style=height:26px;margin-top:4px><select id=filteraction style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=false>\u041d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c<option value=1>\u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0430 \u043c\u0430\u0442\u0447\u0435</select><div style=padding-top:4px>\u0416\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439</div></div>";
1203 setDialogMode(11,"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440 \u0437\u0430\u0449\u0438\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b",3,AddDefenseFilterOk,b);AddDefenseFilterUpdate()}}
1204 function AddDefenseFilterOk(){if(1>=Q("filtertype").value){var b=0==Q("filtertype").value?2048:2054,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrProtocolID8021:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value};2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_Hdr8021Filter",c,AddDefenseFilterOk2)}else{var b=2==Q("filtertype").value?
1205 -4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var g=a[d].indexOf("="),v=a[d].substring(0,g),g=a[d].substring(g+1),n=xxSystemDefenceFilters[v];n||(v="Hdr"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(g=g.split("."),4==g.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(g[0]),
1206 -parseInt(g[1]),parseInt(g[2]),parseInt(g[3]))))):c[v]=g)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c54",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1205 +4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var e=a[d].indexOf("="),v=a[d].substring(0,e),e=a[d].substring(e+1),n=xxSystemDefenceFilters[v];n||(v="Hdr"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(e=e.split("."),4==e.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(e[0]),
1206 +parseInt(e[1]),parseInt(e[2]),parseInt(e[3]))))):c[v]=e)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c106",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}
1207 function AddDefenseFilterOk2(b,c,a,d){200!=d?messagebox("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440 \u0437\u0430\u0449\u0438\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b","\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440, \u043e\u0448\u0438\u0431\u043a\u0430 #"+d):PullSystemDefense()}
1208 -function showFilterDetails(b,c){if(!xxdialogMode){var a,d,g,v;0==b?(v="AMT_Hdr8021Filter",g="Ethernet Traffic",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="\u0412\u0441\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b Ethernet"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",g="IP-\u0442\u0440\u0430\u0444\u0438\u043a",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="\u0412\u0441\u0435 IP \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b"+
1209 -d.HdrIPVersion));var n;n=""+addHtmlValue("\u0438\u043c\u044f",EscapeHtml(d.Name));n+=addHtmlValue("\u0422\u0438\u043f",g);n+=addHtmlValue("\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430",a);n+=addHtmlValue("\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,g=d[l],b=xxSystemDefenceFilters[l],2==
1210 -b&&4==g.length&&(g=hex2rstr(g),g=g.charCodeAt(0)+"."+g.charCodeAt(1)+"."+g.charCodeAt(2)+"."+g.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("\u0424\u0438\u043b\u044c\u0442\u0440"+a,g));n+=addHtmlValue("\u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0430 \u043c\u0430\u0442\u0447\u0435",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,"\u0424\u0438\u043b\u044c\u0442\u0440 Ethernet \u2116"+d.InstanceID,5,showFilterDetailsOk,n,[v,d])}}
1208 +function showFilterDetails(b,c){if(!xxdialogMode){var a,d,e,v;0==b?(v="AMT_Hdr8021Filter",e="Ethernet Traffic",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="\u0412\u0441\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b Ethernet"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",e="IP-\u0442\u0440\u0430\u0444\u0438\u043a",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="\u0412\u0441\u0435 IP \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b"+
1209 +d.HdrIPVersion));var n;n=""+addHtmlValue("\u0438\u043c\u044f",EscapeHtml(d.Name));n+=addHtmlValue("\u0422\u0438\u043f",e);n+=addHtmlValue("\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430",a);n+=addHtmlValue("\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,e=d[l],b=xxSystemDefenceFilters[l],2==
1210 +b&&4==e.length&&(e=hex2rstr(e),e=e.charCodeAt(0)+"."+e.charCodeAt(1)+"."+e.charCodeAt(2)+"."+e.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("\u0424\u0438\u043b\u044c\u0442\u0440"+a,e));n+=addHtmlValue("\u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0430 \u043c\u0430\u0442\u0447\u0435",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,"\u0424\u0438\u043b\u044c\u0442\u0440 Ethernet \u2116"+d.InstanceID,5,showFilterDetailsOk,n,[v,d])}}
1211 function showFilterDetailsOk(b,c){2==b&&amtstack.Delete(c[0],c[1],deleteDefenseFilter)}
1212 function deleteDefenseFilter(b,c,a,d){200!=d?messagebox("\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440","\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f."):PullSystemDefense()}var xxAddDefensePolicyFilters;
1213 function AddDefensePolicy(){if(!xxdialogMode){xxAddDefensePolicyFilters=[];var b;b='<div style=height:26px;margin-top:4px><input id=policyname title="<policy name>:<policy precedence number>" style=float:right;width:260px maxlength=16 onkeyup=AddDefensePolicyUpdate()><div style=padding-top:4px>\u0438\u043c\u044f</div></div><div style=height:26px;margin-top:4px><select id=policytx title="\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430" style=float:right;width:133px><option value=0>Allow<option value=1>\u041a\u0430\u043f\u043b\u044f<option value=2>\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c, \u0433\u0440\u0430\u0444<option value=3>Drop, \u0433\u0440\u0430\u0444<option value=4>Allow, \u0433\u0440\u0430\u0444, \u0441\u043e\u0431\u044b\u0442\u0438\u0435<option value=5>Drop, \u0433\u0440\u0430\u0444, \u0441\u043e\u0431\u044b\u0442\u0438\u0435</select><select id=policyrx style=float:right;width:133px title="\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430"><option value=0>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0442\u044c<option value=1>\u041a\u0430\u043f\u043b\u044f<option value=2>\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c, \u0433\u0440\u0430\u0444<option value=3>Drop, \u0433\u0440\u0430\u0444<option value=4>Allow, \u0433\u0440\u0430\u0444, \u0441\u043e\u0431\u044b\u0442\u0438\u0435<option value=5>Drop, \u0433\u0440\u0430\u0444, \u0441\u043e\u0431\u044b\u0442\u0438\u0435</select><div style=padding-top:4px>TX / RX \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e</div></div>';
1214 b+="<div id=policyFilters></div>";if(0<xxSystemDefense.AMT_Hdr8021Filter.responses.length||0<xxSystemDefense.AMT_IPHeadersFilter.responses.length){b+="<div style=height:26px;margin-top:4px><div style=float:right><select id=xfilter style=width:186px>";for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];b+="<option value="+a.InstanceID+">"+a.Name}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],
1215 b+="<option value="+a.InstanceID+">"+a.Name;b+="</select><input id=addFilterButton type=button value=Add style=width:80px onclick=addFilterButton()></div><div style=padding-top:4px>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440</div></div>"}setDialogMode(11,"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0437\u0430\u0449\u0438\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b",3,AddDefensePolicyOk,b);
1216 AddDefensePolicyUpdate()}}function addFilterButton(){0<=xxAddDefensePolicyFilters.indexOf(Q("xfilter").value)||(xxAddDefensePolicyFilters.push(Q("xfilter").value),AddDefensePolicyUpdate())}function removeFilterButton(b){xxAddDefensePolicyFilters.splice(b,1);AddDefensePolicyUpdate()}
1217 -function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c54",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>\u042d\u0442\u0430 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("\u0423\u0434\u0430\u043b\u0438\u0442\u044c",
1217 +function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c106",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>\u042d\u0442\u0430 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("\u0423\u0434\u0430\u043b\u0438\u0442\u044c",
1218 "removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+GetFilterById(xxAddDefensePolicyFilters[c]).Name+"</b></div></div>";QH("policyFilters",b)}}function GetFilterById(b){for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];if(a.InstanceID==b)return a}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)if(a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],a.InstanceID==b)return a}
1219 function AddDefensePolicyOk(){var b=Q("policytx").value,c=Q("policyrx").value,a=0,d=Q("policyname").value.split(":");2==d.length&&(a=parseInt(d[1]));b={"InstanceID ":0,PolicyName:d[0],PolicyPrecedence:a,TxDefaultCount:1<b,TxDefaultDrop:1==b%2,TxDefaultMatchEvent:3<b,RxDefaultCount:1<c,RxDefaultDrop:1==c%2,RxDefaultMatchEvent:3<c};0<xxAddDefensePolicyFilters.length&&(b.FilterCreationHandles=xxAddDefensePolicyFilters);amtstack.Create("AMT_SystemDefensePolicy",b,AddDefensePolicyOk2)}
1220 function AddDefensePolicyOk2(b,c,a,d){200!=d?messagebox("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0437\u0430\u0449\u0438\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b","\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443, \u043e\u0448\u0438\u0431\u043a\u0430 #"+d):PullSystemDefense()}
@@ -1222,117 +1222,136 @@ function showPolicyDetails(b){if(!xxdialogMode){var c=xxSystemDefense.AMT_System
1222 ", \u0421\u043e\u0431\u044b\u0442\u0438\u0435");a+=addHtmlValue("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 TX \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e",d);d=1==c.RxDefaultDrop?"Drop":"Allow";1==c.RxDefaultCount&&(d+=", Count");1==c.RxDefaultMatchEvent&&(d+=", Event");a+=addHtmlValue("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 RX \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e",d);if(c.FilterCreationHandles)for(b in c.FilterCreationHandles)a+=
1223 addHtmlValue("\u0424\u0438\u043b\u044c\u0442\u0440 \u2116"+(+b+1),GetFilterById(c.FilterCreationHandles[b]).Name);setDialogMode(11,format("\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u2116",c.InstanceID.substring(20)),5,showPolicyDetailsOk,a,c)}}function showPolicyDetailsOk(b,c){2==b&&amtstack.Delete("AMT_SystemDefensePolicy",c,deleteDefensePolicy)}
1224 function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443","\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f."):PullSystemDefense()}
1225 -var xxWireless;function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService *AMT_BootCapabilities".split(" "),processWireless)}function wifiRefresh(){xxdialogMode||PullWireless()}
1225 +var xxWireless;function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService CIM_IEEE8021xSettings".split(" "),processWireless)}function wifiRefresh(){xxdialogMode||PullWireless()}
1226 var xxWifiState={3:"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",32768:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0432 S0",32769:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0432 S0, Sx / AC"},xxRadioState={2:"\u041d\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d",3:"\u043e\u0442",6:"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d"},xxWifiAuthenticationMethod={1:"\u0414\u0440\u0443\u0433\u043e\u0439",2:"\u043e\u0442\u043a\u0440\u044b\u0442\u043e",3:"\u041e\u0431\u0449\u0438\u0439 \u043a\u043b\u044e\u0447",
1227 -4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE"},xxWifiEncryptionMethod={1:"\u0414\u0440\u0443\u0433\u043e\u0439",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"\u041d\u0438\u043a\u0442\u043e"};function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1228 -function showWirelessInfo(){if(xxWireless){var b,c,a="",d,g;if(xxWireless.CIM_WiFiPortCapabilities.response){g="<br><h2>\u041f\u0440\u043e\u0444\u0438\u043b\u0438 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439</h2>"+TableStart2();g+="<tr><td class=r2 style=padding-left:15px><br>\u041f\u0440\u043e\u0444\u0438\u043b\u0438 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 Intel&reg; AMT \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0442\u0438.<br><br>";
1229 -for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b&&(g+="<div class=itemBar onclick=showWifiDetails("+c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+" &nbsp; ",xxAccountAdminName&&(g+=AddButton2("\u0423\u0434\u0430\u043b\u0438\u0442\u044c",'wifiRemoveButton("'+c+'")')),g+="</div><div style=padding-top:3px><b>"+
1230 -EscapeHtml(d.ElementName)+"</b></div></div>",a++);0==a&&(g+="<i>\u041f\u0440\u043e\u0444\u0438\u043b\u0438 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442</i><br>");g+="<br><td class=r2>";g=xxAccountAdminName?g+TableEnd(AddButton("\u041d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c","showWifiNewProfile()")):g+TableEnd("");QH(20,g+"<br>")}}}
1227 +4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE IEEE 802.1x",32769:"WPA3 OWE IEEE 802.1x"},xxWifiEncryptionMethod={1:"\u0414\u0440\u0443\u0433\u043e\u0439",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"\u041d\u0438\u043a\u0442\u043e"};function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1228 +function showWirelessInfo(){if(xxWireless){var b,c,a="",d,e;if(xxWireless.CIM_WiFiPortCapabilities.response){e="<br><h2>\u041f\u0440\u043e\u0444\u0438\u043b\u0438 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439</h2>"+TableStart2();e+="<tr><td class=r2 style=padding-left:15px><br>\u041f\u0440\u043e\u0444\u0438\u043b\u0438 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 Intel&reg; AMT \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0442\u0438.<br><br>";
1229 +for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)if(d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b){var v="",n=null,l="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");if(xxWireless.CIM_IEEE8021xSettings.responses)for(var p in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[p].ElementName==d.ElementName&&
1230 +(n=xxWireless.CIM_IEEE8021xSettings.responses[p]);n&&(v=", "+l[n.AuthenticationProtocol]);e+="<div class=itemBar onclick=showWifiDetails("+c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+v+" &nbsp; ";xxAccountAdminName&&(e+=AddButton2("\u0423\u0434\u0430\u043b\u0438\u0442\u044c",'wifiRemoveButton("'+c+'")'));e+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>";
1231 +a++}0==a&&(e+="<i>\u041f\u0440\u043e\u0444\u0438\u043b\u0438 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442</i><br>");e+="<br><td class=r2>";e=xxAccountAdminName?e+TableEnd(AddButton("\u041d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c","showWifiNewProfile()")):e+TableEnd("");QH(20,e+"<br>")}}}
1232 function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"Wireless State",3,wifiStateDlg,b)}}
1233 function wifiStateDlg(){amtstack.CIM_WiFiPort_RequestStateChange(document.querySelector("input[name=d11]:checked").value,null,function(){amtstack.Get("CIM_WiFiPort",function(b,c,a,d){200==d&&(xxWireless.CIM_WiFiPort.response=a.Body,showWirelessInfo())})})}
1234 function showWifiSyncDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d11 id=wl0 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e</label><br>");b+="<label><input type=radio name=d11 id=wl0 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e</label><br>";
1234 -setDialogMode(11,"Local Profile Sync",3,showWifiSyncDlgEx,b)}}function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,g){200==g&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1235 +setDialogMode(11,"Local Profile Sync",3,showWifiSyncDlgEx,b)}}function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,e){200==e&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1236 function showUefiWifiCoExDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d12 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Disabled</label><br>");b+="<label><input type=radio name=d12 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Enabled</label><br>";setDialogMode(11,"UEFI Wifi CoEx Profile Sharing",3,UefiWifiCoExDlg,b)}}
1236 -function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,g){200==g&&PullWireless()})}
1237 -function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("\u0418\u043c\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044f",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",b.SSID);c+=addHtmlValue("\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435",
1238 -xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442",b.Priority);messagebox("\u0411\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c",c+"</div>")}}
1239 -function wifiRemoveButton(b){xxdialogMode||(QH(60,format('\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 "{0}"?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"\u0411\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c",3,function(){removeWifiButtonEx(b)}))}
1240 -function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}function removeWifiEntryResponse(b,c,a,d,g){methodcheck(a)||amtstack.Enum("CIM_WiFiEndpointSettings",function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c,showWirelessInfo())})}
1241 -function showWifiNewProfile(){if(!xxdialogMode){var b="";for(i=1;256>i;i++){var c=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==i&&(c=0);c&&(b+="<option value="+i+">"+i)}QH("c24",b);QV("c26",13<amtversion);c25.value=6;c27.value=4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0442\u0438",
1242 -3,function(){addWifiProfile()});updateWifiDialog()}}
1243 -function addWifiProfile(){amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},{__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c27.value,SSID:c23.value,Priority:c24.value,
1244 -PSKPassPhrase:c28.value},null,null,null,removeWifiEntryResponse)}
1245 -function updateWifiDialog(){var b=!0,c=c25.value,a=c27.value;QV(66,4>c);QV(65,3<c);QV(64,3<c);QV(67,4>c);4>c&&(3==a||4==a)&&(c27.value=2);3<c&&(2==a||5==a)&&(c27.value=3);32768==c&&(c27.value=4);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);QE("c54",1==b&&0<c22.value.length&&0<c23.value.length&&7<c28.value.length&&
1246 -c28.value==c29.value)}function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1237 +function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,e){200==e&&PullWireless()})}
1238 +function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("\u0418\u043c\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044f",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",EscapeHtml(b.SSID));c+=addHtmlValue("\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435",
1239 +xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442",b.Priority);var a=null,d="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");if(xxWireless.CIM_IEEE8021xSettings.responses)for(var e in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[e].ElementName==b.ElementName&&(a=xxWireless.CIM_IEEE8021xSettings.responses[e]);
1240 +a&&(c=c+'<div style="width:100%;border-bottom:1px solid #000;margin-bottom:5px;margin-top:5px">802.11x</div>'+addHtmlValue("\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f",d[a.AuthenticationProtocol]),a.Domain&&(c+=addHtmlValue("Domain",EscapeHtml(a.Domain))),a.Username&&(c+=addHtmlValue("\u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",EscapeHtml(a.Username))));c+="</div>";messagebox("\u0411\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c",
1241 +c)}}
1242 +function wifiRemoveButton(b){xxdialogMode||(QH(61,format('\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 "{0}"?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"\u0411\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c",3,function(){removeWifiButtonEx(b)}))}
1243 +function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1244 +function removeWifiEntryResponse(b,c,a,d,e){methodcheck(a)||amtstack.BatchEnum("",["CIM_WiFiEndpointSettings","CIM_IEEE8021xSettings"],function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c.CIM_WiFiEndpointSettings.responses,xxWireless.CIM_IEEE8021xSettings.responses=c.CIM_IEEE8021xSettings.responses,showWirelessInfo())})}
1245 +function showWifiNewProfile(){if(!xxdialogMode){for(var b="",c=1;256>c;c++){var a=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==c&&(a=0);a&&(b+="<option value="+c+">"+c)}QH("c24",b);var b="<option value=-1>"+EscapeHtml("\u041d\u0438\u043a\u0442\u043e")+"</option>",a="<option value=-1>"+EscapeHtml("\u041d\u0438\u043a\u0442\u043e")+"</option>",c;for(c in xxCertificates)xxCertificates[c].TrustedRootCertficate?a+='<option value="'+
1246 +c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+"</option>":xxCertificates[c].XPrivateKey&&(b+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+"</option>");QH("c50",b);QH("c52",a);c="<option value=32769>WPA3 OWE IEEE 802.1x</option><option value=32768>WPA3 SAE IEEE 802.1x</option>";c+="<option value=7>WPA2 IEEE 802.1x</option>";c+="<option value=5>WPA IEEE 802.1x</option>";c+="<option value=6>WPA2 PSK</option>";c+="<option value=4>WPA PSK</option>";
1247 +QH("c25",c);c25.value=6;c26.value=4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0442\u0438",3,function(){addWifiProfile()});updateWifiDialog()}}
1248 +function addWifiProfile(){var b,c,a,d={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c26.value,SSID:c23.value,Priority:c24.value};if(4==c25.value||6==c25.value)d.PSKPassPhrase=c28.value;if(5==c25.value||7==c25.value||32768==c25.value||
1249 +32769==c25.value)b={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_IEEE8021xSettings"),ElementName:"8021x-"+c22.value,InstanceID:"8021x-"+c22.value,ActiveInS0:1==Q("c54").value,AuthenticationProtocol:Q("c32").value},""!=Q("c44").value&&(b.RoamingIdentity=Q("c44").value),""!=Q("c34").value&&(b.ServerCertificateName=Q("c34").value,b.ServerCertificateNameComparison=Q("c36").value),
1250 +""!=Q("c40").value&&(b.Username=Q("c40").value),""!=Q("c42").value&&(b.Password=Q("c42").value),""!=Q("c38").value&&(b.Domain=Q("c38").value),3<Q("c32").value&&(b.ProtectedAccessCredential=Q("c46").value,b.PACPassword=Q("c48").value),0<=parseInt(Q("c50").value)&&(c='<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">'+
1251 +xxCertificates[parseInt(Q("c50").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>"),0<=parseInt(Q("c52").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">'+
1252 +xxCertificates[parseInt(Q("c52").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>");console.log("wifiepsettinginput",JSON.stringify(d,null,2));console.log("netAuthProfile",JSON.stringify(b,null,2));console.log("netAuthSettingsClientCert",c);console.log("netAuthSettingsServerCaCert",a);amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},d,b,c,a,removeWifiEntryResponse)}
1253 +function updateWifiDialog(){var b=!0,c=c25.value,a=c26.value;4>c&&(3==a||4==a)&&(c26.value=2);3<c&&(2==a||5==a)&&(c26.value=3);if(32768==c||32769==c)c26.value=4;QV("c27",4==c||6==c);QV("c30",5==c||7==c||32768==c||32769==c);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);0==c22.value.length&&0==c23.value.length&&(b=!1);4!=c&&6!=c||
1254 +!(8>c28.value.length||63<c28.value.length||c28.value!=c29.value)||(b=!1);QE("c106",b);updateNetAuthDialog()}function updateNetAuth2Dialog(){QV("c35",""!=Q("c33").value);QV("c45",3<Q("c32").value);QV("c47",3<Q("c32").value)}
1255 +function editNetAuthProfile(){if(!xxdialogMode){var b="<option value=-1>"+EscapeHtml("\u041d\u0438\u043a\u0442\u043e")+"</option>",c="<option value=-1>"+EscapeHtml("\u041d\u0438\u043a\u0442\u043e")+"</option>",a;for(a in xxCertificates)xxCertificates[a].TrustedRootCertficate?c+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>":xxCertificates[a].XPrivateKey&&(b+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>");QH("c98",b);QH("c100",
1256 +c);b=amtsysstate.AMT_8021XProfile.responses.Body;Q("c78").value=b.Enabled?1:0;Q("c102").value=b.ActiveInS0?1:0;Q("c104").value=b.PxeTimeout;if(b.Enabled){Q("c80").value=b.AuthenticationProtocol;Q("c92").value=b.RoamingIdentity?b.RoamingIdentity:"";Q("c82").value=b.ServerCertificateName?b.ServerCertificateName:"";Q("c84").value=b.ServerCertificateNameComparison?b.ServerCertificateNameComparison:0;
1257 +Q("c88").value=b.Username?b.Username:"";Q("c90").value=b.Password?b.Password:"";Q("c86").value=b.Domain?b.Domain:"";Q("c94").value=b.ProtectedAccessCredential?b.ProtectedAccessCredential:"";Q("c96").value=b.PACPassword?b.PACPassword:"";var d=c=-1;b.ServerCertificateIssuer&&(c=b.ServerCertificateIssuer.ReferenceParameters.SelectorSet.Selector.Value);b.ClientCertificate&&(d=b.ClientCertificate.ReferenceParameters.SelectorSet.Selector.Value);for(a in xxCertificates)xxCertificates[a].InstanceID==
1258 +c&&(Q("c100").value=a),xxCertificates[a].InstanceID==d&&(Q("c98").value=a)}setDialogMode(27,"802.1x Profile",3,function(){setNetAuthProfile()});updateNetAuthDialog()}}
1259 +function updateNetAuthDialog(){QV("c79",1==Q("c78").value);QV("c81",1==Q("c78").value);QV("c83",1==Q("c78").value&&""!=Q("c82").value);QV("c85",1==Q("c78").value);QV("c87",1==Q("c78").value);QV("c89",1==Q("c78").value);QV("c91",1==Q("c78").value);QV("c93",1==Q("c78").value&&
1260 +3<Q("c80").value);QV("c95",1==Q("c78").value&&3<Q("c80").value);QV("c97",1==Q("c78").value);QV("c99",1==Q("c78").value);QV("c101",1==Q("c78").value);QV("c103",1==Q("c78").value)}
1261 +function setNetAuthProfile(){var b=Clone(amtsysstate.AMT_8021XProfile.responses.Body);b.Enabled=1==Q("c78").value;b.Enabled&&(b.ActiveInS0=1==Q("c102").value,b.AuthenticationProtocol=Q("c80").value,""!=Q("c92").value?b.RoamingIdentity=Q("c92").value:delete b.RoamingIdentity,""!=Q("c82").value?(b.ServerCertificateName=Q("c82").value,b.ServerCertificateNameComparison=Q("c84").value):
1262 +(delete b.ServerCertificateName,delete b.ServerCertificateNameComparison),""!=Q("c88").value?b.Username=Q("c88").value:delete b.Username,""!=Q("c90").value?b.Password=Q("c90").value:delete b.Password,""!=Q("c86").value?b.Domain=Q("c86").value:delete b.Domain,3<Q("c80").value?(b.ProtectedAccessCredential=Q("c94").value,b.PACPassword=Q("c96").value):(delete b.ProtectedAccessCredential,delete b.PACPassword),
1263 +0<=parseInt(Q("c98").value)?b.ClientCertificate="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c98").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ClientCertificate,0<=parseInt(Q("c100").value)?b.ServerCertificateIssuer="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+
1264 +amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c100").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ServerCertificateIssuer,b.PxeTimeout=Q("c104").value);amtstack.Put("AMT_8021XProfile",b,setNetAuthProfileEx)}
1265 +function setNetAuthProfileEx(b,c,a,d){200==d?(amtsysstate.AMT_8021XProfile.responses.Body=amtsysstate.AMT_8021XProfile.response=a.Body,updateSystemStatus()):a.Header.WsmanError?messagebox("802.1x Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("802.1x Error","Error, Status = "+d)}
1266 +function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1267 var DMTFCPUStatus="\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439;\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e;\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c;\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e BIOS (\u043e\u0448\u0438\u0431\u043a\u0430 POST);\u0432\u0445\u043e\u043b\u043e\u0441\u0442\u0443\u044e;\u0414\u0440\u0443\u0433\u043e\u0439".split(";"),DMTFMemType="\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439;\u0414\u0440\u0443\u0433\u043e\u0439;\u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u041e\u0417\u0423;\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 DRAM;\u041a\u044d\u0448-\u043f\u0430\u043c\u044f\u0442\u044c;EDO;EDRAM;VRAM;SRAM;\u0431\u0430\u0440\u0430\u043d;\u041f\u0417\u0423;\u0432\u0441\u043f\u044b\u0448\u043a\u0430;EEPROM;FEPROM;EPROM;CDRAM;3DRAM;SDRAM;SGRAM;RDRAM;DDR;DDR-2;BRAM;FB-DIMM;DDR3;FBD2;DDR4;LPDDR;LPDDR2;LPDDR3;LPDDR4".split(";"),
1268 DMTFMemFormFactor=";\u0414\u0440\u0443\u0433\u043e\u0439;\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439;SIMM;\u0413\u041b\u041e\u0422\u041e\u041a;\u0447\u0438\u043f;DIP;ZIP;\u041f\u0440\u043e\u043f\u0440\u0438\u0435\u0442\u0430\u0440\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0430;DIMM;TSOP;\u0420\u044f\u0434 \u0447\u0438\u043f\u0441\u043e\u0432;RIMM;SODIMM;SRIMM;FB-DIM".split(";"),DMTFProcFamilly={191:"\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 Intel&reg; Core &trade; 2 Duo",
1269 192:"\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 Intel&reg; Core &trade; 2 Solo",193:"\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 Intel&reg; Core &trade; 2 Extreme",194:"\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 Intel&reg; Core &trade; 2 Quad",195:"\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 Intel&reg; Core &trade; 2 Extreme \u0434\u043b\u044f \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u041f\u041a",196:"\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 Intel&reg; Core &trade; 2 Duo \u0434\u043b\u044f \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u041f\u041a",
1270 197:"\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 Intel&reg; Core &trade; 2 Solo \u0434\u043b\u044f \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u041f\u041a",198:"\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 Intel&reg; Core &trade; i7",199:"\u0414\u0432\u0443\u0445\u044a\u044f\u0434\u0435\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 Intel&reg; Celeron&reg;"},HardwareInventory;
1251 -function processHardware(b,c,a,d){if(200==d){var g;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c...","SaveHardwareLog()")+" \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.");
1271 +function processHardware(b,c,a,d){if(200==d){var e;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c...","SaveHardwareLog()")+" \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.");
1272 c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430</h2>"+FullTable({"\u041a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c":c.Model,"\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c":c.Manufacturer,"\u0412\u0435\u0440\u0441\u0438\u044f":c.Version,"\u0421\u0435\u0440\u0438\u0439\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440":c.SerialNumber,
1273 "\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u044b":guidToStr(a.CIM_SystemPackaging.responses[0].PlatformGUID).toLowerCase()},"");b+="<br><h2>\u043f\u043b\u0438\u043d\u0442\u0443\u0441</h2>";b+=FullTable({"\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c":d.Manufacturer,"\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430":d.Model,"\u0412\u0435\u0440\u0441\u0438\u044f":d.Version,
1274 "\u0421\u0435\u0440\u0438\u0439\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440":d.SerialNumber,"\u0422\u0435\u0433 \u0430\u043a\u0442\u0438\u0432\u0430":d.Tag,"\u0421\u043c\u0435\u043d\u043d\u0430\u044f?":1==d.CanBeFRUed?"Yes":"No"},"");b+="<br><h2>BIOS</h2>";b+=FullTable({"\u043f\u0440\u043e\u0434\u0430\u0432\u0435\u0446":a.CIM_BIOSElement.response.Manufacturer,"\u0412\u0435\u0440\u0441\u0438\u044f":v,"\u0414\u0430\u0442\u0430 \u0432\u044b\u043f\u0443\u0441\u043a\u0430":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",
1255 -{timeZone:"UTC"})},"");b+="<br>";for(g in a.CIM_Processor.responses)c=a.CIM_Processor.responses[g],d=a.CIM_Chip.responses[g],b+="<h2>\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 "+(parseInt(g)+1)+"</h2>",b+=FullTable({"\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c":trademarks(d.Manufacturer),"\u0441\u0435\u043c\u044c\u044f":DMTFProcFamilly[c.Family],"\u0412\u0435\u0440\u0441\u0438\u044f":trademarks(d.Version),"\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u043e\u0437\u0435\u0442\u043a\u0438":c.MaxClockSpeed+
1256 -" \u041c\u0413\u0446","\u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u043b":DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(g in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[g],b+="<h2>\u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0430\u043c\u044f\u0442\u0438 "+(+g+1)+"</h2>",b+=FullTable({"\u0411\u0430\u043d\u043a \u041c\u0435\u0442\u043a\u0430":c.BankLabel,"\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c":c.Manufacturer,"\u0421\u0435\u0440\u0438\u0439\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440":c.SerialNumber,
1257 -"\u0420\u0430\u0437\u043c\u0435\u0440":parseInt(c.Capacity/1048576)+" \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442","\u0424\u0430\u043a\u0442\u043e\u0440 \u0444\u043e\u0440\u043c\u044b":DMTFMemFormFactor[c.FormFactor],"\u0422\u0438\u043f":DMTFMemType[c.MemoryType],"\u0422\u0435\u0433 \u0430\u043a\u0442\u0438\u0432\u0430":c.Tag,"\u041d\u043e\u043c\u0435\u0440 \u0447\u0430\u0441\u0442\u0438":c.PartNumber},"");b+="<br>";for(g in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[g],
1258 -d=a.CIM_PhysicalPackage.responses[+g+1],b+="<h2>\u041c\u0435\u0434\u0438\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 "+(parseInt(g)+1)+"</h2>",b+=FullTable({"\u043c\u043e\u0434\u0435\u043b\u044c":d.Model,"\u0421\u0435\u0440\u0438\u0439\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440":""==d.SerialNumber?"Unknown":d.SerialNumber,"\u0420\u0430\u0437\u043c\u0435\u0440":parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442"},"");b+="<br>";
1259 -if(null!=a.CIM_Battery.response){c=null;for(g in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[g].PackageType&&(c=a.CIM_PhysicalPackage.responses[g]);null!=c&&(b+="<h2>Battery</h2>",g=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,"\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c":c.Manufacturer,"Manufacture date":g,"\u0421\u0435\u0440\u0438\u0439\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440":c.SerialNumber,
1275 +{timeZone:"UTC"})},"");b+="<br>";for(e in a.CIM_Processor.responses)c=a.CIM_Processor.responses[e],d=a.CIM_Chip.responses[e],b+="<h2>\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 "+(parseInt(e)+1)+"</h2>",b+=FullTable({"\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c":trademarks(d.Manufacturer),"\u0441\u0435\u043c\u044c\u044f":DMTFProcFamilly[c.Family],"\u0412\u0435\u0440\u0441\u0438\u044f":trademarks(d.Version),"\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u043e\u0437\u0435\u0442\u043a\u0438":c.MaxClockSpeed+
1276 +" \u041c\u0413\u0446","\u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u043b":DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(e in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[e],b+="<h2>\u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0430\u043c\u044f\u0442\u0438 "+(+e+1)+"</h2>",b+=FullTable({"\u0411\u0430\u043d\u043a \u041c\u0435\u0442\u043a\u0430":c.BankLabel,"\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c":c.Manufacturer,"\u0421\u0435\u0440\u0438\u0439\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440":c.SerialNumber,
1277 +"\u0420\u0430\u0437\u043c\u0435\u0440":parseInt(c.Capacity/1048576)+" \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442","\u0424\u0430\u043a\u0442\u043e\u0440 \u0444\u043e\u0440\u043c\u044b":DMTFMemFormFactor[c.FormFactor],"\u0422\u0438\u043f":DMTFMemType[c.MemoryType],"\u0422\u0435\u0433 \u0430\u043a\u0442\u0438\u0432\u0430":c.Tag,"\u041d\u043e\u043c\u0435\u0440 \u0447\u0430\u0441\u0442\u0438":c.PartNumber},"");b+="<br>";for(e in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[e],
1278 +d=a.CIM_PhysicalPackage.responses[+e+1],b+="<h2>\u041c\u0435\u0434\u0438\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 "+(parseInt(e)+1)+"</h2>",b+=FullTable({"\u043c\u043e\u0434\u0435\u043b\u044c":d.Model,"\u0421\u0435\u0440\u0438\u0439\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440":""==d.SerialNumber?"Unknown":d.SerialNumber,"\u0420\u0430\u0437\u043c\u0435\u0440":parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442"},"");b+="<br>";
1279 +if(null!=a.CIM_Battery.response){c=null;for(e in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[e].PackageType&&(c=a.CIM_PhysicalPackage.responses[e]);null!=c&&(b+="<h2>Battery</h2>",e=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,"\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c":c.Manufacturer,"Manufacture date":e,"\u0421\u0435\u0440\u0438\u0439\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440":c.SerialNumber,
1280 "\u0422\u0438\u043f":"\u0414\u0440\u0443\u0433\u043e\u0439;\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],"Design capacity":a.CIM_Battery.response.DesignCapacity+" mWatt-hours","Design voltage":a.CIM_Battery.response.DesignVoltage+" mVolts"},c.OtherIdentifyingInfo&&(a["Other Info"]=c.OtherIdentifyingInfo),b+=FullTable(a,""))}b+="<br>";QH(16,
1281 b);updateSystemStatus()}}function SaveHardwareLog(){!xxdialogMode&&HardwareInventory&&SaveJsonFile("IntelAmtHardware","hardware","\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0438 Intel AMT",HardwareInventory)}var AmtSystemPowerSchemes=null;function PullPowerPolicy(){amtstack.Enum("AMT_SystemPowerScheme",powerPolicyResponse)}
1282 function powerPolicyResponse(b,c,a,d){AmtSystemPowerSchemes=a;updateSystemStatus()}
1283 function showPowerPolicyDlg(b){if(!xxdialogMode){for(var c="",a=0;a<AmtSystemPowerSchemes.length;a++)c+='<input type=radio name=powerpolicy value="'+AmtSystemPowerSchemes[a].InstanceID+'" '+(AmtSystemPowerSchemes[a].SchemeGUID==b?" checked":"")+">"+AmtSystemPowerSchemes[a].Description+"<br>";setDialogMode(11,"\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u044d\u043d\u0435\u0440\u0433\u043e\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f Intel&reg; AMT",3,showPowerPolicyDlgOk,
1284 c)}}function showPowerPolicyDlgOk(){for(var b=null,c=0,a=document.getElementsByTagName("input");c<a.length;c++)"powerpolicy"==a[c].name&&a[c].checked&&(b=a[c].value);amtstack.AMT_SystemPowerScheme_SetPowerScheme(showPowerPolicyDlgOkDone,b)}function showPowerPolicyDlgOkDone(b,c,a,d){200==d&&PullSystemStatus()}var xxAccountAdminName,xxAccountRealmInfo,xxAccountEnabledInfo={},xxAccountFetch,showHiddenAccounts=!1;
1285 function PullUserInfo(){xxAccountFetch=1;delete xxAccountAdminName;xxAccountRealmInfo={};amtstack.AMT_AuthorizationService_GetAdminAclEntry(getAdminAclEntryResponse);amtstack.AMT_AuthorizationService_EnumerateUserAclEntries(1,enumerateUserAclEntriesResponse)}function getAdminAclEntryResponse(b,c,a,d){200==d&&(xxAccountRealmInfo[-1]={AccessPermission:999,DigestUsername:a.Body.Username,Realms:null},xxAccountAdminName=a.Body.Username,updateAccounts())}
1266 -function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var g in a.Body.Handles)b=a.Body.Handles[g],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1267 -function getUserAclEntryExResponse(b,c,a,d,g){xxAccountFetch--;200==d&&(a.Body.Handle=g,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[g]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,g){200==d&&(xxAccountEnabledInfo[g]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,g){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(g,getAclEnabledStateResponse,g))}
1268 -function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438 Intel&reg; AMT \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,g=!1,v=0;a.DigestUsername?
1269 -(d=a.DigestUsername,g="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!g){var n="";if(999!=a.AccessPermission){2==v&&(n+="\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Realms[c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="\u0430\u0443\u0434\u0438\u0442\u043e\u0440,");n=0<=a.Realms.indexOf(3)?n+"\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440":
1270 -1==l?n+"1 \u0446\u0430\u0440\u0441\u0442\u0432\u043e":n+(l+" \u0446\u0430\u0440\u0441\u0442\u0432")}else n+="\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!g&&xxAccountAdminName&&(b+=" "+AddButton2("\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c...",
1286 +function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var e in a.Body.Handles)b=a.Body.Handles[e],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1287 +function getUserAclEntryExResponse(b,c,a,d,e){xxAccountFetch--;200==d&&(a.Body.Handle=e,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[e]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,e){200==d&&(xxAccountEnabledInfo[e]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,e){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(e,getAclEnabledStateResponse,e))}
1288 +function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438 Intel&reg; AMT \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,e=!1,v=0;a.DigestUsername?
1289 +(d=a.DigestUsername,e="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!e){var n="";if(999!=a.AccessPermission){2==v&&(n+="\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Realms[c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="\u0430\u0443\u0434\u0438\u0442\u043e\u0440,");n=0<=a.Realms.indexOf(3)?n+"\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440":
1290 +1==l?n+"1 \u0446\u0430\u0440\u0441\u0442\u0432\u043e":n+(l+" \u0446\u0430\u0440\u0441\u0442\u0432")}else n+="\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!e&&xxAccountAdminName&&(b+=" "+AddButton2("\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c...",
1291 "changeAccountButton(event,"+a.Handle+")"));b+='</div><div style=padding-top:3px;width:330px;float:left;overflow-x:hidden title="'+d+'"><b>'+d+"</b></div><div style=padding-top:3px>"+n+"</div></div>"}}c='<div style=float:right;margin-right:8px><a title="\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438" style=color:gray;cursor:pointer onclick=toggleAccountButton()>'+
1272 -(showHiddenAccounts?"&#x25B2;":"&#x25BC;")+"</a></div><div>&nbsp;"+AddRefreshButton("xxAccountFetch=999;PullUserInfo()");xxAccountAdminName&&(c+=AddButton("\u041d\u043e\u0432\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442","newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}
1292 +(showHiddenAccounts?"&#x25B2;":"&#x25BC;")+"</a></div><div>&nbsp;"+AddRefreshButton("xxAccountFetch=999;PullUserInfo()");xxAccountAdminName&&(c+=AddButton("\u041d\u043e\u0432\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442","newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(22,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1293 function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1294 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442",-1==c?3:7,
1295 function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"\u041d\u043e\u0432\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1276 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,g=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("\u041e\u0448\u0438\u0431\u043a\u0430 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430","\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+
1277 -":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,l,n,g,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,g,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}
1278 -function userAclEntryExResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}
1279 -function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,
1280 -c)}}function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["\u0422\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u0442\u043d\u044b\u0439","\u0422\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0442\u044c","\u0412\u0441\u0435 (\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0438 \u043f\u043e \u0441\u0435\u0442\u0438)"];
1281 -function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,g=c.DigestUsername;g||(g=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("\u0438\u043c\u044f",g);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("\u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439",1==xxAccountEnabledInfo[b].Enabled?"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e":"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e"));if(g==xxAccountAdminName)a+=
1296 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("\u041e\u0448\u0438\u0431\u043a\u0430 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430","\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+
1297 +":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}
1298 +function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1299 +function updateRealms(b){QV(62,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(63,
1300 +c)}}function updateAccountDialog(){var b=!0;if("none"!=Q(62).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c106",b)}var xxUserPermissions=["\u0422\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u0442\u043d\u044b\u0439","\u0422\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0442\u044c","\u0412\u0441\u0435 (\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0438 \u043f\u043e \u0441\u0435\u0442\u0438)"];
1301 +function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,e=c.DigestUsername;e||(e=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("\u0438\u043c\u044f",e);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("\u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439",1==xxAccountEnabledInfo[b].Enabled?"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e":"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e"));if(e==xxAccountAdminName)a+=
1302 addHtmlValue("\u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435","\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440");else{var a=a+addHtmlValue("\u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v="\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440",0<=c.Realms.indexOf(20)&&(v+="\u0410\u0443\u0434\u0438\u0442\u043e\u0440");else for(d in xxAccountRealmInfo[b].Realms)""!=
1283 -amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="\u041d\u0438\u043a\u0442\u043e");a+=addHtmlValue("Realms","")+"<b>"+v+"</b>"}messagebox("\u0421\u0447\u0435\u0442"+g,a+"</div>")}}
1284 -function wsmanQuery(){QH(24,"");var b=getSelectedOptions(Q(22)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(23,!1),c&&0<c.length&&amtstack.BatchEnum("\u0431\u0440\u0430\u0443\u0437\u0435\u0440",c,browserResponse,null,!0))}
1285 -function browserResponse(b,c,a,d){QE(23,!0);b="";for(var g in a)c=a[g],b+="<h2>"+g+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(\u041f\u0443\u0441\u0442\u043e)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>\u041e\u0448\u0438\u0431\u043a\u0430 #"+c.status+"</div>"),b+="</div><br>";QH(24,b)}
1303 +amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="\u041d\u0438\u043a\u0442\u043e");a+=addHtmlValue("Realms","")+"<b>"+v+"</b>"}messagebox("\u0421\u0447\u0435\u0442"+e,a+"</div>")}}
1304 +function wsmanQuery(){QH(25,"");var b=getSelectedOptions(Q(23)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(24,!1),c&&0<c.length&&amtstack.BatchEnum("\u0431\u0440\u0430\u0443\u0437\u0435\u0440",c,browserResponse,null,!0))}
1305 +function browserResponse(b,c,a,d){QE(24,!0);b="";for(var e in a)c=a[e],b+="<h2>"+e+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(\u041f\u0443\u0441\u0442\u043e)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>\u041e\u0448\u0438\u0431\u043a\u0430 #"+c.status+"</div>"),b+="</div><br>";QH(25,b)}
1306 function wsmanFilter(){var b=c0.value.toLowerCase(),c;for(c in AllWsman)QV("WSB-"+AllWsman[c],""==b||0<=AllWsman[c].toLowerCase().indexOf(b))}function connectTerminal(){terminal&&(0==terminal.State?(terminal.tlsv1only=amtstack.wsman.comm.tlsv1only,terminal.Start(currentMeshNode._id,16994,"*","*",0)):terminal.Stop())}
1287 -function onTerminalStateChange(b,c){c4.value=0==c?"Connect":"\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c";Q(29).textContent=StatusStrs[c];QE(34,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection of not supported.");
1288 -break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(31).value="100x30",terminal.m.Init(100,30)):(Q(31).value="80x25",terminal.m.Init(80,25))}
1289 -var terminalEmulations=["UTF8 \u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b","\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 ASCII","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(33).value=terminalEmulations[terminal.m.terminalEmulation]}
1290 -function termToggleFx(){Q(32).value=["Intel (F10 = ESC + [OM)","\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(30).value="LF",terminal.m.lineFeed="\n"):(Q(30).value="CR + LF",terminal.m.lineFeed="\r\n")}
1307 +function onTerminalStateChange(b,c){c4.value=0==c?"Connect":"\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c";Q(30).textContent=StatusStrs[c];QE(35,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection is not supported.");
1308 +break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(32).value="100x30",terminal.m.Init(100,30)):(Q(32).value="80x25",terminal.m.Init(80,25))}
1309 +var terminalEmulations=["UTF8 \u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b","\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 ASCII","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(34).value=terminalEmulations[terminal.m.terminalEmulation]}
1310 +function termToggleFx(){Q(33).value=["Intel (F10 = ESC + [OM)","\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 (F10 = ESC + 0)","VT100 + (F10 = ESC + [OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(31).value="LF",terminal.m.lineFeed="\n"):(Q(31).value="CR + LF",terminal.m.lineFeed="\r\n")}
1311 function terminalCaptureToggle(b){if(!xxdialogMode)if(void 0==terminal.m.capture)terminal.m.capture="",c3.value="\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0442";else{if(0<terminal.m.capture.length){b="TerminalCapture";var c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+
1312 "-"+("0"+c.getMinutes()).slice(-2);saveAs(data2blob(terminal.m.capture),b+".txt")}delete terminal.m.capture;c3.value="\u041d\u0430\u0447\u0430\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0442"}}function terminal_FileSelectHandler(b){haltEvent(b);if(3==terminal.State&&null!=b.dataTransfer&&1==b.dataTransfer.files.length){var c=new FileReader;c.onload=terminal_onSetupBinRead;c.readAsText(b.dataTransfer.files[0])}}
1313 function terminal_onSetupBinRead(b){d3pastetextarea.value=b.target.result;setDialogMode(3,"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c",3,termPaste)}var desktopScreenInfo=null,desktopPollTimer=null,webRtcDesktop=null;
1314 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1315 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1296 -function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1297 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1316 +function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&(null==amtsysstate||null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&null!=amtsysstate.IPS_OptInService.response&&0!=amtsysstate.IPS_OptInService.response.OptInRequired)?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&
1317 +null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1318 0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1319 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1320 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1321 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
1322 "\r\n"},webRtcDesktop.webrtc.oniceconnectionstatechange=function(){null==webRtcDesktop||null==webRtcDesktop.webrtc||"disconnected"!=webRtcDesktop.webrtc.iceConnectionState&&"failed"!=webRtcDesktop.webrtc.iceConnectionState||webRtcDesktopReset()},webRtcDesktop.webrtc.createOffer(function(a){webRtcDesktop.webrtcoffer=a;webRtcDesktop.webrtc.setLocalDescription(a,function(){},webRtcDesktopReset)},webRtcDesktopReset,{mandatory:{OfferToReceiveAudio:!1,OfferToReceiveVideo:!1}})):"answer"==a.action&&null!=
1303 -webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=
1304 -setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(42).innerHTML="")}
1323 +webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.m.ReverseMouseWheel=desktopsettings.reverseMouseWheel,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),
1324 +PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(43).innerHTML="")}
1325 function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(desktopScreenInfo=a.IPS_ScreenSettingData.responses.Body,desktopScreenInfo.KVMRSD=a.IPS_KVMRedirectionSettingData.responses.Body,UpdateDesktopDisplayInfo())}
1306 -function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1326 +function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(43).innerHTML=b+"&nbsp;":Q(43).innerHTML=""}
1327 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1308 -function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Connect":"\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b","The remote device is busy, a session may already be open."):
1309 -3==b.disconnectCode?messagebox("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b","The device indicated that this type of connection of not supported."):5E4==b.disconnectCode?messagebox("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):
1310 -50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",
1311 -ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", \u0421\u043e\u0444\u0442-\u041a\u0412\u041c":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}
1328 +function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Connect":"\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c";var d=3==c&&!urlvars.kvmviewonly;QE(44,d);QE("deskkeys",d);QE("DeskWD",d);QE(45,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b","The remote device is busy, a session may already be open."):
1329 +3==b.disconnectCode?messagebox("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b","The device indicated that this type of connection is not supported."):5E4==b.disconnectCode?messagebox("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):
1330 +50001==b.disconnectCode?a=null!=b.connectTime&&b.connectTime+5E3<Date.now():50002==b.disconnectCode&&messagebox("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&
1331 +QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", \u0421\u043e\u0444\u0442-\u041a\u0412\u041c":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(41).textContent=StatusStrs[desktop.State]+b}
1332 function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430",3,showDesktopSettingsChanged))}
1313 -function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1314 -1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1315 -function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1316 -15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1333 +function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.reverseMouseWheel=d7kvmrmw.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();
1334 +desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1335 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;d7kvmrmw.checked=desktopsettings.reverseMouseWheel;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",
1336 +12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1337 c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1318 -QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1319 -function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1320 -"8px"),center()))}
1321 -function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0432\u043e\u0434 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b",3,showDeskTypeEx,'<div>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442 \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 OK, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e \u043d\u0430\u0431\u0440\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0421\u0428\u0410. \u041f\u0435\u0440\u0435\u0434 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u0443\u0440\u0441\u043e\u0440 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1322 -var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
1323 -function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(48).checked||desktop.m.sendcad()}
1338 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(44,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1339 +function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1!=urlvars.kvmonly&&disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(36,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding="8px"),center()))}
1340 +function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(45).blur(),setDialogMode(11,"\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0432\u043e\u0434 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b",3,showDeskTypeEx,'<div>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442 \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 OK, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e \u043d\u0430\u0431\u0440\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0421\u0428\u0410. \u041f\u0435\u0440\u0435\u0434 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u0443\u0440\u0441\u043e\u0440 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),
1341 +Q("d2typeText").focus())}var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
1342 +function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(49).checked||desktop.m.sendcad()}
1343 var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511,0]],2:[[65511,1],[65362,1],[65362,0],[65511,0]],3:[[65511,1],[108,1],[108,0],[65511,0]],4:[[65511,1],[109,1],[109,0],[65511,0]],5:[[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]],6:[[65470,1],[65470,0]],7:[[65471,1],[65471,0]],8:[[65472,1],[65472,0]],9:[[65473,1],[65473,0]],10:[[65474,1],[65474,0]],11:[[65475,1],[65475,0]],12:[[65476,1],[65476,0]],13:[[65477,1],[65477,0]],14:[[65478,1],[65478,0]],15:[[65479,
1325 -1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]]};
1326 -function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1344 +1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]],25:[[65293,1],[65293,0]]};
1345 +function deskSendKeys(){if(!Q(49).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1346 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1328 -function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1329 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1347 +function dmousedown(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1348 +function dmousemove(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1349 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1350 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1351 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1333 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\u043a\u043e\u0440\u0435\u043d\u044c</a>",g=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in g)""!=g[v]&&p24filetreelocation.push(g[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var g=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+
1334 -EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),e="";null!=l.d&&(e=new Date(l.d),e=e.getMonth()+1+"/"+e.getDate()+"/"+e.getFullYear()+" "+e.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1335 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(g+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+e+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1352 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\u043a\u043e\u0440\u0435\u043d\u044c</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,r;r=70<p.length?'<span title="'+
1353 +EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1354 +encodeURIComponent(l.nx)+'")>'+r+"</a></span></div>":(w=r,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+r+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1355 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1356 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1357 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1343,8 +1362,8 @@ function p24selectallfile(){for(var b=0==p24getFileSelCount(),c=document.getElem
1362 function p24createfolderEx(){p24files.sendCtrlMsg(JSON.stringify({action:"mkdir",reqid:1,path:p24filetreelocation.join("/")+"/"+Q("p24renameinput").value}));p24folderup(999)}function p24deletefile(){var b=p24getFileSelCount();setDialogMode(11,"\u0443\u0434\u0430\u043b\u044f\u0442\u044c",3,p24deletefileEx,1<b?"Delete "+b+" selected items?":"Delete selected item?")}
1363 function p24deletefileEx(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);p24files.sendCtrlMsg(JSON.stringify({action:"rm",reqid:1,path:p24filetreelocation.join("/"),delfiles:b}));p24folderup(999)}
1364 function p24renamefile(){for(var b,c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&(b=p24filetree.dir[c[a].value].n);setDialogMode(11,"Rename",3,p24renamefileEx,'<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% value="'+b+'" />',{action:"rename",path:p24filetreelocation.join("/"),oldname:b});focusTextBox("p24renameinput");p24fileNameCheck()}
1346 -function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c54",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1347 -function p24uploadFile(){setDialogMode(11,"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c54",""!=Q(b).value)}
1365 +function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c106",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1366 +function p24uploadFile(){setDialogMode(11,"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c106",""!=Q(b).value)}
1367 var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;function p24copyFile(b){var c=document.getElementsByName("fd");p24clipboard=[];p24clipboardCut=b;p24clipboardFolder=p24targetpath;for(b=0;b<c.length;b++)c[b].checked&&"3"==c[b].attributes.file.value&&p24clipboard.push(p24filetree.dir[c[b].value].n);p24updateClipview()}
1368 function p24pasteFile(){var b="";null!=p24clipboard&&0<p24clipboard.length&&(b="Confim "+(0==p24clipboardCut?"copy":"move")+" of "+p24clipboard.length+" entrie"+(1<p24clipboard.length?"s":"")+" to this location?");setDialogMode(11,"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c",3,p24pasteFileEx,b)}
1369 function p24pasteFileEx(){p24files.sendCtrlMsg(JSON.stringify({action:0==p24clipboardCut?"copy":"move",reqid:1,scpath:p24clipboardFolder,dspath:p24targetpath,names:p24clipboard}));p24folderup(999);1==p24clipboardCut&&(p24clipboardFolder=p24clipboard=null,p24clipboardCut=0,p24updateClipview())}
@@ -1370,43 +1389,43 @@ Q("floppyImageInput").files.length&&0!=Q("floppyImageInput").files[0].size%512)m
1389 function iderStart3(b,c,a){iderStop();ider=CreateAmtRedirect(CreateAmtRemoteIder());ider.onStateChanged=onIderStateChange;ider.m.floppy=b;ider.m.cdrom=c;ider.m.iderStart=a;ider.m.sectorStats=iderSectorStats;ider.tlsv1only=amtstack.wsman.comm.tlsv1only;ider.Start(currentMeshNode._id,16994,"*","*",0);QV("IDERDiskMapButton",!0)}
1390 function iderStop(){ider&&(ider.m.Stop(),ider.onStateChanged=null,ider.m.onDialogPrompt=null,delete ider);iderTimer&&(clearInterval(iderTimer),delete iderTimer);iderToggleDiskMap(!1)}function onIderStateChange(b,c){QE("c2",3!=c);QE("c8",3!=c);QE("c1",3!=c);QE("c7",3!=c);QV(9,3==c);center();3==c?(urlvars.norefresh||(iderTimer=setInterval(onIderTimer,500)),onIderTimer()):iderTimer&&(clearInterval(iderTimer),delete iderTimer)}
1391 function onIderTimer(){ider.m.Update&&ider.m.Update();-1==ider.m.bytesFromAmt?iderStop():QH(10,"<b>"+(ider.m.server?"\u0441\u0435\u0440\u0432\u0435\u0440":"")+"\u0421\u0435\u0441\u0441\u0438\u044f IDE-R </ b>, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043e,"+ider.m.bytesFromAmt+" \u0432,"+ider.m.bytesToAmt+" \u0432\u043d\u0435.")}var heatMapWidth=600,heatMapDividor={};
1373 -function iderSectorStats(b,c,a,d,g){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </ b>, \u0431\u043b\u043e\u043a\u0438 - {0} \u0431\u0430\u0439\u0442\u043e\u0432.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> \u0424\u043b\u043e\u043f\u043f\u0438-\u0434\u0438\u0441\u043a </ b>, \u0431\u043b\u043e\u043a\u0438 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 {0}.",
1374 -512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;g/=c;if(0==b)v.height=6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+g;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1392 +function iderSectorStats(b,c,a,d,e){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </ b>, \u0431\u043b\u043e\u043a\u0438 - {0} \u0431\u0430\u0439\u0442\u043e\u0432.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> \u0424\u043b\u043e\u043f\u043f\u0438-\u0434\u0438\u0441\u043a </ b>, \u0431\u043b\u043e\u043a\u0438 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 {0}.",
1393 +512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;e/=c;if(0==b)v.height=6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+e;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1394 function iderToggleDiskMap(b){var c="none"!=QS("iderHeatmap").display;null==b&&(b=!c);xxdialogMode&&(b=!1);QS("iderHeatmap").display=b?"":"none"}
1395 function onIderDialogPrompt(b,c,a){iderCodeBlock&&(document.body.removeChild(iderCodeBlock),delete iderCodeBlock);c.js&&(b=document.createElement("script"),b.text=c.js,iderCodeBlock=document.body.appendChild(b));setDialogMode(11,"\u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430",a?a:3,onIderDialogPromptOk,c.html)}
1396 function onIderDialogPromptOk(b){1==b?window.iderServerCall?ider.m.dialogPrompt(window.iderServerCall()):ider.m.dialogPrompt():iderStop()}function iderServerStart(){xxdialogMode||(iderStop(),ider=CreateAmtRemoteServerIder(),null!=ider&&(ider.onStateChanged=onIderStateChange,ider.m.sectorStats=iderSectorStats,ider.m.onDialogPrompt=onIderDialogPrompt,ider.tlsv1only=amtstack.wsman.comm.tlsv1only,ider.Start(currentMeshNode._id,16994,"*","*",0)))}
1397 var xxRemoteAccess=null,xxEnvironementDetection=null,xxCiraServers=null,xxUserInitiatedCira=null,xxUserInitiatedEnabledState={32768:"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",32769:"BIOS \u0432\u043a\u043b\u044e\u0447\u0435\u043d",32770:"\u041e\u0421 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c",32771:"BIOS \u0438 \u041e\u0421 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b"},xxRemoteAccessCredentiaLinks=null,xxMPSUserPass=null,xxPolicies=null;
1398 function PullRemoteAccess(){var b="*AMT_EnvironmentDetectionSettingData AMT_ManagementPresenceRemoteSAP AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule *AMT_UserInitiatedConnectionService AMT_MPSUsernamePassword".split(" ");11<amtversion&&b.push("*IPS_HTTPProxyService","IPS_HTTPProxyAccessPoint");amtstack.BatchEnum(null,b,processRemote1)}
1380 -function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var g in a)200!=a[g].status&&(d=a[g].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1381 -MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(g in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[g],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1399 +function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var e in a)200!=a[e].status&&(d=a[e].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1400 +MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(e in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[e],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1401 "@Name","Name").Value)),b.MpsType=c.MpsType,c=getItem(c.PolicySet.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyRuleName").Value.split(" ")[0],xxPolicies[c].push(b);updateRemoteAccess()}}
1402 function updateRemoteAccess(){if(null!=xxEnvironementDetection){var b,c="\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",a=xxRemoteAccess.IPS_HTTPProxyService&&xxRemoteAccess.IPS_HTTPProxyAccessPoint;xxEnvironementDetection.DetectionStrings&&0<xxEnvironementDetection.DetectionStrings.length&&(c="\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e,"+xxEnvironementDetection.DetectionStrings.length+" "+(1<xxEnvironementDetection.DetectionStrings.length?"domains":"domain"));b=""+TableStart();b+=
1403 TableEntry("\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0439 \u0441\u0440\u0435\u0434\u044b",addLink(c,"editEnvironmentDetection()"));b+=TableEntry("\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",addLinkConditional(xxUserInitiatedEnabledState[xxUserInitiatedCira.EnabledState],"editUserInitiatedCira()",
1404 xxAccountAdminName));c="<i>\u041d\u0438\u043a\u0442\u043e</i>";if(0<xxPolicies.User.length){var c="",d;for(d in xxPolicies.User)0<c.length&&(c+=", "),c+=xxPolicies.User[d].AccessInfo,1==xxPolicies.User[d].MpsType&&(c+=" (CILA)")}b+=TableEntry("\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435",addLinkConditional(c,'editMpsPolicy("User")',xxAccountAdminName));
1405 c="<i>\u041d\u0438\u043a\u0442\u043e</i>";if(0<xxPolicies.Alert.length)for(d in c="",xxPolicies.Alert)0<c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("\u041e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>\u041d\u0438\u043a\u0442\u043e</i>";
1387 -if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var g=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName","\u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0439");if(g){var v=atob(g.ExtendedData);0==ReadInt(v,0)&&(c+=format("\u043a\u0430\u0436\u0434\u044b\u0435 {0} \u0441\u0435\u043a\u0443\u043d\u0434",ReadInt(v,4)));1==ReadInt(v,
1388 -0)&&(g=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+g+":"+v+" daily")}b+=TableEntry("\u041f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0432\u044f\u0437\u044c",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Intel&reg; AMT.<br><br>";
1406 +if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var e=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName","\u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0439");if(e){var v=atob(e.ExtendedData);0==ReadInt(v,0)&&(c+=format("\u043a\u0430\u0436\u0434\u044b\u0435 {0} \u0441\u0435\u043a\u0443\u043d\u0434",ReadInt(v,4)));1==ReadInt(v,
1407 +0)&&(e=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+e+":"+v+" daily")}b+=TableEntry("\u041f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0432\u044f\u0437\u044c",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Intel&reg; AMT.<br><br>";
1408 if(0==xxCiraServers.length)b+="<div style=padding-left:15px><br><i>\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b.</i></div><br>";else for(d in xxCiraServers)c=":"+xxCiraServers[d].Port,xxCiraServers[d].CN&&(c+=", "+xxCiraServers[d].CN),b+="<div class=itemBar onclick=showServerDetails("+d+")><div style=padding-top:3px><b>"+xxCiraServers[d].AccessInfo+"</b>"+EscapeHtml(c)+"</div></div>";if(a)if(b+=
1409 "<br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 HTTP \u043f\u0440\u043e\u043a\u0441\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c\u0438 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f\u043c\u0438.<br><br>",c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses,0==c.length)b+="<div style=padding-left:15px><br><i>\u041d\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u043f\u0440\u043e\u043a\u0441\u0438.</i></div><br>";
1410 else for(d in c)b+="<div class=itemBar onclick=showProxyDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(c[d].AccessInfo)+":"+c[d].Port+"</b> / "+EscapeHtml(c[d].NetworkDnsSuffix)+"</div></div>";d="";xxAccountAdminName&&(d=AddButton("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440...","AddRemoteAccessServer()"),a&&(d+=AddButton("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438 ...","AddRemoteAccessProxy()")));b+="<br><td class=r1>"+
1392 -TableEnd(AddRefreshButton("PullRemoteAccess()")+d);QH(52,b)}}var xxEditMpsPolicyType;
1393 -function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(\u041d\u0438\u043a\u0442\u043e)",g;
1394 -for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[g].Name?" selected":"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - \u0412\u043d\u0435\u0448\u043d\u0438\u0439<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?
1395 -" selected":"")+">CILA - \u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439</select><div>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u0438\u043f MPS</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";c+="<option value=-1>(\u041d\u0438\u043a\u0442\u043e)";for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[g].Name?" selected":
1396 -"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>\u0412\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - \u0412\u043d\u0435\u0448\u043d\u0438\u0439<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA - \u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439</select><div>\u0412\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0439 \u0442\u0438\u043f MPS</div></div>")}g=
1397 -0;d&&(g=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+g+">";c+="<div>\u0412\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438 \u0442\u0443\u043d\u043d\u0435\u043b\u044f (\u0441\u0435\u043a\u0443\u043d\u0434\u044b)</div></div>";"Periodic"==b&&(a=0,g=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),g=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),g+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",
1411 +TableEnd(AddRefreshButton("PullRemoteAccess()")+d);QH(53,b)}}var xxEditMpsPolicyType;
1412 +function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>(\u041d\u0438\u043a\u0442\u043e)",e;
1413 +for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[e].Name?" selected":"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - \u0412\u043d\u0435\u0448\u043d\u0438\u0439<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?
1414 +" selected":"")+">CILA - \u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439</select><div>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u0438\u043f MPS</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";c+="<option value=-1>(\u041d\u0438\u043a\u0442\u043e)";for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[e].Name?" selected":
1415 +"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>\u0412\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA - \u0412\u043d\u0435\u0448\u043d\u0438\u0439<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA - \u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439</select><div>\u0412\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0439 \u0442\u0438\u043f MPS</div></div>")}e=
1416 +0;d&&(e=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+e+">";c+="<div>\u0412\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438 \u0442\u0443\u043d\u043d\u0435\u043b\u044f (\u0441\u0435\u043a\u0443\u043d\u0434\u044b)</div></div>";"Periodic"==b&&(a=0,e=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),e=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),e+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",
1417 c+="<option value=0"+(0==a?" selected":"")+">\u041f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0439, \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b<option value=1"+(1==a?" selected":"")+">\u0412\u0440\u0435\u043c\u044f \u0441\u0443\u0442\u043e\u043a, \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432 \u0434\u0435\u043d\u044c",c+="</select><div>\u0422\u0438\u043f \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+
1399 -g+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0} \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1400 -function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c54",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1418 +e+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0} \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1419 +function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c106",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1420 -1!=Q("d2server1").value),QH("ttypelabel",0==Q("d2ttype").value?"\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f (\u0441\u0435\u043a\u0443\u043d\u0434\u044b)":"\u0412\u0440\u0435\u043c\u044f \u0441\u0443\u0442\u043e\u043a (\u0427\u0427: \u041c\u041c)"),QE("d2ttype",-1!=Q("d2server1").value));QE("d2lifetime",-1!=Q("d2server1").value);b&&(QE("d2server1cira",-1<Q("d2server1").value),1<xxCiraServers.length&&QE("d2server2cira",-1<
1421 Q("d2server1").value&&-1<Q("d2server2").value))}function editMpsPolicyOk(){var b=xxEditMpsPolicyType;"User"==b&&(b="User Initiated");getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",b)?amtstack.Delete("AMT_RemoteAccessPolicyRule",{PolicyRuleName:b},editMpsPolicyOk2):editMpsPolicyOk2()}
1403 -function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var g,v;0<=Q("d2server1").value&&(g='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1422 +function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var e,v;0<=Q("d2server1").value&&(e='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1423 xxCiraServers[Q("d2server1").value].Name+"</Selector></SelectorSet></ReferenceParameters>");0<=Q("d2server1").value&&1<xxCiraServers.length&&0<=Q("d2server2").value&&(v='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1405 -xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?g&&(0==Q("d2server1cira").value?d.push(g):n.push(g),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):g&&(d.push(g),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1424 +xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?e&&(0==Q("d2server1cira").value?d.push(e):n.push(e),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):e&&(d.push(e),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1425 function editEnvironmentDetection(b){1!=b&&(editEnvironmentDetectionTmp=xxEnvironementDetection.DetectionStrings?Clone(xxEnvironementDetection.DetectionStrings):[]);var c="";xxAccountAdminName&&(c+="\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u043e 5 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u0432 \u0434\u043e\u043c\u0435\u043d\u0430 \u0438\u043d\u0442\u0440\u0430\u0441\u0435\u0442\u0438. \u0415\u0441\u043b\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u044d\u0442\u0438\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432, \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0440\u0442\u044b Intel&reg; AMT \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043a\u0440\u044b\u0442\u044b \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0431\u0443\u0434\u0443\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u044b.<br><br>");
1426 0==editEnvironmentDetectionTmp.length&&(c+="<i>\u0414\u043e\u043c\u0435\u043d\u044b \u0438\u043d\u0442\u0440\u0430\u0441\u0435\u0442\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e.</i><br>");for(var a in editEnvironmentDetectionTmp)c+="<div class=itemBar style=margin-right:0><div style=float:right>"+
1427 AddButton2("\u0423\u0434\u0430\u043b\u0438\u0442\u044c","editEnvironmentDetectionRemove("+a+")")+'</div><div style=padding-top:3px;max-width:260px;overflow:hidden title="'+editEnvironmentDetectionTmp[a]+'"><b>'+editEnvironmentDetectionTmp[a]+"</b></div></div>";xxAccountAdminName&&5>editEnvironmentDetectionTmp.length&&(c+="<br><input id=edInput placeholder=intranet.org style=width:276px onkeyup=edInputChg() maxlength=63><input type=button id=edAdd value=Add style=width:80px;margin-left:5px onclick=editEnvironmentDetectionAdd()>");
1409 -1==b?QH(63,c):setDialogMode(11,"\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0439 \u0441\u0440\u0435\u0434\u044b",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}
1428 +1==b?QH(64,c):setDialogMode(11,"\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0439 \u0441\u0440\u0435\u0434\u044b",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}
1429 function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1430 function editEnvironmentDetectionDlg2(b,c,a,d){200!=d?messagebox("\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0439 \u0441\u0440\u0435\u0434\u044b",format("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440, \u0441\u0442\u0430\u0442\u0443\u0441 {0}",d)):a.Body.ReturnValue&&0!=a.Body.ReturnValue?messagebox("\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0439 \u0441\u0440\u0435\u0434\u044b",
1431 a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}function edInputChg(){5>editEnvironmentDetectionTmp.length&&QE("edAdd",0<Q("edInput").value.length)}function editEnvironmentDetectionAdd(){editEnvironmentDetectionTmp.push(Q("edInput").value);editEnvironmentDetection(1)}function editEnvironmentDetectionRemove(b){editEnvironmentDetectionTmp.splice(b,1);editEnvironmentDetection(1)}
@@ -1424,7 +1443,7 @@ function showProxyDetailsOk(b,c){var a=xxRemoteAccess.IPS_HTTPProxyAccessPoint.r
1443 function showProxyDetailsOk2(b,c,a,d){408==d?messagebox("\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 HTTP \u043f\u0440\u043e\u043a\u0441\u0438","\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c HTTP \u043f\u0440\u043e\u043a\u0441\u0438, \u0434\u043e\u0441\u0442\u0443\u043f \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d."):PullRemoteAccess()}
1444 function AddRemoteAccessProxy(){var b;b='<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessProxyUpdate()><option value=2>\u0418\u043c\u044f \u0445\u043e\u0441\u0442\u0430 FQDN<option value=3>\u0410\u0434\u0440\u0435\u0441 IPv4<option value=4>\u0410\u0434\u0440\u0435\u0441 IPv6</select><div>\u0422\u0438\u043f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f</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>\u043f\u043e\u0440\u0442</div></div>';b+=
1445 "<div style=height:26px><input id=d2domain style=float:right;width:200px maxlength=191 onkeyup=AddRemoteAccessProxyUpdate()><div>DNS-\u0441\u0443\u0444\u0444\u0438\u043a\u0441</div></div>";setDialogMode(11,"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c HTTP \u043f\u0440\u043e\u043a\u0441\u0438",3,AddRemoteAccessProxyOk,b);AddRemoteAccessProxyUpdate()}
1427 -function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c54",b);QH("d2typespan",["","","FQDN / \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430","\u0410\u0434\u0440\u0435\u0441 IPv4","\u0410\u0434\u0440\u0435\u0441 IPv6"][Q("d2type").value])}
1446 +function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c106",b);QH("d2typespan",["","","FQDN / \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430","\u0410\u0434\u0440\u0435\u0441 IPv4","\u0410\u0434\u0440\u0435\u0441 IPv6"][Q("d2type").value])}
1447 function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
1448 function AddRemoteAccessProxyOk2(b,c,a,d){200!=d?messagebox("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440","\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438, \u0441\u0442\u0430\u0442\u0443\u0441"+d):0!=a.Body.ReturnValue?messagebox("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440",
1449 a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
@@ -1438,108 +1457,110 @@ function AddRemoteAccessServerOk(){var b,c,a,d;1==Q("d2auth").value?b='<Address
1457 function AddRemoteAccessServerOk2(b,c,a,d){200!=d?messagebox("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0441\u0435\u0440\u0432\u0435\u0440",format("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440, \u0441\u0442\u0430\u0442\u0443\u0441 {0}",d)):0!=a.Body.ReturnValue?messagebox("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0441\u0435\u0440\u0432\u0435\u0440",
1458 a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1459 function AddRemoteAccessServerUpdate(){var b=0!=Q("d2name").value.length;3==Q("d2type").value&&1==b&&(b=0!=Q("d2cn").value.length);2==Q("d2auth").value&&1==b&&(b=0!=Q("d2user").value.length&&passwordcheck(Q("d2pass").value));if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;if(-1!=Q("d2name").value.indexOf(":")||3==Q("d2type").value&&-1!=Q("d2cn").value.indexOf(":"))b=!1;QH("d2lname",201==Q("d2type").value?"Hostname":"IPv4-\u0430\u0434\u0440\u0435\u0441");QV("d2utype",2==Q("d2auth").value);
1441 -QV("d2ucn",3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c54",b)}
1460 +QV("d2ucn",3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c106",b)}
1461 function showEditNameDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_GeneralSettings.response.HostName,a=amtsysstate.AMT_GeneralSettings.response.DomainName;null!=a&&0<a.length&&(c+="."+a);c='<br><div style=height:26px><input id=d11name value="'+c+'" style=float:right;width:200px><div>\u0418\u043c\u044f \u0438 \u0434\u043e\u043c\u0435\u043d</div></div>';1==b&&(b=1==amtsysstate.AMT_GeneralSettings.response.SharedFQDN,c+="<div style=height:26px><select id=d11fqdn style=float:right;width:200px><option value=true "+
1462 (b?"selected":"")+'>\u041e\u0431\u0449\u0438\u0439, \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043a\u0430\u043a \u041e\u0421<option value="false" '+(b?"":"selected")+">\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439, \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u041e\u0421</select><div>\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0438</div></div>");setDialogMode(11,"\u0418\u043c\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430",
1463 3,editNameDlgOk,c)}}function editNameDlgOk(){var b=Q("d11name").value,c=b.indexOf("."),a="";0<=c&&(a=b.substring(c+1),b=b.substring(0,c));c=Clone(amtsysstate.AMT_GeneralSettings.response);c.HostName=b;c.DomainName=a;Q("d11fqdn")&&(c.SharedFQDN=d11fqdn.value);amtstack.Put("AMT_GeneralSettings",c,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}function computerNameGet(b,c,a,d){200==d&&(amtsysstate.AMT_GeneralSettings.response=a.Body,updateSystemStatus())}
1445 -function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c36.value=c;c37.value=b.DDNSPeriodicUpdateInterval;c38.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 DNS-\u043a\u043b\u0438\u0435\u043d\u0442",3,showEditDnsDlgOk)}}
1446 -function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c36.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c36.value?!0:!1;2==c36.value&&(b.DDNSPeriodicUpdateInterval=c37.value,b.DDNSTTL=c38.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1447 -function showEditDnsDlgChange(){QE("c37",2==c36.value);QE("c38",2==c36.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"Intel&reg; AMT \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438",3,featuresDlgOk))}
1448 -function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,g){200!=g?messagebox("\u043e\u0448\u0438\u0431\u043a\u0430","RedirectionService, \u041e\u0448\u0438\u0431\u043a\u0430 RequestStateChange"+g):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,
1449 -0,function(a,c,d,g){200!=g?messagebox("\u043e\u0448\u0438\u0431\u043a\u0430","KVMRedirectionSAP, \u041e\u0448\u0438\u0431\u043a\u0430 RequestStateChange"+g):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("\u043e\u0448\u0438\u0431\u043a\u0430","\u041e\u0448\u0438\u0431\u043a\u0430 PUT RedirectionService"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}
1464 +function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c61.value=c;c62.value=b.DDNSPeriodicUpdateInterval;c63.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 DNS-\u043a\u043b\u0438\u0435\u043d\u0442",3,showEditDnsDlgOk)}}
1465 +function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c61.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c61.value?!0:!1;2==c61.value&&(b.DDNSPeriodicUpdateInterval=c62.value,b.DDNSTTL=c63.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1466 +function showEditDnsDlgChange(){QE("c62",2==c61.value);QE("c63",2==c61.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"Intel&reg; AMT \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438",3,featuresDlgOk))}
1467 +function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,e){200!=e?messagebox("\u043e\u0448\u0438\u0431\u043a\u0430","RedirectionService, \u041e\u0448\u0438\u0431\u043a\u0430 RequestStateChange"+e):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,
1468 +0,function(a,c,d,e){200!=e?messagebox("\u043e\u0448\u0438\u0431\u043a\u0430","KVMRedirectionSAP, \u041e\u0448\u0438\u0431\u043a\u0430 RequestStateChange"+e):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("\u043e\u0448\u0438\u0431\u043a\u0430","\u041e\u0448\u0438\u0431\u043a\u0430 PUT RedirectionService"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}
1469 function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1451 -function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c49.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c50.checked=!c49.checked),c51.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c52.checked=!c51.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1470 +function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c74.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c75.checked=!c74.checked),c76.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c77.checked=!c76.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1471 function showEnableBootServiceDlgOk(){var b=32768+parseInt(document.querySelector("input[name=d26a]:checked").value);15<amtversion&&(b+=parseInt(document.querySelector("input[name=d26b]:checked").value));amtstack.CIM_BootService_RequestStateChange(b,null,showEnableBootServiceDlgResponse,b)}
1453 -function showEnableBootServiceDlgResponse(b,c,a,d,g){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,g),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1454 -function showEnableBootServiceDlgResponse2(b,c,a,d,g){200==d&&a.Body.EnabledState!=g&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}
1472 +function showEnableBootServiceDlgResponse(b,c,a,d,e){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,e),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1473 +function showEnableBootServiceDlgResponse2(b,c,a,d,e){200==d&&a.Body.EnabledState!=e&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}
1474 function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",3,consentDlgOk)}}
1475 function consentDlgOk(){amtsysstate.IPS_OptInService.response.OptInRequired=document.querySelector("input[name=d10]:checked").value;amtstack.Put("IPS_OptInService",amtsysstate.IPS_OptInService.response,function(){amtstack.Get("IPS_OptInService",consentGet,0,1)},0,1)}function consentGet(b,c,a,d){200==d&&PullSystemStatus()}var ipv6addrtype="\u0421\u0441\u044b\u043b\u043a\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441;\u0421\u0435\u0442\u0435\u0432\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441;\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441;\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d;\u041d\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e;\u041f\u0430\u043f\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435;\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439;\u0423\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0435\u0435;\u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 / \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439;\u0438\u0441\u0442\u0435\u043a\u0448\u0438\u0439;\u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435;\u043d\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e".split(";");
1476 function showIPv6AddrDlg(b,c){if(!xxdialogMode){var a=TableStart();t=c.split(",");for(var d=0;d<t.length;d+=3)a+=TableEntry("<b>"+t[d]+"</b><br><span style=font-size:10px>"+ipv6addrtype[t[d+1]]+","+ipv6addrtype[+t[d+2]+5]+"</span>","");setDialogMode(11,0==b?"IPv6-\u0430\u0434\u0440\u0435\u0441\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430":"IPv6-\u0430\u0434\u0440\u0435\u0441\u0430 \u0434\u043b\u044f \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430",
1477 1,null,a+TableEnd())}}
1459 -function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(69,0==b);QV(70,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d");QH("d21l1","IPv6 \u0432\u043a\u043b\u044e\u0447\u0435\u043d, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439");QH("d21l2",
1460 -"IPv6 \u0432\u043a\u043b\u044e\u0447\u0435\u043d, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 + \u0440\u0443\u0447\u043d\u043e\u0439 \u0430\u0434\u0440\u0435\u0441");d21o0.checked=!c;d21o1.checked=c&&!ipv6manual;d21o2.checked=c&&ipv6manual;c31.value=isIpAddress(a.IPv6Address,"");c33.value=isIpAddress(a.DefaultRouter,"");c34.value=isIpAddress(a.PrimaryDNS,"");c35.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==
1478 +function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(68,0==b);QV(69,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","IPv6 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d");QH("d21l1","IPv6 \u0432\u043a\u043b\u044e\u0447\u0435\u043d, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439");QH("d21l2",
1479 +"IPv6 \u0432\u043a\u043b\u044e\u0447\u0435\u043d, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 + \u0440\u0443\u0447\u043d\u043e\u0439 \u0430\u0434\u0440\u0435\u0441");d21o0.checked=!c;d21o1.checked=c&&!ipv6manual;d21o2.checked=c&&ipv6manual;c56.value=isIpAddress(a.IPv6Address,"");c58.value=isIpAddress(a.DefaultRouter,"");c59.value=isIpAddress(a.PrimaryDNS,"");c60.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==
1480 b?"\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 IPv6 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430":"\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 IPv6 \u0434\u043b\u044f \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1462 -function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c31.value?"::":c31.value.toLocaleLowerCase(),a.DefaultRouter=""==c33.value?"::":c33.value.toLocaleLowerCase(),
1463 -a.PrimaryDNS=""==c34.value?"::":c34.value.toLocaleLowerCase(),a.SecondaryDNS=""==c35.value?"::":c35.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1464 -"CreationClassName").Value,g=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1465 -d+'</w:Selector><w:Selector Name="DeviceID">'+g+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1466 -b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",g=Clone(c[a]);g.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",g,showIPv6StateDlgDone,null,0,d)}}
1481 +function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c56.value?"::":c56.value.toLocaleLowerCase(),a.DefaultRouter=""==c58.value?"::":c58.value.toLocaleLowerCase(),
1482 +a.PrimaryDNS=""==c59.value?"::":c59.value.toLocaleLowerCase(),a.SecondaryDNS=""==c60.value?"::":c60.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1483 +"CreationClassName").Value,e=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1484 +d+'</w:Selector><w:Selector Name="DeviceID">'+e+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1485 +b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",e=Clone(c[a]);e.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",e,showIPv6StateDlgDone,null,0,d)}}
1486 function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 IPv6",format("\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 IPv6, \u043e\u0448\u0438\u0431\u043a\u0430 {0}",d))}
1487 function showPingActionDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,b=(1==b.PingResponseEnabled)+((1==b.RmcpPingResponseEnabled)<<1);d20a.checked=0==b;d20b.checked=1==b;d20c.checked=2==b;d20d.checked=3==b;setDialogMode(20,"Intel&reg; AMT Ping Response",3,showPingActionDlgOk)}}
1488 function showPingActionDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response),c=document.querySelector("input[name=d20]:checked").value;b.PingResponseEnabled=0!=(c&1);b.RmcpPingResponseEnabled=0!=(c&2);amtstack.Put("AMT_GeneralSettings",b,PullSystemStatus,0,1)}
1470 -function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(68,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(69,!0);QV(70,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c DHCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430");
1471 -QH("d21l2","\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a IPv4 \u043d\u0438\u0436\u0435");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=!d21o1.checked;c31.value=isIpAddress(b.IPAddress,"");c32.value=isIpAddress(b.SubnetMask,"");c33.value=
1472 -isIpAddress(b.DefaultGateway,"");c34.value=isIpAddress(b.PrimaryDNS,"");c35.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 IPv4",3,showIPSetupDlgOk)}}
1473 -function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6 \u0432\u043a\u043b\u044e\u0447\u0435\u043d, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 + \u0440\u0443\u0447\u043d\u043e\u0439 \u0430\u0434\u0440\u0435\u0441"==Q("d21l2").innerHTML&&2>c31.value.split(":").length&&(b=!1);QE("c54",b);c31.disabled=c32.disabled=c33.disabled=c34.disabled=c35.disabled=!(d21o2.checked&&(7>amtversion||0==
1489 +function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(67,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(68,!0);QV(69,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c DHCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430");
1490 +QH("d21l2","\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a IPv4 \u043d\u0438\u0436\u0435");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=!d21o1.checked;c56.value=isIpAddress(b.IPAddress,"");c57.value=isIpAddress(b.SubnetMask,"");c58.value=
1491 +isIpAddress(b.DefaultGateway,"");c59.value=isIpAddress(b.PrimaryDNS,"");c60.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 IPv4",3,showIPSetupDlgOk)}}
1492 +function updateIPSetupDlg(){var b=!0;d21o2.checked&&"IPv6 \u0432\u043a\u043b\u044e\u0447\u0435\u043d, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 + \u0440\u0443\u0447\u043d\u043e\u0439 \u0430\u0434\u0440\u0435\u0441"==Q("d21l2").innerHTML&&2>c56.value.split(":").length&&(b=!1);QE("c106",b);c56.disabled=c57.disabled=c58.disabled=c59.disabled=c60.disabled=!(d21o2.checked&&(7>amtversion||0==
1493 Q("d21ipsync").checked))}
1475 -function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c31.value,b.SubnetMask=c32.value,b.DefaultGateway=c33.value,""!=c34.value&&(b.PrimaryDNS=c34.value),""!=c35.value&&
1476 -(b.SecondaryDNS=c35.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}
1494 +function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c56.value,b.SubnetMask=c57.value,b.DefaultGateway=c58.value,""!=c59.value&&(b.PrimaryDNS=c59.value),""!=c60.value&&
1495 +(b.SecondaryDNS=c60.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}
1496 function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 IPv4",format("\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0435\u0442\u0438, \u043e\u0448\u0438\u0431\u043a\u0430 {0}",d))}amtPowerBootCapabilities=null;
1497 function showPowerActionDlg(){xxdialogMode||(statusbox("\u0421\u0438\u043b\u043e\u0432\u044b\u0435 \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f","\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 ..."),amtstack.Get("AMT_BootCapabilities",powerActionResponse00,0,1))}
1479 -function powerActionResponse00(b,c,a,d){if(200==d){b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(g){}amtPowerBootCapabilities=a.Body;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435",2);b&1&&(addOption("d5actionSelect","\u0421\u0431\u0440\u043e\u0441",10),addOption("d5actionSelect","\u0421\u0438\u043b\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b",5),addOption("d5actionSelect","\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c",
1480 -8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443",300),b&1&&addOption("d5actionSelect","\u0421\u0431\u0440\u043e\u0441 \u043a \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0435",301));9<amtversion&&b&1&&(addOption("d5actionSelect","OS Wake \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f",
1498 +function showPowerActionDlg(){if(!xxdialogMode){var b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(c){}amtPowerBootCapabilities=amtsysstate.AMT_BootCapabilities.response;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435",2);b&1&&(addOption("d5actionSelect","\u0421\u0431\u0440\u043e\u0441",10),addOption("d5actionSelect","\u0421\u0438\u043b\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b",5),addOption("d5actionSelect",
1499 +"\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443",300),b&1&&addOption("d5actionSelect","\u0421\u0431\u0440\u043e\u0441 \u043a \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0435",301));9<amtversion&&b&1&&(addOption("d5actionSelect","OS Wake \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f",
1500 500),addOption("d5actionSelect","\u041e\u0421 \u044d\u043d\u0435\u0440\u0433\u043e\u0441\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u0438\u044f",501),addOption("d5actionSelect","Soft-\u043e\u0444\u0444",12),addOption("d5actionSelect","\u041c\u044f\u0433\u043a\u0438\u0439 \u0441\u0431\u0440\u043e\u0441",14),addOption("d5actionSelect","\u0421\u043f\u0430\u0442\u044c",4),addOption("d5actionSelect","Hibernate",7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&addOption("d5actionSelect","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 BIOS",
1501 100),b&1&&addOption("d5actionSelect","\u0421\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0432 BIOS",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u0435",104),b&1&&addOption("d5actionSelect","\u0421\u0431\u0440\u043e\u0441 \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f",
1502 105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",106),b&1&&addOption("d5actionSelect","Reset to Platform Erase",107));b&1&&addOption("d5actionSelect","\u0421\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043d\u0430 IDE-R \u0434\u0438\u0441\u043a\u0435\u0442\u0443",200);b&2&&addOption("d5actionSelect",
1503 "\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 IDE-R Floppy",201);b&1&&addOption("d5actionSelect","\u0421\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043d\u0430 IDE-R CDROM",202);b&2&&addOption("d5actionSelect","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 IDR-R CDROM",203);b&1&&addOption("d5actionSelect","\u0421\u0431\u0440\u043e\u0441 \u043a PXE",400);b&2&&addOption("d5actionSelect","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 PXE",401);addOption("d5actionSelect","\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 ...",
1485 -999);5<amtversion&&addOption("d5actionSelect","\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f ...",998);setDialogMode(5,"\u0421\u0438\u043b\u043e\u0432\u044b\u0435 \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f",3,powerActionDlgCheck)}else messagebox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",format("\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043e\u0448\u0438\u0431\u043a\u0430 {0}",
1486 -d))}
1487 -function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"\u0421\u0438\u043b\u043e\u0432\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e."):QH(60,format("\u041e\u0448\u0438\u0431\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0438\u0442\u0430\u043d\u0438\u044f # {0}.",g));
1488 -setDialogMode(1,"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 Intel&reg; Remote Secure Erase?<br>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>\u043f\u0430\u0440\u043e\u043b\u044c</div></div><br><div style=color:red><b> \u041f\u0420\u0415\u0414\u0423\u041f\u0420\u0415\u0416\u0414\u0415\u041d\u0418\u0415. </ b> \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.</div>",
1504 +999);5<amtversion&&addOption("d5actionSelect","\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f ...",998);setDialogMode(5,"\u0421\u0438\u043b\u043e\u0432\u044b\u0435 \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f",3,powerActionDlgCheck)}}
1505 +function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"\u0421\u0438\u043b\u043e\u0432\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e."):QH(61,format("\u041e\u0448\u0438\u0431\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0438\u0442\u0430\u043d\u0438\u044f # {0}.",
1506 +e));setDialogMode(1,"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 Intel&reg; Remote Secure Erase?<br>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>\u043f\u0430\u0440\u043e\u043b\u044c</div></div><br><div style=color:red><b> \u041f\u0420\u0415\u0414\u0423\u041f\u0420\u0415\u0416\u0414\u0415\u041d\u0418\u0415. </ b> \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.</div>",
1507 rsepass=1,setDialogMode(11,"\u0421\u0438\u043b\u043e\u0432\u044b\u0435 \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1508 function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> \u041f\u0420\u0415\u0414\u0423\u041f\u0420\u0415\u0416\u0414\u0415\u041d\u0418\u0415. </ b> \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.</div>";var a=
1491 -[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");
1492 -d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"\u0421\u0438\u043b\u043e\u0432\u044b\u0435 \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f",
1493 -3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1494 -function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,g=[1,2,6,25,26,31],v;for(v in g)d&1<<g[v]&&Q("rpef"+g[v]).checked&&(a+=1<<g[v]);d=makeUefiBootParam(1,a,4);g=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),g++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),g++);platfromEraseTLV={tlv:btoa(d),tlvlen:g};c?(statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f ..."),
1495 -amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1496 -function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f ...");null!=
1497 -rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=!1);13!=currentView&&10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
1498 -function showAdvPowerDlg(){try{Q("c39").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1509 +[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&8&&a.push("<label><input id=rpef3 type=checkbox onchange=powerActionDlgRPEValidate()>Verify Storage Erase</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&
1510 +65536&&a.push("<label><input id=rpef16 type=checkbox onchange=powerActionDlgRPEValidate()>OEM Custom Action</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");
1511 +0<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpeeomdata style=margin-top:4px;margin-bottom:4px;display:none>"+
1512 +addHtmlValue("OEM Data (HEX)","<input id=rpeoemdatax style=width:210px maxlength=256 type=input>")+"</div>";setDialogMode(11,"\u0421\u0438\u043b\u043e\u0432\u044b\u0435 \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f",3,powerActionDlgRPEEx,c,b);QE("c106",!1)}
1513 +function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,3,6,16,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QV("rpeeomdata",b&65536);QE("c106",b)}var platfromEraseTLV=null;
1514 +function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,3,6,16,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);a&65536&&""!=Q("rpeoemdatax").value&&(d+=makeUefiBootParam(20,hex2rstr(Q("rpeoemdatax").value),null,11),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",
1515 +"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1516 +function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f ...");
1517 +null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=!1);13!=currentView&&10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
1518 +function showAdvPowerDlg(){try{Q("c64").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1519 QV("ForceHDBootOption",1==amtPowerBootCapabilities.ForceHardDriveBoot);QV("ForcePXEBootOption",1==amtPowerBootCapabilities.ForcePXEBoot);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);QV("d24dSerialOverLan",1==amtPowerBootCapabilities.SOL);
1520 QV("d24dSecureErase",1==amtPowerBootCapabilities.SecureErase);QV("d24dPlatformErase",null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&0!=(amtsysstate.CIM_BootService.response.EnabledState&2));QV("d24dFirmwareReset",1==amtPowerBootCapabilities.ConfigurationDataReset);QV("d24dLockSleepButton",1==amtPowerBootCapabilities.SleepButtonLock);QV("d24dUserPasswordBypass",1==amtPowerBootCapabilities.UserPasswordBypass);
1501 -QV("c46",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c47",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c48",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);setDialogMode(24,"Custom Power Action",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}
1502 -function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c39").value&&600>Q("c39").value;QE("c41",!b);QE("c43",!b);QE("idd_d24IDERBootDevice",!b);QE("c45",!b);QE("idd_d24RSEPass",!b);QE("c54",!0)}
1503 -function showAdvPowerDlgOk(){var b=Q("c39").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"\u0421\u0438\u043b\u043e\u0432\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e."):QH(60,format("\u041e\u0448\u0438\u0431\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0438\u0442\u0430\u043d\u0438\u044f # {0}.",g));setDialogMode(1,
1504 -"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c39").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=Q("d24BiosSecureBoot").checked,AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c43").value,AvdPowerDlg.FirmwareVerbosity=Q("c45").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,
1505 -AvdPowerDlg.IDERBootDevice=Q("c44").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=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=
1521 +QV("c71",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c72",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c73",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);QH("c66",'<option value=0>None</option><option id="ForceDVDBootOption" value=1>Force CD/DVD Boot</option><option id="ForcePXEBootOption" value=2>Force PXE Boot</option><option id="ForceHDBootOption" value=3>Force Hard Disk Boot</option><option id="ForceDiagBootOption" value=4>Force Diagnostic Boot</option>');
1522 +setDialogMode(24,"Custom Power Action",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c64").value&&600>Q("c64").value;QE("c66",!b);QE("c68",!b);QE("idd_d24IDERBootDevice",!b);QE("c70",!b);QE("idd_d24RSEPass",!b);QE("c106",!0)}
1523 +function showAdvPowerDlgOk(){var b=Q("c64").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"\u0421\u0438\u043b\u043e\u0432\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e."):QH(61,format("\u041e\u0448\u0438\u0431\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0438\u0442\u0430\u043d\u0438\u044f # {0}.",e));setDialogMode(1,
1524 +"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c64").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=Q("d24BiosSecureBoot").checked,AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c68").value,AvdPowerDlg.FirmwareVerbosity=Q("c70").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,
1525 +AvdPowerDlg.IDERBootDevice=Q("c69").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=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=
1526 Q("d24UserPasswordBypass").checked,AvdPowerDlg.SecureErase=Q("d24SecureErase").checked,AvdPowerDlg.PlatformErase=Q("d24PlatformErase").checked,AvdPowerDlg.FirmwareReset=Q("d24FirmwareReset").checked,!0===AvdPowerDlg.SecureErase&&0<Q("d24rsepass").value.length&&(AvdPowerDlg.RSEPassword=Q("d24rsepass").value),!0===AvdPowerDlg.PlatformErase?powerActionDlgRPE(!0):(statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f ..."),
1527 amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)))}
1508 -function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",format("\u041e\u0448\u0438\u0431\u043a\u0430 \u2116 {0}",d)):4294967295==a.Body.OptInRequired&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(d6ConsentText.value="",setDialogMode(6,"\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",11,powerActionSendConsent),
1509 -checkConsentDisplay(),consentChanged()):(statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u041d\u0430\u0447\u0430\u043b\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 ..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",
1528 +function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",format("\u041e\u0448\u0438\u0431\u043a\u0430 \u2116 {0}",d)):(4294967295==a.Body.OptInRequired||connectDesktopConsent&&0!=a.Body.OptInRequired)&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(amtstack.IPS_OptInService_CancelOptIn(null),d6ConsentText.value="",setDialogMode(6,"\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",
1529 +11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u041d\u0430\u0447\u0430\u043b\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 ..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",
1530 "\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f."):(statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1531 function powerActionResponseC1(b,c,a,d){200!=d?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",format("\u041e\u0448\u0438\u0431\u043a\u0430 #",d)):0!=a.Body.ReturnValue?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",a.Body.ReturnValueStr.replace(/_/g,
1532 " ")):(d6ConsentText.value="",setDialogMode(6,"\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",11,powerActionSendConsent),checkConsentDisplay(),consentChanged(),amtstack.Enum("CIM_ServiceAvailableToElement",function(a,b,c,d){errcheck(d,a)||(amtsysstate.CIM_ServiceAvailableToElement.responses=c,updateSystemStatus(),null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<
1533 amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState&&amtstack.RequestPowerStateChange(2,function(a,b,c,d){}))}))}
1514 -function powerActionSendConsent(b){0==b?amtstack.IPS_OptInService_CancelOptIn(function(){}):(statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1534 +function powerActionSendConsent(b){console.log("powerActionSendConsent",b);0==b?(amtstack.IPS_OptInService_CancelOptIn(function(){}),connectDesktopConsent=!1,desktop.Stop()):(statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,
1535 +0,1))}
1536 function powerActionResponseC2(b,c,a,d){200!=d?messagebox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",format("\u041e\u0448\u0438\u0431\u043a\u0430 \u2116 {0}",d)):0!=a.Body.ReturnValue?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f","\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e."):
1537 (statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1517 -function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",format("\u041e\u0448\u0438\u0431\u043a\u0430 \u2116 {0}",d));else{b=d5actionSelect.value;var g=a.Body;g.ConfigurationDataReset=!1;delete g.WinREBootEnabled;delete g.UEFILocalPBABootEnabled;delete g.UEFIHTTPSBootEnabled;delete g.SecureBootControlEnabled;delete g.BootguardStatus;delete g.OptionsCleared;delete g.BIOSLastStatus;delete g.UefiBootParametersArray;delete g.RPEEnabled;
1518 -999==b?(g.BIOSPause=AvdPowerDlg.BIOSPause,g.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,g.BIOSSetup=AvdPowerDlg.BIOSSetup,g.BootMediaIndex=AvdPowerDlg.BootMediaIndex,g.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,g.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,g.IDERBootDevice=AvdPowerDlg.IDERBootDevice,g.LockKeyboard=AvdPowerDlg.LockKeyboard,g.LockPowerButton=AvdPowerDlg.LockPowerButton,g.LockResetButton=AvdPowerDlg.LockResetButton,g.LockSleepButton=AvdPowerDlg.LockSleepButton,g.ReflashBIOS=
1519 -AvdPowerDlg.ReflashBIOS,g.UseIDER=AvdPowerDlg.UseIDER,g.UseSOL=AvdPowerDlg.UseSOL,g.UseSafeMode=AvdPowerDlg.UseSafeMode,g.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=g.SecureErase&&(g.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==g.SecureErase&&AvdPowerDlg.RSEPassword&&(g.RSEPassword=AvdPowerDlg.RSEPassword)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&
1520 -2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(g.BIOSPause=!1,g.EnforceSecureBoot=!1,g.BIOSSetup=99<b&&104>b,g.BootMediaIndex=0,g.FirmwareVerbosity=0,g.ForcedProgressEvents=!1,g.IDERBootDevice=202==b||203==b?1:0,g.LockKeyboard=
1521 -!1,g.LockPowerButton=!1,g.LockResetButton=!1,g.LockSleepButton=!1,g.ReflashBIOS=!1,g.UseIDER=199<b&&300>b,g.UseSOL=13==currentView&&8!=b&&300>b,g.UseSafeMode=!1,g.UserPasswordBypass=!1,null!=g.SecureErase&&(g.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===g.SecureErase&&0<rsepass.length&&(g.RSEPassword=rsepass)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&
1522 -2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=!1),rsepass=null);console.log("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438: "+b);console.log("\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438: "+
1523 -ObjectToString2(g));statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,b,c,d){200!=d?messagebox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",
1524 -d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",g,powerActionResponse2,0,1)},0,1)}}
1525 -function powerActionResponse2(b,c,a,d,g){200!=d?messagebox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",format("PUT AMT_BootSettingData, \u041e\u0448\u0438\u0431\u043a\u0430 \u2116 {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 ..."),
1538 +function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",format("\u041e\u0448\u0438\u0431\u043a\u0430 \u2116 {0}",d));else{b=d5actionSelect.value;var e=a.Body;e.ConfigurationDataReset=!1;delete e.WinREBootEnabled;delete e.UEFILocalPBABootEnabled;delete e.UEFIHTTPSBootEnabled;delete e.SecureBootControlEnabled;delete e.BootguardStatus;delete e.OptionsCleared;delete e.BIOSLastStatus;delete e.UefiBootParametersArray;delete e.RPEEnabled;
1539 +999==b?(e.BIOSPause=AvdPowerDlg.BIOSPause,e.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,e.BIOSSetup=AvdPowerDlg.BIOSSetup,e.BootMediaIndex=AvdPowerDlg.BootMediaIndex,e.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,e.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,e.IDERBootDevice=AvdPowerDlg.IDERBootDevice,e.LockKeyboard=AvdPowerDlg.LockKeyboard,e.LockPowerButton=AvdPowerDlg.LockPowerButton,e.LockResetButton=AvdPowerDlg.LockResetButton,e.LockSleepButton=AvdPowerDlg.LockSleepButton,e.ReflashBIOS=
1540 +AvdPowerDlg.ReflashBIOS,e.UseIDER=AvdPowerDlg.UseIDER,e.UseSOL=AvdPowerDlg.UseSOL,e.UseSafeMode=AvdPowerDlg.UseSafeMode,e.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=e.SecureErase&&(e.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==e.SecureErase&&AvdPowerDlg.RSEPassword&&(e.RSEPassword=AvdPowerDlg.RSEPassword)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&
1541 +2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(e.BIOSPause=!1,e.EnforceSecureBoot=!1,e.BIOSSetup=99<b&&104>b,e.BootMediaIndex=0,e.FirmwareVerbosity=0,e.ForcedProgressEvents=!1,e.IDERBootDevice=202==b||203==
1542 +b?1:0,e.LockKeyboard=!1,e.LockPowerButton=!1,e.LockResetButton=!1,e.LockSleepButton=!1,e.ReflashBIOS=!1,e.UseIDER=199<b&&300>b,e.UseSOL=13==currentView&&8!=b&&300>b,e.UseSafeMode=!1,e.UserPasswordBypass=!1,null!=e.SecureErase&&(e.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===e.SecureErase&&0<rsepass.length&&(e.RSEPassword=rsepass)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&
1543 +2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=!1),rsepass=null);console.log("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438: "+b);console.log("\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438: "+
1544 +ObjectToString2(e));statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,b,c,d){200!=d?messagebox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",
1545 +d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",e,powerActionResponse2,0,1)},0,1)}}
1546 +function powerActionResponse2(b,c,a,d,e){200!=d?messagebox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",format("PUT AMT_BootSettingData, \u041e\u0448\u0438\u0431\u043a\u0430 \u2116 {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 ..."),
1547 amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1527 -function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c41.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c41.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c41").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1548 +function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c66.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c66.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c66").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1549 c+"</Selector></SelectorSet></ReferenceParameters>",powerActionResponse3)}var targetPowerAction=0;
1529 -function powerActionResponse3(b,c,a,d){console.log("powerActionResponse3("+c+","+a+","+d+")");if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u0438\u043b\u043e\u0432\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f ...");b=d5actionSelect.value;
1530 -if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==b&&(b=AvdPowerDlg.Action);targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e.")}}
1531 -function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"\u0421\u0438\u043b\u043e\u0432\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e."),setDialogMode(1,"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}function powerActionResponse5(b,c,a,d){}
1532 -function consentChanged(){QE("c54",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1550 +function powerActionResponse3(b,c,a,d){if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u0438\u043b\u043e\u0432\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=
1551 +2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==b&&(b=AvdPowerDlg.Action);targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e.")}}
1552 +function powerActionResponse4(b,c,a,d){200==d&&(QH(61,"\u0421\u0438\u043b\u043e\u0432\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e."),setDialogMode(1,"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}function powerActionResponse5(b,c,a,d){}
1553 +function consentChanged(){QE("c106",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1554 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1555 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1535 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var g=b[c].app?b[c].app:"";a[d][g]||(a[d][g]={});b[c].name&&(a[d][g][b[c].name]=b[c])}xxStorage.content=
1556 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1557 b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c Intel&reg; AMT \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430.<br><br>";
1537 -var v,n,g="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,e;for(e in b[c][p]){q++;if(c!=v||p!=n)""!=g&&(a+=g,g="<br>"),v=c,n=p,g=""!=c?g+EscapeHtml(c+" / "+p):g+"\u043a\u043e\u0440\u0435\u043d\u044c";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+e+'"',g=g+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+e+'",'+C+")><div style=float:right>"),g=g+(" "+AddButton2("\u0421\u043a\u0430\u0447\u0430\u0442\u044c","DownloadFromStorage("+C+',"'+e+'",event)')),g=g+("</div><div style=padding-top:3px><b>"+
1538 -EscapeHtml(e)+"</b>, <i>"+b[c][p][e].size+" \u0431\u0430\u0439\u0442\u043e\u0432</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==q&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=g&&(a+=g);0==d&&(a+=
1539 -"<div style=padding-left:15px><br><i>\u0424\u0430\u0439\u043b\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c ...","UploadToStorage()"):""));QH(55,a)}else QH(55,"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 ...<br/>"+
1558 +var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var r=0,g;for(g in b[c][p]){r++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+" / "+p):e+"\u043a\u043e\u0440\u0435\u043d\u044c";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+g+'",'+C+")><div style=float:right>"),e=e+(" "+AddButton2("\u0421\u043a\u0430\u0447\u0430\u0442\u044c","DownloadFromStorage("+C+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+
1559 +EscapeHtml(g)+"</b>, <i>"+b[c][p][g].size+" \u0431\u0430\u0439\u0442\u043e\u0432</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==r&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+=
1560 +"<div style=padding-left:15px><br><i>\u0424\u0430\u0439\u043b\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c ...","UploadToStorage()"):""));QH(56,a)}else QH(56,"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 ...<br/>"+
1561 AddButton("\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435","PullStorage()"))}
1541 -function showStorageDetails(b,c,a,d){if(!xxdialogMode){var g="",v=xxStorage.content[b][c][a];""!=b&&(g+=addHtmlValue("\u043f\u0440\u043e\u0434\u0430\u0432\u0435\u0446",b));""!=c&&(g+=addHtmlValue("\u0437\u0430\u044f\u0432\u043a\u0430",c));g+=addHtmlValue("\u0438\u043c\u044f",a);g+=addHtmlValue("\u0420\u0430\u0437\u043c\u0435\u0440",v.size+" bytes");v.link&&(g+=addHtmlValue("\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442",v.link));setDialogMode(11,"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f",
1542 -5,showStorageDetailsEx,g,d)}}function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}
1562 +function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("\u043f\u0440\u043e\u0434\u0430\u0432\u0435\u0446",b));""!=c&&(e+=addHtmlValue("\u0437\u0430\u044f\u0432\u043a\u0430",c));e+=addHtmlValue("\u0438\u043c\u044f",a);e+=addHtmlValue("\u0420\u0430\u0437\u043c\u0435\u0440",v.size+" bytes");v.link&&(e+=addHtmlValue("\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442",v.link));setDialogMode(11,"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f",
1563 +5,showStorageDetailsEx,e,d)}}function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}
1564 function storageDeleteResponse(b,c){200!=c?messagebox("\u041c\u0435\u0441\u0442\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f",format("\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0430\u0439\u043b (ERR {0}), \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0432\u043a\u043b\u044e\u0447\u0435\u043d.",c)):PullStorage()}
1565 function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}function DownloadFromStorageEx(b,c,a){200!=c||null==b?console.log(c,"Data = null"):saveAs(data2blob(b),a)}function OpenFromStorage(b,c){if(!xxdialogMode){haltEvent(c);var a=window.open("http://"+wsstack.comm.host+":"+wsstack.comm.port+"/amt-storage/"+b,"_blank","noopener,noreferrer");a.opener=null;a.focus()}}
1566 function PushToStorage(b,c,a){var d=null;7E3<c.length&&(d=[b,c.substring(7E3)],c=c.substring(0,7E3));wsstack.comm.PerformAjax(c,PushToStorageResponse,d,0,"/amt-storage/"+b+(1==a?"?append=":""),"PUT")}
@@ -1553,47 +1574,47 @@ a+="<datalist id=mstoragevendorlist>";for(var d in xxStorageVendors)a+='<option
1574 3,UploadToStorageEx,a,b);b&&SetStorageName(c)}}function UploadToStorageEx(b,c){if(c)d=new FileReader,d.onload=UploadToStorageEx2,d.filename=Q("mstoragefile").value,d.readAsBinaryString(c);else{var a=Q("mstoragefile");if(1==a.files.length){var d=new FileReader;d.onload=UploadToStorageEx2;d.filename=a.files[0].name;d.readAsBinaryString(a.files[0])}}}
1575 function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0].name:"");b=b.split(" ").join("");var c=b.split("-");3==c.length&&12>c[0].length&&12>c[1].length&&(Q("mstoragevendor").value=c[0],Q("mstorageapplication").value=c[1],b=c[2]);b=b.split("-").join("");b.endsWith(".gz")&&(b=b.substring(0,b.length-3));b.endsWith(".htm")||b.endsWith(".html")?Q("mstoragetype").value="text/html":b.endsWith(".txt")&&(Q("mstoragetype").value="text/plain");11<b.length&&(b=b.substring(0,11));Q("mstoragefilename").value=
1576 b}
1556 -function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var g=Q("mstoragetype").value;""==g&&(g="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1557 -"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+g+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1577 +function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1578 +"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1579 function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," \u0434\u043d\u0435\u0439").replace("H"," \u0447\u0430\u0441\u043e\u0432").replace("M"," \u043c\u0438\u043d\u0443\u0442");b=b.replace(" 1 \u0434\u043d\u0435\u0439"," 1 \u0434\u0435\u043d\u044c").replace(" 1 \u0447\u0430\u0441"," 1 \u0447\u0430\u0441").replace(" 1 \u043c\u0438\u043d\u0443\u0442\u0430 "," 1 \u043c\u0438\u043d\u0443\u0442\u0430 ");return b.substring(0,b.length-1)}
1580 function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1560 -function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u043c.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,g){if(200==g){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, \u043f\u0440\u043e\u0441\u043d\u0443\u0442\u044c\u0441\u044f "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", ",
1581 +function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u043c.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, \u043f\u0440\u043e\u0441\u043d\u0443\u0442\u044c\u0441\u044f "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", ",
1582 " \u0432"),void 0!=d[c].Interval&&(a+=" \u0438 \u043a\u0430\u0436\u0434\u044b\u0439"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+="\u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0435"),b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c...",'showAddAlarm(" + i + ")')),
1562 -b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>\u041d\u0435\u0442 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u0440\u0435\u0432\u043e\u0433\u0438",
1563 -"RemoveAllAlarms()")+AddButton("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
1564 -function prepareAlarmOccurenceTemplate(b,c,a,d,g){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1565 -g+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438",3,RemoveAllAlarmsEx,"\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u0432?")}
1566 -function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,g,v){0==--b&&PullAlarms()})}
1583 +b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>\u041d\u0435\u0442 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0430 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton2("\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u0440\u0435\u0432\u043e\u0433\u0438",
1584 +"RemoveAllAlarms()",xxAlarms?"":"disabled")+AddButton("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(58,b)}},null,!0)}
1585 +function prepareAlarmOccurenceTemplate(b,c,a,d,e){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1586 +e+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u0438",3,RemoveAllAlarmsEx,"\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u0432?")}
1587 +function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,e,v){0==--b&&PullAlarms()})}
1588 function showAddAlarm(b){if(!xxdialogMode){QE("d25alarm_name",!b);if(void 0!=b){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime);Q("d25alarm_name").value=c.ElementName;Q("d25alarm_sdate").value=a.getFullYear()+"-"+_fmttimepad(a.getMonth()+1)+"-"+_fmttimepad(a.getDate());Q("d25alarm_stime").value=a.getHours()+":"+_fmttimepad(a.getMinutes())+":"+_fmttimepad(a.getSeconds());if(c.Interval){var a=c.Interval.Interval.replace("P","").replace("T","").replace("D","D,").replace("H","H,").replace("M","M,").split(","),
1568 -d=[0,0,0],g;for(g in a){var v=a[g].length-1;"D"==a[g][v]&&(d[0]=parseInt(a[g].substring(0,v)));"H"==a[g][v]&&(d[1]=parseInt(a[g].substring(0,v)));"M"==a[g][v]&&(d[2]=parseInt(a[g].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1589 +d=[0,0,0],e;for(e in a){var v=a[e].length-1;"D"==a[e][v]&&(d[0]=parseInt(a[e].substring(0,v)));"H"==a[e][v]&&(d[1]=parseInt(a[e].substring(0,v)));"M"==a[e][v]&&(d[2]=parseInt(a[e].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1590 Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}
1570 -function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c54",b)}
1571 -function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),g=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],g[0],g[1],g[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",g=Q("d25alarm_interval").value.split("-");3!=g.length&&(g=[0,0,0]);var g=
1572 -"P"+g[0]+"DT"+g[1]+"H"+g[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,g,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a",format("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a. \u0421\u0442\u0430\u0442\u0443\u0441: {0}. <br/> \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435.",
1591 +function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c106",b)}
1592 +function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),e=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],e[0],e[1],e[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",e=Q("d25alarm_interval").value.split("-");3!=e.length&&(e=[0,0,0]);var e=
1593 +"P"+e[0]+"DT"+e[1]+"H"+e[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,e,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a",format("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a. \u0421\u0442\u0430\u0442\u0443\u0441: {0}. <br/> \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435.",
1594 d)):0!=c.Body.ReturnValue?messagebox("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a",format("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b \u0442\u0440\u0435\u0432\u043e\u0433\u0438 {0}. <br/> \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0441\u0438\u0433\u043d\u0430\u043b \u0442\u0440\u0435\u0432\u043e\u0433\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u0431\u0443\u0434\u0443\u0449\u0435\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.",
1574 -c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+g+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",
1595 +c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+e+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",
1596 d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
1597 function showAlertDetails(b){if(!xxdialogMode){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime),a="<div style=text-align:left>"+addHtmlValue("\u0438\u043c\u044f",c.ElementName)+addHtmlValue("\u0412\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0431\u0443\u0436\u0434\u0435\u043d\u0438\u044f",a.toLocaleString().replace(", "," at "));void 0!=c.Interval&&(a+=addHtmlValue("\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439",_fmtinterval(c.Interval.Interval)));a+=addHtmlValue("\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0431\u0443\u0436\u0434\u0435\u043d\u0438\u044f",
1598 1==c.DeleteOnCompletion?"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a":"\u0414\u0435\u0440\u0436\u0430\u0442\u044c \u0442\u0440\u0435\u0432\u043e\u0433\u0443")+"</div>";messagebox(format("\u0422\u0440\u0435\u0432\u043e\u0433\u0430 {0}",c.ElementName),a);setDialogMode(11,"\u0410\u0432\u0430\u0440\u0438\u0439\u043d\u0430\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f"+c.ElementName,5,showAlertDetailsDelete,a,b)}}
1599 function showAlertDetailsDelete(b,c){2==b&&amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,b,c,v){PullAlarms()})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag;
1579 -function setDialogMode(b,c,a,d,g,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c54",!0);QV("c54",a&1);QV("c53",a&2);QV(58,a&2);QV("c55",a&4);c&&QH(59,c);for(c=1;27>c;c++)QV("dialog"+c,c==b);QV("dialog",b);g&&(11==b?QH(63,g):QH(60,g));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1600 +function setDialogMode(b,c,a,d,e,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c106",!0);QV("c106",a&1);QV("c105",a&2);QV(59,a&2);QV("c107",a&4);c&&QH(60,c);for(c=1;28>c;c++)QV("dialog"+c,c==b);QV("dialog",b);e&&(11==b?QH(64,e):QH(61,e));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1601 function dialogclose(b){var c=xxdialogFunc,a=xxdialogButtons,d=xxdialogTag;setDialogMode();(a&8||b)&&c&&c(b,d)}
1581 -function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(41).offsetWidth&&(QS("Desk")["max-width"]=Q(41).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1582 -"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(60,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(60,c);setDialogMode(1,b)}
1583 -function SaveJsonFile(b,c,a,d){var g="",v={},n=new Date;amtsysstate&&(g="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));g+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1584 -n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+g+".json")}
1602 +function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(42).offsetWidth&&(QS("Desk")["max-width"]=Q(42).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1603 +"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(61,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(61,c);setDialogMode(1,b)}
1604 +function SaveJsonFile(b,c,a,d){var e="",v={},n=new Date;amtsysstate&&(e="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));e+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1605 +n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+e+".json")}
1606 var httpErrorTable={200:"\u0425\u043e\u0440\u043e\u0448\u043e",401:"\u041e\u0448\u0438\u0431\u043a\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438",408:"\u041e\u0448\u0438\u0431\u043a\u0430 \u0442\u0430\u0439\u043c-\u0430\u0443\u0442\u0430",601:"\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 WSMAN",602:"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0442\u0432\u0435\u0442\u0430 HTTP",
1607 603:"\u041d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0439 HTTP-\u043e\u0442\u0432\u0435\u0442 enum",604:"\u041d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0439 HTTP-\u043e\u0442\u0432\u0435\u0442",997:"\u041d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u0426\u0430\u0440\u0441\u0442\u0432\u043e \u0414\u0430\u0439\u0434\u0436\u0435\u0441\u0442\u0430"};
1608 function errcheck(b,c){if(null==wsstack||amtstack!=c)return!0;200!=b&&9!=b&&(setDialogMode(),wsstack.comm.FailAllError=999,amtstack.CancelAllQueries(999),QH(5,httpErrorTable[b]?httpErrorTable[b]:format("\u041e\u0448\u0438\u0431\u043a\u0430 \u2116 {0}",b)),401==b&&QH(5,'\u041e\u0448\u0438\u0431\u043a\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<br /><br /><input type=button value="Set new credentials" onclick=meshcentral2credCallback(true)></input>'),
1609 go(100),QS(3).width=0);return 200!=b}function goiFrame(b,c,a){if(!xxdialogMode){go(c);if(1==b.shiftKey||0==Q(13).src.endsWith(a))Q(13).src=a;QV(14,!1);QV(12,!0)}}
1610 function go(b,c){if(!xxdialogMode||1==c){QV(12,!1);QV(14,!0);QV(4,100==b);QV(6,100>b);for(var a=0;80>a;a++){QV("p"+a,a==b);var d=QS("go"+a);d&&(d["background-color"]=a==b?"#abcae1":"");d&&(d["background-color"]=a==b?"gray":"")}currentView=b;center()}}
1590 -function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,g=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:g};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(g=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:g}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(g=parseInt(a[2]));return{host:a[0],http:d,redir:g}}
1611 +function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,e=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:e};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(e=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:e}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(e=parseInt(a[2]));return{host:a[0],http:d,redir:e}}
1612 function addLink(b,c){return"<a style=cursor:pointer;color:blue onclick='"+c+"'>&diams; "+b+"</a>"}function addLinkConditional(b,c,a){return a?addLink(b,c):b}function haltEvent(b){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1}function addOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;Q(b).add(d)}function addDisabledOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;d.disabled=1;Q(b).add(d)}
1592 -function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,g=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:g=1}return 4==c+a+d+g}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("\u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u0430",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}
1613 +function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,e=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:e=1}return 4==c+a+d+e}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("\u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u0430",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}
1614 function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}function TableStart2(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><p><td>"}function TableEntry(b,c){return"<tr><td class=r1><p>"+b+"<td class=r1>"+c}function FullTable(b,c){var a=TableStart();for(i in b)i&&b[i]&&(a+=TableEntry(i,b[i]));return a+TableEnd(c)}
1615 function TableEnd(b){return"<tr><td colspan=2><p>"+(b?b:"")+"</table>"}function AddButton(b,c){return"<input type=button value='"+b+"' onclick='"+c+"' style=margin:4px>"}function AddButton2(b,c,a){return"<input type=button value='"+b+"' onclick='"+c+"' "+a+">"}
1616 function AddRefreshButton(b){return'<input type=button name=refreshbtn value="\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435" onclick=\'refreshButtons(false);'+b+"' style=margin:4px "+(0==refreshButtonsState?"disabled":"")+">"}function MoreStart(){return'<a style=cursor:pointer;color:blue id=morexxx1 onclick=QV("morexxx1",false);QV("morexxx2",true)>&#x25BC; More</a><div id=morexxx2 style=display:none><br><hr>'}
1596 -function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,g=b.options.length;d<g;d++)a=b.options[d],a.selected&&c.push(a.value);return c}function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}
1617 +function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,e=b.options.length;d<e;d++)a=b.options[d],a.selected&&c.push(a.value);return c}function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}
1618 function guidToStr(b){return b.substring(6,8)+b.substring(4,6)+b.substring(2,4)+b.substring(0,2)+"-"+b.substring(10,12)+b.substring(8,10)+"-"+b.substring(14,16)+b.substring(12,14)+"-"+b.substring(16,20)+"-"+b.substring(20)}function getUrlVars(){for(var b,c=[],a=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),d=0;d<a.length;d++)b=a[d].indexOf("="),0<b&&(c[a[d].substring(0,b)]=a[d].substring(b+1,a[d].length));return c}
1619 function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}
1620 function getDocHeight(){return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight&&0!=document.documentElement.clientHeight?document.documentElement.clientHeight:document.getElementsByTagName("body")[0].clientHeight}function addHtmlValue(b,c){return'<div style=height:20px><div style=float:right;width:220px;overflow:hidden><b title="'+c+'">'+c+"</b></div><div>"+b+"</div></div>"}
public/commander-zh-chs.htm
+920 -898
@@ -1,8 +1,8 @@
1 -<!DOCTYPE html><html lang="zh-chs" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=连接 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>断线</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>系统状况</a><p id=go14 class=nav1 onclick=go(14)><a>远程桌面</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>档案</a><p id=go13 class=nav1 onclick=go(13)><a>局域网串行</a><p id=go2 class=nav1 onclick=go(2)><a>硬件资讯</a><p id=go6 class=nav1 onclick=go(6)><a>事件簿</a><p id=go15 class=nav1 onclick=go(15)><a>审核日志</a><p id=go21 class=nav1 onclick=go(21)><a>存储</a><p id=go8 class=nav1 onclick=go(8)><a>网络设置</a><p id=go17 class=nav1 onclick=go(17)><a>网际网路设定</a><p id=go16 class=nav1 onclick=go(16)><a>安全设定</a><p id=go19 class=nav1 onclick=go(19)><a>代理人在场</a><p id=go18 class=nav1 onclick=go(18)><a>系统防御</a><p id=go11 class=nav1 onclick=go(11)><a>用户帐号</a><p id=go22 class=nav1 onclick=go(22)><a>订阅内容</a><p id=go23 class=nav1 onclick=go(23)><a>唤醒警报</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN浏览器</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value=磁盘映射 onclick=iderToggleDiskMap()><input type=button value=停止IDE-R会话 onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>软盘块为512字节。</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM,块为2048字节。</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>此计算机的固件应更新,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>请在这里检查</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>载入中...</h1></div><div id=p1 style=display:none><h1>系统状况</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>硬件资讯</h1><span id=16></span></div><div id=p6 style=display:none><h1>事件簿</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>网络设置</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>用户帐号</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMAN浏览器</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><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=询问 style=margin:4px onclick=wsmanQuery()><input type=button value=明确 style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=过滤 style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>局域网串行终端</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>英特尔®AMT重定向端口或LAN上串行功能已禁用<span id=26>,请点击此处启用它。</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>远程计算机未打开电源,请单击此处以发出电源命令。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=电源动作... onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=依德 title="开始远程磁盘安装操作" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=开始捕捉 title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=连接 onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>断开连接。</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR +低频" title="切换返​​回键将发送的内容" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="切换终端尺寸" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="英特尔(F10 = ESC + [OM)" title="切换F1至F10键仿真类型" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value=扩展的ASCII title="切换终端仿真类型" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>退出<option value=8>退格键<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=发送 onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=糊 disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>远程桌面</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>英特尔®AMT重定向端口或KVM功能已禁用<span id=37>,请点击此处启用它。</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>远程计算机未打开电源,请单击此处以发出电源命令。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="向左旋转" onclick=drotate(-1)>↺</div><div class=rb title="右旋" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="切换全屏模式" onkeypress="return false" onkeydown="return false" value=充分 onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="保存远程桌面的屏幕截图" onkeypress="return false" onkeydown="return false" value=救... onclick=deskSaveImage() style=margin-right:3px><input type=button value=设定... title="编辑远程桌面设置" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=依德 title="开始远程磁盘安装操作" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="更改远程机器的电源状态" onkeypress="return false" onkeydown="return false" value=电源动作... onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=连接 onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>断开连接。</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>赢得<option value=1>胜负<option value=2>赢+<option value=3>赢+ L<option value=4>Win + M<option value=20>Win + R<option value=23>赢+左<option value=24>赢+右<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=发送 onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=类型 onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>黑屏&nbsp;</span><span id=47><input id=48 type=checkbox>只读&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>审核日志</h1><span id=50></span></div><div id=p16 style=display:none><h1>安全设定</h1><span id=51></span></div><div id=p17 style=display:none><h1>网际网路设定</h1><span id=52></span></div><div id=p18 style=display:none><h1>系统防御</h1><span id=53></span></div><div id=p19 style=display:none><h1>代理人在场</h1><span id=54></span></div><div id=p21 style=display:none><h1>存储</h1><span id=55></span></div><div id=p22 style=display:none><h1>活动订阅</h1><span id=56></span></div><div id=p23 style=display:none><h1>唤醒警报</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>档案</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=上>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value=全选 onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=改名 onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=删除 onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value=新建文件夹 onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=上载 onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=切 onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=复制 onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=糊 onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=刷新 onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">按名称分类<option value=2>按大小排序<option value=3>按日期排序<option value=4>按名称降序<option value=5>按大小下降<option value=6>按日期降序</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 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=60 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>用户名</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>密码*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>确认密码</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>本地<option value=1>网络<option value=2>任何</select><div>允许</div></div><div>授予的权限</div><ul id=62 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>*至少8个字符,大写,小写,0-9和!@#$%^&*()+-之一</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>权力行动</div></div><div><span style=color:red>警告:</span>某些电源操作可能会导致数据丢失,并可能断开桌面,终端或磁盘重定向会话。</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>同意码</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>主要展示<option value=1>辅助显示<option id=d6ThirdDisplay value=2 style=display:none>第三显示</select><div>同意显示</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>图像编码</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>残障人士<option value=2>Automatic<option value=3>已启用</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>显示本地鼠标光标</label><br><label><input type=checkbox id=d7showcad>显示Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>极限帧率</label><br><label><input type=checkbox id=d7noMouseRotate>不要旋转鼠标</label><br></div><div>其他设定</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">软件KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>质量</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>缩放比例</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=管理员 style=float:right;width:220px><div style=height:20px>用户名</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>密码</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>重定向端口</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM远程桌面</label><label style=display:block><input type=checkbox id=c17>IDE重定向<br></label><label style=display:block><input type=checkbox id=c18>局域网串行<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>不需要<br></label><label><input type=radio name=d10 id=c20 value=1>仅KVM需要<br></label><label><input type=radio name=d10 id=c21 value=4294967295>始终需要<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最多32个字符"><div title="最多32个字符">个人资料名称</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最多32个字符"><div title="最多32个字符">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>优先</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>认证方式</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>认证协议<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>没有</select><div>加密</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="长度介于8到63个字符之间"><div title="长度介于8到63个字符之间">密码*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="长度介于8到63个字符之间"><div title="长度介于8到63个字符之间">确认密码</div></div></div><div id=dialog19 style=margin:auto;margin:3px>这会将此计算机的英特尔®AMT的整个状态保存到文件中。密码将不会保存,但可能会包含一些敏感数据。<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>残障人士<br><input type=radio name=d20 id=d20b value=1>ICMP回应<br><input type=radio name=d20 id=d20c value=2>RMCP响应<br><input type=radio name=d20 id=d20d value=3>ICMP和RMCP响应<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>操作系统IP地址同步</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP地址</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>子网标记</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>网关</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>主DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>备用DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>残障人士<option value=1>禁用,DHCP更新<option value=2>已启用</select><div>动态DNS客户端</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>更新间隔(分钟)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL(秒)</div></div><div style=font-size:10px><br>默认间隔时间是1440分钟,默认TTL是900秒。</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>充电<option value=10>重启<option value=5>电源周期<option value=8>掉电<option id=d24p500 value=500>操作系统从待机状态唤醒<option id=d24p501 value=501>操作系统省电<option value=999>设置启动选项</select><div>远程命令</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS暂停</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>强制执行安全启动</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS设置</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>强制进度事件</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>锁定电源按钮</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>锁定重置按钮</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>锁定睡眠按钮</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>锁键盘</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS密码绕过</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>重新刷新BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>安全模式</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>使用IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>局域网串行</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>英特尔®远程安全擦除</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>开机设定</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>没有<option id=ForceDVDBootOption value=1>强制启动CD / DVD<option id=ForcePXEBootOption value=2>强制PXE引导<option id=ForceHDBootOption value=3>强制硬盘启动<option id=ForceDiagBootOption value=4>强制诊断启动</select><div>引导源</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>没有<option value=1>索引1<option value=2>索引2<option value=3>索引3<option value=3>索引4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>引导到软盘<option value=1>引导至CDROM</select><div>IDER引导设备</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>系统默认<option id=c46 value=1>安静<option id=c47 value=2>详细<option id=c48 value=3>黑屏</select><div>详细性</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密码</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>报警名称</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>唤醒日期(年月日)</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>唤醒时间(小时:分钟:秒)</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>间隔(天-小时-分钟)</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>保持警惕<option value=1>完成时删除</select></div><div style=padding-top:4px>醒后</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>已启用<br></label><label><input type=radio name=d26b id=c50 value=0>残障人士<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>已启用<br></label><label><input type=radio name=d26a id=c52 value=0>残障人士<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=取消 style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=好 style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=删除 style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="zh-chs" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=连接 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>断线</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>系统状况</a><p id=go14 class=nav1 onclick=go(14)><a>远程桌面</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>档案</a><p id=go13 class=nav1 onclick=go(13)><a>局域网串行</a><p id=go2 class=nav1 onclick=go(2)><a>硬件资讯</a><p id=go6 class=nav1 onclick=go(6)><a>事件簿</a><p id=go15 class=nav1 onclick=go(15)><a>审核日志</a><p id=go21 class=nav1 onclick=go(21)><a>存储</a><p id=go8 class=nav1 onclick=go(8)><a>网络设置</a><p id=go17 class=nav1 onclick=go(17)><a>网际网路设定</a><p id=go16 class=nav1 onclick=go(16)><a>安全设定</a><p id=go19 class=nav1 onclick=go(19)><a>代理人在场</a><p id=go18 class=nav1 onclick=go(18)><a>系统防御</a><p id=go11 class=nav1 onclick=go(11)><a>用户帐号</a><p id=go22 class=nav1 onclick=go(22)><a>订阅内容</a><p id=go23 class=nav1 onclick=go(23)><a>唤醒警报</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN浏览器</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value=磁盘映射 onclick=iderToggleDiskMap()><input type=button value=停止IDE-R会话 onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>软盘块为512字节。</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM,块为2048字节。</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>此计算机的固件应更新,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>请在这里检查</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>载入中...</h1></div><div id=p1 style=display:none><h1>系统状况</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>硬件资讯</h1><span id=16></span></div><div id=p6 style=display:none><h1>事件簿</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>网络设置</h1><span id=19></span><span id=20></span><span id=21></span></div><div id=p11 style=display:none><h1>用户帐号</h1><span id=22></span></div><div id=p12 style=display:none><h1>WSMAN浏览器</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=23 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=24 type=button value=询问 style=margin:4px onclick=wsmanQuery()><input type=button value=明确 style=margin:4px onclick="QH(25, '')"><input id=c0 placeholder=过滤 style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=25></div></div><div id=p13 style=display:none;min-width:780px><h1>局域网串行终端</h1><br><div id=26 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>英特尔®AMT重定向端口或LAN上串行功能已禁用<span id=27>,请点击此处启用它。</span></div></div><div id=28 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>远程计算机未打开电源,请单击此处以发出电源命令。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=29></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=电源动作... onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=依德 title="开始远程磁盘安装操作" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=开始捕捉 title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=连接 onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=30>断开连接。</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR +低频" title="切换返​​回键将发送的内容" onclick="termToggleCr();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="切换终端尺寸" onclick="termToggleSize();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="英特尔(F10 = ESC + [OM)" title="切换F1至F10键仿真类型" onclick="termToggleFx();Q(33).blur()"><input id=34 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value=扩展的ASCII title="切换终端仿真类型" onclick="termToggleType();Q(34).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>退出<option value=8>退格键<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=发送 onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=35 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=糊 disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=36><h1>远程桌面</h1><br></div><div id=37 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>英特尔®AMT重定向端口或KVM功能已禁用<span id=38>,请点击此处启用它。</span></div></div><div id=39 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>远程计算机未打开电源,请单击此处以发出电源命令。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=40></span>&nbsp;<div class=rb title="向左旋转" onclick=drotate(-1)>↺</div><div class=rb title="右旋" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="切换全屏模式" onkeypress="return false" onkeydown="return false" value=充分 onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="保存远程桌面的屏幕截图" onkeypress="return false" onkeydown="return false" value=救... onclick=deskSaveImage() style=margin-right:3px><input type=button value=设定... title="编辑远程桌面设置" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=依德 title="开始远程磁盘安装操作" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="更改远程机器的电源状态" onkeypress="return false" onkeydown="return false" value=电源动作... onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=连接 onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=41>断开连接。</span></div><tr><td id=42 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onwheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=43 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>赢得<option value=1>胜负<option value=2>赢+<option value=3>赢+ L<option value=4>Win + M<option value=20>Win + R<option value=23>赢+左<option value=24>赢+右<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12<option value=25>Enter</select><input id=DeskWD type=button value=发送 onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=44 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=45 type=button value=类型 onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=46><input id=47 type=checkbox>黑屏&nbsp;</span><span id=48><input id=49 type=checkbox>只读&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=50></span><h1>审核日志</h1><span id=51></span></div><div id=p16 style=display:none><h1>安全设定</h1><span id=52></span></div><div id=p17 style=display:none><h1>网际网路设定</h1><span id=53></span></div><div id=p18 style=display:none><h1>系统防御</h1><span id=54></span></div><div id=p19 style=display:none><h1>代理人在场</h1><span id=55></span></div><div id=p21 style=display:none><h1>存储</h1><span id=56></span></div><div id=p22 style=display:none><h1>活动订阅</h1><span id=57></span></div><div id=p23 style=display:none><h1>唤醒警报</h1><span id=58></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>档案</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=上>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value=全选 onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=改名 onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=删除 onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value=新建文件夹 onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=上载 onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=切 onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=复制 onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=糊 onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=刷新 onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">按名称分类<option value=2>按大小排序<option value=3>按日期排序<option value=4>按名称降序<option value=5>按大小下降<option value=6>按日期降序</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=59 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=60 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=61 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>用户名</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>密码*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>确认密码</div></div><div id=62><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>本地<option value=1>网络<option value=2>任何</select><div>允许</div></div><div>授予的权限</div><ul id=63 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>*至少8个字符,大写,小写,0-9和!@#$%^&*()+-之一</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>权力行动</div></div><div><span style=color:red>警告:</span>某些电源操作可能会导致数据丢失,并可能断开桌面,终端或磁盘重定向会话。</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="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>同意码</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>主要展示<option value=1>辅助显示<option id=d6ThirdDisplay value=2 style=display:none>第三显示</select><div>同意显示</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>图像编码</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>残障人士<option value=2>Automatic<option value=3>已启用</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>显示本地鼠标光标</label><br><label><input type=checkbox id=d7showcad>显示Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>极限帧率</label><br><label><input type=checkbox id=d7noMouseRotate>不要旋转鼠标</label><br><label><input type=checkbox id=d7kvmrmw>Reverse Mouse Wheel</label><br></div><div>其他设定</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">软件KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>质量</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>缩放比例</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=管理员 style=float:right;width:220px><div style=height:20px>用户名</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>密码</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>重定向端口</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM远程桌面</label><label style=display:block><input type=checkbox id=c17>IDE重定向<br></label><label style=display:block><input type=checkbox id=c18>局域网串行<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>不需要<br></label><label><input type=radio name=d10 id=c20 value=1>仅KVM需要<br></label><label><input type=radio name=d10 id=c21 value=4294967295>始终需要<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=64></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最多32个字符"><div title="最多32个字符">个人资料名称</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最多32个字符"><div title="最多32个字符">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>优先</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()></select><div>认证方式</div></div><div style=height:26px><select id=c26 style=float:right;width:200px onclick=updateWifiDialog()><option id=65 value=4>认证协议<option id=66 value=3>TKIP-RC4</select><div>加密</div></div><div id=c27><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="长度介于8到63个字符之间"><div title="长度介于8到63个字符之间">密码*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="长度介于8到63个字符之间"><div title="长度介于8到63个字符之间">确认密码</div></div></div><div id=c30 style=display:none><div id=c31 style=height:26px><select id=c32 style=float:right;width:200px onchange=updateNetAuth2Dialog(event)><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>协议</div></div><div id=c33 style=height:26px><input id=c34 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="最多32个字符"><div title="最多32个字符">Server Name</div></div><div id=c35 style=height:26px><select id=c36 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c37 style=height:26px><input id=c38 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c39 style=height:26px><input id=c40 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">用户名</div></div><div id=c41 style=height:26px><input id=c42 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuth2Dialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">密码</div></div><div id=c43 style=height:26px><input id=c44 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuth2Dialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c45 style=height:26px><input id=c46 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c47 style=height:26px><input id=c48 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c49 style=height:26px><select id=c50 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Client Certificate</div></div><div id=c51 style=height:26px><select id=c52 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Server Issuer Cert</div></div><div id=c53 style=height:26px><select id=c54 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=1>已启用<option value=0>残障人士</select><div>Active in S0</div></div></div></div><div id=dialog19 style=margin:auto;margin:3px>这会将此计算机的英特尔®AMT的整个状态保存到文件中。密码将不会保存,但可能会包含一些敏感数据。<br><br><input id=c55 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>残障人士<br><input type=radio name=d20 id=d20b value=1>ICMP回应<br><input type=radio name=d20 id=d20c value=2>RMCP响应<br><input type=radio name=d20 id=d20d value=3>ICMP和RMCP响应<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=67><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>操作系统IP地址同步</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=68><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c56 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP地址</div></div><div style=height:26px id=69><input id=c57 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>子网标记</div></div><div style=height:26px><input id=c58 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>网关</div></div><div style=height:26px><input id=c59 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>主DNS</div></div><div style=height:26px><input id=c60 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>备用DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c61 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>残障人士<option value=1>禁用,DHCP更新<option value=2>已启用</select><div>动态DNS客户端</div></div><div style=height:26px><input id=c62 style=float:right;width:200px><div>更新间隔(分钟)</div></div><div style=height:26px><input id=c63 style=float:right;width:200px><div>TTL(秒)</div></div><div style=font-size:10px><br>默认间隔时间是1440分钟,默认TTL是900秒。</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c64 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>充电<option value=10>重启<option value=5>电源周期<option value=8>掉电<option id=d24p500 value=500>操作系统从待机状态唤醒<option id=d24p501 value=501>操作系统省电<option value=999>设置启动选项</select><div>远程命令</div></div><div style=height:80px><div id=c65 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS暂停</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>强制执行安全启动</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS设置</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>强制进度事件</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>锁定电源按钮</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>锁定重置按钮</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>锁定睡眠按钮</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>锁键盘</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS密码绕过</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>重新刷新BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>安全模式</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>使用IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>局域网串行</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>英特尔®远程安全擦除</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>开机设定</div></div><div style=height:26px><select id=c66 style=float:right;width:200px onchange=showAdvPowerDlgChange()></select><div>引导源</div></div><div id=c67 style=height:26px><select id=c68 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>没有<option value=1>索引1<option value=2>索引2<option value=3>索引3<option value=3>索引4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c69 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>引导到软盘<option value=1>引导至CDROM</select><div>IDER引导设备</div></div><div style=height:26px><select id=c70 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>系统默认<option id=c71 value=1>安静<option id=c72 value=2>详细<option id=c73 value=3>黑屏</select><div>详细性</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密码</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>报警名称</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>唤醒日期(年月日)</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>唤醒时间(小时:分钟:秒)</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>间隔(天-小时-分钟)</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>保持警惕<option value=1>完成时删除</select></div><div style=padding-top:4px>醒后</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c74 value=2>已启用<br></label><label><input type=radio name=d26b id=c75 value=0>残障人士<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c76 value=1>已启用<br></label><label><input type=radio name=d26a id=c77 value=0>残障人士<br></label></div><div id=dialog27 style=margin:auto;margin:3px><br><div style=height:26px><select id=c78 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>残障人士<option value=1>已启用</select><div>已启用</div></div><div id=c79 style=height:26px><select id=c80 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>协议</div></div><div id=c81 style=height:26px><input id=c82 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="最多32个字符"><div title="最多32个字符">Server Name</div></div><div id=c83 style=height:26px><select id=c84 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c85 style=height:26px><input id=c86 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c87 style=height:26px><input id=c88 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">用户名</div></div><div id=c89 style=height:26px><input id=c90 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuthDialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">密码</div></div><div id=c91 style=height:26px><input id=c92 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c93 style=height:26px><input id=c94 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c95 style=height:26px><input id=c96 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c97 style=height:26px><select id=c98 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Client Certificate</div></div><div id=c99 style=height:26px><select id=c100 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Server Issuer Cert</div></div><div id=c101 style=height:26px><select id=c102 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>已启用<option value=1>残障人士</select><div>Active in S0</div></div><div id=c103 style=height:26px><input id=c104 style=float:right;width:200px onkeyup=updateNetAuthDialog()><div>PXE Timeout</div></div></div></div><div style=padding:10px;margin-bottom:4px><input id=c105 type=button value=取消 style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c106 type=button value=好 style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c107 type=button value=删除 style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
5 -$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var g=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==g&&$jscomp.global.Object.defineProperty(b,d,g)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
5 +$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var e=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==e&&$jscomp.global.Object.defineProperty(b,d,e)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
6 String.prototype.endsWith||(String.prototype.endsWith=function(b){return-1!==this.indexOf(b,this.length-b.length)});function Q(b){return document.getElementById(b)}function QS(b){try{return Q(b).style}catch(c){}}function QE(b,c){try{Q(b).disabled=!c}catch(a){}}function QV(b,c){try{QS(b).display=c?"":"none"}catch(a){}}function QA(b,c){Q(b).innerHTML+=c}function QH(b,c){Q(b).innerHTML=c}function inputBoxFocus(b){Q(b).focus();var c=Q(b).value;Q(b).value="";Q(b).value=c}
7 function ReadShort(b,c){return(b.charCodeAt(c)<<8)+b.charCodeAt(c+1)}function ReadShortX(b,c){return(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}function ReadInt(b,c){return 16777216*b.charCodeAt(c)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadSInt(b,c){return(b.charCodeAt(c)<<24)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}function ReadIntX(b,c){return 16777216*b.charCodeAt(c+3)+(b.charCodeAt(c+2)<<16)+(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}
8 function ShortToStr(b){return String.fromCharCode(b>>8&255,b&255)}function ShortToStrX(b){return String.fromCharCode(b&255,b>>8&255)}function IntToStr(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}function IntToStrX(b){return String.fromCharCode(b&255,b>>8&255,b>>16&255,b>>24&255)}function MakeToArray(b){return b&&null!=b&&"object"!=typeof b?[b]:b}function SplitArray(b){return b.split(",")}function Clone(b){return JSON.parse(JSON.stringify(b))}
@@ -12,261 +12,261 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a,d){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(d?d:32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,u,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.floppyReady)return g.floppyReady=!0,g.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;if(0==g.cdromReady)return g.cdromReady=!0,g.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}g.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,u);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),g.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 -d=0;switch(c){case 160:if(null==g.floppy)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==g.cdrom)return g.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}g.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),u&1);return}g.SendCommandEndResponse(1,5,c,36,0);break;case 27:g.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==g.floppy||176==c&&null==g.cdrom)return g.SendCommandEndResponse(1,
18 -2,c,58,0),-1;g.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}g.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),u&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -g.floppy||0==g.floppy.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.floppy&&(d=(g.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==g.cdrom||0==g.cdrom.size)return g.SendCommandEndResponse(0,2,c,58,0),-1;null!=g.cdrom&&(d=(g.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);g.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),u&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,F,d);a(c,F,d,u);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);g.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return g.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?g.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -u&1):0==N&&(H?g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),u&1):g.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),u&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=r;if(16==v||N&&16>v)H+=K;if(30==
22 -v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=A;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));g.SendDataToHost(c,!0,H,u&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");g.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=g.floppy?d=2:176==c&&null!=g.cdrom&&(d=2);g.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),u&1);break;case 76:g.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),g.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),g.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return g.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),u&1),-1;F=0;160==c?null!=g.floppy&&(F=g.floppy.size>>9):null!=g.cdrom&&(F=g.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?y:R:z;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?q:l:D;break;case 26:176==c&&(H=e);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?g.SendCommandEndResponse(0,5,c,32,0):g.SendDataToHost(c,!0,H,u&1);break;case 81:g.SendDataToHost(c,!0,E,u&1);break;case 172:g.SendDataToHost(c,!0,O,u&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),g.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 -b,x,e){var c=null,y=0;160==a&&(c=g.floppy,null!=g.floppy&&(y=g.floppy.size>>9));176==a&&(c=g.cdrom,null!=g.cdrom&&(y=g.cdrom.size>>11));if(0>x||b+x>y)return g.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return g.SendCommandEndResponse(1,0,a,0,0),0;null!=c&&(g.sectorStats&&g.sectorStats(1,160==a?0:1,y,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==u?H.push({media:c,dev:a,lba:b,len:x,fr:e}):(u=c,T=a,P=b,F=x,d(e)))}function d(a){var b=F,x=P;F>g.iderinfo.readbfr&&(b=g.iderinfo.readbfr);F-=b;P+=b;var e=
26 -new FileReader;e.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));g.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(u=null,N?(g.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),u=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};e.readAsBinaryString?e.readAsBinaryString(u.slice(x,x+b)):e.readAsArrayBuffer(u.slice(x,x+b))}var g={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,q,F){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,F,d);a(c,F,d,q);break;case 10:return F=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,F,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){F=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;F=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;F=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,F,0),q&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);F=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),q&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,F);e.SendDataToHost(F,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),q&1);break;case 40:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,F,d);a(c,F,d,q);break;case 42:case 46:F=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,F,d);e.SendGetDataFromHost(c,512*d);break;case 67:F=ReadShort(d,7);var H=d.charCodeAt(1)&2,N=d.charCodeAt(2)&7;0==N&&(N=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+F+", msf="+H+", format="+N);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==N?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +q&1):0==N&&(H?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),q&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),q&1));break;case 70:var N=2!=d.charCodeAt(1),v=ReadShort(d,2);F=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,N,v,F);if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;H=IntToStr(8);0==v&&(H+=m);if(1==v||N&&1>v)H+=k;if(2==v||N&&2>v)H+=h;if(3==v||N&&3>v)H+=u;if(16==v||N&&16>v)H+=K;if(30==
22 +v||N&&30>v)H+=B;if(256==v||N&&256>v)H+=x;if(261==v||N&&261>v)H+=z;H=IntToStr(H.length)+H;H.length>F&&(H=H.substring(0,F));e.SendDataToHost(c,!0,H,q&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),q&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);F=ReadShort(d,7);H=null;if(0==F)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),q&1),-1;F=0;160==c?null!=e.floppy&&(F=e.floppy.size>>9):null!=e.cdrom&&(F=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:H=160==c?2880>=F?A:R:y;break;case 5:160==c&&(H=2880>=F?p:n);break;case 63:H=160==c?2880>=F?r:l:D;break;case 26:176==c&&(H=g);break;case 29:176==c&&(H=C);break;case 42:176==c&&(H=w)}null==H?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,H,q&1);break;case 81:e.SendDataToHost(c,!0,E,q&1);break;case 172:e.SendDataToHost(c,!0,O,q&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,
25 +b,x,c){var g=null,p=0;160==a&&(g=e.floppy,null!=e.floppy&&(p=e.floppy.size>>9));176==a&&(g=e.cdrom,null!=e.cdrom&&(p=e.cdrom.size>>11));if(0>x||b+x>p)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,p,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==q?H.push({media:g,dev:a,lba:b,len:x,fr:c}):(q=g,T=a,P=b,F=x,d(c)))}function d(a){var b=F,x=P;F>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);F-=b;P+=b;var c=
26 +new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));e.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(q=null,N?(e.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),q=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(q.slice(x,x+b)):c.readAsArrayBuffer(q.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
27 iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,
28 -0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),e=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 -18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),r=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 -0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),A=String.fromCharCode(1,5,3,0),y=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),z=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);g.xxStateChange=function(a){b("IDER-StateChange",a);
31 -0==a&&g.Stop();3==a&&g.Start()};g.Start=function(){b("IDER-Start");b(g.floppy,g.cdrom);g.bytesToAmt=0;g.bytesFromAmt=0;g.inSequence=0;g.outSequence=0;H=[];g.SendCommand(64,ShortToStrX(g.rx_timeout)+ShortToStrX(g.tx_timeout)+ShortToStrX(g.heartbeat)+IntToStrX(g.version));g.sectorStats&&(g.sectorStats(0,0,g.floppy?g.floppy.size>>9:0),g.sectorStats(0,1,g.cdrom?g.cdrom.size>>11:0))};g.Stop=function(){b("IDER-Stop");g.parent.Stop()};g.ProcessData=function(a){g.bytesFromAmt+=a.length;g.acc+=a;null!=v&&
32 -v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",g.acc.length,rstr2hex(g.acc));;){a=g.ProcessDataEx();if(0==a)break;if(g.inSequence!=ReadIntX(g.acc,4)){b("ERROR: Out of sequence",g.inSequence,ReadIntX(g.acc,4));g.Stop();break}g.inSequence++;g.acc=g.acc.substring(a)}};g.SendCommand=function(a,x,e,c){null==x&&(x="");e=50<a&&1==e?2:0;c&&(e+=1);x=String.fromCharCode(a,0,0,e)+IntToStrX(g.outSequence++)+x;g.parent.xxSend(x);g.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 -"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};g.SendCommandEndResponse=function(a,b,x,e,c){a?g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,e,c),!0)};g.SendDataToHost=function(a,b,x,e){var c=e?0:x.length;1==b?g.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,e):g.SendCommand(84,
34 -String.fromCharCode(0,x.length&255,x.length>>8,0,e?180:181,0,2,0,c&255,c>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,e)};g.SendGetDataFromHost=function(a,b){g.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};g.SendDisableEnableFeatures=function(a,b){null==b&&(b="");g.SendCommand(72,String.fromCharCode(a)+b)};g.ProcessDataEx=function(){if(8>g.acc.length)return 0;switch(g.acc.charCodeAt(0)){case 65:if(30>g.acc.length)break;var a=g.acc.charCodeAt(29);
35 -if(g.acc.length<30+a)break;g.iderinfo={};g.iderinfo.major=g.acc.charCodeAt(8);g.iderinfo.minor=g.acc.charCodeAt(9);g.iderinfo.fwmajor=g.acc.charCodeAt(10);g.iderinfo.fwminor=g.acc.charCodeAt(11);g.iderinfo.readbfr=ReadShortX(g.acc,16);g.iderinfo.writebfr=ReadShortX(g.acc,18);g.iderinfo.proto=g.acc.charCodeAt(21);g.iderinfo.iana=ReadIntX(g.acc,25);b(g.iderinfo);0!=g.iderinfo.proto&&(b("Unknown proto",g.iderinfo.proto),g.Stop());8192<g.iderinfo.readbfr&&(b("Illegal read buffer size",g.iderinfo.readbfr),
36 -g.Stop());8192<g.iderinfo.writebfr&&(b("Illegal write buffer size",g.iderinfo.writebfr),g.Stop());0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),g.Stop(),8;case 68:return g.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>g.acc.length)break;a=g.acc.charCodeAt(8);null===u?(g.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 -a));return 9;case 73:if(13>g.acc.length)break;var a=g.acc.charCodeAt(8),x=ReadIntX(g.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(9)):1==g.iderStart?g.SendDisableEnableFeatures(3,IntToStrX(17)):2==g.iderStart&&g.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:g.enabled=x&2?!0:!1;b("IDER Status: "+g.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>g.acc.length)break;b("IDER: ABORT",g.acc.charCodeAt(8));
38 -return 11;case 75:return 8;case 80:if(28>g.acc.length)break;var a=g.acc.charCodeAt(14)&16?176:160,x=g.acc.charCodeAt(14),e=g.acc.substring(16,28),y=g.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(e),y,x);c(a,e,y,x);return 28;case 83:if(14>g.acc.length)break;a=ReadShortX(g.acc,9);if(g.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));g.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",g.acc[0]),g.Stop()}return 0};
39 -var H=[],N=!1,u=null,T,P,F;return g},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 -a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,g,v,n){b("SIDER-Start",a,d,g,v,n);c.host=a;c.port=d;c.user=g;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==g?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+g:"")+"&tls1only="+
41 -c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(g){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
28 +0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),r=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),C=String.fromCharCode(0,
29 +18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),K=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,
30 +0,0),B=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0),E=String.fromCharCode(0,32,14,1,1,1,1,32,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0),O=String.fromCharCode(0,0,0,4,2,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);
31 +0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;H=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&
32 +v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+
33 +"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,
34 +String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),!1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);
35 +if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),
36 +e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===q?(e.SendCommand(71),b("RESETOCCURED1",a)):(N=!0,b("RESETOCCURED2",
37 +a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));
38 +return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),p=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),p,x);c(a,g,p,x);return 28;case 83:if(14>e.acc.length)break;a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};
39 +var H=[],N=!1,q=null,T,P,F;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=
40 +a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+
41 +c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,
42 b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);break;
43 -default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,g){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){e.socketState=2;e.socketParseState=0;e.socketAccumulator="";e.socketHeader=null;e.socketData="";
44 -for(i in e.pendingAjaxCall)e.sendRequest(e.pendingAjaxCall[i][0],e.pendingAjaxCall[i][3],e.pendingAjaxCall[i][4])}function p(a){var b=e.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(e.socketAccumulator=b+a;;){if(0==e.socketParseState){b=e.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;e.socketHeader=e.socketAccumulator.substring(0,b).split("\r\n");if(null==e.amtVersion)for(var c in e.socketHeader)0==e.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 -(e.amtVersion=e.socketHeader[c].substring(46));e.socketAccumulator=e.socketAccumulator.substring(b+4);e.socketParseState=1;e.socketData="";e.socketXHeader={Directive:e.socketHeader[0].split(" ")};for(c in e.socketHeader)0!=c&&(b=e.socketHeader[c].indexOf(":"),e.socketXHeader[e.socketHeader[c].substring(0,b).toLowerCase()]=e.socketHeader[c].substring(b+2))}if(1==e.socketParseState){b=-1;if(void 0==e.socketXHeader.connection||"close"!=e.socketXHeader.connection.toLowerCase()||void 0!=e.socketXHeader["transfer-encoding"]&&
46 -"chunked"==e.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=e.socketXHeader["content-length"]){b=parseInt(e.socketXHeader["content-length"]);if(e.socketAccumulator.length<b)break;a=e.socketAccumulator.substring(0,b);e.socketAccumulator=e.socketAccumulator.substring(b);e.socketData=a;b=0}else{var p=e.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(e.socketAccumulator.substring(0,p),16);if(isNaN(b)){e.websocket&&e.websocket.close();break}if(e.socketAccumulator.length<p+2+b+2)break;
47 -a=e.socketAccumulator.substring(p+2,p+2+b);e.socketAccumulator=e.socketAccumulator.substring(p+2+b+2);e.socketData+=a}else b=0;if(0==b){p=e.socketXHeader;b=e.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++e.authcounter){if(e.challengeParams=e.parseDigest(p["www-authenticate"]),null!=e.challengeParams.qop){b=e.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 -e.challengeParams.qop="auth-int":e.challengeParams.qop="auth"}}else p=e.pendingAjaxCall.shift(),e.authcounter=0,e.ActiveAjaxCount--,e.gotNextMessages(b,"success",{status:a},p),e.PerformNextAjax();e.socketParseState=0;e.socketHeader=null}}}}function q(a){0==e.inDataCount&&(e.tlsv1only=1-e.tlsv1only);e.socketState=0;null!=e.socket&&(e.socket.close(),e.socket=null);if(0<e.pendingAjaxCall.length){a=e.pendingAjaxCall.shift();var b=a[5];e.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var e={PendingAjax:[],
49 -ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};e.host=b;e.port=c;e.user=a;e.pass=d;e.tls=g;e.tlsv1only=0;e.inDataCount=0;e.amtVersion=null;e.digestRealmMatch=null;e.digestRealm=null;e.PerformAjax=function(a,b,c,p,d,h){e.ActiveAjaxCount<e.MaxActiveAjaxCount&&0==e.PendingAjax.length?e.PerformAjaxEx(a,b,c,d,h):1==p?e.PendingAjax.unshift([a,b,c,d,h]):e.PendingAjax.push([a,b,c,d,h])};e.PerformNextAjax=function(){if(!(e.ActiveAjaxCount>=
50 -e.MaxActiveAjaxCount||0==e.PendingAjax.length)){var a=e.PendingAjax.shift();e.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);e.PerformNextAjax()}};e.PerformAjaxEx=function(a,b,c,p,d){if(0!=e.FailAllError)e.gotNextMessagesError({status:e.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),e.ActiveAjaxCount++,e.PerformAjaxExNodeJS(a,b,c,p,d)};e.pendingAjaxCall=[];e.PerformAjaxExNodeJS=function(a,b,c,p,d){e.PerformAjaxExNodeJS2(a,
51 -b,c,p,d,5)};e.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=e.FailAllError?(e.ActiveAjaxCount--,999!=e.FailAllError&&e.gotNextMessages(null,"error",{status:0==e.FailAllError?408:e.FailAllError},[a,b,c,p,d]),e.PerformNextAjax()):(e.pendingAjaxCall.push([a,b,c,p,d,h]),0==e.socketState?e.xxConnectHttpSocket():2==e.socketState&&e.sendRequest(a,p,d))};e.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=e.challengeParams){e.digestRealm=e.challengeParams.realm;
52 -if(e.digestRealmMatch&&e.digestRealm!=e.digestRealmMatch){e.FailAllError=997;e.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(e.user+":"+e.challengeParams.realm+":"+e.pass)+":"+e.challengeParams.nonce+":"+n(e.noncecounter)+":"+d+":"+e.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==e.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+e.renderDigest({username:e.user,realm:e.challengeParams.realm,nonce:e.challengeParams.nonce,uri:b,qop:e.challengeParams.qop,
53 -response:c,nc:n(e.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+e.host+":"+e.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==e.socketState&&null!=e.socket&&e.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{e.socket.send(b.buffer)}catch(h){}}};e.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var e=b.trim().split("=");a[e[0]]=e[1].replace(RegExp('"',"g"),"");return a},{})};e.renderDigest=function(a){var b=
54 -[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,e){return b+","+("nc"==e||"qop"==e?e+"="+a[e]:e+'="'+a[e]+'"')},"").substring(1)};e.xxConnectHttpSocket=function(){e.inDataCount=0;e.socketState=1;e.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+e.host+"&port="+e.port+"&tls="+e.tls+"&tls1only="+e.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 -typeof d?"&serverauth=1&user="+a:""));e.socket.binaryType="arraybuffer";e.socket.onopen=l;e.socket.onmessage=p;e.socket.onclose=q};e.gotNextMessages=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](a,c.status,p[2])};e.gotNextMessagesError=function(a,b,c,p){if(999!=e.FailAllError)if(0!=e.FailAllError)p[1](null,e.FailAllError,p[2]);else p[1](e,null,{Header:{HttpError:a.status}},a.status,p[2])};e.CancelAllQueries=function(a){for(;0<e.PendingAjax.length;){var b=
56 -e.PendingAjax.shift();b[1](null,a,b[2])}null!=e.websocket&&(e.websocket.close(),e.websocket=null,e.socketState=0)};return e},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
43 +default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(a){a="00000000"+a.toString(16);return a.substring(a.length-8)}function l(){g.socketState=2;g.socketParseState=0;g.socketAccumulator="";g.socketHeader=null;g.socketData="";
44 +for(i in g.pendingAjaxCall)g.sendRequest(g.pendingAjaxCall[i][0],g.pendingAjaxCall[i][3],g.pendingAjaxCall[i][4])}function p(a){var b=g.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(g.socketAccumulator=b+a;;){if(0==g.socketParseState){b=g.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;g.socketHeader=g.socketAccumulator.substring(0,b).split("\r\n");if(null==g.amtVersion)for(var c in g.socketHeader)0==g.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
45 +(g.amtVersion=g.socketHeader[c].substring(46));g.socketAccumulator=g.socketAccumulator.substring(b+4);g.socketParseState=1;g.socketData="";g.socketXHeader={Directive:g.socketHeader[0].split(" ")};for(c in g.socketHeader)0!=c&&(b=g.socketHeader[c].indexOf(":"),g.socketXHeader[g.socketHeader[c].substring(0,b).toLowerCase()]=g.socketHeader[c].substring(b+2))}if(1==g.socketParseState){b=-1;if(void 0==g.socketXHeader.connection||"close"!=g.socketXHeader.connection.toLowerCase()||void 0!=g.socketXHeader["transfer-encoding"]&&
46 +"chunked"==g.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=g.socketXHeader["content-length"]){b=parseInt(g.socketXHeader["content-length"]);if(g.socketAccumulator.length<b)break;a=g.socketAccumulator.substring(0,b);g.socketAccumulator=g.socketAccumulator.substring(b);g.socketData=a;b=0}else{var p=g.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(g.socketAccumulator.substring(0,p),16);if(isNaN(b)){g.websocket&&g.websocket.close();break}if(g.socketAccumulator.length<p+2+b+2)break;
47 +a=g.socketAccumulator.substring(p+2,p+2+b);g.socketAccumulator=g.socketAccumulator.substring(p+2+b+2);g.socketData+=a}else b=0;if(0==b){p=g.socketXHeader;b=g.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++g.authcounter){if(g.challengeParams=g.parseDigest(p["www-authenticate"]),null!=g.challengeParams.qop){b=g.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?
48 +g.challengeParams.qop="auth-int":g.challengeParams.qop="auth"}}else p=g.pendingAjaxCall.shift(),g.authcounter=0,g.ActiveAjaxCount--,g.gotNextMessages(b,"success",{status:a},p),g.PerformNextAjax();g.socketParseState=0;g.socketHeader=null}}}}function r(a){0==g.inDataCount&&(g.tlsv1only=1-g.tlsv1only);g.socketState=0;null!=g.socket&&(g.socket.close(),g.socket=null);if(0<g.pendingAjaxCall.length){a=g.pendingAjaxCall.shift();var b=a[5];g.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var g={PendingAjax:[],
49 +ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,authcounter:0,socket:null,socketState:0};g.host=b;g.port=c;g.user=a;g.pass=d;g.tls=e;g.tlsv1only=0;g.inDataCount=0;g.amtVersion=null;g.digestRealmMatch=null;g.digestRealm=null;g.PerformAjax=function(a,b,c,p,d,h){g.ActiveAjaxCount<g.MaxActiveAjaxCount&&0==g.PendingAjax.length?g.PerformAjaxEx(a,b,c,d,h):1==p?g.PendingAjax.unshift([a,b,c,d,h]):g.PendingAjax.push([a,b,c,d,h])};g.PerformNextAjax=function(){if(!(g.ActiveAjaxCount>=
50 +g.MaxActiveAjaxCount||0==g.PendingAjax.length)){var a=g.PendingAjax.shift();g.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);g.PerformNextAjax()}};g.PerformAjaxEx=function(a,b,c,p,d){if(0!=g.FailAllError)g.gotNextMessagesError({status:g.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),g.ActiveAjaxCount++,g.PerformAjaxExNodeJS(a,b,c,p,d)};g.pendingAjaxCall=[];g.PerformAjaxExNodeJS=function(a,b,c,p,d){g.PerformAjaxExNodeJS2(a,
51 +b,c,p,d,5)};g.PerformAjaxExNodeJS2=function(a,b,c,p,d,h){0>=h||0!=g.FailAllError?(g.ActiveAjaxCount--,999!=g.FailAllError&&g.gotNextMessages(null,"error",{status:0==g.FailAllError?408:g.FailAllError},[a,b,c,p,d]),g.PerformNextAjax()):(g.pendingAjaxCall.push([a,b,c,p,d,h]),0==g.socketState?g.xxConnectHttpSocket():2==g.socketState&&g.sendRequest(a,p,d))};g.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=g.challengeParams){g.digestRealm=g.challengeParams.realm;
52 +if(g.digestRealmMatch&&g.digestRealm!=g.digestRealmMatch){g.FailAllError=997;g.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(g.user+":"+g.challengeParams.realm+":"+g.pass)+":"+g.challengeParams.nonce+":"+n(g.noncecounter)+":"+d+":"+g.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==g.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+g.renderDigest({username:g.user,realm:g.challengeParams.realm,nonce:g.challengeParams.nonce,uri:b,qop:g.challengeParams.qop,
53 +response:c,nc:n(g.noncecounter++),cnonce:d})+"\r\n"}a=p+="Host: "+g.host+":"+g.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==g.socketState&&null!=g.socket&&g.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{g.socket.send(b.buffer)}catch(h){}}};g.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};g.renderDigest=function(a){var b=
54 +[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+","+("nc"==c||"qop"==c?c+"="+a[c]:c+'="'+a[c]+'"')},"").substring(1)};g.xxConnectHttpSocket=function(){g.inDataCount=0;g.socketState=1;g.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+g.host+"&port="+g.port+"&tls="+g.tls+"&tls1only="+g.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===
55 +typeof d?"&serverauth=1&user="+a:""));g.socket.binaryType="arraybuffer";g.socket.onopen=l;g.socket.onmessage=p;g.socket.onclose=r};g.gotNextMessages=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](a,c.status,p[2])};g.gotNextMessagesError=function(a,b,c,p){if(999!=g.FailAllError)if(0!=g.FailAllError)p[1](null,g.FailAllError,p[2]);else p[1](g,null,{Header:{HttpError:a.status}},a.status,p[2])};g.CancelAllQueries=function(a){for(;0<g.PendingAjax.length;){var b=
56 +g.PendingAjax.shift();b[1](null,a,b[2])}null!=g.websocket&&(g.websocket.close(),g.websocket=null,g.socketState=0)};return g},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=
57 function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;
58 d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?
59 d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,
60 0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):d.Stop(2);
61 -else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),e=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),q=q+(e+
62 -1),e=0,e=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(e=n[q],e=a(new Uint8Array(n.buffer.slice(q+1,q+1+e))),w="00000002:"+C+":"+e+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(q+=e.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 -p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(e.length)+e);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
61 +else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var r=0,p=n[r],l=a(new Uint8Array(n.buffer.slice(r+1,r+1+p))),r=r+(p+1),g=n[r],p=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),r=r+(g+
62 +1),g=0,g=null,C;C="";for(var w=0;32>w;w++)C+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[r],g=a(new Uint8Array(n.buffer.slice(r+1,r+1+g))),w="00000002:"+C+":"+g+":");n=hex_md5(hex_md5(d.user+":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));r=d.user.length+l.length+p.length+d.authuri.length+C.length+8+n.length+7;4==c&&(r+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(r)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+
63 +p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(C.length)+C+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;
64 break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;
65 break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&
66 1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+
67 "/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=
68 --1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,g,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
68 +-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},
69 b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b="",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";
70 var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";
71 -b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,g,v);q.PerformAjax=function(a,b,c,p,d){null==d&&(d="");q.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" '+
72 -d+"><Header><a:Action>"+a,function(a,c,e){var p=q.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(q,p.Header.ResourceURI,p,c,e)}else b(q,null,{Header:{HttpError:c}},601,e)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,h,g,l,B){var x="",A="";
73 -g="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 -B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",A='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=g&&(g="<a:ReferenceParameters><m:arg>"+g+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+
75 -"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+g+"</e:NotifyTo>"+A+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=
76 -function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 -q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=q.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var g in b)if(b.hasOwnProperty(g)&&0!==g.indexOf("__")&&0!==g.indexOf("@")&&null!=b[g]&&"function"!==typeof b[g])if("object"===typeof b[g]&&
78 -b[g].ReferenceParameters){a+="<r:"+g+"><a:Address>"+b[g].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[g].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[g].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+g+">"}else if(Array.isArray(b[g]))for(B=0;B<b[g].length;B++)a+=
79 -"<r:"+g+">"+b[g][B].toString()+"</r:"+g+">";else a+="<r:"+g+">"+b[g].toString()+"</r:"+g+">";b=a+("</r:"+h+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var h=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
80 -p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var g in b)a+="<g:"+g+">"+b[g]+"</g:"+g+">";q.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
81 -p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>",b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,
82 -h){var g="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])g+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else g+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,g,p,d,k,h)};q.ExecMethodXml=function(a,b,c,d,m,k,h){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>"+
83 -p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>',
84 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var g=a.getElementsByTagName("Body")[0];g||(g=a.getElementsByTagName("a:Body")[0]);
86 -if(!g)return null;if(0<g.childNodes.length){k=g.childNodes[0].localName;var q=k.indexOf("_OUTPUT");-1!=q&&q==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(g.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",g,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
87 -function AmtStackCreateService(b){function c(){var a=e.GetPendingActions();C<a&&(C=a);null!=e.onProcessChanged&&w!=a&&(w=a,e.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,z,h,k){200!=z?(c(e,a,null,z,h),g(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?e.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,e,p,z){d(a,p,c,e,[],z,h,k)}):(c(e,a,null,603,h),g(1))}function d(a,b,p,h,z,E,k,m){if(200!=E)p(e,a,null,E,k),g(1);else if(null==b||"PullResponse"!=b.Header.Method)p(e,
88 -a,null,604,k),g(1);else{for(var r in b.Body.Items)if(b.Body.Items[r]instanceof Array)for(var q in b.Body.Items[r])"function"!=typeof b.Body.Items[r][q]&&z.push(b.Body.Items[r][q]);else"function"!=typeof b.Body.Items[r]&&z.push(b.Body.Items[r]);b.Body.EnumerationContext?e.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,e,A){d(a,e,p,c,z,A,k,1)}):(g(1),p(e,a,z,E,k),c())}}function g(a){e.ActiveEnumsCount-=a;e.ActiveEnumsCount>=e.MaxActiveEnumsCount||0==e.PendingEnums.length?c():(a=e.PendingEnums.shift(),
89 -e.Enum(a[0],a[1],a[2]),g(0))}function v(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]),function(b,c,p,d){null==p||200!=d?a.callback(e,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](e,null,d[2]);else e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,z){if(200!=d||"0"!=c.Body.ReturnValue)z[0](e,
90 -null,z[2]);else{var h,m,g;b=z[2];d=new Date;var r=c.Body.RecordArray;"string"===typeof r&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in r){a=null;try{a=window.atob(r[h])}catch(q){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){g={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),
91 -EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)g.EventData.push(a.charCodeAt(m));g.EntityStr=k[g.Entity];g.Desc=p(g.EventSensorType,g.EventOffset,g.EventData,g.Entity);g.EntityStr||(g.EntityStr="Unknown");b.push(g)}}if(1!=c.Body.NoMoreRecords)e.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[z[0],b,z[2]]);else z[0](e,b,z[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Invalid Data";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("One Click Recovery: {0}",
92 -r[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("One Click Recovery: {0}",h[c[2]]):format("One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&64==c[1]){if(1==
71 +b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var r={NextMessageId:1,Address:"/wsman"};r.comm=CreateWsmanComm(b,c,a,d,e,v);r.PerformAjax=function(a,b,c,p,d){null==d&&(d="");r.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" '+
72 +d+"><Header><a:Action>"+a,function(a,c,g){var p=r.ParseWsman(a);if(null==a||p&&null!=p||200!=c){if(200!=c){null==p&&(p={Header:{}});p.Header.HttpError=c;try{p.Header.WsmanError=p.Body.Reason.Text.Value}catch(d){}}b(r,p.Header.ResourceURI,p,c,g)}else b(r,null,{Header:{HttpError:c}},601,g)},c,p)};r.CancelAllQueries=function(a){r.comm.CancelAllQueries(a)};r.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};r.ExecSubscribe=function(a,b,c,d,m,k,h,e,l,B){var x="",z="";
73 +e="";null!=l&&null!=B&&(x='<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>'+l+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+
74 +B+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=e&&(e="<a:ReferenceParameters><m:arg>"+e+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+r.Address+
75 +"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+e+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";r.PerformAjax(a+"</Body></Envelope>",d,m,k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};r.ExecUnSubscribe=
76 +function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";r.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};r.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+
77 +r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+p(k)+"</Header><Body>";if(a&&null!=b){var h=r.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var e in b)if(b.hasOwnProperty(e)&&0!==e.indexOf("__")&&0!==e.indexOf("@")&&null!=b[e]&&"function"!==typeof b[e])if("object"===typeof b[e]&&
78 +b[e].ReferenceParameters){a+="<r:"+e+"><a:Address>"+b[e].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[e].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var K=b[e].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(K))for(var B=0;B<K.length;B++)a+="<w:Selector"+l(K[B])+">"+K[B].Value+"</w:Selector>";else a+="<w:Selector"+l(K)+">"+K.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+e+">"}else if(Array.isArray(b[e]))for(B=0;B<b[e].length;B++)a+=
79 +"<r:"+e+">"+b[e][B].toString()+"</r:"+e+">";else a+="<r:"+e+">"+b[e].toString()+"</r:"+e+">";b=a+("</r:"+h+">")}else b="";r.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};r.ExecCreate=function(a,b,c,d,m,k){var h=r.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
80 +p(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";r.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};r.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
81 +p(b)+"</Header><Body /></Envelope>";r.PerformAjax(a,c,d,m)};r.ExecGet=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>",b,c,p)};r.ExecMethod=function(a,b,c,p,d,k,
82 +h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])e+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";r.ExecMethodXml(a,b,e,p,d,k,h)};r.ExecMethodXml=function(a,b,c,d,m,k,h){r.PerformAjax(a+"/"+b+"</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>"+
83 +p(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};r.ExecEnum=function(a,b,c,p){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>',
84 +b,c,p)};r.ExecPull=function(a,b,c,p,d){r.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+r.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+r.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>'+b+"</EnumerationContext></Pull></Body></Envelope>",
85 +c,p,d)};r.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var e=a.getElementsByTagName("Body")[0];e||(e=a.getElementsByTagName("a:Body")[0]);
86 +if(!e)return null;if(0<e.childNodes.length){k=e.childNodes[0].localName;var r=k.indexOf("_OUTPUT");-1!=r&&r==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(e.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",e,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return r};
87 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();C<a&&(C=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,C));0==a&&(C=0)}function a(a,b,c,p,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,g,p,y){d(a,p,c,g,[],y,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,p,h,y,E,k,m){if(200!=E)p(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(g,
88 +a,null,604,k),e(1);else{for(var u in b.Body.Items)if(b.Body.Items[u]instanceof Array)for(var r in b.Body.Items[u])"function"!=typeof b.Body.Items[u][r]&&y.push(b.Body.Items[u][r]);else"function"!=typeof b.Body.Items[u]&&y.push(b.Body.Items[u]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,p,c,y,z,k,1)}):(e(1),p(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
89 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
90 +null,y[2]);else{var h,m,e;b=y[2];d=new Date;var u=c.Body.RecordArray;"string"===typeof u&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in u){a=null;try{a=window.atob(u[h])}catch(r){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){e={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),
91 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)e.EventData.push(a.charCodeAt(m));e.EntityStr=k[e.Entity];e.Desc=p(e.EventSensorType,e.EventOffset,e.EventData,e.Entity);e.EntityStr||(e.EntityStr="Unknown");b.push(e)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Invalid Data";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("One Click Recovery: {0}",
92 +u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],K[c[3]]):7>c[2]?format("One Click Recovery: {0}",h[c[2]]):format("One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&64==c[1]){if(1==
93 c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
94 -a&&170==c[0])return"Agent watchdog "+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... changed to "+e.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Case intrusion";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"A remote Serial Over LAN session was established.";if(1==c[2])return"Remote Serial Over LAN session finished. User control was restored.";if(2==c[2])return"A remote IDE-Redirection session was established.";if(3==c[2])return"Remote IDE-Redirection session finished. User control was restored."}if(36==
94 +a&&170==c[0])return"Agent watchdog "+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... changed to "+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Case intrusion";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"A remote Serial Over LAN session was established.";if(1==c[2])return"Remote Serial Over LAN session finished. User control was restored.";if(2==c[2])return"A remote IDE-Redirection session was established.";if(3==c[2])return"Remote IDE-Redirection session finished. User control was restored."}if(36==
95 a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="wired"),4294967293==a?"All received packet filter was matched on "+b+" interface.":4294967292==a?"All outbound packet filter was matched on "+b+" interface.":4294967290==a?"Spoofed packet filter was matched on "+b+" interface.":"Filter "+a+" was matched on "+b+" interface.";if(192==a)return 0==c[2]?"Security policy invoked. Some or all network traffic (TX) was stopped.":2==c[2]?"Security policy invoked. Some or all network traffic (RX) was stopped.":
96 "Security policy invoked.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"User request for remote connection.";if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"EAC error: attempt to get posture while NAC in Intel\ufffd AMT is disabled.";if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"HWA Error: general error"}return 6==a?"Authentication failed "+(c[1]+(c[2]<<8))+" times. The system may be under attack.":30==a?"No bootable media":32==a?"Operating system lockup or power interrupt":35==a?
97 -64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"System boot failure":37==a?"System firmware started (at least one CPU is properly executing).":"Unknown Sensor Type #"+a}function q(a,b,c,p,d){if(200!=p)d[0](e,[],p);else{var h,k,m=d[1],g=new Date,r;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,
98 -2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM Default Port</i>",h=5);r=ReadInt(a,h);b.Time=new Date(1E3*(r+60*g.getTimezoneOffset()));
99 -h+=4;b.MCLocationType=a.charCodeAt(h++);r=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+r);h+=r;r=a.charCodeAt(h++);b.Ex=a.substring(h,h+r);b.ExStr=e.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)e.AMT_AuditLog_ReadRecords(m.length+1,q,[d[0],m]);else d[0](e,m,p)}}var e={};e.wsman=b;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=
100 -[];e.PendingBatchOperations=0;e.ActiveEnumsCount=0;e.MaxActiveEnumsCount=1;e.onProcessChanged=null;var C=0,w=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,b,p,d,z,h,k,m,g,r){e.wsman.ExecSubscribe(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,y,A,z)},0,h,k,m,g,r);c()};e.UnSubscribe=function(a,b,p,d,z){e.wsman.ExecUnSubscribe(e.CompleteName(a),function(d,
101 -z,h,k){c();b(e,a,h,k,p)},0,d,z);c()};e.Get=function(a,b,p,d){e.wsman.ExecGet(e.CompleteName(a),function(d,h,k,m){c();b(e,a,k,m,p)},0,d);c()};e.Put=function(a,b,p,d,z,h){e.wsman.ExecPut(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z,h);c()};e.Create=function(a,b,p,d,z){e.wsman.ExecCreate(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Delete=function(a,b,p,d,z){e.wsman.ExecDelete(e.CompleteName(a),b,function(b,z,A,h){c();p(e,a,A,h,d)},0,z);c()};e.Exec=function(a,b,
102 -p,d,z,h,k){e.wsman.ExecMethod(e.CompleteName(a),b,p,function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.ExecWithXml=function(a,b,p,d,z,h,k){e.wsman.ExecMethodXml(e.CompleteName(a),b,execArgumentsToXml(p),function(b,p,y,A){c();d(e,a,e.CompleteExecResponse(y),A,z)},0,h,k);c()};e.Enum=function(b,p,d,h){e.ActiveEnumsCount<e.MaxActiveEnumsCount?(e.ActiveEnumsCount++,e.wsman.ExecEnum(e.CompleteName(b),function(e,d,y,h,k){c();a(b,y,p,d,h,k)},d,h)):e.PendingEnums.push([b,p,d,h]);c()};
103 -e.BatchEnum=function(a,b,p,d,z,h){z={_pending:b.length};e.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],g=e.Enum;"*"==m[0]&&(g=e.Get,m=m.substring(1));g(m,function(b,z,A,h,k){e.PendingBatchOperations--;c();k[2][z]={response:null==A?null:A.Body,responses:A,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(e,e,a,k[2],h,d))},[a,b,z,g==e.Get?"Get":"Enum"],h)}};e.BatchGet=function(a,b,p,e,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:e,pri:d});c()};e.CompleteName=function(a){if(0==
104 -a.indexOf("AMT_"))return e.pfx[0]+a;if(0==a.indexOf("CIM_"))return e.pfx[1]+a;if(0==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,b){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>',
105 -null,null,b)};e.RequestOSPowerStateChange=function(a,b){e.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
106 -null,null,b)};e.SetBootConfigRole=function(a,b){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>',
107 -a,b)};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,b){e.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
108 -k,m,g){e.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,g)};e.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){e.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};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=
109 -function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};e.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){e.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};e.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){e.Exec("AMT_AgentPresenceWatchdogVA",
110 -"DeleteAllActions",{_method_dummy:a},b)};e.AMT_AuditLog_ClearLog=function(a){e.Exec("AMT_AuditLog","ClearLog",{},a)};e.AMT_AuditLog_RequestStateChange=function(a,b,c){e.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_AuditLog_ReadRecords=function(a,b,c){e.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};e.AMT_AuditLog_SetAuditLock=function(a,b,c,p){e.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};e.AMT_AuditLog_ExportAuditLogSignature=
111 -function(a,b){e.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};e.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){e.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){e.Exec("AMT_AuditPolicyRule",
112 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};e.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){e.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};e.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){e.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};e.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService",
113 -"GetUserAclEntryEx",{Handle:a},b,c)};e.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){e.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};e.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){e.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};e.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){e.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
114 -{Username:a,DigestPassword:b},c)};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,b,c,p){e.Exec("AMT_AuthorizationService",
115 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};e.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){e.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};e.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_EndpointAccessControlService_GetPosture=function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};e.AMT_EndpointAccessControlService_GetPostureHash=
116 -function(a,b){e.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};e.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){e.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};e.AMT_EndpointAccessControlService_GetEacOptions=function(a){e.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};e.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){e.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
117 -PostureHashAlgorithm:b},c)};e.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};e.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){e.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};e.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){e.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};e.AMT_GeneralSettings_AMTAuthenticate=
118 -function(a,b){e.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};e.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){e.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};e.AMT_KerberosSettingData_GetCredentialCacheState=function(a){e.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};e.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){e.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
119 -b)};e.AMT_MessageLog_CancelIteration=function(a,b){e.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};e.AMT_MessageLog_RequestStateChange=function(a,b,c){e.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_MessageLog_ClearLog=function(a){e.Exec("AMT_MessageLog","ClearLog",{},a)};e.AMT_MessageLog_GetRecords=function(a,b,c,p){e.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};e.AMT_MessageLog_GetRecord=function(a,
120 -b,c){e.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};e.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){e.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};e.AMT_MessageLog_PositionToFirstRecord=function(a,b){e.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};e.AMT_MessageLog_FreezeLog=function(a,b){e.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};e.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){e.Exec("AMT_PublicKeyManagementService",
121 -"AddCRL",{Url:a,SerialNumbers:b},c)};e.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){e.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};e.AMT_PublicKeyManagementService_AddCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){e.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};e.AMT_PublicKeyManagementService_AddKey=
122 -function(a,b){e.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};e.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};e.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){e.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};e.AMT_PublicKeyManagementService_GenerateKeyPair=
123 -function(a,b,c){e.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};e.AMT_RedirectionService_RequestStateChange=function(a,b){e.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};e.AMT_RedirectionService_TerminateSession=function(a,b){e.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};e.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,g){e.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
124 -Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},g)};e.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){e.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};e.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){e.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){e.Exec("AMT_SetupAndConfigurationService",
125 -"CommitChanges",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_Unprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};e.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){e.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};e.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
126 -e.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){e.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};e.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){e.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};e.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){e.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){e.Exec("AMT_SetupAndConfigurationService",
127 -"GetProvisioningAuditRecord",{},a)};e.AMT_SetupAndConfigurationService_GetUuid=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};e.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){e.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};e.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){e.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};e.AMT_SystemDefensePolicy_GetTimeout=
128 -function(a){e.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};e.AMT_SystemDefensePolicy_SetTimeout=function(a,b){e.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};e.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){e.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};e.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){e.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};e.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
129 -function(a,b){e.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};e.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){e.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};e.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){e.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WebUIService_RequestStateChange=function(a,b,c){e.Exec("AMT_WebUIService",
130 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){console.log(JSON.stringify({WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},null,2));e.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=
131 -function(a,b,c,p,d,h){e.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};e.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};e.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){e.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},
132 -b)};e.CIM_Account_RequestStateChange=function(a,b,c){e.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_AccountManagementService_CreateAccount=function(a,b,c){e.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};e.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){e.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};e.CIM_BootService_SetBootConfigRole=function(a,b,c){e.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,
133 -Role:b},c,0,1)};e.CIM_BootService_RequestStateChange=function(a,b,c,p){e.Exec("CIM_BootService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c,p,1)};e.CIM_Card_ConnectorPower=function(a,b,c){e.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};e.CIM_Card_IsCompatible=function(a,b){e.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};e.CIM_Chassis_IsCompatible=function(a,b){e.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};e.CIM_Fan_SetSpeed=function(a,b){e.Exec("CIM_Fan",
134 -"SetSpeed",{DesiredSpeed:a},b)};e.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){e.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:a},c)};e.CIM_MediaAccessDevice_LockMedia=function(a,b){e.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};e.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){e.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_MediaAccessDevice_Reset=function(a){e.Exec("CIM_MediaAccessDevice","Reset",{},a)};e.CIM_MediaAccessDevice_EnableDevice=
135 -function(a,b){e.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};e.CIM_MediaAccessDevice_OnlineDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};e.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){e.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};e.CIM_MediaAccessDevice_SaveProperties=function(a){e.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};e.CIM_MediaAccessDevice_RestoreProperties=function(a){e.Exec("CIM_MediaAccessDevice","RestoreProperties",
136 -{},a)};e.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){e.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_PhysicalFrame_IsCompatible=function(a,b){e.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};e.CIM_PhysicalPackage_IsCompatible=function(a,b){e.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};e.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){e.Exec("CIM_PowerManagementService","RequestPowerStateChange",
137 -{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};e.CIM_PowerSupply_SetPowerState=function(a,b,c){e.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_PowerSupply_Reset=function(a){e.Exec("CIM_PowerSupply","Reset",{},a)};e.CIM_PowerSupply_EnableDevice=function(a,b){e.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};e.CIM_PowerSupply_OnlineDevice=function(a,b){e.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};e.CIM_PowerSupply_QuiesceDevice=function(a,b){e.Exec("CIM_PowerSupply",
138 -"QuiesceDevice",{Quiesce:a},b)};e.CIM_PowerSupply_SaveProperties=function(a){e.Exec("CIM_PowerSupply","SaveProperties",{},a)};e.CIM_PowerSupply_RestoreProperties=function(a){e.Exec("CIM_PowerSupply","RestoreProperties",{},a)};e.CIM_PowerSupply_RequestStateChange=function(a,b,c){e.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Processor_SetPowerState=function(a,b,c){e.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Processor_Reset=function(a){e.Exec("CIM_Processor",
139 -"Reset",{},a)};e.CIM_Processor_EnableDevice=function(a,b){e.Exec("CIM_Processor","EnableDevice",{Enabled:a},b)};e.CIM_Processor_OnlineDevice=function(a,b){e.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};e.CIM_Processor_QuiesceDevice=function(a,b){e.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Processor_SaveProperties=function(a){e.Exec("CIM_Processor","SaveProperties",{},a)};e.CIM_Processor_RestoreProperties=function(a){e.Exec("CIM_Processor","RestoreProperties",{},a)};e.CIM_Processor_RequestStateChange=
140 -function(a,b,c){e.Exec("CIM_Processor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RecordLog_ClearLog=function(a){e.Exec("CIM_RecordLog","ClearLog",{},a)};e.CIM_RecordLog_RequestStateChange=function(a,b,c){e.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_RedirectionService_RequestStateChange=function(a,b,c){e.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_Sensor_SetPowerState=function(a,
141 -b,c){e.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_Sensor_Reset=function(a){e.Exec("CIM_Sensor","Reset",{},a)};e.CIM_Sensor_EnableDevice=function(a,b){e.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};e.CIM_Sensor_OnlineDevice=function(a,b){e.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};e.CIM_Sensor_QuiesceDevice=function(a,b){e.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};e.CIM_Sensor_SaveProperties=function(a){e.Exec("CIM_Sensor","SaveProperties",{},a)};e.CIM_Sensor_RestoreProperties=
142 -function(a){e.Exec("CIM_Sensor","RestoreProperties",{},a)};e.CIM_Sensor_RequestStateChange=function(a,b,c){e.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_StatisticalData_ResetSelectedStats=function(a,b){e.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};e.CIM_Watchdog_KeepAlive=function(a){e.Exec("CIM_Watchdog","KeepAlive",{},a)};e.CIM_Watchdog_SetPowerState=function(a,b,c){e.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},
143 -c)};e.CIM_Watchdog_Reset=function(a){e.Exec("CIM_Watchdog","Reset",{},a)};e.CIM_Watchdog_EnableDevice=function(a,b){e.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};e.CIM_Watchdog_OnlineDevice=function(a,b){e.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};e.CIM_Watchdog_QuiesceDevice=function(a,b){e.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};e.CIM_Watchdog_SaveProperties=function(a){e.Exec("CIM_Watchdog","SaveProperties",{},a)};e.CIM_Watchdog_RestoreProperties=function(a){e.Exec("CIM_Watchdog",
144 -"RestoreProperties",{},a)};e.CIM_Watchdog_RequestStateChange=function(a,b,c){e.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.CIM_WiFiPort_SetPowerState=function(a,b,c){e.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};e.CIM_WiFiPort_Reset=function(a){e.Exec("CIM_WiFiPort","Reset",{},a)};e.CIM_WiFiPort_EnableDevice=function(a,b){e.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};e.CIM_WiFiPort_OnlineDevice=function(a,b){e.Exec("CIM_WiFiPort","OnlineDevice",
145 -{Online:a},b)};e.CIM_WiFiPort_QuiesceDevice=function(a,b){e.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};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,b,c){e.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){e.Exec("IPS_HostBasedSetupService",
146 -"Setup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};e.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};e.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){e.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,
147 -DigitalSignature:d},h)};e.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(a,b,c,p){e.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};e.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){e.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};e.IPS_KVMRedirectionSettingData_TerminateSession=function(a){e.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelRead=
148 -function(a){e.Exec("IPS_KVMRedirectionSettingData","DataChannelRead",{},a)};e.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){e.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};e.IPS_OptInService_StartOptIn=function(a){e.Exec("IPS_OptInService","StartOptIn",{},a)};e.IPS_OptInService_CancelOptIn=function(a){e.Exec("IPS_OptInService","CancelOptIn",{},a)};e.IPS_OptInService_SendOptInCode=function(a,b){e.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};
149 -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,b,c){e.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){e.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,
150 -Time:c,TimeoutPeriod:p},d,0,1)};e.IPS_ProvisioningRecordLog_RequestStateChange=function(a,b,c){e.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_ProvisioningRecordLog_ClearLog=function(a,b){e.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};e.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){e.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};e.IPS_SecIOService_RequestStateChange=
151 -function(a,b,c){e.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};e.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){e.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};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",
97 +64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"System boot failure":37==a?"System firmware started (at least one CPU is properly executing).":"Unknown Sensor Type #"+a}function r(a,b,c,p,d){if(200!=p)d[0](g,[],p);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,
98 +2),InitiatorType:a.charCodeAt(4)};b.AuditApp=B[b.AuditAppID];b.Event=B[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM Default Port</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));
99 +h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,r,[d[0],m]);else d[0](g,m,p)}}var g={};g.wsman=b;g.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/"];g.PendingEnums=
100 +[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var C=0,w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,p,d,y,h,k,m,e,u){g.wsman.ExecSubscribe(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,A,z,y)},0,h,k,m,e,u);c()};g.UnSubscribe=function(a,b,p,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,
101 +y,h,k){c();b(g,a,h,k,p)},0,d,y);c()};g.Get=function(a,b,p,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,p)},0,d);c()};g.Put=function(a,b,p,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,p,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,p,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();p(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,
102 +p,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,p,function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,p,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,p,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(g,d,A,h,k){c();a(b,A,p,d,h,k)},d,h)):g.PendingEnums.push([b,p,d,h]);c()};
103 +g.BatchEnum=function(a,b,p,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],e=g.Enum;"*"==m[0]&&(e=g.Get,m=m.substring(1));e(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(g,g,a,k[2],h,d))},[a,b,y,e==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,p,g,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:g,pri:d});c()};g.CompleteName=function(a){if(0==
104 +a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.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>',
105 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(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>',
106 +null,null,b)};g.SetBootConfigRole=function(a,b){g.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>',
107 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,h,
108 +k,m,e){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h,k,m,e)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
109 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
110 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,p){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};g.AMT_AuditLog_ExportAuditLogSignature=
111 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){g.Exec("AMT_AuditPolicyRule",
112 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
113 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
114 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){g.Exec("AMT_AuthorizationService",
115 +"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
116 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
117 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
118 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
119 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,p){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};g.AMT_MessageLog_GetRecord=function(a,
120 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
121 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
122 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
123 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,h,k,m,e){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
124 +Port:c,AuthMethod:p,Certificate:d,Username:h,Password:k,CN:m},e)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
125 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
126 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
127 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
128 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
129 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
130 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,h){console.log(JSON.stringify({WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},null,2));g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=
131 +function(a,b,c,p,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},
132 +b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,
133 +Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,p){g.Exec("CIM_BootService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c,p,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan",
134 +"SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=
135 +function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",
136 +{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",
137 +{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply",
138 +"QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply","SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor",
139 +"Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor","EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=
140 +function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,
141 +b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=
142 +function(a){g.Exec("CIM_Sensor","RestoreProperties",{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},
143 +c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog","Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog",
144 +"RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",
145 +{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,h,k){g.Exec("IPS_HostBasedSetupService",
146 +"Setup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,
147 +DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(a,b,c,p){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=
148 +function(a){g.Exec("IPS_KVMRedirectionSettingData","DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};
149 +g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService","StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,
150 +Time:c,TimeoutPeriod:p},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=
151 +function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",
152 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",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",
153 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",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",
154 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",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",
155 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",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",
156 -4106:"URL_REQUIRED"};e.GetMessageLog=function(a,b){e.AMT_MessageLog_PositionToFirstRecord(n,[a,b,[]])};var D="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(";"),
156 +4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,[a,b,[]])};var D="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(";"),
157 m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS 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(";"),
158 k="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(";");
159 -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 h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),
160 -r=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),K={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},B={16:"Security Admin",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Security Audit Log",21:"Network Time",22:"Network Administration",23:"Storage Administration",24:"Event Manager",25:"Circuit Breaker Manager",
159 +g.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(";");g.WatchdogCurrentStates={1:"Not Started",2:"Stopped",4:"Running",8:"Expired",16:"Suspended"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),
160 +u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),K={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},B={16:"Security Admin",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Security Audit Log",21:"Network Time",22:"Network Administration",23:"Storage Administration",24:"Event Manager",25:"Circuit Breaker Manager",
161 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",1608:"TLS Server Certificate Set",1609:"TLS Server Certificate Remove",1610:"TLS Trusted Root Certificate Added",1611:"TLS Trusted Root Certificate Removed",
162 1612:"TLS Preshared Key Set",1613:"Kerberos Settings Modified",1614:"Kerberos Main 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",1703:"Performed Reset",1704:"Set Boot Options",1705:"Remote graceful power down initiated",1706:"Remote graceful reset initiated",1707:"Remote Standby initiated",
163 1708:"Remote Hiberate initiated",1709:"Remote NMI initiated",1800:"IDER Session Opened",1801:"IDER Session Closed",1802:"IDER Enabled",1803:"IDER Disabled",1804:"SoL Session Opened",1805:"SoL Session Closed",1806:"SoL Enabled",1807:"SoL Disabled",1808:"KVM Session Started",1809:"KVM Session Ended",1810:"KVM Enabled",1811:"KVM Disabled",1812:"VNC Password Failed 3 Times",1900:"Firmware Updated",1901:"Firmware Update Failed",2E3:"Security Audit Log Cleared",2001:"Security Audit Policy Modified",2002:"Security Audit Log Disabled",
164 2003:"Security Audit Log Enabled",2004:"Security Audit Log Exported",2005:"Security Audit Log Recovered",2100:"Intel&reg; ME Time Set",2200:"TCPIP Parameters Set",2201:"Host Name Set",2202:"Domain Name Set",2203:"VLAN Parameters Set",2204:"Link Policy Set",2205:"IPv6 Parameters Set",2300:"Global Storage Attributes Set",2301:"Storage EACL Modified",2302:"Storage FPACL Modified",2303:"Storage Write Operation",2400:"Alert Subscribed",2401:"Alert Unsubscribed",2402:"Event Log Cleared",2403:"Event Log Frozen",
165 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",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",
166 2800:"EAC Posture Signer SET",2801:"EAC Enabled",2802:"EAC Disabled",2803:"EAC Posture State",2804:"EAC Set Options",2900:"KVM Opt-in Enabled",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",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};
167 -e.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Invalid ME access","Invalid MEBx access"][b.charCodeAt(0)];if(1606==a){var c=["Disabled","Enabled"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=", "+b.substring(3));return c}return 1607==a?"Remote "+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local "+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:
168 -1617==a?e.RealmNames[ReadInt(b,0)]+", "+["NoAuth","Auth","Disabled"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","Local MEI","Local WSMAN","Remote WSAMN"][b.charCodeAt(0)]:1900==a?"From "+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" to "+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"From "+["None","KVM","All"][b.charCodeAt(0)]+" to "+
169 -["None","KVM","All"][b.charCodeAt(1)]:3001==a?["Success","Failed 3 times"][b.charCodeAt(0)]:null};e.GetAuditLog=function(a){e.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return e}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
167 +g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Invalid ME access","Invalid MEBx access"][b.charCodeAt(0)];if(1606==a){var c=["Disabled","Enabled"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=", "+b.substring(3));return c}return 1607==a?"Remote "+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local "+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:
168 +1617==a?g.RealmNames[ReadInt(b,0)]+", "+["NoAuth","Auth","Disabled"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","Local MEI","Local WSMAN","Remote WSAMN"][b.charCodeAt(0)]:1900==a?"From "+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" to "+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"From "+["None","KVM","All"][b.charCodeAt(0)]+" to "+
169 +["None","KVM","All"][b.charCodeAt(1)]:3001==a?["Success","Failed 3 times"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,r,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
170 function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
171 -function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",g=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">";if("string"==typeof c)a+=c;else for(var v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+g+v+">"));return a+("</r:"+b+">")}
171 +function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">";if("string"==typeof c)a+=c;else for(var v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
172 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
173 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
174 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
175 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function g(a,b){var c,p,e,d,x,h,k,m,g,q=b&&b.split("/"),w=r.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){q=q.slice(0,q.length-1);a=a.split("/");x=a.length-1;r.nodeIdCompat&&A.test(a[x])&&(a[x]=a[x].replace(A,""));a=q.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
176 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((q||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(q)for(g=q.length;0<g;--g)if(e=w[q.slice(0,g).join("/")])if(e=e[p]){d=e;h=x;break}if(d)break;!k&&l&&l[p]&&(k=l[p],m=x)}!d&&k&&(d=k,h=m);d&&(c.splice(0,h,d),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return g(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
177 -a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function e(a){return function(){return r&&r.config&&r.config[a]||{}}}var C,w,D,m,k={},h={},r={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,A=/\.js$/;D=function(a,b){var c,e=q(a),d=e[0];a=e[1];d&&(d=g(d,b),c=p(d));d?a=c&&c.normalize?c.normalize(a,n(b)):g(a,b):(a=g(a,b),e=q(a),
178 -d=e[0],a=e[1],d&&(c=p(d)));return{f:d?d+"!"+a:a,n:a,pr:d,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:e(a)}}};C=function(a,b,c,e){var x,g,A,r,q=[];g=typeof c;var w;e=e||a;if("undefined"===g||"function"===g){b=!b.length&&c.length?["require","exports","module"]:b;for(r=0;r<b.length;r+=1)if(A=D(b[r],e),g=A.f,"require"===g)q[r]=m.require(a);else if("exports"===g)q[r]=m.exports(a),
179 -w=!0;else if("module"===g)x=q[r]=m.module(a);else if(B.call(k,g)||B.call(h,g)||B.call(K,g))q[r]=p(g);else if(A.p)A.p.load(A.n,v(e,!0),l(g),{}),q[r]=k[g];else throw Error(a+" missing "+g);b=c?c.apply(k[a],q):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,e,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){r=a;r.deps&&w(r.deps,r.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
180 -typeof c&&(c=e,e=x);e?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(e.isArrayBuffer(a)||e.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
181 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var e=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)e.nextTick=process.nextTick,e.setImmediate="function"===typeof setImmediate?setImmediate:e.nextTick;else if("function"===typeof setImmediate)e.setImmediate=setImmediate,e.nextTick=function(a){return setImmediate(a)};
182 -else{e.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];e.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
183 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var d=e.setImmediate;e.setImmediate=function(e){15<Date.now()-b?(b=Date.now(),d(e)):(a.push(e),1===a.length&&p.setAttribute("a",c=!c))}}e.nextTick=e.setImmediate}})();e.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};e.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};e.isArrayBufferView=function(a){return a&&
184 -e.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};e.ByteBuffer=c;e.ByteStringBuffer=c;e.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};e.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};e.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};e.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
185 -e.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};e.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};e.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(e.encodeUtf8(a))};e.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
186 -255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};e.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
187 -8&255))};e.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};e.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};e.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
188 -e.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};e.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};e.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
189 -16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};e.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};e.ByteStringBuffer.prototype.getInt24Le=
190 -function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};e.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};e.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};e.ByteStringBuffer.prototype.getSignedInt=
191 -function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};e.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
192 -a)};e.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};e.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};e.ByteStringBuffer.prototype.copy=function(){var a=e.createBuffer(this.data);a.read=this.read;return a};e.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};e.ByteStringBuffer.prototype.clear=
193 -function(){this.data="";this.read=0;return this};e.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};e.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.ByteStringBuffer.prototype.toString=function(){return e.decodeUtf8(this.bytes())};e.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
194 -0;this.growSize=b.growSize||1024;var c=e.isArrayBuffer(a),p=e.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};e.DataBuffer.prototype.length=function(){return this.write-this.read};e.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
195 -e.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),p=new Uint8Array(this.length()+b);p.set(c);this.data=new DataView(p.buffer);return this};e.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};e.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
196 -return this};e.DataBuffer.prototype.putBytes=function(a,b){if(e.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var d=new Uint8Array(this.data.buffer,this.write);d.set(c);this.write+=p;return this}if(e.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),d=new Uint8Array(this.data.buffer),d.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof e.DataBuffer||"object"===typeof a&&"number"===
197 -typeof a.read&&"number"===typeof a.write&&e.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),d=new Uint8Array(a.data.byteLength,this.write),d.set(c),this.write+=c.byteLength,this;a instanceof e.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.hex.decode(a,c,this.write),this;if("base64"===
198 -b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=e.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=e.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=e.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
199 -b);}throw Error("Invalid parameter: "+a);};e.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};e.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};e.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};e.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
200 -e.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};e.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};e.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};e.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
201 -a,!0);this.write+=4;return this};e.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};e.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};e.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};e.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};e.DataBuffer.prototype.getInt24=
202 -function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};e.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};e.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};e.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};e.DataBuffer.prototype.getInt32Le=function(){var a=
203 -this.data.getInt32(this.read,!0);this.read+=4;return a};e.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};e.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};e.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
204 -e.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};e.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};e.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};e.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};e.DataBuffer.prototype.copy=function(){return new e.DataBuffer(this)};e.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
205 -new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};e.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};e.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};e.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
206 -this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};e.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return e.binary.raw.encode(b);if("hex"===a)return e.binary.hex.encode(b);if("base64"===a)return e.binary.base64.encode(b);if("utf8"===a)return e.text.utf8.decode(b);if("utf16"===a)return e.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};e.createBuffer=function(a,b){void 0!==a&&"utf8"===
207 -(b||"raw")&&(a=e.encodeUtf8(a));return new e.ByteBuffer(a)};e.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};e.xorBytes=function(a,b,c){for(var p="",d="",e="",h=0,k=0;0<c;--c,++h)d=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(p+=e,e="",k=0),e+=String.fromCharCode(d),++k;return p+e};e.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};e.bytesToHex=
208 -function(a){return e.createBuffer(a).toHex()};e.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var d=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];e.encode64=function(a,b){for(var c="",p="",d,e,h,k=0;k<a.length;)d=
209 -a.charCodeAt(k++),e=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&3)<<4|e>>4),isNaN(e)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,b)+"\r\n",c=c.substr(b));return p+
210 -c};e.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,p,e,h,k=0;k<a.length;)c=d[a.charCodeAt(k++)-43],p=d[a.charCodeAt(k++)-43],e=d[a.charCodeAt(k++)-43],h=d[a.charCodeAt(k++)-43],b+=String.fromCharCode(c<<2|p>>4),64!==e&&(b+=String.fromCharCode((p&15)<<4|e>>2),64!==h&&(b+=String.fromCharCode((e&3)<<6|h)));return b};e.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};e.decodeUtf8=function(a){return decodeURIComponent(escape(a))};e.binary={raw:{},hex:{},base64:{}};
211 -e.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};e.binary.raw.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(a.length));for(var e=c=c||0,d=0;d<a.length;++d)p[e++]=a.charCodeAt(d);return b?e-c:p};e.binary.hex.encode=e.bytesToHex;e.binary.hex.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var e=0,d=c;a.length&1&&(e=1,p[d++]=parseInt(a[0],16));for(;e<a.length;e+=2)p[d++]=parseInt(a.substr(e,2),16);return b?d-c:p};e.binary.base64.encode=
212 -function(a,b){for(var c="",p="",e,d,h,k=0;k<a.byteLength;)e=a[k++],d=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((e&3)<<4|d>>4),isNaN(d)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((d&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(p+=c.substr(0,
213 -b)+"\r\n",c=c.substr(b));return p+c};e.binary.base64.decode=function(a,b,c){var p=b;p||(p=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var e,h,k,m,g=0,r=c;g<a.length;)e=d[a.charCodeAt(g++)-43],h=d[a.charCodeAt(g++)-43],k=d[a.charCodeAt(g++)-43],m=d[a.charCodeAt(g++)-43],p[r++]=e<<2|h>>4,64!==k&&(p[r++]=(h&15)<<4|k>>2,64!==m&&(p[r++]=(k&3)<<6|m));return b?r-c:p.subarray(0,r)};e.text={utf8:{},utf16:{}};e.text.utf8.encode=function(a,b,c){a=e.encodeUtf8(a);
214 -var p=b;p||(p=new Uint8Array(a.length));for(var d=c=c||0,h=0;h<a.length;++h)p[d++]=a.charCodeAt(h);return b?d-c:p};e.text.utf8.decode=function(a){return e.decodeUtf8(String.fromCharCode.apply(null,a))};e.text.utf16.encode=function(a,b,c){var p=b;p||(p=new Uint8Array(2*a.length));for(var e=new Uint16Array(p.buffer),d=c=c||0,h=c,k=0;k<a.length;++k)e[h++]=a.charCodeAt(k),d+=2;return b?d-c:p};e.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};e.deflate=function(a,
215 -b,c){b=e.decode64(a.deflate(e.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};e.inflate=function(a,b,c){a=a.inflate(e.encode64(b)).rval;return null===a?null:e.decode64(a)};var g=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=e.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
216 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(e.decode64(c)));return c},m=function(a,b,c,p){var d=l(a,b);null===d&&(d={});d[c]=p;g(a,b,d)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var p=l(a,b);if(null!==p&&c in p){delete p[c];c=!0;for(var d in p){c=!1;break}c&&(p=null);g(a,b,p)}},r=function(a,b){g(a,b,null)},K=function(a,b,
217 -c){var p=null;"undefined"===typeof c&&(c=["web","flash"]);var d,e=!1,h=null,k;for(k in c){d=c[k];try{if("flash"===d||"both"===d){if(null===b[0])throw Error("Flash local storage not available.");p=a.apply(this,b);e="flash"===d}if("web"===d||"both"===d)b[0]=localStorage,p=a.apply(this,b),e=!0}catch(m){h=m}if(e)break}if(!e)throw h;return p};e.setItem=function(a,b,c,p,d){K(m,arguments,d)};e.getItem=function(a,b,c,p){return K(k,arguments,p)};e.removeItem=function(a,b,c,p){K(h,arguments,p)};e.clearItems=
218 -function(a,b,c){K(r,arguments,c)};e.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;e.getQueryVariables=function(a){var b=function(a){var b=
219 -{};a=a.split("&");for(var c=0;c<a.length;c++){var p=a[c].indexOf("="),d;0<p?(d=a[c].substring(0,p),p=a[c].substring(p+1)):(d=a[c],p=null);d in b||(b[d]=[]);d in Object.prototype||null===p||b[d].push(unescape(p))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};e.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
220 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:e.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};e.makeRequest=function(a){var b=e.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var p;"undefined"===typeof a?p=b.query:(p=b.query[a])&&"undefined"!==typeof c&&(p=p[c]);return p},getQueryLast:function(a,b){var p=c.getQuery(a);return p?p[p.length-1]:b}};return c};e.makeLink=function(a,
221 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};e.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var p=0,d=b.length;p<d;){var e=b[p++];if(p==d)a[e]=c;else{var h=e in a;if(!h||h&&"object"!==typeof a[e]||h&&null===a[e])a[e]={};a=a[e]}}};e.getPath=function(a,b,c){for(var p=0,d=b.length,e=!0;e&&p<d&&"object"===typeof a&&null!==a;){var h=b[p++];(e=h in a)&&(a=a[h])}return e?a:c};e.deletePath=function(a,b){if("object"===
222 -typeof a&&null!==a)for(var c=0,p=b.length;c<p;){var d=b[c++];if(c==p)delete a[d];else{if(!(d in a)||"object"!==typeof a[d]||null===a[d])break;a=a[d]}}};e.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};e.format=function(a){var b=/%./g,c,p,d=0,e=[];for(p=0;c=b.exec(a);)switch(p=a.substring(p,b.lastIndex-2),0<p.length&&e.push(p),p=b.lastIndex,c=c[0][1],c){case "s":case "o":d<arguments.length?e.push(arguments[d++ +1]):e.push("<?>");break;case "%":e.push("%");break;default:e.push("<#"+
223 -c+"?>")}e.push(a.substring(p));return e.join("")};e.formatNumber=function(a,b,c,p){var d=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;p=void 0===p?".":p;c=0>a?"-":"";var e=parseInt(a=Math.abs(+a||0).toFixed(d),10)+"",h=3<e.length?e.length%3:0;return c+(h?e.substr(0,h)+p:"")+e.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+p)+(d?b+Math.abs(a-e).toFixed(d).slice(2):"")};e.formatSize=function(a){return a=1073741824<=a?e.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?e.formatNumber(a/1048576,2,".","")+
224 -" MiB":1024<=a?e.formatNumber(a/1024,0)+" KiB":e.formatNumber(a,0)+" bytes"};e.bytesFromIP=function(a){return-1!==a.indexOf(".")?e.bytesFromIPv4(a):-1!==a.indexOf(":")?e.bytesFromIPv6(a):null};e.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=e.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};e.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
225 -2*(8-a.length+b),p=e.createBuffer(),d=0;8>d;++d)if(a[d]&&0!==a[d].length){var h=e.hexToBytes(a[d]);2>h.length&&p.putByte(0);p.putBytes(h)}else p.fillWithByte(0,c),c=0;return p.getBytes()};e.bytesToIP=function(a){return 4===a.length?e.bytesToIPv4(a):16===a.length?e.bytesToIPv6(a):null};e.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};e.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,d=0;d<a.length;d+=
226 -2){for(var h=e.bytesToHex(a[d]+a[d+1]);"0"===h[0]&&"0"!==h;)h=h.substr(1);if("0"===h){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(h)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};e.estimateCores=function(a,b){function c(a,k,m){if(0===k){var g=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);e.cores=
227 -Math.max(1,g);URL.revokeObjectURL(h);return b(null,e.cores)}p(m,function(b,p){a.push(d(m,p));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],e=0;e<a;++e){var z=new Worker(h);z.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(z)}for(e=0;e<a;++e)c[e].postMessage(e)}function d(a,b){for(var c=[],p=0;p<a;++p)for(var e=b[p],h=c[p]=[],z=0;z<a;++z)if(p!==z){var k=b[z];(e.st>k.st&&e.st<k.et||k.st>e.st&&k.st<e.et)&&h.push(z)}return c.reduce(function(a,
228 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in e&&!a.update)return b(null,e.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return e.cores=navigator.hardwareConcurrency,b(null,e.cores);if("undefined"===typeof Worker)return e.cores=1,b(null,e.cores);if("undefined"===typeof Blob)return e.cores=2,b(null,e.cores);var h=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
229 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var q=0;q<g.length;++q)g[q](c);
230 -return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
175 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,g,x,h,k,m,e,r=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){r=r.slice(0,r.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=r.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
176 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((r||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){p=c.slice(0,x).join("/");if(r)for(e=r.length;0<e;--e)if(d=w[r.slice(0,e).join("/")])if(d=d[p]){g=d;h=x;break}if(g)break;!k&&l&&l[p]&&(k=l[p],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(B.call(h,
177 +a)){var b=h[a];delete h[a];K[a]=!0;C.apply(d,b)}if(!B.call(k,a)&&!B.call(K,a))throw Error("No "+a);return k[a]}function r(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var C,w,D,m,k={},h={},u={},K={},B=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=r(a),g=d[0];a=d[1];g&&(g=e(g,b),c=p(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=r(a),
178 +g=d[0],a=d[1],g&&(c=p(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};C=function(a,b,c,g){var x,e,z,u,r=[];e=typeof c;var w;g=g||a;if("undefined"===e||"function"===e){b=!b.length&&c.length?["require","exports","module"]:b;for(u=0;u<b.length;u+=1)if(z=D(b[u],g),e=z.f,"require"===e)r[u]=m.require(a);else if("exports"===e)r[u]=m.exports(a),
179 +w=!0;else if("module"===e)x=r[u]=m.module(a);else if(B.call(k,e)||B.call(h,e)||B.call(K,e))r[u]=p(e);else if(z.p)z.p.load(z.n,v(g,!0),l(e),{}),r[u]=k[e];else throw Error(a+" missing "+e);b=c?c.apply(k[a],r):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):p(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
180 +typeof c&&(c=g,g=x);g?C(d,a,b,c):setTimeout(function(){C(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);B.call(k,a)||B.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(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(b){for(var p=
181 +0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.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)};
182 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
183 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}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&&
184 +d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
185 +d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
186 +255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
187 +8&255))};d.ByteStringBuffer.prototype.putInt24Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255))};d.ByteStringBuffer.prototype.putInt32Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>24&255))};d.ByteStringBuffer.prototype.putInt=function(a,b){var c="";do b-=8,c+=String.fromCharCode(a>>b&255);while(0<b);return this.putBytes(c)};
188 +d.ByteStringBuffer.prototype.putSignedInt=function(a,b){0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.ByteStringBuffer.prototype.putBuffer=function(a){return this.putBytes(a.getBytes())};d.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};d.ByteStringBuffer.prototype.getInt16=function(){var a=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24=function(){var a=this.data.charCodeAt(this.read)<<
189 +16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32=function(){var a=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return a};d.ByteStringBuffer.prototype.getInt16Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return a};d.ByteStringBuffer.prototype.getInt24Le=
190 +function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return a};d.ByteStringBuffer.prototype.getInt32Le=function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return a};d.ByteStringBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.charCodeAt(this.read++),a-=8;while(0<a);return b};d.ByteStringBuffer.prototype.getSignedInt=
191 +function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
192 +a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
193 +function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
194 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
195 +d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
196 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
197 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
198 +b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
199 +b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
200 +d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
201 +a,!0);this.write+=4;return this};d.DataBuffer.prototype.putInt=function(a,b){this.accommodate(b/8);do b-=8,this.data.setInt8(this.write++,a>>b&255);while(0<b);return this};d.DataBuffer.prototype.putSignedInt=function(a,b){this.accommodate(b/8);0>a&&(a+=2<<b-1);return this.putInt(a,b)};d.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};d.DataBuffer.prototype.getInt16=function(){var a=this.data.getInt16(this.read);this.read+=2;return a};d.DataBuffer.prototype.getInt24=
202 +function(){var a=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);this.read+=3;return a};d.DataBuffer.prototype.getInt32=function(){var a=this.data.getInt32(this.read);this.read+=4;return a};d.DataBuffer.prototype.getInt16Le=function(){var a=this.data.getInt16(this.read,!0);this.read+=2;return a};d.DataBuffer.prototype.getInt24Le=function(){var a=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;this.read+=3;return a};d.DataBuffer.prototype.getInt32Le=function(){var a=
203 +this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.getInt=function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0<a);return b};d.DataBuffer.prototype.getSignedInt=function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.DataBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};
204 +d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
205 +new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
206 +this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
207 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
208 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
209 +a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
210 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
211 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
212 +function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
213 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,u=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[u++]=p<<2|g>>4,64!==h&&(d[u++]=(g&15)<<4|h>>2,64!==k&&(d[u++]=(h&3)<<6|k));return b?u-c:d.subarray(0,u)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
214 +var p=b;p||(p=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)p[y++]=a.charCodeAt(h);return b?y-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
215 +b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
216 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},K=function(a,b,
217 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){K(m,arguments,p)};d.getItem=function(a,b,c,d){return K(k,arguments,d)};d.removeItem=function(a,b,c,d){K(h,arguments,d)};d.clearItems=
218 +function(a,b,c){K(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[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 B=null;d.getQueryVariables=function(a){var b=function(a){var b=
219 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===B&&(B="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=B):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
220 +0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
221 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
222 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
223 +c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
224 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
225 +2*(8-a.length+b),p=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&p.putByte(0);p.putBytes(k)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,h=0;h<a.length;h+=
226 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],e=b.length;m&&e===m.end+1?(m.end=e,m.end-m.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:e,end:e})}b.push(k)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,e){if(0===m){var u=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
227 +Math.max(1,u);URL.revokeObjectURL(k);return b(null,d.cores)}p(e,function(b,d){a.push(h(e,d));c(a,m-1,e)})}function p(a,b){for(var c=[],d=[],g=0;g<a;++g){var h=new Worker(k);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(g=0;g<a;++g)c[g].postMessage(g)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],g=c[d]=[],y=0;y<a;++y)if(d!==y){var k=b[y];(p.st>k.st&&p.st<k.et||k.st>p.st&&k.st<p.et)&&g.push(y)}return c.reduce(function(a,
228 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
229 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var r=0;r<e.length;++r)e[r](c);
230 +return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
231 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
232 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
233 this.mode.start(c)};c.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()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
234 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
235 -c.defined.cipher=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
236 -4<b.length){var d=b;b=a.util.createBuffer();for(var e=0;e<d.length;++e)b.putByte(d[e])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function g(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
234 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
235 +c.defined.cipher=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
236 +4<b.length){var d=b;b=a.util.createBuffer();for(var g=0;g<d.length;++g)b.putByte(d[g])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.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=
237 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
238 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.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);
239 this._outBlock=Array(this._ints)};w.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=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
240 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
241 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
242 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32()^this._outBlock[d],b.putInt32(this._inBlock[d]);else{var e=(this.blockSize-p)%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]);
243 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
244 -p>=this.blockSize)for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32(),b.putInt32(this._inBlock[d]^this._outBlock[d]);else{var e=(this.blockSize-p)%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);
245 -if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
246 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var p=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var d=0;d<this._ints;++d)b.putInt32(a.getInt32()^this._outBlock[d]),this._inBlock[d]=this._outBlock[d];else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(d=0;d<this._ints;++d)this._partialOutput.putInt32(a.getInt32()^
247 -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&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
248 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var g=0;g<
249 -this._ints;++g)b.putInt32(a.getInt32()^this._outBlock[g]);else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);0<q&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
242 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
243 +if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
244 +d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
245 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
246 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
247 +this._outBlock[p]);if(0<g)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
248 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var e=0;e<
249 +this._ints;++e)b.putInt32(a.getInt32()^this._outBlock[e]);else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);0<r&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<r&&!c)return b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
250 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
251 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.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,
252 -this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(g(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=g(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
253 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var g=0;g<this._ints;++g)b.putInt32(this._outBlock[g]^=a.getInt32());this._cipherLength+=this.blockSize}else{var q=(this.blockSize-p)%this.blockSize;0<q&&(q=this.blockSize-q);this._partialOutput.clear();
254 -for(g=0;g<this._ints;++g)this._partialOutput.putInt32(a.getInt32()^this._outBlock[g]);if(0===q||c){c?(g=p%this.blockSize,this._cipherLength+=g,this._partialOutput.truncate(this.blockSize-g)):this._cipherLength+=this.blockSize;for(g=0;g<this._ints;++g)this._outBlock[g]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<q&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(q-this._partialBytes)),
255 -this._partialBytes=q,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
256 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var e=this._aDataLength.concat(g(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,e);e=[];this.cipher.encrypt(this._j0,e);for(var q=0;q<
257 -this._ints;++q)this.tag.putInt32(this._s[q]^e[q]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],p=b.slice(0),d=0;128>d;++d)a[d/32|0]&1<<31-d%32&&(c[0]^=p[0],c[1]^=p[1],c[2]^=p[2],c[3]^=p[3]),this.pow(p,p);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,p=3;0<p;--p)b[p]=a[p]>>>1|(a[p-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
258 -[0,0,0,0],c=0;32>c;++c){var p=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=p[0];b[1]^=p[1];b[2]^=p[2];b[3]^=p[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,p=4*c,c=16*c,d=Array(c),e=0;e<c;++e){var g=[0,0,0,0];g[e/p|0]=1<<b-1<<(p-1-e%p)*b;d[e]=this.generateSubHashTable(this.multiply(g,a),b)}return d};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
259 -p=c>>>1,d=Array(c);d[p]=a.slice(0);for(var e=p>>>1;0<e;)this.pow(d[2*e],d[e]=[]),e>>=1;for(e=2;e<p;){for(var g=1;g<e;++g){var q=d[e],w=d[g];d[e+g]=[q[0]^w[0],q[1]^w[1],q[2]^w[2],q[3]^w[3]]}e*=2}d[0]=[0,0,0,0];for(e=p+1;e<c;++e)g=d[e^p],d[e]=[a[0]^g[0],a[1]^g[1],a[2]^g[2],a[3]^g[3]];return d}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=
260 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var q=0;q<g.length;++q)g[q](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
261 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);r=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,e,g,k,q,u,b=0;256>b;++b){q=p^p<<1^p<<2^p<<3^p<<4;q=q>>8^q&255^99;h[c]=q;r[q]=c;u=a[q];e=a[c];g=a[e];k=a[g];u^=u<<24^q<<16^q<<8^q;g=(e^g^k)<<24^(c^
262 -k)<<16^(c^g^k)<<8^c^e^k;for(var w=0;4>w;++w)B[w][c]=u,x[w][q]=g,u=u<<24|u>>>8,g=g<<24|g>>>8;0===c?c=p=1:(c=e^a[a[a[e^k]]],p^=a[a[p]])}}function g(a,b){for(var c=a.slice(0),d,p=1,e=c.length,m=k*(e+6+1),q=e;q<m;++q)d=c[q-1],0===q%e?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^K[p]<<24,p++):6<e&&4===q%e&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[q]=c[q-e]^d;if(b){for(var p=x[0],e=x[1],r=x[2],w=x[3],l=c.slice(0),m=c.length,q=0,F=m-k;q<m;q+=k,F-=k)if(0===q||q===m-k)l[q]=
263 -c[F],l[q+1]=c[F+3],l[q+2]=c[F+2],l[q+3]=c[F+1];else for(var B=0;B<k;++B)d=c[F+B],l[q+(3&-B)]=p[h[d>>>24]]^e[h[d>>>16&255]]^r[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,e,g,k,m,q;d?(e=x[0],g=x[1],k=x[2],m=x[3],q=r):(e=B[0],g=B[1],k=B[2],m=B[3],q=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[d?3:1]^a[1];C=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)L=e[w>>>24]^g[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=e[l>>>24]^g[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=e[C>>>24]^
264 -g[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=e[b>>>24]^g[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=q[w>>>24]<<24^q[l>>>16&255]<<16^q[C>>>8&255]<<8^q[b&255]^a[++n];c[d?3:1]=q[l>>>24]<<24^q[C>>>16&255]<<16^q[b>>>8&255]<<8^q[w&255]^a[++n];c[2]=q[C>>>24]<<24^q[b>>>16&255]<<16^q[w>>>8&255]<<8^q[l&255]^a[++n];c[d?1:3]=q[b>>>24]<<24^q[w>>>16&255]<<16^q[l>>>8&255]<<8^q[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
265 -a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;e.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
252 +this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
253 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var e=0;e<this._ints;++e)b.putInt32(this._outBlock[e]^=a.getInt32());this._cipherLength+=this.blockSize}else{var r=(this.blockSize-p)%this.blockSize;0<r&&(r=this.blockSize-r);this._partialOutput.clear();
254 +for(e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(0===r||c){c?(e=p%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<r&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),
255 +this._partialBytes=r,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))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,
256 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var u=0;u<
257 +this._ints;++u)this.tag.putInt32(this._s[u]^g[u]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
258 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),g=0;g<c;++g){var e=[0,0,0,0];e[g/d|0]=1<<b-1<<(d-1-g%d)*b;p[g]=this.generateSubHashTable(this.multiply(e,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
259 +d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(p[2*g],p[g]=[]),g>>=1;for(g=2;g<d;){for(var e=1;e<g;++e){var r=p[g],w=p[e];p[g+e]=[r[0]^w[0],r[1]^w[1],r[2]^w[2],r[3]^w[3]]}g*=2}p[0]=[0,0,0,0];for(g=d+1;g<c;++g)e=p[g^d],p[g]=[a[0]^e[0],a[1]^e[1],a[2]^e[2],a[3]^e[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=
260 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var r=0;r<e.length;++r)e[r](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
261 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;K=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);B=Array(4);x=Array(4);for(b=0;4>b;++b)B[b]=Array(256),x[b]=Array(256);for(var c=0,p=0,g,e,k,r,q,b=0;256>b;++b){r=p^p<<1^p<<2^p<<3^p<<4;r=r>>8^r&255^99;h[c]=r;u[r]=c;q=a[r];g=a[c];e=a[g];k=a[e];q^=q<<24^r<<16^r<<8^r;e=(g^e^k)<<24^(c^
262 +k)<<16^(c^e^k)<<8^c^g^k;for(var w=0;4>w;++w)B[w][c]=q,x[w][r]=e,q=q<<24|q>>>8,e=e<<24|e>>>8;0===c?c=p=1:(c=g^a[a[a[g^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,g=c.length,m=k*(g+6+1),r=g;r<m;++r)d=c[r-1],0===r%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^K[p]<<24,p++):6<g&&4===r%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[r]=c[r-g]^d;if(b){for(var p=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),m=c.length,r=0,F=m-k;r<m;r+=k,F-=k)if(0===r||r===m-k)l[r]=
263 +c[F],l[r+1]=c[F+3],l[r+2]=c[F+2],l[r+3]=c[F+1];else for(var B=0;B<k;++B)d=c[F+B],l[r+(3&-B)]=p[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,g,e,k,m,r;d?(g=x[0],e=x[1],k=x[2],m=x[3],r=u):(g=B[0],e=B[1],k=B[2],m=B[3],r=h);var w,l,C,L,D,K;w=b[0]^a[0];l=b[d?3:1]^a[1];C=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)L=g[w>>>24]^e[l>>>16&255]^k[C>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^e[C>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],K=g[C>>>24]^
264 +e[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^e[w>>>16&255]^k[l>>>8&255]^m[C&255]^a[++n],w=L,l=D,C=K;c[0]=r[w>>>24]<<24^r[l>>>16&255]<<16^r[C>>>8&255]<<8^r[b&255]^a[++n];c[d?3:1]=r[l>>>24]<<24^r[C>>>16&255]<<16^r[b>>>8&255]<<8^r[w&255]^a[++n];c[2]=r[C>>>24]<<24^r[b>>>16&255]<<16^r[w>>>8&255]<<8^r[l&255]^a[++n];c[d?1:3]=r[b>>>24]<<24^r[w>>>16&255]<<16^r[l>>>8&255]<<8^r[C&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
265 +a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;g.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
266 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
267 -c;for(var c=a.util.createBuffer(),e=0;e<d.length;++e)c.putByte(d[e])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,e=0;e<h;++e)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=g(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return g(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
268 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,r,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
269 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
267 +c;for(var c=a.util.createBuffer(),g=0;g<d.length;++g)c.putByte(d[g])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,g=0;g<h;++g)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
268 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,K,B,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
269 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
270 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
271 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
272 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -280,336 +280,336 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
280 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
281 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
282 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
283 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var q=0;q<g.length;++q)g[q](c);return c.oids}},
284 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
285 -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};c.create=function(b,c,d,e){if(a.util.isArray(e)){for(var h=[],g=0;g<e.length;++g)void 0!==e[g]&&h.push(e[g]);e=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(e),value:e}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,g){void 0===g&&(g=!0);
286 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,r=d(b);if(b.length()<r){if(g)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+r,m;r=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<r){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===r-(b.read-
287 -x))++x,--r}catch(A){}b.read=x}if(l)if(l=[],void 0===r)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,g))}else for(x=b.length();0<r;)l.push(c.fromDer(b,g)),r-=x-b.length(),x=b.length();else{if(void 0===r){if(g)throw Error("Non-constructed ASN.1 object of indefinite length.");r=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<r;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(r)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
288 -e=b.tagClass|b.type,g=a.util.createBuffer();if(b.composed){b.constructed?e|=32:g.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&g.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)g.putInt16(b.value.charCodeAt(h));else g.putBytes(b.value);d.putByte(e);if(127>=g.length())d.putByte(g.length()&127);else{h=g.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(g);
289 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,e,h,g,q=2;q<b.length;++q){d=!0;e=[];h=parseInt(b[q],10);do g=h&127,h>>>=7,d||(g|=128),e.push(g),d=!1;while(0<h);for(d=e.length-1;0<=d;--d)c.putByte(e[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var e=0;0<b.length();)d=b.getByte(),e<<=7,d&128?e+=d&127:(c+="."+(e+d),e=0);
290 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,e=parseInt(a.substr(4,2),10),p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,e);b.setUTCHours(p,g,q,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
291 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,e=parseInt(a.substr(6,2),10),p=parseInt(a.substr(8,2),10),g=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),x=0,l=0,y=!1;"Z"===a.charAt(a.length-1)&&(y=!0);var R=a.length-5,z=a.charAt(R);if("+"===z||"-"===z)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===z&&(l*=-1),y=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
292 -10));y?(b.setUTCFullYear(c,d,e),b.setUTCHours(p,g,q,x),b.setTime(+b+l)):(b.setFullYear(c,d,e),b.setHours(p,g,q,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
283 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var r=0;r<e.length;++r)e[r](c);return c.oids}},
284 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
285 +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};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
286 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
287 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,B,l)};c.toDer=function(b){var d=a.util.createBuffer(),
288 +g=b.tagClass|b.type,e=a.util.createBuffer();if(b.composed){b.constructed?g|=32:e.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&e.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)e.putInt16(b.value.charCodeAt(h));else e.putBytes(b.value);d.putByte(g);if(127>=e.length())d.putByte(e.length()&127);else{h=e.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(e);
289 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,r=2;r<b.length;++r){d=!0;g=[];h=parseInt(b[r],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
290 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),r=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(r=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(g,e,r,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
291 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),r=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
292 +10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(g,e,r,x),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(g,e,r,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
293 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
294 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,e,g){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)g&&(b.tagClass!==d.tagClass&&g.push("["+d.name+'] Expected tag class "'+d.tagClass+
295 -'", got "'+b.tagClass+'"'),b.type!==d.type&&g.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var r=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[r]&&((h=c.validate(b.value[r],d.value[l],e,g))?++r:d.value[l].optional&&(h=!0)),!h&&g&&g.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
296 -b.value.length+'"');h&&e&&(d.capture&&(e[d.capture]=b.value),d.captureAsn1&&(e[d.captureAsn1]=b))}else g&&g.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var g=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,e){var k="";d=d||0;e=e||2;0<d&&(k+="\n");for(var h="",r=0;r<d*e;++r)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
294 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
295 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
296 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
297 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
298 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
299 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",r=0;r<b.value.length;++r)void 0!==b.value[r]&&(l+=1,B+=c.prettyPrint(b.value[r],d+1,e),r+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
300 -c.Type.OCTETSTRING?(g.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:g.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
301 -c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<g.length;++q)g[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
299 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,B="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,B+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(B+=","));k+=h+"Sub values: "+l+B}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
300 +c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
301 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var r=0;r<e.length;++r)e[r](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
302 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[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];m=[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];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
303 -Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var e,p,h,g,z,E,q,l=c.length();64<=l;){p=a.h0;h=a.h1;g=a.h2;z=a.h3;for(q=0;16>q;++q)b[q]=c.getInt32Le(),e=z^h&(g^z),e=p+e+k[q]+b[q],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;32>q;++q)e=g^z&(h^g),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;48>q;++q)e=h^g^z,e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;for(;64>q;++q)e=g^(h|~z),e=p+e+k[q]+b[n[q]],E=m[q],p=z,z=g,g=h,h+=e<<E|e>>>32-E;a.h0=a.h0+p|0;a.h1=a.h1+h|0;a.h2=a.h2+g|0;a.h3=
304 -a.h3+z|0;l-=64}}var g=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=g;g.create=function(){h||c();var b=null,g=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);g=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
305 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],z=m.fullMessageLength.length-1;0<=z;--z)m.fullMessageLength[z]+=q[1],q[1]=q[0]+(m.fullMessageLength[z]/4294967296>>>0),m.fullMessageLength[z]>>>=0,q[0]=q[1]/4294967296>>>0;g.putBytes(c);d(b,k,g);(2048<g.read||0===g.length())&&g.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(g.bytes());c.putBytes(l.substr(0,
306 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,q=0,z=m.fullMessageLength.length-1;0<=z;--z)h=8*m.fullMessageLength[z]+q,q=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=
307 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
308 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,A,y,w,z=d.length();64<=z;){p=a.h0;g=a.h1;q=a.h2;l=a.h3;A=a.h4;for(w=0;16>w;++w)e=d.getInt32(),b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;20>w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=l^g&(q^l),e=(p<<5|p>>>27)+y+A+1518500249+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;32>
309 -w;++w)e=b[w-3]^b[w-8]^b[w-14]^b[w-16],e=e<<1|e>>>31,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;40>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>27)+y+A+1859775393+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;60>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g&q|l&(g^q),e=(p<<5|p>>>27)+y+A+2400959708+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;for(;80>w;++w)e=b[w-6]^b[w-16]^b[w-28]^b[w-32],e=e<<2|e>>>30,b[w]=e,y=g^q^l,e=(p<<5|p>>>
310 -27)+y+A+3395469782+e,A=l,l=q,q=g<<30|g>>>2,g=p,p=e;a.h0=a.h0+p|0;a.h1=a.h1+g|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+A|0;z-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),e=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
311 -0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,e=0;e<c;++e)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var w=g.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
312 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],A=0;A<h.fullMessageLength.length;++A)w=8*h.fullMessageLength[A+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
313 -h4:b.h4};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var g=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
314 -!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,q,l,y,w,z,E,O,H,C,u,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
315 -for(;64>l;++l)e=b[l-2],e=(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10,p=b[l-15],p=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,b[l]=e+b[l-7]+p+b[l-16]|0;y=a.h0;w=a.h1;z=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;u=a.h7;for(l=0;64>l;++l)e=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),g=C^O&(H^C),p=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),q=y&w|z&(y^w),e=u+e+g+n[l]+b[l],p+=q,u=C,C=H,H=O,O=E+e|0,E=z,z=w,w=y,y=e+p|0;a.h0=a.h0+y|0;a.h1=a.h1+w|0;a.h2=a.h2+z|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+u|0;v-=
316 -64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(g=String.fromCharCode(128),g+=a.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,
317 -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],l=!0);var b=null,d=a.util.createBuffer(),e=Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,
318 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){r.messageLength=0;r.fullMessageLength=r.messageLength64=[];for(var c=r.messageLengthSize/4,e=0;e<c;++e)r.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return r}};r.start();r.update=function(g,l){"utf8"===l&&(g=a.util.encodeUtf8(g));var x=g.length;r.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=r.fullMessageLength.length-
319 -1;0<=w;--w)r.fullMessageLength[w]+=x[1],x[1]=x[0]+(r.fullMessageLength[w]/4294967296>>>0),r.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(g);c(b,e,d);(2048<d.read||0===d.length())&&d.compact();return r};r.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(g.substr(0,r.blockLength-(r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize&r.blockLength-1)));a.util.createBuffer();for(var w,x,A=8*r.fullMessageLength[0],y=0;y<r.fullMessageLength.length;++y)w=
320 -8*r.fullMessageLength[y+1],x=w/4294967296>>>0,A+=x,l.putInt32(A>>>0),A=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,e,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return r};var g=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
321 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
322 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var e,p,g,k,q,z,E,l,w,C,u,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)q=b[S-2],w=q[0],q=q[1],e=((w>>>19|q<<13)^(q>>>29|w<<3)^w>>>6)>>>0,p=((w<<13|q>>>19)^(q<<3|w>>>29)^(w<<26|q>>>6))>>>0,q=b[S-15],w=q[0],q=q[1],g=((w>>>1|q<<31)^(w>>>8|q<<24)^w>>>7)>>>0,k=((w<<31|q>>>1)^(w<<24|q>>>8)^(w<<25|q>>>7))>>>0,w=b[S-7],C=b[S-
323 -16],q=p+w[1]+k+C[1],b[S][0]=e+w[0]+g+C[0]+(q/4294967296>>>0)>>>0,b[S][1]=q>>>0;w=a[0][0];C=a[0][1];u=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)e=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,q=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,p=(ba^D&(J^ba))>>>0,z=(W^V&(aa^W))>>>0,g=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
324 -E=(w&u|v&(w^u))>>>0,l=(C&n|F&(C^n))>>>0,q=G+q+z+m[S][1]+b[S][1],e=I+e+p+m[S][0]+b[S][0]+(q/4294967296>>>0)>>>0,p=q>>>0,q=k+l,g=g+E+(q/4294967296>>>0)>>>0,k=q>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,q=L+p,D=Y+e+(q/4294967296>>>0)>>>0,V=q>>>0,Y=v,L=F,v=u,F=n,u=w,n=C,q=p+k,w=e+g+(q/4294967296>>>0)>>>0,C=q>>>0;q=a[0][1]+C;a[0][0]=a[0][0]+w+(q/4294967296>>>0)>>>0;a[0][1]=q>>>0;q=a[1][1]+n;a[1][0]=a[1][0]+u+(q/4294967296>>>0)>>>0;a[1][1]=q>>>0;q=a[2][1]+F;a[2][0]=a[2][0]+v+(q/4294967296>>>0)>>>0;a[2][1]=q>>>0;
325 -q=a[3][1]+L;a[3][0]=a[3][0]+Y+(q/4294967296>>>0)>>>0;a[3][1]=q>>>0;q=a[4][1]+V;a[4][0]=a[4][0]+D+(q/4294967296>>>0)>>>0;a[4][1]=q>>>0;q=a[5][1]+aa;a[5][0]=a[5][0]+J+(q/4294967296>>>0)>>>0;a[5][1]=q>>>0;q=a[6][1]+W;a[6][0]=a[6][0]+ba+(q/4294967296>>>0)>>>0;a[6][1]=q>>>0;q=a[7][1]+G;a[7][0]=a[7][0]+I+(q/4294967296>>>0)>>>0;a[7][1]=q>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var g=a.sha384=a.sha512.sha384=a.sha512.sha384||
326 -{};g.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=g;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
303 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var p,g,h,e,y,E,r,l=c.length();64<=l;){g=a.h0;h=a.h1;e=a.h2;y=a.h3;for(r=0;16>r;++r)b[r]=c.getInt32Le(),p=y^h&(e^y),p=g+p+k[r]+b[r],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;32>r;++r)p=e^y&(h^e),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;48>r;++r)p=h^e^y,p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;for(;64>r;++r)p=e^(h|~y),p=g+p+k[r]+b[n[r]],E=m[r],g=y,y=e,e=h,h+=p<<E|p>>>32-E;a.h0=a.h0+g|0;a.h1=a.h1+h|0;a.h2=a.h2+e|0;a.h3=
304 +a.h3+y|0;l-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
305 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var r=c.length;m.messageLength+=r;for(var r=[r/4294967296>>>0,r>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=r[1],r[1]=r[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,r[0]=r[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
306 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,r=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+r,r=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
307 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
308 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;r=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(r^l),p=(g<<5|g>>>27)+A+z+1518500249+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;32>
309 +w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>27)+A+z+1859775393+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&r|l&(e^r),p=(g<<5|g>>>27)+A+z+2400959708+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^r^l,p=(g<<5|g>>>
310 +27)+A+z+3395469782+p,z=l,l=r,r=e<<30|e>>>2,e=g,g=p;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+r|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
311 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
312 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,B,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],B=w/4294967296>>>0,x+=B,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
313 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
314 +!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,r,l,A,w,y,E,O,H,C,q,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
315 +for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=p+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;O=a.h4;H=a.h5;C=a.h6;q=a.h7;for(l=0;64>l;++l)p=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),e=C^O&(H^C),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),r=A&w|y&(A^w),p=q+p+e+n[l]+b[l],g+=r,q=C,C=H,H=O,O=E+p|0,E=y,y=w,w=A,A=p+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+O|0;a.h5=a.h5+H|0;a.h6=a.h6+C|0;a.h7=a.h7+q|0;v-=
316 +64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.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,
317 +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],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
318 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
319 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
320 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
321 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
322 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,g,e,k,r,y,E,l,w,C,q,n,v,F,Y,L,D,V,J,aa,ba,W,I,G,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)r=b[S-2],w=r[0],r=r[1],p=((w>>>19|r<<13)^(r>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|r>>>19)^(r<<3|w>>>29)^(w<<26|r>>>6))>>>0,r=b[S-15],w=r[0],r=r[1],e=((w>>>1|r<<31)^(w>>>8|r<<24)^w>>>7)>>>0,k=((w<<31|r>>>1)^(w<<24|r>>>8)^(w<<25|r>>>7))>>>0,w=b[S-7],C=b[S-
323 +16],r=g+w[1]+k+C[1],b[S][0]=p+w[0]+e+C[0]+(r/4294967296>>>0)>>>0,b[S][1]=r>>>0;w=a[0][0];C=a[0][1];q=a[1][0];n=a[1][1];v=a[2][0];F=a[2][1];Y=a[3][0];L=a[3][1];D=a[4][0];V=a[4][1];J=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];I=a[7][0];G=a[7][1];for(S=0;80>S;++S)p=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,r=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(J^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25))>>>0,k=((w<<4|C>>>28)^(C<<30|w>>>2)^(C<<25|w>>>7))>>>0,
324 +E=(w&q|v&(w^q))>>>0,l=(C&n|F&(C^n))>>>0,r=G+r+y+m[S][1]+b[S][1],p=I+p+g+m[S][0]+b[S][0]+(r/4294967296>>>0)>>>0,g=r>>>0,r=k+l,e=e+E+(r/4294967296>>>0)>>>0,k=r>>>0,I=ba,G=W,ba=J,W=aa,J=D,aa=V,r=L+g,D=Y+p+(r/4294967296>>>0)>>>0,V=r>>>0,Y=v,L=F,v=q,F=n,q=w,n=C,r=g+k,w=p+e+(r/4294967296>>>0)>>>0,C=r>>>0;r=a[0][1]+C;a[0][0]=a[0][0]+w+(r/4294967296>>>0)>>>0;a[0][1]=r>>>0;r=a[1][1]+n;a[1][0]=a[1][0]+q+(r/4294967296>>>0)>>>0;a[1][1]=r>>>0;r=a[2][1]+F;a[2][0]=a[2][0]+v+(r/4294967296>>>0)>>>0;a[2][1]=r>>>0;
325 +r=a[3][1]+L;a[3][0]=a[3][0]+Y+(r/4294967296>>>0)>>>0;a[3][1]=r>>>0;r=a[4][1]+V;a[4][0]=a[4][0]+D+(r/4294967296>>>0)>>>0;a[4][1]=r>>>0;r=a[5][1]+aa;a[5][0]=a[5][0]+J+(r/4294967296>>>0)>>>0;a[5][1]=r>>>0;r=a[6][1]+W;a[6][0]=a[6][0]+ba+(r/4294967296>>>0)>>>0;a[6][1]=r>>>0;r=a[7][1]+G;a[7][0]=a[7][0]+I+(r/4294967296>>>0)>>>0;a[7][1]=r>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
326 +{};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
327 3609767458],[1899447441,602891725],[3049323471,3964484399],[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],
328 [1555081692,3175218132],[1996064986,2198950837],[2554220882,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,
329 106217008],[3516065817,3606008344],[3600352804,1432725776],[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],
330 [3515267271,566280711],[3940187606,3454069534],[4118630271,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]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
331 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,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,
332 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],e=null,g=a.util.createBuffer(),x=Array(80),A=0;80>A;++A)x[A]=Array(2);var y={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){y.messageLength=
333 -0;y.fullMessageLength=y.messageLength128=[];for(var b=y.messageLengthSize/4,c=0;c<b;++c)y.fullMessageLength.push(0);g=a.util.createBuffer();e=Array(d.length);for(c=0;c<d.length;++c)e[c]=d[c].slice(0);return y}};y.start();y.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;y.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=y.fullMessageLength.length-1;0<=k;--k)y.fullMessageLength[k]+=h[1],h[1]=h[0]+(y.fullMessageLength[k]/4294967296>>>0),y.fullMessageLength[k]>>>=0,h[0]=
334 -h[1]/4294967296>>>0;g.putBytes(b);c(e,x,g);(2048<g.read||0===g.length())&&g.compact();return y};y.digest=function(){var d=a.util.createBuffer();d.putBytes(g.bytes());d.putBytes(l.substr(0,y.blockLength-(y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize&y.blockLength-1)));a.util.createBuffer();for(var z,k,m=8*y.fullMessageLength[0],r=0;r<y.fullMessageLength.length;++r)z=8*y.fullMessageLength[r+1],k=z/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=z;z=Array(e.length);for(r=0;r<e.length;++r)z[r]=
335 -e[r].slice(0);c(z,x,d);d=a.util.createBuffer();k="SHA-512"===b?z.length:"SHA-384"===b?z.length-2:z.length-4;for(r=0;r<k;++r)d.putInt32(z[r][0]),r===k-1&&"SHA-512/224"===b||d.putInt32(z[r][1]);return d};return y};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
336 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<g.length;++q)g[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
337 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<g.length;++q)g[q](c);return c.md}},l=a;a=function(b,
338 -c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,g={start:function(g,m){if(null!==g)if("string"===typeof g)if(g=g.toLowerCase(),g in a.md.algorithms)b=
339 -a.md.algorithms[g].create();else throw Error('Unknown hash algorithm "'+g+'"');else b=g;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
340 -d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};g.digest=g.getMac;return g}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
341 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<g.length;++q)g[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],e=function(a,
342 -b){return" "+b},p=0;p<a.values.length;++p)d.push(a.values[p].replace(/^(\S+\r\n)/,e));b+=d.join(",")+"\r\n";d=0;a=-1;for(p=0;p<b.length;++p,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=p-a-1,a=-1,++p;else if(" "===b[p]||"\t"===b[p]||","===b[p])a=p;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var e="-----BEGIN "+b.type+"-----\r\n",g;b.procType&&(g={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
343 -e+=c(g));b.contentDomain&&(g={name:"Content-Domain",values:[b.contentDomain]},e+=c(g));b.dekInfo&&(g={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&g.values.push(b.dekInfo.parameters),e+=c(g));if(b.headers)for(g=0;g<b.headers.length;++g)e+=c(b.headers[g]);b.procType&&(e+="\r\n");e+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return e+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
344 -e=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,g=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var q={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(q);if(h[2]){for(var l=h[2].split(g),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var A=l[x];if(!/\s/.test(A[0]))break;h+=A;B=x}if(h=h.match(e)){for(var x={name:h[1],values:[]},A=h[2].split(","),y=0;y<A.length;++y)x.values.push(A[y].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
345 -"Content-Domain"!==x.name)if(q.dekInfo||"DEK-Info"!==x.name)q.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:A[0],parameters:A[1]||null}}else q.contentDomain=A[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
346 -q.procType={version:A[0],type:A[1]}}}++B}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
347 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
348 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,e){var p=32===a.length?3:9;e=3===p?e?[30,-2,-2]:[0,32,2]:e?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=b[0],q=b[1];b=(g>>>4^q)&252645135;q^=b;g^=b<<4;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(g>>>1^q)&1431655765;for(var q=q^b,g=g^b<<1,g=g<<1|g>>>31,q=q<<1|q>>>31,H=0;H<p;H+=3){for(var C=e[H+1],u=e[H+2],T=e[H];T!=C;T+=u){var P=q^a[T],F=(q>>>4|q<<28)^a[T+1];b=g;
349 -g=q;q=b^(n[P>>>24&63]|k[P>>>16&63]|r[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=g;g=q;q=b}g=g>>>1|g<<31;q=q>>>1|q<<31;b=(g>>>1^q)&1431655765;q^=b;g^=b<<1;b=(q>>>8^g)&16711935;g^=b;q^=b<<8;b=(q>>>2^g)&858993459;g^=b;q^=b<<2;b=(g>>>16^q)&65535;q^=b;g^=b<<16;b=(g>>>4^q)&252645135;c[0]=g^b<<4;c[1]=q^b}function g(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var e=d.start;d.start=function(b,c){var g=
350 -null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;e.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return g({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=g({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return g({key:a,
332 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
333 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
334 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
335 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
336 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var r=0;r<e.length;++r)e[r](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
337 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var r=0;r<e.length;++r)e[r](c);return c.md}},l=a;a=function(b,
338 +c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
339 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
340 +d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
341 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var r=0;r<e.length;++r)e[r](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
342 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
343 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
344 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var r={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(r);if(h[2]){for(var l=h[2].split(e),B=0;h&&B<l.length;){h=l[B].replace(/\s+$/,"");for(var x=B+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;B=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(r.procType)if(r.contentDomain||
345 +"Content-Domain"!==x.name)if(r.dekInfo||"DEK-Info"!==x.name)r.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');r.dekInfo={algorithm:z[0],parameters:z[1]||null}}else r.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
346 +r.procType={version:z[0],type:z[1]}}}++B}if("ENCRYPTED"===r.procType&&!r.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
347 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
348 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,g){var p=32===a.length?3:9;g=3===p?g?[30,-2,-2]:[0,32,2]:g?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],r=b[1];b=(e>>>4^r)&252645135;r^=b;e^=b<<4;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(e>>>1^r)&1431655765;for(var r=r^b,e=e^b<<1,e=e<<1|e>>>31,r=r<<1|r>>>31,H=0;H<p;H+=3){for(var C=g[H+1],q=g[H+2],T=g[H];T!=C;T+=q){var P=r^a[T],F=(r>>>4|r<<28)^a[T+1];b=e;
349 +e=r;r=b^(n[P>>>24&63]|k[P>>>16&63]|u[P>>>8&63]|B[P&63]|l[F>>>24&63]|m[F>>>16&63]|h[F>>>8&63]|v[F&63])}b=e;e=r;r=b}e=e>>>1|e<<31;r=r>>>1|r<<31;b=(e>>>1^r)&1431655765;r^=b;e^=b<<1;b=(r>>>8^e)&16711935;e^=b;r^=b<<8;b=(r>>>2^e)&858993459;e^=b;r^=b<<2;b=(e>>>16^r)&65535;r^=b;e^=b<<16;b=(e>>>4^r)&252645135;c[0]=e^b<<4;c[1]=r^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
350 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
351 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
352 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[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],
353 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],r=[0,268435456,8,268435464,0,268435456,
352 +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],
353 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],r=[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],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
354 8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],F=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],B=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],L=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
355 1,C=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],K=0,D,W=0;W<n;W++){var I=b.getInt32(),G=b.getInt32();D=(I>>>4^G)&252645135;G^=D;I^=D<<4;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>2^G)&858993459;G^=D;I^=D<<2;D=(G>>>-16^I)&65535;I^=D;G^=D<<-16;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=(G>>>8^I)&16711935;I^=D;G^=D<<8;D=(I>>>1^G)&1431655765;G^=D;I^=D<<1;D=I<<8|G>>>20&240;for(var I=G<<24|G<<8&16711680|G>>>8&65280|G>>>24&240,G=D,S=0;S<v.length;++S){v[S]?(I=I<<2|I>>>26,G=G<<2|G>>>26):(I=I<<1|I>>>27,G=G<<1|G>>>27);
356 -var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|e[I>>>20&15]|g[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|q[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|r[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
356 +var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|g[I>>>20&15]|e[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|r[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|u[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
357 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[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,
358 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,
359 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[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,
360 8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[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],h=[256,34078976,34078720,1107296512,
361 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,
362 -524288,0,1074266112,34078976,1073742080],r=[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,
362 +524288,0,1074266112,34078976,1073742080],u=[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,
363 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[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,
364 67108866,67110912,2048,2097154],B=[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,
365 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<g.length;++q)g[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,
366 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,g;e&&!a.disableNativeCode&&(g=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,q){function l(){if(N>A)return q(null,z);n.start(null,
367 -null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();u=2;B()}function B(){if(u<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++u,a.util.setImmediate(B);z+=N<A?E:E.substr(0,y);++N;l()}"function"===typeof h&&(q=h,h=null);if(e&&!a.disableNativeCode&&g.pbkdf2&&(null===h||"object"!==typeof h)&&(4<g.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),q?4===g.pbkdf2Sync.length?g.pbkdf2(b,
368 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):g.pbkdf2(b,c,d,k,h,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===g.pbkdf2Sync.length?g.pbkdf2Sync(b,c,d,k).toString("binary"):g.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
369 -if(q)return q(b);throw b;}var A=Math.ceil(k/x),y=k-(A-1)*x,n=a.hmac.create();n.start(h,b);var z="",E,O,H;if(!q){for(var N=1;N<=A;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var u=2;u<=d;++u)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;z+=N<A?E:E.substr(0,y)}return z}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
370 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
371 -"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
372 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function g(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
373 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)e.putInt32(k[h])}catch(z){if(!("undefined"!==typeof QuotaExceededError&&z instanceof QuotaExceededError))throw z;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
374 -e.putByte(String.fromCharCode(k&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),q=0;32>q;++q)h[q]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(g(k.key,h(k.seed)));k.seed=z(g(k.key,k.seed));
375 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,q=k.plugin.formatKey,z=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var z=c(k.key,
376 -k.seed);k.generated+=z.length;q.putBytes(z);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,g(a))}catch(c){b(c)}},k.seedFileSync=g);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
365 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var r=0;r<e.length;++r)e[r](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
366 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},g="undefined"!==typeof process&&process.versions&&process.versions.node,e;g&&!a.disableNativeCode&&(e=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,r){function l(){if(N>z)return r(null,y);n.start(null,
367 +null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();q=2;B()}function B(){if(q<=d)return n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O,++q,a.util.setImmediate(B);y+=N<z?E:E.substr(0,A);++N;l()}"function"===typeof h&&(r=h,h=null);if(g&&!a.disableNativeCode&&e.pbkdf2&&(null===h||"object"!==typeof h)&&(4<e.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),r?4===e.pbkdf2Sync.length?e.pbkdf2(b,
368 +c,d,k,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):e.pbkdf2(b,c,d,k,h,function(a,b){if(a)return r(a);r(null,b.toString("binary"))}):4===e.pbkdf2Sync.length?e.pbkdf2Sync(b,c,d,k).toString("binary"):e.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
369 +if(r)return r(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,n=a.hmac.create();n.start(h,b);var y="",E,O,H;if(!r){for(var N=1;N<=z;++N){n.start(null,null);n.update(c);n.update(a.util.int32ToBytes(N));E=H=n.digest().getBytes();for(var q=2;q<=d;++q)n.start(null,null),n.update(H),O=n.digest().getBytes(),E=a.util.xorBytes(E,O,x),H=O;y+=N<z?E:E.substr(0,A)}return y}N=1;l()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
370 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
371 +"./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,g=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(g=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
372 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function e(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var g=
373 +a.util.createBuffer();if(c)for(;g.length()<b;){var h=Math.max(1,Math.min(b-g.length(),65536)/4),k=new Uint32Array(Math.floor(h));try{for(c(k),h=0;h<k.length;++h)g.putInt32(k[h])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(g.length()<b)for(c=Math.floor(65536*Math.random());g.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)k=c>>>(h<<3),k^=Math.floor(256*Math.random()),
374 +g.putByte(String.fromCharCode(k&255));return g.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),r=0;32>r;++r)h[r]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function g(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(g)});l=e(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=r(e(k.key,h(k.seed)));k.seed=y(e(k.key,k.seed));
375 +a.util.setImmediate(g)}if(!d)return k.generateSync(b);var e=k.plugin.cipher,h=k.plugin.increment,r=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;g()};k.generateSync=function(b){var c=k.plugin.cipher,g=k.plugin.increment,e=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var r=a.util.createBuffer();r.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
376 +k.seed);k.generated+=y.length;r.putBytes(y);k.key=e(c(k.key,g(k.seed)));k.seed=h(c(k.key,k.seed))}return r.getBytes(b)};g?(k.seedFile=function(a,b){g.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return g.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,e(a))}catch(c){b(c)}},k.seedFileSync=e);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
377 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
378 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<g.length;++q)g[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
379 -0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},g=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
380 -b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,g,!1);l.putInt32(g[0]);l.putInt32(g[1]);l.putInt32(g[2]);l.putInt32(g[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
381 -process.versions.node,h=null;if("undefined"!==typeof window){var r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(h=function(a){return r.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
382 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<g.length;++q)g[q](c);
383 -return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
378 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var r=0;r<e.length;++r)e[r](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
379 +0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
380 +b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
381 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(B){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
382 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var r=0;r<e.length;++r)e[r](c);
383 +return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[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,
384 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,
385 -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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
386 -1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var g=function(b,c,g){var k=!1,h=null,q=null,l=null,n,x,A,y,v=[];b=a.rc2.expandKey(b,c);for(A=0;64>A;A++)v.push(b.getInt16Le());g?(n=function(a){for(A=0;4>A;A++){a[A]+=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);var b=a[A],c=d[A];a[A]=b<<c&65535|(b&65535)>>16-c;y++}},x=function(a){for(A=0;4>A;A++)a[A]+=v[a[(A+3)%4]&63]}):(n=function(a){for(A=3;0<=A;A--){var b=a[A],c=d[A];a[A]=
387 -(b&65535)>>c|b<<16-c&65535;a[A]-=v[y]+(a[(A+3)%4]&a[(A+2)%4])+(~a[(A+3)%4]&a[(A+1)%4]);y--}},x=function(a){for(A=3;0<=A;A--)a[A]-=v[a[(A+3)%4]&63]});var z=null;return z={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();q=c||new a.util.createBuffer;l=b;z.output=q},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(A=0;4>A;A++){var c=h.getInt16Le();null!==l&&(g?c^=l.getInt16Le():l.putInt16Le(c));
388 -b.push(c&65535)}y=g?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(A=0;4>A;A++)null!==l&&(g?l.putInt16Le(b[A]):b[A]^=l.getInt16Le()),q.putInt16Le(b[A])}},finish:function(a){var b=!0;if(g)if(a)b=a(8,h,!g);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,z.update());!g&&(b=0===h.length())&&(a?b=a(8,q,!g):(a=q.length(),c=q.at(a-1),c>a?b=!1:q.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
389 -a.rc2.createEncryptionCipher=function(a,b){return g(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return g(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
390 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<g.length;++q)g[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
391 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function g(a,b,c,d,e,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+e;e=Math.floor(h/67108864);c.data[d++]=h&67108863}return e}function l(a,b,c,d,e,g){var p=b&32767;for(b>>=15;0<=--g;){var h=this.data[a]&32767,z=this.data[a++]>>15,k=b*h+z*p,h=p*h+((k&32767)<<15)+c.data[d]+(e&1073741823);e=(h>>>30)+(k>>>15)+b*z+(e>>>30);c.data[d++]=h&1073741823}return e}function n(a,b,
392 -c,d,e,g){var p=b&16383;for(b>>=14;0<=--g;){var h=this.data[a]&16383,z=this.data[a++]>>14,k=b*h+z*p,h=p*h+((k&16383)<<14)+c.data[d]+e;e=(h>>28)+(k>>14)+b*z;c.data[d++]=h&268435455}return e}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function r(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
393 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function A(a,b){return a^b}function y(a,b){return a&~b}function R(){}function z(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
394 -navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=g,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],u;H=48;for(u=0;9>=u;++u)N[H++]=u;H=97;for(u=10;36>u;++u)N[H++]=u;H=65;for(u=10;36>u;++u)N[H++]=u;r.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};r.prototype.revert=function(a){return a};r.prototype.reduce=
395 -function(a){a.divRemTo(this.m,null,a)};r.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};r.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
385 +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];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var g=b,e=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=e;128>n;n++)g.putByte(c[g.at(n-
386 +1)+g.at(n-e)&255]);g.setAt(128-l,c[g.at(128-l)&h]);for(n=127-l;0<=n;n--)g.setAt(n,c[g.at(n+1)^g.at(n+l)]);return g};var e=function(b,c,e){var k=!1,h=null,r=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
387 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();r=c||new a.util.createBuffer;l=b;y.output=r},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
388 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),r.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,r,!e):(a=r.length(),c=r.at(a-1),c>a?b=!1:r.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
389 +a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
390 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var r=0;r<e.length;++r)e[r](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
391 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,g,p){for(;0<=--p;){var h=b*this.data[a++]+c.data[d]+g;g=Math.floor(h/67108864);c.data[d++]=h&67108863}return g}function l(a,b,c,d,g,e){var p=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,y=this.data[a++]>>15,k=b*h+y*p,h=p*h+((k&32767)<<15)+c.data[d]+(g&1073741823);g=(h>>>30)+(k>>>15)+b*y+(g>>>30);c.data[d++]=h&1073741823}return g}function n(a,b,
392 +c,d,g,e){var p=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,y=this.data[a++]>>14,k=b*h+y*p,h=p*h+((k&16383)<<14)+c.data[d]+g;g=(h>>28)+(k>>14)+b*y;c.data[d++]=h&268435455}return g}function m(a,b){var c=N[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
393 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function B(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function O(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var H;"undefined"===typeof navigator?(c.prototype.am=n,H=28):"Microsoft Internet Explorer"==
394 +navigator.appName?(c.prototype.am=l,H=30):"Netscape"!=navigator.appName?(c.prototype.am=e,H=26):(c.prototype.am=n,H=28);c.prototype.DB=H;c.prototype.DM=(1<<H)-1;c.prototype.DV=1<<H;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-H;c.prototype.F2=2*H-52;var N=[],q;H=48;for(q=0;9>=q;++q)N[H++]=q;H=97;for(q=10;36>q;++q)N[H++]=q;H=65;for(q=10;36>q;++q)N[H++]=q;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
395 +function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
396 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
397 -c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var e=a.length,g=!1,p=0;0<=--e;){var h=8==d?a[e]&255:m(a,e);0>h?"-"==a.charAt(e)&&(g=!0):(g=!1,0==p?this.data[this.t++]=h:p+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-p)-1)<<p,this.data[this.t++]=
398 -h>>this.DB-p):this.data[this.t-1]|=h<<p,p+=d,p>=this.DB&&(p-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<p&&(this.data[this.t-1]|=(1<<this.DB-p)-1<<p));this.clamp();g&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
399 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,e=(1<<d)-1,g=Math.floor(a/this.DB),p=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+g+1]=this.data[h]>>d|p,p=(this.data[h]&e)<<c;for(h=g-1;0<=h;--h)b.data[h]=0;b.data[g]=p;b.t=this.t+g+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,e=this.DB-d,g=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var p=
400 -c+1;p<this.t;++p)b.data[p-c-1]|=(this.data[p]&g)<<e,b.data[p-c]=this.data[p]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&g)<<e);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
401 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),e=a.abs(),g=d.t;for(b.t=g+e.t;0<=--g;)b.data[g]=0;for(g=0;g<e.t;++g)b.data[g+d.t]=d.am(0,e.data[g],b,g,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
402 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,g){var p=a.abs();if(!(0>=p.t)){var z=this.abs();if(z.t<p.t)null!=b&&b.fromInt(0),null!=g&&this.copyTo(g);else{null==g&&(g=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(p.data[p.t-1]);0<l?(p.lShiftTo(l,k),z.lShiftTo(l,g)):(p.copyTo(k),z.copyTo(g));p=k.t;z=k.data[p-1];if(0!=z){var E=z*(1<<this.F1)+(1<p?k.data[p-2]>>this.F2:0),u=this.FV/E,E=(1<<this.F1)/E,y=1<<this.F2,r=g.t,x=r-p,w=null==b?d():b;k.dlShiftTo(x,w);0<=g.compareTo(w)&&
403 -(g.data[g.t++]=1,g.subTo(w,g));c.ONE.dlShiftTo(p,w);for(w.subTo(k,k);k.t<p;)k.data[k.t++]=0;for(;0<=--x;){var O=g.data[--r]==z?this.DM:Math.floor(g.data[r]*u+(g.data[r-1]+y)*E);if((g.data[r]+=k.am(0,O,g,x,0,p))<O)for(k.dlShiftTo(x,w),g.subTo(w,g);g.data[r]<--O;)g.subTo(w,g)}null!=b&&(g.drShiftTo(p,b),m!=a&&c.ZERO.subTo(b,b));g.t=p;g.clamp();0<l&&g.rShiftTo(l,g);0>m&&c.ZERO.subTo(g,g)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
404 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var g=d(),p=d(),z=b.convert(this),k=h(a)-1;for(z.copyTo(g);0<=--k;)if(b.sqrTo(g,p),0<(a&1<<k))b.mulTo(p,z,g);else var m=g,g=p,p=m;return b.revert(g)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
405 -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 b=(1<<a)-1,c,d=!1,e="",g=this.t,p=this.DB-g*this.DB%a;if(0<g--)for(p<this.DB&&0<(c=this.data[g]>>p)&&(d=!0,e="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=g;)p<a?(c=(this.data[g]&(1<<p)-1)<<a-p,c|=this.data[--g]>>(p+=this.DB-a)):(c=this.data[g]>>(p-=a)&b,0>=p&&(p+=this.DB,--g)),0<c&&(d=!0),d&&(e+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?e:"0"};c.prototype.negate=function(){var a=
397 +c.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};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var g=a.length,e=!1,p=0;0<=--g;){var h=8==d?a[g]&255:m(a,g);0>h?"-"==a.charAt(g)&&(e=!0):(e=!1,0==p?this.data[this.t++]=h:p+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-p)-1)<<p,this.data[this.t++]=
398 +h>>this.DB-p):this.data[this.t-1]|=h<<p,p+=d,p>=this.DB&&(p-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<p&&(this.data[this.t-1]|=(1<<this.DB-p)-1<<p));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
399 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,g=(1<<d)-1,p=Math.floor(a/this.DB),e=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+p+1]=this.data[h]>>d|e,e=(this.data[h]&g)<<c;for(h=p-1;0<=h;--h)b.data[h]=0;b.data[p]=e;b.t=this.t+p+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,g=this.DB-d,p=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var e=
400 +c+1;e<this.t;++e)b.data[e-c-1]|=(this.data[e]&p)<<g,b.data[e-c]=this.data[e]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&p)<<g);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,g=Math.min(a.t,this.t);c<g;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
401 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),g=a.abs(),p=d.t;for(b.t=p+g.t;0<=--p;)b.data[p]=0;for(p=0;p<g.t;++p)b.data[p+d.t]=d.am(0,g.data[p],b,p,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
402 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,p){var e=a.abs();if(!(0>=e.t)){var y=this.abs();if(y.t<e.t)null!=b&&b.fromInt(0),null!=p&&this.copyTo(p);else{null==p&&(p=d());var k=d(),m=this.s;a=a.s;var l=this.DB-h(e.data[e.t-1]);0<l?(e.lShiftTo(l,k),y.lShiftTo(l,p)):(e.copyTo(k),y.copyTo(p));e=k.t;y=k.data[e-1];if(0!=y){var E=y*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),q=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=p.t,x=u-e,w=null==b?d():b;k.dlShiftTo(x,w);0<=p.compareTo(w)&&
403 +(p.data[p.t++]=1,p.subTo(w,p));c.ONE.dlShiftTo(e,w);for(w.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--x;){var O=p.data[--u]==y?this.DM:Math.floor(p.data[u]*q+(p.data[u-1]+A)*E);if((p.data[u]+=k.am(0,O,p,x,0,e))<O)for(k.dlShiftTo(x,w),p.subTo(w,p);p.data[u]<--O;)p.subTo(w,p)}null!=b&&(p.drShiftTo(e,b),m!=a&&c.ZERO.subTo(b,b));p.t=e;p.clamp();0<l&&p.rShiftTo(l,p);0>m&&c.ZERO.subTo(p,p)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
404 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var p=d(),e=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(p);0<=--k;)if(b.sqrTo(p,e),0<(a&1<<k))b.mulTo(e,y,p);else var l=p,p=e,e=l;return b.revert(p)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
405 +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 b=(1<<a)-1,c,d=!1,p="",g=this.t,e=this.DB-g*this.DB%a;if(0<g--)for(e<this.DB&&0<(c=this.data[g]>>e)&&(d=!0,p="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=g;)e<a?(c=(this.data[g]&(1<<e)-1)<<a-e,c|=this.data[--g]>>(e+=this.DB-a)):(c=this.data[g]>>(e-=a)&b,0>=e&&(e+=this.DB,--g)),0<c&&(d=!0),d&&(p+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?p:"0"};c.prototype.negate=function(){var a=
406 d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
407 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new r(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=z;R.prototype.revert=z;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
407 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.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 b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
408 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)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var T=[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,
409 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],P=67108864/T[T.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
410 -b),c=k(b),g=d(),p=d(),h="";for(this.divRemTo(c,g,p);0<g.signum();)h=(b+p.intValue()).toString(a).substr(1)+h,g.divRemTo(c,g,p);return p.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),e=Math.pow(b,d),g=!1,p=0,h=0,z=0;z<a.length;++z){var k=m(a,z);0>k?"-"==a.charAt(z)&&0==this.signum()&&(g=!0):(h=b*h+k,++p>=d&&(this.dMultiply(e),this.dAddOffset(h,0),h=p=0))}0<p&&(this.dMultiply(Math.pow(b,p)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
411 -this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var e=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<e?d[0]&(1<<e)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,e,g=Math.min(a.t,this.t);for(d=
412 -0;d<g;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){e=a.s&this.DM;for(d=g;d<this.t;++d)c.data[d]=b(this.data[d],e);c.t=this.t}else{e=this.s&this.DM;for(d=g;d<a.t;++d)c.data[d]=b(e,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
410 +b),c=k(b),p=d(),e=d(),h="";for(this.divRemTo(c,p,e);0<p.signum();)h=(b+e.intValue()).toString(a).substr(1)+h,p.divRemTo(c,p,e);return e.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),p=Math.pow(b,d),g=!1,e=0,h=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(g=!0):(h=b*h+k,++e>=d&&(this.dMultiply(p),this.dAddOffset(h,0),h=e=0))}0<e&&(this.dMultiply(Math.pow(b,e)),this.dAddOffset(h,0));g&&c.ZERO.subTo(this,
411 +this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var p=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<p?d[0]&(1<<p)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,p,g=Math.min(a.t,this.t);for(d=
412 +0;d<g;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){p=a.s&this.DM;for(d=g;d<this.t;++d)c.data[d]=b(this.data[d],p);c.t=this.t}else{p=this.s&this.DM;for(d=g;d<a.t;++d)c.data[d]=b(p,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
413 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
414 -0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var e;for(e=c.t-this.t;d<e;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(e=Math.min(a.t,b);d<e;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
415 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var e=b.shiftRight(d),g=O(),p,h=0;h<a;++h){do p=new c(this.bitLength(),g);while(0>=p.compareTo(c.ONE)||0<=p.compareTo(b));p=p.modPow(e,this);if(0!=p.compareTo(c.ONE)&&0!=p.compareTo(b)){for(var z=1;z++<d&&0!=
416 -p.compareTo(b);)if(p=p.modPowInt(2,this),0==p.compareTo(c.ONE))return!1;if(0!=p.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.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]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
417 -function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,e=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[e++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==e&&
418 -(this.s&128)!=(d&128)&&++e,0<e||d!=this.s)b[e++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,A,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
419 -y,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
420 -0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,e=0;0!=d;)d&=d-1,++e;a+=e}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
421 -y)};c.prototype.flipBit=function(a){return this.changeBit(a,A)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
422 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),g,p=k(1),z;if(0>=c)return p;g=18>c?1:48>c?3:144>c?4:768>c?5:6;z=8>c?new r(b):b.isEven()?new E(b):new v(b);var m=[],l=3,q=g-1,u=(1<<g)-1;m[1]=z.convert(this);if(1<g)for(c=d(),z.sqrTo(m[1],c);l<=u;)m[l]=d(),z.mulTo(c,m[l-2],m[l]),l+=2;for(var y=a.t-1,x,w=!0,O=d(),c=h(a.data[y])-1;0<=y;){c>=q?x=a.data[y]>>c-q&u:(x=(a.data[y]&(1<<c+1)-1)<<q-c,0<y&&(x|=a.data[y-1]>>this.DB+c-q));for(l=g;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--y);
423 -if(w)m[x].copyTo(p),w=!1;else{for(;1<l;)z.sqrTo(p,O),z.sqrTo(O,p),l-=2;0<l?z.sqrTo(p,O):(l=p,p=O,O=l);z.mulTo(O,m[x],p)}for(;0<=y&&0==(a.data[y]&1<<c);)z.sqrTo(p,O),l=p,p=O,O=l,0>--c&&(c=this.DB-1,--y)}return z.revert(p)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),e=this.clone(),g=k(1),p=k(0),h=k(0),z=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(g.isEven()&&p.isEven()||(g.addTo(this,g),p.subTo(a,p)),g.rShiftTo(1,
424 -g)):p.isEven()||p.subTo(a,p),p.rShiftTo(1,p);for(;e.isEven();)e.rShiftTo(1,e),b?(h.isEven()&&z.isEven()||(h.addTo(this,h),z.subTo(a,z)),h.rShiftTo(1,h)):z.isEven()||z.subTo(a,z),z.rShiftTo(1,z);0<=d.compareTo(e)?(d.subTo(e,d),b&&g.subTo(h,g),p.subTo(z,p)):(e.subTo(d,e),b&&h.subTo(g,h),z.subTo(p,z))}if(0!=e.compareTo(c.ONE))return c.ZERO;if(0<=z.compareTo(a))return z.subtract(a);if(0>z.signum())z.addTo(a,z);else return z;return 0>z.signum()?z.add(a):z};c.prototype.pow=function(a){return this.exp(a,
414 +0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var p;for(p=c.t-this.t;d<p;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(p=Math.min(a.t,b);d<p;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
415 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var p=b.shiftRight(d),g=O(),e,h=0;h<a;++h){do e=new c(this.bitLength(),g);while(0>=e.compareTo(c.ONE)||0<=e.compareTo(b));e=e.modPow(p,this);if(0!=e.compareTo(c.ONE)&&0!=e.compareTo(b)){for(var y=1;y++<d&&0!=
416 +e.compareTo(b);)if(e=e.modPowInt(2,this),0==e.compareTo(c.ONE))return!1;if(0!=e.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.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]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
417 +function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,p=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[p++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==p&&
418 +(this.s&128)!=(d&128)&&++p,0<p||d!=this.s)b[p++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,B,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
419 +A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
420 +0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,p=0;0!=d;)d&=d-1,++p;a+=p}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
421 +A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
422 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),p,e=k(1),y;if(0>=c)return e;p=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var l=[],m=3,r=p-1,q=(1<<p)-1;l[1]=y.convert(this);if(1<p)for(c=d(),y.sqrTo(l[1],c);m<=q;)l[m]=d(),y.mulTo(c,l[m-2],l[m]),m+=2;for(var A=a.t-1,x,w=!0,O=d(),c=h(a.data[A])-1;0<=A;){c>=r?x=a.data[A]>>c-r&q:(x=(a.data[A]&(1<<c+1)-1)<<r-c,0<A&&(x|=a.data[A-1]>>this.DB+c-r));for(m=p;0==(x&1);)x>>=1,--m;0>(c-=m)&&(c+=this.DB,--A);
423 +if(w)l[x].copyTo(e),w=!1;else{for(;1<m;)y.sqrTo(e,O),y.sqrTo(O,e),m-=2;0<m?y.sqrTo(e,O):(m=e,e=O,O=m);y.mulTo(O,l[x],e)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(e,O),m=e,e=O,O=m,0>--c&&(c=this.DB-1,--A)}return y.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),p=this.clone(),e=k(1),g=k(0),h=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&g.isEven()||(e.addTo(this,e),g.subTo(a,g)),e.rShiftTo(1,
424 +e)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);for(;p.isEven();)p.rShiftTo(1,p),b?(h.isEven()&&y.isEven()||(h.addTo(this,h),y.subTo(a,y)),h.rShiftTo(1,h)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(p)?(d.subTo(p,d),b&&e.subTo(h,e),g.subTo(y,g)):(p.subTo(d,p),b&&h.subTo(e,h),y.subTo(g,y))}if(0!=p.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
425 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
426 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],e=b+1;e<T.length&&d<P;)d*=T[e++];for(d=c.modInt(d);b<e;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
427 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<g.length;++l)g[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
426 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=T[T.length-1]){for(b=0;b<T.length;++b)if(c.data[0]==T[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<T.length;){for(var d=T[b],p=b+1;p<T.length&&d<P;)d*=T[p++];for(d=c.modInt(d);b<p;)if(0==d%T[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
427 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var l=0;l<e.length;++l)e[l](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
428 0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var l=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+l);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
429 v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
430 v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
431 2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
432 -0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs1}},
433 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?g(a,b,p,h):d(a,b,p,h)}function d(b,c,g,k){var m=l(b,c),z=0,q=n(m.bitLength());"millerRabinTests"in
434 -g&&(q=g.millerRabinTests);var r=10;"maxBlockTime"in g&&(r=g.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(q))return k(null,m);m.dAddOffset(h[z++%8],0)}while(0>r||+new Date-v<r);a.util.setImmediate(function(){d(b,c,g,k)})}function g(b,c,h,m){function q(){function a(e){if(!p){--g;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();p=!0;return m(null,new k(h.prime,16))}z.bitLength()>b&&(z=l(b,c));h=z.toString(16);e.target.postMessage({hex:h,workLoad:r});
435 -z.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var g=E,e=0;e<E;++e)d[e].addEventListener("message",a);var p=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var z=l(b,c),E=h.workers,r=h.workLoad||100,n=30*r/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;q()});q()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(r).byteValue(),0);return c}
436 -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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],r=new k(null);r.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
437 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
438 -0;l<g.length;++l)g[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
432 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
433 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,h){return"workers"in p?e(a,b,p,h):d(a,b,p,h)}function d(b,c,e,k){var m=l(b,c),y=0,r=n(m.bitLength());"millerRabinTests"in
434 +e&&(r=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{m.bitLength()>b&&(m=l(b,c));if(m.isProbablePrime(r))return k(null,m);m.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,m){function r(){function a(e){if(!g){--p;var h=e.data;if(h.found){for(e=0;e<d.length;++e)d[e].terminate();g=!0;return m(null,new k(h.prime,16))}y.bitLength()>b&&(y=l(b,c));h=y.toString(16);e.target.postMessage({hex:h,workLoad:u});
435 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var p=E,e=0;e<E;++e)d[e].addEventListener("message",a);var g=!1}if("undefined"===typeof Worker)return d(b,c,h,m);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;r()});r()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
436 +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(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,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||a.random;d={nextBytes:function(a){for(var b=h.getBytesSync(a.length),
437 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===g.name)return c(b,d,g.options,e);throw Error("Invalid prime generation algorithm: "+g.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
438 +0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var g=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw g=
439 Error("Message is too long for PKCS#1 v1.5 padding."),g.length=b.length,g.max=d-11,g;g.putByte(0);g.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var h=0;h<d;++h)g.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),h=0;h<d;++h)e=l.charCodeAt(h),0===e?++k:g.putByte(e);d=k}g.putByte(0);g.putBytes(b);return g}function d(b,c,e,g){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var h=b.getByte(),k=b.getByte();if(0!==h||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
440 -typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function g(b,c,d){function e(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
441 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var g=b.p;b.p=b.q;b.q=g}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,e()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,e()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
442 -(g=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,g,b.p,b.q,g.mod(b.p1),g.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);e()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
443 -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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,r=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
440 +typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
441 +b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,r,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
442 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var r={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(r.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
443 +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 m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
444 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},B={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
445 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
446 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
447 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},A=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
448 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},y=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
447 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
448 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
449 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
450 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
451 -b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,g,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
452 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,g).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,g):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
451 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var g=e,h=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(g=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,g).toString(16);g=a.util.createBuffer();for(h-=Math.ceil(d.length/2);0<h;)g.putByte(0),--h;g.putBytes(a.util.hexToBytes(d));return g.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
452 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==h?d(l.getBytes(),c,e):l.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,g={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
453 c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:g,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},g=+new Date,p,k=0;null===a.keys&&
454 -(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(r[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
454 +(0>=b||k<b);){if(0===a.state){p=null===a.p?a.pBits:a.qBits;var l=p-1;0===a.pqState?(a.num=new m(p,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>p?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
455 null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(p=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,p,a.p,a.q,
456 p.mod(a.p1),p.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});p=+new Date;k+=p-g;g=p}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
457 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var e=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(e,0),e.keys;g(e,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,g){var l={n:b,e:g,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
457 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var g=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(g,0),g.keys;e(g,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,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,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
458 b,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+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
459 -l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,g,k,l,m,q,r){var x={n:b,e:c,d:g,p:k,q:l,dP:m,dQ:q,qInv:r,decrypt:function(b,c,g){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,g)}};else if(-1!==["RAW","NONE",
460 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:y},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
459 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,l,m,r,u){var x={n:b,e:c,d:e,p:k,q:l,dP:m,dQ:r,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
460 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
461 [k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,B,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
462 -c.errors=d,c;var e,g,l,q,y,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();y=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
463 -16),new m(e,16),new m(g,16),new m(l,16),new m(q,16),new m(y,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
464 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,A,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
462 +c.errors=d,c;var e,g,l,r,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();r=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
463 +16),new m(e,16),new m(g,16),new m(l,16),new m(r,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
464 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
465 c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
466 -!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||
467 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<g.length;++l)g[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
468 -b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var g=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encryptionOid"},
469 -{name:"AlgorithmIdentifier.parameters",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
470 -tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:g.Class.UNIVERSAL,
471 -type:g.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:g.Class.UNIVERSAL,type:g.Type.OCTETSTRING,constructed:!1,capture:"salt"},
472 -{name:"pkcs-12PbeParams.iterations",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var e=a.random.getBytesSync(d.saltSize),h=d.count,k=g.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var z,q;switch(d.algorithm){case "aes128":z=m=16;d=n["aes128-CBC"];q=a.aes.createEncryptionCipher;break;case "aes192":m=24;
473 -z=16;d=n["aes192-CBC"];q=a.aes.createEncryptionCipher;break;case "aes256":m=32;z=16;d=n["aes256-CBC"];q=a.aes.createEncryptionCipher;break;case "des":z=m=8;d=n.desCBC;q=a.des.createEncryptionCipher;break;default:throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;}var v=a.pkcs5.pbkdf2(c,e,h,m);c=a.random.getBytesSync(z);h=q(v);h.start(c);h.update(g.toDer(b));h.finish();b=h.output.getBytes();e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,
474 -g.Type.OID,!1,g.oidToDer(n.pkcs5PBES2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n.pkcs5PBKDF2).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(d).getBytes()),g.create(g.Class.UNIVERSAL,
475 -g.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(e),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(g.toDer(b)),h.finish(),b=h.output.getBytes(),e=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,
476 -!1,e),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,k.getBytes())])]);else throw e=Error("Cannot encrypt private key. Unknown encryption algorithm."),e.algorithm=d.algorithm,e;return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[e,g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,e={},h=[];if(!g.validate(b,m,e,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=g.derToOid(e.encryptionOid);
477 -h=l.pbe.getCipher(h,e.encryptionParams,c);e=a.util.createBuffer(e.encryptedData);h.update(e);h.finish()&&(d=g.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:g.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
478 -b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return g.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var e,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
479 -h=24;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;e=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;e=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
480 -e.substr(0,8),h);c=k(c);c.start(e);c.update(g.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(e).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,e=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==e.type&&"PRIVATE KEY"!==e.type&&"RSA PRIVATE KEY"!==e.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".'),
481 -d.headerType=d,d;if(e.procType&&"ENCRYPTED"===e.procType.type){var h,k;switch(e.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
482 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+e.dekInfo.algorithm+'".'),d.algorithm=e.dekInfo.algorithm,d;}var m=a.util.hexToBytes(e.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(e.body));if(k.finish())d=k.output.getBytes();else return d}else d=
483 -e.body;d="ENCRYPTED PRIVATE KEY"===e.type?l.decryptPrivateKeyInfo(g.fromDer(d),c):g.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,q=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var u=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,q);
484 -var C=q*Math.ceil(u/q);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%u));C=q*Math.ceil(b/q);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<q;l++)D.putByte(C.at(l%m));var Y=Math.ceil(u/q)+Math.ceil(b/q),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(q)),
466 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
467 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
468 +b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
469 +{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"}]},k={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",
470 +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,
471 +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"}]}]},h={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"},
472 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var g=a.random.getBytesSync(d.saltSize),h=d.count,k=e.integerToDer(h),m;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,r;switch(d.algorithm){case "aes128":y=m=16;d=n["aes128-CBC"];r=a.aes.createEncryptionCipher;break;case "aes192":m=24;
473 +y=16;d=n["aes192-CBC"];r=a.aes.createEncryptionCipher;break;case "aes256":m=32;y=16;d=n["aes256-CBC"];r=a.aes.createEncryptionCipher;break;case "des":y=m=8;d=n.desCBC;r=a.des.createEncryptionCipher;break;default:throw g=Error("Cannot encrypt private key. Unknown encryption algorithm."),g.algorithm=d.algorithm,g;}var v=a.pkcs5.pbkdf2(c,g,h,m);c=a.random.getBytesSync(y);h=r(v);h.start(c);h.update(e.toDer(b));h.finish();b=h.output.getBytes();g=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
474 +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,
475 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)m=24,d=new a.util.ByteBuffer(g),v=l.pbe.generatePkcs12Key(c,d,1,h,m),c=l.pbe.generatePkcs12Key(c,d,2,h,m),h=a.des.createEncryptionCipher(v),h.start(c),h.update(e.toDer(b)),h.finish(),b=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,
476 +!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,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,g={},h=[];if(!e.validate(b,m,g,h))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=h,d;h=e.derToOid(g.encryptionOid);
477 +h=l.pbe.getCipher(h,g.encryptionParams,c);g=a.util.createBuffer(g.encryptedData);h.update(g);h.finish()&&(d=e.fromDer(h.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
478 +b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var g,h,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";h=16;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
479 +h=24;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";h=32;g=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";h=24;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";h=8;g=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
480 +g.substr(0,8),h);c=k(c);c.start(g);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(g).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,g=a.pem.decode(b)[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".'),
481 +d.headerType=d,d;if(g.procType&&"ENCRYPTED"===g.procType.type){var h,k;switch(g.dekInfo.algorithm){case "DES-CBC":h=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":h=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":h=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":h=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":h=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":h=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":h=
482 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":h=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+g.dekInfo.algorithm+'".'),d.algorithm=g.dekInfo.algorithm,d;}var m=a.util.hexToBytes(g.dekInfo.parameters);h=a.pbe.opensslDeriveBytes(c,m.substr(0,8),h);k=k(h);k.start(m);k.update(a.util.createBuffer(g.body));if(k.finish())d=k.output.getBytes();else return d}else d=
483 +g.body;d="ENCRYPTED PRIVATE KEY"===g.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,g,h){var k,l;if("undefined"===typeof h||null===h)h=a.md.sha1.create();var m=h.digestLength,r=h.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var q=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,r);
484 +var C=r*Math.ceil(q/r);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%q));C=r*Math.ceil(b/r);c=new a.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=new a.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();var D=new a.util.ByteBuffer;for(l=0;l<r;l++)D.putByte(C.at(l%m));var Y=Math.ceil(q/r)+Math.ceil(b/r),L=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(r)),
485 V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);L.putBuffer(ea)}v=L;n.putBuffer(C)}n.truncate(n.length()-g);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
486 -"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var e={};b=[];if(!g.validate(c,k,e,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=g.derToOid(e.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=g.derToOid(e.encOid);if(b!==l.oids["aes128-CBC"]&&
487 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=e.kdfSalt;var m=a.util.createBuffer(e.kdfIterationCount),m=m.getInt(m.length()<<3),q;switch(l.oids[b]){case "aes128-CBC":q=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":q=24;h=a.aes.createDecryptionCipher;break;
488 -case "aes256-CBC":q=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":q=24;h=a.des.createDecryptionCipher;break;case "desCBC":q=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,q);e=e.encIv;h=h(b);h.start(e);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var e={},k=[];if(!g.validate(c,h,e,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(e.salt),e=a.util.createBuffer(e.iterations),
489 -e=e.getInt(e.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,e,m);d=l.pbe.generatePkcs12Key(d,k,2,e,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
490 -typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
491 -0;l<g.length;++l)g[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
492 -a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var g={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
486 +"pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var g={};b=[];if(!e.validate(c,k,g,b)){var h=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");h.errors=b;throw h;}b=e.derToOid(g.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw h=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),h.oid=b,h.supportedOids=["pkcs5PBKDF2"],h;b=e.derToOid(g.encOid);if(b!==l.oids["aes128-CBC"]&&
487 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw h=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),h.oid=b,h.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],h;c=g.kdfSalt;var m=a.util.createBuffer(g.kdfIterationCount),m=m.getInt(m.length()<<3),r;switch(l.oids[b]){case "aes128-CBC":r=16;h=a.aes.createDecryptionCipher;break;case "aes192-CBC":r=24;h=a.aes.createDecryptionCipher;break;
488 +case "aes256-CBC":r=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":r=24;h=a.des.createDecryptionCipher;break;case "desCBC":r=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,r);g=g.encIv;h=h(b);h.start(g);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
489 +g=g.getInt(g.length()<<3),m;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:m=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:m=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}m=l.pbe.generatePkcs12Key(d,k,1,g,m);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(m,d)};l.pbe.opensslDeriveBytes=function(b,d,e,g){if("undefined"===
490 +typeof g||null===g)g=a.md.md5.create();null===d&&(d="");for(var h=[c(g,b+d)],k=16,l=1;k<e;++l,k+=16)h.push(c(g,h[l-1]+b+d));return h.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
491 +0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
492 +a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
493 tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",
494 -tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(g)};d.encryptedDataValidator={name:"EncryptedData",
495 -tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(g)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
494 +tagClass:c.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};d.envelopedDataValidator={name:"EnvelopedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(e)};d.encryptedDataValidator={name:"EncryptedData",
495 +tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"}].concat(e)};d.signedDataValidator={name:"SignedData",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,constructed:!0,
496 captureAsn1:"digestAlgorithms"},a,{name:"SignedData.Certificates",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:c.Class.UNIVERSAL,type:c.Type.SET,capture:"signerInfos",optional:!0,value:[{name:"SignerInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:c.Class.UNIVERSAL,
497 type:c.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
498 value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,
499 constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:c.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]}]}]};d.recipientInfoValidator={name:"RecipientInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,
500 constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:c.Class.UNIVERSAL,type:c.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,
501 -value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
502 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
503 -["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var g=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());g.putBuffer(b.digest())}g.truncate(g.length()-d);return g.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
504 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
505 -Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
506 -{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<g.length;++l)g[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
507 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,g=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,x=Math.ceil(v/8),A=b.digest().getBytes();
508 -if(x<g+m+2)throw Error("Message is too long to encrypt.");var y;y=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(A);n.putBytes(y);c.start();c.update(n.getBytes());A=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-g-2);n.putByte(1);n.putBytes(y);var R=n.getBytes(),z=x-g-1,E=d.generate(A,z);y="";for(n=0;n<z;n++)y+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;y=String.fromCharCode(y.charCodeAt(0)&~v)+y.substr(1);
509 -return y+A+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<g+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-g-1,v=k.substr(0,n);k=k.substr(n,g);var y=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&y))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),z="";for(q=0;q<n;q++)z+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
510 -z=String.fromCharCode(z.charCodeAt(0)&~y)+z.substr(1);l=l-g-m-2;for(q=0;q<l;q++)if(0!==z.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==z.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=z.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,
511 -module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
501 +value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:c.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:c.Class.UNIVERSAL,type:c.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
502 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7asn1)return c.pkcs7asn1;c.defined.pkcs7asn1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs7asn1",
503 +["require","module","./asn1","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};(a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(b){return{generate:function(c,d){for(var e=new a.util.ByteBuffer,l=Math.ceil(d/b.digestLength),m=0;m<l;m++){var k=new a.util.ByteBuffer;k.putInt32(m);b.start();b.update(c+k.getBytes());e.putBuffer(b.digest())}e.truncate(e.length()-d);return e.getBytes()}}}}if("function"!==typeof a)if("object"===typeof module&&
504 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
505 +Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
506 +{};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
507 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,r){var n,v=r-1,x=Math.ceil(v/8),z=b.digest().getBytes();
508 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
509 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var r;r=l-1;l=Math.ceil(r/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-r&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(r=0;r<n;r++)y+=String.fromCharCode(v.charCodeAt(r)^R.charCodeAt(r));
510 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(r=0;r<l;r++)if(0!==y.charCodeAt(r))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
511 +module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
512 ["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
513 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function g(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
514 -v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===r.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
513 +var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
514 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
515 typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
516 (e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
517 -"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in r?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
517 +"pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
518 d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
519 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
520 -d.extension=b,d;return b}function n(a,b){switch(a){case r["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
520 +d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
521 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
522 !1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
523 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},r=h.oids,v={};v.CN=r.commonName;v.commonName="CN";v.C=r.countryName;v.countryName="C";v.L=r.localityName;v.localityName="L";v.ST=r.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=r.organizationName;v.organizationName="O";v.OU=r.organizationalUnitName;v.organizationalUnitName="OU";v.E=r.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
523 +h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var B=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
524 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
525 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
526 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
527 {name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},B,{name:"Certificate.TBSCertificate.issuerUniqueID",
528 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
529 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
530 -{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},A={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
530 +{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
531 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
532 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
533 -tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},y={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
533 +tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
534 tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},B,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
535 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
536 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in r&&(g.name=r[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
537 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in r&&(p.name=r[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===r.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==r["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:r.sha1},mgf:{algorithmOid:r.mgf1,hash:{algorithmOid:r.sha1}},
538 -saltLength:20});c={};a=[];if(!k.validate(b,A,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
536 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
537 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var p={};p.type=e;p.value=d[g].value;p.valueTagClass=d[g].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(h.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
538 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
539 b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
540 return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
541 body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
542 break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
543 c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
544 -null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){g([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){g(a);
545 -b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){g(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
546 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
547 -e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in r)switch(r[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
548 -e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case r.sha1WithRSAEncryption:l=void 0;break;case r["RSASSA-PSS"]:d=r[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=r[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
549 -e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=r[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
550 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=r.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
551 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,x,e,l))throw e=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),e.errors=l,e;if("string"!==typeof e.certSignature){for(var l="\x00",m=0;m<e.certSignature.length;++m)l+=k.toDer(e.certSignature[m]).getBytes();e.certSignature=l}var l=k.derToOid(e.publicKeyOid),y=h.createCertificate();y.version=e.certVersion?e.certVersion.charCodeAt(0):
552 -0;m=a.util.createBuffer(e.certSerialNumber);y.serialNumber=m.toHex();y.signatureOid=a.asn1.derToOid(e.certSignatureOid);y.signatureParameters=R(y.signatureOid,e.certSignatureParams,!0);y.siginfo.algorithmOid=a.asn1.derToOid(e.certinfoSignatureOid);y.siginfo.parameters=R(y.siginfo.algorithmOid,e.certinfoSignatureParams,!1);m=a.util.createBuffer(e.certSignature);++m.read;y.signature=m.getBytes();m=[];void 0!==e.certValidity1UTCTime&&m.push(k.utcTimeToDate(e.certValidity1UTCTime));void 0!==e.certValidity2GeneralizedTime&&
553 -m.push(k.generalizedTimeToDate(e.certValidity2GeneralizedTime));void 0!==e.certValidity3UTCTime&&m.push(k.utcTimeToDate(e.certValidity3UTCTime));void 0!==e.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(e.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
554 -y.validity.notBefore=m[0];y.validity.notAfter=m[1];y.tbsCertificate=e.tbsCertificate;if(d){y.md=null;if(y.signatureOid in r)switch(l=r[y.signatureOid],l){case "sha1WithRSAEncryption":y.md=a.md.sha1.create();break;case "md5WithRSAEncryption":y.md=a.md.md5.create();break;case "sha256WithRSAEncryption":y.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":y.md=a.md.sha512.create();break;case "RSASSA-PSS":y.md=a.md.sha256.create()}if(null===y.md)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
555 -e.signatureOid=y.signatureOid,e;m=k.toDer(y.tbsCertificate);y.md.update(m.getBytes())}m=a.md.sha1.create();y.issuer.getField=function(a){return c(y.issuer,a)};y.issuer.addField=function(a){g([a]);y.issuer.attributes.push(a)};y.issuer.attributes=h.RDNAttributesAsArray(e.certIssuer,m);e.certIssuerUniqueId&&(y.issuer.uniqueId=e.certIssuerUniqueId);y.issuer.hash=m.digest().toHex();m=a.md.sha1.create();y.subject.getField=function(a){return c(y.subject,a)};y.subject.addField=function(a){g([a]);y.subject.attributes.push(a)};
556 -y.subject.attributes=h.RDNAttributesAsArray(e.certSubject,m);e.certSubjectUniqueId&&(y.subject.uniqueId=e.certSubjectUniqueId);y.subject.hash=m.digest().toHex();y.extensions=e.certExtensions?h.certificateExtensionsFromAsn1(e.certExtensions):[];l===h.oids.rsaEncryption&&(y.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo));return y};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
557 -return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in r)if(c.name=r[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
544 +null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
545 +b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
546 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
547 +e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
548 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
549 +e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
550 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
551 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),q=h.createCertificate();q.version=g.certVersion?g.certVersion.charCodeAt(0):
552 +0;m=a.util.createBuffer(g.certSerialNumber);q.serialNumber=m.toHex();q.signatureOid=a.asn1.derToOid(g.certSignatureOid);q.signatureParameters=R(q.signatureOid,g.certSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;q.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
553 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
554 +q.validity.notBefore=m[0];q.validity.notAfter=m[1];q.tbsCertificate=g.tbsCertificate;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===q.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
555 +g.signatureOid=q.signatureOid,g;m=k.toDer(q.tbsCertificate);q.md.update(m.getBytes())}m=a.md.sha1.create();q.issuer.getField=function(a){return c(q.issuer,a)};q.issuer.addField=function(a){e([a]);q.issuer.attributes.push(a)};q.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(q.issuer.uniqueId=g.certIssuerUniqueId);q.issuer.hash=m.digest().toHex();m=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};
556 +q.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(q.subject.uniqueId=g.certSubjectUniqueId);q.subject.hash=m.digest().toHex();q.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return q};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
557 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
558 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
559 -k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in r?c[r[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
560 -g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var e={},l=[];if(!k.validate(b,y,e,l))throw e=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),e.errors=l,e;if("string"!==typeof e.csrSignature){for(var l=
561 -"\x00",m=0;m<e.csrSignature.length;++m)l+=k.toDer(e.csrSignature[m]).getBytes();e.csrSignature=l}l=k.derToOid(e.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var u=h.createCertificationRequest();u.version=e.csrVersion?e.csrVersion.charCodeAt(0):0;u.signatureOid=a.asn1.derToOid(e.csrSignatureOid);u.signatureParameters=R(u.signatureOid,e.csrSignatureParams,!0);u.siginfo.algorithmOid=a.asn1.derToOid(e.csrSignatureOid);u.siginfo.parameters=R(u.siginfo.algorithmOid,
562 -e.csrSignatureParams,!1);l=a.util.createBuffer(e.csrSignature);++l.read;u.signature=l.getBytes();u.certificationRequestInfo=e.certificationRequestInfo;if(d){u.md=null;if(u.signatureOid in r)switch(l=r[u.signatureOid],l){case "sha1WithRSAEncryption":u.md=a.md.sha1.create();break;case "md5WithRSAEncryption":u.md=a.md.md5.create();break;case "sha256WithRSAEncryption":u.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":u.md=a.md.sha512.create();break;case "RSASSA-PSS":u.md=a.md.sha256.create()}if(null===
563 -u.md)throw e=Error("Could not compute certification request digest. Unknown signature OID."),e.signatureOid=u.signatureOid,e;l=k.toDer(u.certificationRequestInfo);u.md.update(l.getBytes())}l=a.md.sha1.create();u.subject.getField=function(a){return c(u.subject,a)};u.subject.addField=function(a){g([a]);u.subject.attributes.push(a)};u.subject.attributes=h.RDNAttributesAsArray(e.certificationRequestInfoSubject,l);u.subject.hash=l.digest().toHex();u.publicKey=h.publicKeyFromAsn1(e.subjectPublicKeyInfo);
564 -u.getAttribute=function(a){return c(u,a)};u.addAttribute=function(a){g([a]);u.attributes.push(a)};u.attributes=h.CRIAttributesAsArray(e.certificationRequestInfoAttributes||[]);return u};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){g([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
565 -null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){g([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){g(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){g(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
566 -e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in r)switch(r[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
567 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case r["RSASSA-PSS"]:c=r[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=r[b.signatureParameters.mgf.algorithmOid];
568 -if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=r[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
559 +k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
560 +g={type:d.type,value:d.value};c.altNames.push(g);switch(d.type){case 7:g.ip=a.util.bytesToIP(d.value);break;case 8:g.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
561 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var q=h.createCertificationRequest();q.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;q.signatureOid=a.asn1.derToOid(g.csrSignatureOid);q.signatureParameters=R(q.signatureOid,g.csrSignatureParams,!0);q.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);q.siginfo.parameters=R(q.siginfo.algorithmOid,
562 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;q.signature=l.getBytes();q.certificationRequestInfo=g.certificationRequestInfo;if(d){q.md=null;if(q.signatureOid in u)switch(l=u[q.signatureOid],l){case "sha1WithRSAEncryption":q.md=a.md.sha1.create();break;case "md5WithRSAEncryption":q.md=a.md.md5.create();break;case "sha256WithRSAEncryption":q.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":q.md=a.md.sha512.create();break;case "RSASSA-PSS":q.md=a.md.sha256.create()}if(null===
563 +q.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=q.signatureOid,g;l=k.toDer(q.certificationRequestInfo);q.md.update(l.getBytes())}l=a.md.sha1.create();q.subject.getField=function(a){return c(q.subject,a)};q.subject.addField=function(a){e([a]);q.subject.attributes.push(a)};q.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);q.subject.hash=l.digest().toHex();q.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
564 +q.getAttribute=function(a){return c(q,a)};q.addAttribute=function(a){e([a]);q.attributes.push(a)};q.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return q};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
565 +null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
566 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
567 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
568 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
569 h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
570 k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
571 !1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
572 return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
573 return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
574 -h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return g.certs[b.hash]||
575 -null}var g={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in g.certs?(c=g.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):g.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
576 -for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)g.addCertificate(b[l]);return g};h.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"};
577 -h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var q=c.shift(),y=null,r=!1;if(g<q.validity.notBefore||g>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:g};if(null===k){y=c[0]||b.getIssuer(q);null===y&&q.isIssuer(q)&&(r=!0,y=q);if(y){var n=y;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){y=n.shift();
578 -try{x=y.verify(q)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||y&&!r||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&y&&!q.isIssuer(y)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<q.extensions.length;++x){var w=q.extensions[x];!w.critical||w.name in n||(k=
579 -{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||y&&!r)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
580 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
581 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
582 -c.defined.x509=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
583 -[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function g(b,c,h,q){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
584 -for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],r,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},u=null,u=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(u.tagClass!==m.Class.UNIVERSAL||u.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");u=d(u).value;break;case k.oids.encryptedData:var A=q,x={},B=[];if(!m.validate(u,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
585 -b.errors=B,b;u=m.derToOid(x.contentType);if(u!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=u,b;u=m.derToOid(x.encAlgorithm);u=k.pbe.getCipher(u,x.encParameter,A);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);u.update(x);if(!u.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");u=u.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
586 -l(u,h,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var q,r,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
587 -k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:q=A;r=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
588 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(x,q,g,h))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=h,a;r()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
589 -a.pkcs12||{},r={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
590 -r,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
574 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
575 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
576 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.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"};
577 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var r=c.shift(),A=null,u=!1;if(g<r.validity.notBefore||g>r.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:r.validity.notBefore,notAfter:r.validity.notAfter,now:g};if(null===k){A=c[0]||b.getIssuer(r);null===A&&r.isIssuer(r)&&(u=!0,A=r);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
578 +try{x=A.verify(r)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(r)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&A&&!r.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<r.extensions.length;++x){var w=r.extensions[x];!w.critical||w.name in n||(k=
579 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=r.getExtension("basicConstraints"),r=r.getExtension("keyUsage"),null!==r&&(r.keyCertSign&&null!==l||(k={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:h.certificateError.bad_certificate})),
580 +null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==r&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));r=null===k?!0:k.error;l=d?d(r,m,e):r;if(!0===l)k=null;else{!0===r&&(k={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
581 +if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
582 +c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var g=
583 +[],h=0;h<a.length;h++)for(var p=0;p<a[h].safeBags.length;p++){var l=a[h].safeBags[p];if(void 0===e||l.type===e)null===b?g.push(l):void 0!==l.attributes[b]&&0<=l.attributes[b].indexOf(d)&&g.push(l)}return g}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,r){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
584 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},q=null,q=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(q.tagClass!==m.Class.UNIVERSAL||q.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");q=d(q).value;break;case k.oids.encryptedData:var z=r,x={},B=[];if(!m.validate(q,a.pkcs7.asn1.encryptedDataValidator,x,B))throw b=Error("Cannot read EncryptedContentInfo."),
585 +b.errors=B,b;q=m.derToOid(x.contentType);if(q!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=q,b;q=m.derToOid(x.encAlgorithm);q=k.pbe.getCipher(q,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);q.update(x);if(!q.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");q=q.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
586 +l(q,h,r);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.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 g={},h=[];if(!m.validate(a.value[e],B,g,h))throw a=Error("Cannot read SafeBag."),a.errors=h,a;var p={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);var r,u,x=g.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
587 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:r=z;u=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
588 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==r&&!m.validate(x,r,g,h))throw a=Error("Cannot read PKCS#12 "+r.name),a.errors=h,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var g=0;g<d.values.length;++g)b[k.oids[e]].push(d.values[g].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
589 +a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
590 +u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
591 tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},B={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
592 value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
593 -capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},A={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
594 -h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var r={};if(!m.validate(b,v,r,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:r.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
595 -(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==r.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=r.version.charCodeAt(0),l;if(m.derToOid(r.contentType)!==k.oids.data)throw l=
596 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(r.contentType),l;b=r.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(r.mac){var w=null,A=0,u=m.derToOid(r.macAlgorithm);switch(u){case k.oids.sha1:w=a.md.sha1.create();A=20;break;case k.oids.sha256:w=a.md.sha256.create();A=32;break;case k.oids.sha384:w=a.md.sha384.create();A=48;break;case k.oids.sha512:w=a.md.sha512.create();
597 -A=64;break;case k.oids.md5:w=a.md.md5.create(),A=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+u);var u=new a.util.ByteBuffer(r.macSalt),B="macIterations"in r?parseInt(a.util.bytesToHex(r.macIterations),16):1,A=h.generateKey(n,u,3,B,A,w),u=a.hmac.create();u.start(w,A);u.update(b.value);if(u.getMac().getBytes()!==r.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}g(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
598 -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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(q)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);q=[];null!==
599 -g&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
600 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));g=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],n=0;n<q.length;++n){c=q[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
601 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
593 +capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
594 +h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(x.safeContents,null,null,b.bagType));void 0!==e&&
595 +(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
596 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var w=null,z=0,q=m.derToOid(u.macAlgorithm);switch(q){case k.oids.sha1:w=a.md.sha1.create();z=20;break;case k.oids.sha256:w=a.md.sha256.create();z=32;break;case k.oids.sha384:w=a.md.sha384.create();z=48;break;case k.oids.sha512:w=a.md.sha512.create();
597 +z=64;break;case k.oids.md5:w=a.md.md5.create(),z=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+q);var q=new a.util.ByteBuffer(u.macSalt),B="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,z=h.generateKey(n,q,3,B,z,w),q=a.hmac.create();q.start(w,z);q.update(b.value);if(q.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
598 +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 g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var r=a.util.isArray(c)?c[0]:c;"string"===typeof r&&(r=k.certificateFromPem(r));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(r)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);r=[];null!==
599 +g&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&r.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
600 +0<r.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,r));g=[];r=[];null!==c&&(r=a.util.isArray(c)?c:[c]);for(var u=[],n=0;n<r.length;++n){c=r[n];"string"===typeof c&&(c=k.certificateFromPem(c));var x=0===n?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).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.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
601 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),x]);u.push(c)}0<u.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,u),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
602 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
603 [m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var v;e.useMac&&(g=a.md.sha1.create(),v=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,v,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),v=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
604 !0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,v.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
605 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
606 -n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
607 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var g=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
608 -g.headerType=b.type;throw g;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,g){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:g})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
609 -typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
605 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),v])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
606 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
607 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
608 +e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
609 +typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
610 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var g=a.util.createBuffer(),h=b.length>>1,l=h+(b.length&1),k=b.substr(0,l),l=b.substr(h,l);b=a.util.createBuffer();h=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);h.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
611 -for(var q=0;q<m;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
612 -a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},g=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
611 +for(var r=0;r<m;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),k.putBuffer(h.digest());h.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(r=0;r<c;++r)h.start(null,null),h.update(b.getBytes()),b.putBuffer(h.digest()),h.start(null,null),h.update(b.bytes()+d),l.putBuffer(h.digest());g.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return g},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
612 +a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(g){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
613 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
614 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
615 certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};m.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};m.CipherSuites={};m.getCipherSuite=function(a){var b=null,c;for(c in m.CipherSuites){var d=m.CipherSuites[c];if(d.id[0]===a.charCodeAt(0)&&d.id[1]===a.charCodeAt(1)){b=d;break}}return b};
@@ -620,41 +620,41 @@ send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protoco
620 b.session.compressionMethod=g?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.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,
621 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
622 (a.expect=B,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
623 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:z,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
623 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var g,e=1;e<m.SupportedVersions.length&&!(g=m.SupportedVersions[e],g.minor<=c.version.minor);++e);b.version={major:g.major,minor:g.minor};b.session.version=b.version}null!==d?(b.expect=O,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
624 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
625 !1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
626 -l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:z:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:z)):b.error(b,{message:e?"No server certificate provided.":
627 -"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=r;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
626 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
627 +"No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
628 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
629 try{var g=b.session.sp;g.pre_master_secret=d.decrypt(c);var h=b.session.clientHelloVersion;if(h.major!==g.pre_master_secret.charCodeAt(0)||h.minor!==g.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){g.pre_master_secret=a.random.getBytes(48)}b.expect=O;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
630 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
631 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(g){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=O;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
632 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
633 -return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=y;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
633 +return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
634 data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=B;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
635 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:H;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var g=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
636 e.putBuffer(b.session.sha1.digest());var h=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,h?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(g);b.session.sha1.update(g);if(b.session.resuming&&h||!b.session.resuming&&!h)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
637 -data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?A:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
637 +data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=h?z:N;b.handshaking=!1;++b.handshakes;b.peerCertificate=h?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
638 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
639 "Bad certificate.";break;case m.Alert.Description.unsupported_certificate:d="Unsupported certificate.";break;case m.Alert.Description.certificate_revoked:d="Certificate revoked.";break;case m.Alert.Description.certificate_expired:d="Certificate expired.";break;case m.Alert.Description.certificate_unknown:d="Certificate unknown.";break;case m.Alert.Description.illegal_parameter:d="Illegal parameter.";break;case m.Alert.Description.unknown_ca:d="Unknown certificate authority.";break;case m.Alert.Description.access_denied:d=
640 "Access denied.";break;case m.Alert.Description.decode_error:d="Decode error.";break;case m.Alert.Description.decrypt_error:d="Decrypt error.";break;case m.Alert.Description.export_restriction:d="Export restriction.";break;case m.Alert.Description.protocol_version:d="Unsupported protocol version.";break;case m.Alert.Description.insufficient_security:d="Insufficient security.";break;case m.Alert.Description.internal_error:d="Internal error.";break;case m.Alert.Description.user_canceled:d="User canceled.";
641 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt24();if(g>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var h=d.bytes(g+
642 4);d.read+=4;e in J[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(h),b.session.sha1.update(h)),J[b.entity][b.expect][e](b,c,g)):
643 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),g=d.getInt16(),d=d.getBytes(g);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||g>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
644 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,r=3,v=4,B=5,x=6,A=7,y=8,R=1,z=2,E=3,O=4,H=5,N=6,u=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];ea[m.ConnectionEnd.server]=[[u,P,F,u,L],[u,
645 -P,F,u,L],[u,P,F,u,L],[u,P,F,u,L],[T,P,u,u,L],[u,P,F,u,L],[u,P,F,Y,L],[u,P,F,u,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[u,u,m.handleServerHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,P,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,F,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,Y,L,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,L,u,u,u,u,u,u],
646 -[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[T,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];J[m.ConnectionEnd.server]=[[u,m.handleClientHello,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,P,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleClientKeyExchange,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m.handleCertificateVerify,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,
647 -u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,V],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u],[u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
644 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,B=5,x=6,z=7,A=8,R=1,y=2,E=3,O=4,H=5,N=6,q=m.handleUnexpected,T=m.handleChangeCipherSpec,P=m.handleAlert,F=m.handleHandshake,Y=m.handleApplicationData,L=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];ea[m.ConnectionEnd.server]=[[q,P,F,q,L],[q,
645 +P,F,q,L],[q,P,F,q,L],[q,P,F,q,L],[T,P,q,q,L],[q,P,F,q,L],[q,P,F,Y,L],[q,P,F,q,L]];var T=m.handleHelloRequest,P=m.handleCertificate,F=m.handleServerKeyExchange,Y=m.handleCertificateRequest,L=m.handleServerHelloDone,V=m.handleFinished,J=[];J[m.ConnectionEnd.client]=[[q,q,m.handleServerHello,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,P,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,F,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,Y,L,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,L,q,q,q,q,q,q],
646 +[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q],[T,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,q]];J[m.ConnectionEnd.server]=[[q,m.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,P,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.handleClientKeyExchange,q,q,q,q],[q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,m.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,
647 +q,q,q,q,q,q,q,q,q,q,q,q,q,q,q,V],[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]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,g=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;g&&(e+=2*b.fixed_iv_length);d=
648 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};g&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
649 cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
650 a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
651 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=g;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
651 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
652 }return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
653 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
654 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
653 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var g=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var h=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var r=a.util.createBuffer();
654 +n(r,2,k);n(l,2,r);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;g=k.length+1+2+4+28+2+g+1+h+l;h=a.util.createBuffer();h.putByte(m.HandshakeType.client_hello);h.putInt24(g);h.putByte(b.version.major);h.putByte(b.version.minor);h.putBytes(b.session.sp.client_random);n(h,1,a.util.createBuffer(k));n(h,2,c);n(h,1,d);0<l&&n(h,2,e);return h};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
655 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var g=
656 -null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(q.bytes(),!1));
657 -var y=a.util.createBuffer();n(y,3,q);e.putBuffer(y)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
656 +null,h=0;h<d.length;++h){var l=a.pem.decode(d[h])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var r=a.util.createBuffer(l.body);null===g&&(g=a.asn1.fromDer(r.bytes(),!1));
657 +var u=a.util.createBuffer();n(u,3,r);e.putBuffer(u)}d=a.pki.certificateFromAsn1(g);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(q){return b.error(b,{message:"Could not send certificate list.",cause:q,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
658 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
659 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(g){b.error(b,{message:"Could not get private key.",cause:g,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
660 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var g=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(g))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -676,199 +676,199 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_versio
676 alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_message}})),c.record.ready=!0));c=b}if(!h.fail&&null!==h.record&&h.record.ready)if(b=h.record,d=b.type-m.ContentType.change_cipher_spec,e=ea[h.entity][h.expect],d in e)e[d](h,b);else m.handleUnexpected(h,b)}return c};h.prepare=function(b){m.queue(h,m.createRecord(h,{type:m.ContentType.application_data,data:a.util.createBuffer(b)}));return m.flush(h)};h.prepareHeartbeatRequest=function(b,c){b instanceof a.util.ByteBuffer&&
677 (b=b.bytes());"undefined"===typeof c&&(c=b.length);h.expectedHeartbeatPayload=b;m.queue(h,m.createRecord(h,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_request,b,c)}));return m.flush(h)};h.close=function(a){if(!h.fail&&h.sessionCache&&h.session){var b={id:h.session.id,version:h.session.version,sp:h.session.sp};b.sp.keys=null;h.sessionCache.setSession(b.id,b)}if(h.open){h.open=!1;h.input.clear();if(h.isConnected||h.handshaking)h.isConnected=h.handshaking=!1,
678 m.queue(h,m.createAlert(h,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(h);h.closed(h)}h.reset(a)};return h};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
679 -return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<g.length;++l)g[l](c);return c.tls}},
680 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,g,l){g=g.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
681 -g?l.keys.server_write_key:l.keys.client_write_key),iv:g?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",g?l.keys.client_write_key:l.keys.server_write_key),iv:g?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var e=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
682 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(g)&&(b.fragment=k.output,b.length=b.fragment.length(),e=!0);return e}function g(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
683 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,q=a.random.getBytesSync(g),y=e.output.length();y>=g?(b.fragment=e.output.getBytes(y-g),q=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
684 -b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;y=a.hmac.create();y.start("SHA1",e);y.update(q);q=y.digest().getBytes();y.start(null,null);y.update(g);g=y.digest().getBytes();return q===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
679 +return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
680 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
681 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
682 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
683 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,r=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),r=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
684 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(r);r=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return r===g&&d}var m=a.tls;m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
685 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.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=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
686 -20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<g.length;++l)g[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
687 -typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
688 -a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
689 -function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<g.length;++l)g[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
690 -(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<q;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var g=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(g.getBytesSync(h)),
691 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));h-=q.length;0<h&&(q=a.util.fillString(String.fromCharCode(0),h)+q);h=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:h,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===
692 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<g.length;++l)g[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
693 -"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],g=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var g=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):g<=c[m.level].index&&
686 +20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
687 +typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
688 +a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
689 +function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
690 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,r=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<r;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),r;do r=(new d(a.util.bytesToHex(e.getBytesSync(h)),
691 +16)).mod(c.n);while(r.equals(d.ZERO));r=a.util.hexToBytes(r.toString(16));h-=r.length;0<h&&(r=a.util.fillString(String.fromCharCode(0),h)+r);h=c.encrypt(r,"NONE");r=b.generate(r,l);return{encapsulation:h,key:r}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
692 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
693 +"./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
694 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
695 a.log.logMessage({timestamp:new Date,level:b,category:c,message:d,arguments:e})}})(n[l]);a.log.makeLogger=function(b){b={flags:0,f:b};a.log.setLevel(b,"none");return b};a.log.setLevel=function(b,c){var d=!1;if(b&&!(b.flags&a.log.LEVEL_LOCKED))for(var e=0;e<a.log.levels.length;++e)if(c==a.log.levels[e]){b.level=c;d=!0;break}return d};a.log.lock=function(b,c){b.flags="undefined"===typeof c||c?b.flags|a.log.LEVEL_LOCKED:b.flags&~a.log.LEVEL_LOCKED};a.log.addLogger=function(a){d.push(a)};if("undefined"!==
696 -typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},g=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else g=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};g=a.log.makeLogger(g);a.log.setLevel(g,"debug");a.log.addLogger(g)}else console={log:function(){}};
697 -null!==g&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(g,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(g));a.log.consoleLogger=g}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
698 -c.defined.log=!0;for(var l=0;l<g.length;++l)g[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!r.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
699 -b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:r.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
700 -r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.encryptedContent.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]),r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function g(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
701 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.digestAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(r.create(r.Class.UNIVERSAL,
702 -r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.signatureAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]));c.value.push(r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=r.create(r.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
703 -r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?r.utcTimeToDate(e):r.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?r.create(r.Class.UNIVERSAL,r.Type.UTCTIME,!1,r.dateToUtcTime(e)):
704 -r.create(r.Class.UNIVERSAL,r.Type.GENERALIZEDTIME,!1,r.dateToGeneralizedTime(e))}return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[c])])}function m(b){return[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,
705 -r.Type.OCTETSTRING,!1,b.parameter.getBytes())]),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!r.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(r.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
706 -0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:r.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==r.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
696 +typeof console&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)var m={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},e=function(b,c){a.log.prepareStandard(c);var d=m[c.level],e=[c.standard],e=e.concat(c.arguments.slice());d.apply(console,e)};else e=function(b,c){a.log.prepareStandardFull(c);console.log(c.standardFull)};e=a.log.makeLogger(e);a.log.setLevel(e,"debug");a.log.addLogger(e)}else console={log:function(){}};
697 +null!==e&&(l=a.util.getQueryVariables(),"console.level"in l&&a.log.setLevel(e,l["console.level"].slice(-1)[0]),"console.lock"in l&&"true"==l["console.lock"].slice(-1)[0]&&a.log.lock(e));a.log.consoleLogger=e}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.log)return c.log;
698 +c.defined.log=!0;for(var l=0;l<e.length;++l)e[l](c);return c.log}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/log",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){var d={},e=[];if(!u.validate(b,v.asn1.recipientInfoValidator,d,e))throw b=Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo."),
699 +b.errors=e,b;return{version:d.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(d.issuer),serialNumber:a.util.createBuffer(d.serial).toHex(),encryptedContent:{algorithm:u.derToOid(d.encAlgorithm),parameter:d.encParameter.value,content:d.encKey}}}function d(b){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),
700 +u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.encryptedContent.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]),u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.encryptedContent.content)])}function e(a){for(var b=[],c=0;c<a.length;++c)b.push(d(a[c]));return b}function l(b){var c=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
701 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:b.issuer}),u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber))]),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.digestAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")])]);b.authenticatedAttributesAsn1&&c.value.push(b.authenticatedAttributesAsn1);c.value.push(u.create(u.Class.UNIVERSAL,
702 +u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.signatureAlgorithm).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.NULL,!1,"")]));c.value.push(u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.signature));if(0<b.unauthenticatedAttributes.length){for(var d=u.create(u.Class.CONTEXT_SPECIFIC,1,!0,[]),e=0;e<b.unauthenticatedAttributes.length;++e)d.values.push(n(b.unauthenticatedAttributes[e]));c.value.push(d)}return c}function n(b){var c;if(b.type===a.pki.oids.contentType)c=
703 +u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if(b.type===a.pki.oids.messageDigest)c=u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.value.bytes());else if(b.type===a.pki.oids.signingTime){c=new Date("Jan 1, 1950 00:00:00Z");var d=new Date("Jan 1, 2050 00:00:00Z"),e=b.value;if("string"===typeof e)var g=Date.parse(e),e=isNaN(g)?13===e.length?u.utcTimeToDate(e):u.generalizedTimeToDate(e):new Date(g);c=e>=c&&e<d?u.create(u.Class.UNIVERSAL,u.Type.UTCTIME,!1,u.dateToUtcTime(e)):
704 +u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
705 +u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
706 +0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
707 c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
708 -break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var r=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
709 -b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=r.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:r.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!r.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=r.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
708 +break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
709 +b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
710 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
711 -c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,
712 -r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(r.create(r.Class.UNIVERSAL,r.Type.SET,!0,b.signerInfos));return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),
711 +c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
712 +u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
713 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
714 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
715 -signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(r.create(r.Class.CONTEXT_SPECIFIC,
716 -0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(g).getBytes()),r.create(r.Class.UNIVERSAL,
717 -r.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=r.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=r.toDer(d);h.getByte();r.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
718 -}else{e.authenticatedAttributesAsn1=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=r.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
714 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var r=c[m];if(!l&&r.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&r.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
715 +signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
716 +0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
717 +u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
718 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var r=e.authenticatedAttributes[m];r.type===a.pki.oids.messageDigest?r.value=c[e.digestAlgorithm].digest():r.type!==a.pki.oids.signingTime||r.value||(r.value=k);h.value.push(n(r));e.authenticatedAttributesAsn1.value.push(n(r))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
719 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
720 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,
721 -!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(b.type).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(b.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,g(b.recipients)),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
720 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
721 +!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
722 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
723 }h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
724 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
725 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
726 -module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<g.length;++l)g[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
727 -Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function g(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
728 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=g(w.bytes()),b.truncate(b.length()-
729 -x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(g("\x00\x00\x00\x00",l)),x.putBuffer(g("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=g("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
730 -h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,g){g=g||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+g};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
731 -function(b,g){g=g||{};var l=g.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===g.encoding)return l=l.toHex(),g.delimiter?l.match(/.{2}/g).join(g.delimiter):l;if("binary"===g.encoding)return l.getBytes();if(g.encoding)throw Error('Unknown encoding "'+g.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
732 -(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<g.length;++l)g[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
733 -function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var g={};a.debug.set("forge.task","queues",g);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
726 +module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
727 +Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
728 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
729 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
730 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
731 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
732 +(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
733 +function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
734 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
735 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
736 -this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",g)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
736 +this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
737 (c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
738 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
739 this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
740 a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
741 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in g?0===g[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):g[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(g[b.type].shift(),0===g[b.type].length?delete g[b.type]:g[b.type][0].start()):a.log.error("forge.task",
742 -"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in g?g[a.type].push(b):(g[b.type]=[b],m(b))};a.task.cancel=function(a){a in g&&(g[a]=[g[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
743 -a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<g.length;++l)g[l](c);return c.task}},
744 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(g)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
745 -return}var g,v=function(a,b){b.exports=function(b){var c=g.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){g="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
741 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
742 +"[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
743 +a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
744 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
745 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("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(" "),
746 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});
747 -function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var g=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),g=g.substring(0,g.length-24),v=0;v<c.length;v++)if(g===c[v].DERKey||g==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
748 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),g=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(g,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
749 -var e=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,e,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,g){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,g)}
750 -function amtcert_createCertificate(b,c,a,d,g){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
751 -value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==g?g={name:"extKeyUsage",serverAuth:!0}:g.name="extKeyUsage",
752 -n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},g,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
753 -function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,g=b.length;d<g;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
747 +function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),e=e.substring(0,e.length-24),v=0;v<c.length;v++)if(e===c[v].DERKey||e==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
748 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),r=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(r).getBytes();
749 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
750 +function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
751 +value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
752 +n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
753 +function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,e=b.length;d<e;d++)a[d]=b.charCodeAt(d);return c}function _arrayBufferToString(b){var c="";b=new Uint8Array(b);for(var a=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);return c}function certCetAsn1Values(b,c){if("string"===typeof b&&0==b.indexOf("https://"))c.push(b);else if(Array.isArray(b))for(var a in b)certCetAsn1Values(b[a],c);else b&&"object"===typeof b&&certCetAsn1Values(b.value,c)}
754 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
755 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
756 -require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var g="";a.on("data",function(a){null!=g&&(g+=a.toString("binary"));5E5<g.length&&(g=null)});a.on("end",function(){certUrlCache[b]={data:btoa(g),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,g)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
757 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,e,k,m,q){var r=a[b++];q={};var u=0,B=0;if(0==r){if(2==h.bpp)for(e=0;e<m;e++)n(a[b++]+(a[b++]<<8),e);else for(e=0;e<m;e++)v(a[b++],e);g(h.spare,c,d)}else if(1==r)h.graymode?(r=a[b++],h.lowcolor&&(r<<=4),h.canvas.fillStyle="rgb("+r+","+r+","+r+")"):(r=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(r&224)+","+((r&28)<<3)+","+D((r&3)<<6):(r>>8&248)+","+(r>>3&252)+","+
758 -((r&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,e,k);else if(1<r&&17>r){k=4;B=15;if(2==h.bpp){for(e=0;e<r;e++)q[e]=a[b++]+(a[b++]<<8);2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)n(q[r>>e&B],u++)}else{for(e=0;e<r;e++)q[e]=a[b++];2==r?B=k=1:4>=r&&(k=2,B=3);for(;u<m&&b<a.byteLength;)for(r=a[b++],e=8-k;0<=e;e-=k)v(q[r>>e&B],u++)}g(h.spare,c,d)}else if(128==r){if(2==h.bpp)for(;u<m&&b<a.byteLength;){r=a[b++]+(a[b++]<<8);B=1;do B+=e=a[b++];while(255==e);if(0==
759 -h.rotation)p(r,u,B),u+=B;else for(;0<=--B;)n(r,u++)}else for(;u<m&&b<a.byteLength;){r=a[b++];B=1;do B+=e=a[b++];while(255==e);if(0==h.rotation)l(r,u,B),u+=B;else for(;0<=--B;)v(r,u++)}g(h.spare,c,d)}else if(129<r){if(2==h.bpp)for(e=0;e<r-128;e++)q[e]=a[b++]+(a[b++]<<8);else for(e=0;e<r-128;e++)q[e]=a[b++];for(;u<m&&b<a.byteLength;){B=1;e=a[b++];r=q[e%128];if(127<e){do B+=e=a[b++];while(255==e)}if(0==h.rotation)2==h.bpp?p(r,u,B):l(r,u,B),u+=B;else if(2==h.bpp)for(;0<=--B;)n(r,u++);else for(;0<=--B;)v(r,
760 -u++)}g(h.spare,c,d)}}function g(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
756 +require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
757 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,r){var u=a[b++];r={};var q=0,B=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
758 +((u&31)<<3))+")"),a=C(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;B=15;if(2==h.bpp){for(g=0;g<u;g++)r[g]=a[b++]+(a[b++]<<8);2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(r[u>>g&B],q++)}else{for(g=0;g<u;g++)r[g]=a[b++];2==u?B=k=1:4>=u&&(k=2,B=3);for(;q<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(r[u>>g&B],q++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;q<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);B=1;do B+=g=a[b++];while(255==g);if(0==
759 +h.rotation)p(u,q,B),q+=B;else for(;0<=--B;)n(u,q++)}else for(;q<m&&b<a.byteLength;){u=a[b++];B=1;do B+=g=a[b++];while(255==g);if(0==h.rotation)l(u,q,B),q+=B;else for(;0<=--B;)v(u,q++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)r[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)r[g]=a[b++];for(;q<m&&b<a.byteLength;){B=1;g=a[b++];u=r[g%128];if(127<g){do B+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?p(u,q,B):l(u,q,B),q+=B;else if(2==h.bpp)for(;0<=--B;)n(u,q++);else for(;0<=--B;)v(u,
760 +q++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
761 h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
762 b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
763 -1]=e,h.spare.data[b+2]=a,b+=4}function q(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function e(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
764 -2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):r[c.code];
765 -null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
766 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
767 -0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
768 -h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var e=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)e=12,h.state=1,h.parent&&delete h.parent.connectTime,
769 -h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)e=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){e=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;e=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
763 +1]=e,h.spare.data[b+2]=a,b+=4}function r(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
764 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];null!=c&&h.sendkey(c,
765 +a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);173==c&&(d=45);186==c&&
766 +(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=0;h.spareh2=0;
767 +h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=h.rwidth=
768 +h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
769 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
770 h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
771 0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
772 -50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);e=4;break;case 2:e=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)e=0;else if(b=l.getUint32(4)+8,c.byteLength<b)e=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
772 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
773 0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
774 -h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}e=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),e=l.getUint16(4),q=l.getUint16(6),p=e*q,r=l.getUint32(8);if(17>r){if(1>e||64<e||1>q||
775 -64<q)return console.log("Invalid tile size ("+e+","+q+"), disconnecting."),h.Stop();if(h.sparew!=e||h.spareh!=q){h.sparew=h.sparew2=e;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=e;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==r){h.canvas.canvas.width=h.rwidth=h.width=e;h.canvas.canvas.height=h.rheight=
776 -h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));e=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==r){r=12;e=12+p*h.bpp;if(h.acc.byteLength<e)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(r,!0),w),r+=2;else for(w=0;w<p;w++)v(h.acc[r++],w);g(h.spare,b,c)}else if(16==r){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
777 -16+w)break;r=16;if(5<w&&0==h.acc[r]&&l.getUint16(r+1,!0)==w-5)d(h.acc,r+5,b,c,e,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(r,r+w-0)))),0<l.length){for(var r=l,N=new Uint8Array(r.length),u=0,C=r.length;u<C;++u)N[u]=r.charCodeAt(u);d(N,0,b,c,e,q,p,l.length)}else console.log("Invalid deflate data");e=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==e)break;h.acc=e!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(e)):
774 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),r=l.getUint16(6),p=g*r,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>r||
775 +64<r)return console.log("Invalid tile size ("+g+","+r+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=r){h.sparew=h.sparew2=g;h.spareh=h.spareh2=r;if(1==h.rotation||3==h.rotation)h.sparew2=r,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var N=h.sparew2*h.spareh2<<2,w=3;w<N;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
776 +h.height=r;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
777 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,r,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,N=new Uint8Array(u.length),q=0,C=u.length;q<C;++q)N[q]=u.charCodeAt(q);d(N,0,b,c,g,r,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
778 null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
779 function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
780 -h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,C(0,0),w(0,0));h.width=h.canvas.canvas.width;
781 -h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var r={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
781 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
782 NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
783 F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
784 h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
785 h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var K=!1,B=!1;h.GrabMouseInput=function(){if(1!=K){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;K=!0}};h.UnGrabMouseInput=function(){if(0!=K){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;K=!1}};h.GrabKeyInput=function(){1!=B&&(document.onkeyup=
786 h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,B=!0)};h.UnGrabKeyInput=function(){0!=B&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,B=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
787 0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){h.ReverseMouseWheel&&(b*=-1);var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/
788 -Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,g=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-g[0])*d;h.my=(event.pageY-g[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=q(h.mx,h.my),h.my=e(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
788 +Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=r(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
789 h.mNagleTimer=null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=
790 -0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;
791 -a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,g="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?g:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");
792 -a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&
793 -a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var g=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<g&&0!=a.State)for(a.PendingOperations.push([g,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];
794 -if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&
795 -255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),g=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),n=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,n,b,e,g,n,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);
796 -a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();
797 -if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,e=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,
798 -4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),e=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+
799 -q+" Y="+e);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,e);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,e);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,
800 -4));break;case 11:c=0;q={};e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<e)for(c=((b.charCodeAt(6+2*e)&255)<<8)+(b.charCodeAt(7+2*e)&255),n=0;n<e;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,
801 -4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);g=v[b];d&&(a.CanvasId.style.cursor=g)}return w+D}}};a.MouseButton=
802 -{NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,
803 -Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?
804 -d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,
805 -a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,
806 -67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,g;for(g in a.TouchArray)g==b?e=c:1==a.TouchArray[g].f?(e=65542,a.TouchArray[g].f=3):e=2==a.TouchArray[g].f?262144:131078,d+=String.fromCharCode(g)+a.intToStr(e)+a.shortToStr(a.TouchArray[g].x)+a.shortToStr(a.TouchArray[g].y),2==a.TouchArray[g].f&&
807 -delete a.TouchArray[g];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,g=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-g[0])*e,d=(c.pageY-
808 -g[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var n=g=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?g=a.MouseButton.LEFT:2==c.which?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT:c.button&&(0==c.button?g=a.MouseButton.LEFT:1==c.button?g=a.MouseButton.MIDDLE:g=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?n=-120*c.detail:c.wheelDelta&&(n=3*c.wheelDelta));var v="",v=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,
809 -a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,n/256&255,n&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?g:2*g&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(v),a.Alternate=1):a.Alternate=0:a.send(v)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",
810 -b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,
811 -a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&
812 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&
813 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&
814 -(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&
815 -a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};
816 -a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,g=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]=
817 -{x:e,y:g});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
818 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<
819 -b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/
820 -a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=
821 -a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
822 -null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=
823 -null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;
824 -if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||
825 -3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,
826 -0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};
827 -a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;
828 -d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var g=new FileReader,v=!1,n=[];g.readAsBinaryString?g.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:g.readAsBinaryString(new Blob([n.shift()]))}:g.readAsArrayBuffer&&(g.onloadend=function(a){d.xxOnSocketData(a.target.result);
829 -0==n.length?v=!1:g.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(g.readAsBinaryString)v=!0,g.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,g.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=
830 -function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=
831 -a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");
832 -d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(u[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<
833 -b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){y[m][D]=a;A[m][D]=(e<<6)+(C<<12)+q}function g(){for(var a=(e<<6)+(C<<12)+q,b=D;b<l.width;b++)y[m][b]=" ",A[m][b]=a}function v(a){for(var b=(e<<6)+(C<<12)+q,c=0;c<l.width;c++)y[a][c]=" ",A[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)y[b]=y[b+a],A[b]=A[b+a];for(b=E[1]-a+1;b<=
834 -E[1];b++)for(y[b]=[],A[b]=[],a=0;a<l.width;a++)y[b][a]=" ",A[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,e=7,C=0,w=!0,D=0,m=0,k=0,h=0,r=0,K=[],B=0,x=0,A=[],y=[],R=!1,z=!0,E,O=!1,H=[],
835 -N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){y[c]=[];A[c]=[];for(var d=0;d<l.width;d++)y[c][d]=" ",A[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=
836 -decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(r){case 0:switch(n){case 27:r=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":r=2;break;case "(":r=4;break;case ")":r=5;break;case "]":r=6;break;case "=":O=!0;r=0;break;case ">":O=!1;r=0;break;case "7":k=D;h=m;r=0;break;case "8":D=k;m=h;r=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var u=0;u<l.width;u++)y[n][u]=y[n-1][u],A[n][u]=A[n-1][u];for(n=
837 -E[0]+1-1;n>E[0]-1;n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;r=0;break;default:console.log("unknown terminal short code",p),r=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,u=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(z=!1);break;case "h":25==n[0]&&(z=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==u&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==
838 -u&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==u&&(0==n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==u&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==u&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==u&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==u&&(p=n[0]);for(J=D;J<l.width-p;J++)y[m][J]=y[m][J+p],A[m][J]=A[m][J+p];for(J=l.width-p;J<l.width;J++)y[m][J]=" ",A[m][J]=448;break;case "L":J=1;1==u&&(J=n[0]);0==J&&(J=1);
839 -for(n=E[1];n>=m+J;n--)y[n]=y[n-J],A[n]=A[n-J];for(n=m;n<m+J;n++)for(y[n]=[],A[n]=[],p=0;p<l.width;p++)y[n][p]=" ",A[n][p]=448;break;case "J":if(1==u&&2==n[0])l.TermClear((C<<12)+(e<<6)),m=D=0,H=[];else if(0==u||1==u&&0==n[0])for(g(),J=m+1;J<l.height;J++)v(J);else if(1==u&&1==n[0])for(g(),J=0;J<m-1;J++)v(J);break;case "H":2==u?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<u;J++)n[J]&&0!=n[J]?1==n[J]?
840 -8>e&&(e+=8):2==n[J]||22==n[J]?8<=e&&(e-=8):7==n[J]?q=2:27==n[J]?q=0:30<=n[J]&&37>=n[J]?(p=8<=e,e=n[J]-30,p&&8>=e&&(e+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?e=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,e=7,q=0);break;case "K":if(0!=u&&(1!=u||n[0]&&0!=n[0])){if(1==u)if(1==n[0])for(n=(e<<6)+(C<<12)+q,u=0;u<D;u++)y[m][u]=" ",A[m][u]=n;else 2==n[0]&&v(m)}else g();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==u&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-
841 -1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=E[1]);break;case "S":p=1;1==u&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "M":p=1;1==u&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(u=0;u<l.width;u++)y[n][u]=y[n+p][u],A[n][u]=A[n+p][u];for(n=E[1]-p+1;n<E[1];n++)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "T":p=1;1==u&&(p=n[0]);for(n=E[1];n>E[0]+
842 -p;n--)for(u=0;u<l.width;u++)y[n][u]=y[n-p][u],A[n][u]=A[n-p][u];for(n=E[0]+p;n>E[0];n--)for(u=0;u<l.width;u++)y[n][u]=" ",A[n][u]=448;break;case "X":p=1;J=D;R=m;for(1==u&&(p=n[0]);0<p&&R<l.height;)y[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}r=0}break;case 4:r=0;break;case 5:r=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(u=parseInt(n[0]),(0==u||2==u)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,
843 -l.title=n[1]);r=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var u=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
844 -9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,
845 -9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)y[b][c]=" ",A[b][c]=a;H=[]};l.TermResetScreen=function(){q=0;e=7;C=0;w=z=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);
846 -N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};
847 -l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,
848 -79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,
849 -91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;
850 -var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
851 -a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=A[b][h],D==h&&m==b&&z&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=y[b][h],d){case "&":a+="&amp;";
790 +0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=
791 +700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
792 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
793 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
794 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
795 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
796 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
797 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,r=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
798 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),r=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+r+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
799 +a.ProcessPictureMsg(c,r,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(r,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;r={};g=((b.charCodeAt(4)&255)<<8)+
800 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);r[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,r,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
801 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
802 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
803 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&
804 +7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==
805 +a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&
806 +a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+
807 +a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
808 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
809 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
810 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
811 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
812 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
813 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
814 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
815 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
816 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
817 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
818 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
819 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
820 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
821 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
822 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
823 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
824 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
825 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
826 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
827 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
828 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
829 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
830 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
831 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
832 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(q[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
833 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(C<<12)+r}function e(){for(var a=(g<<6)+(C<<12)+r,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(C<<12)+r,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
834 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),r=0,g=7,C=0,w=!0,D=0,m=0,k=0,h=0,u=0,K=[],B=0,x=0,z=[],A=[],R=!1,y=!0,E,O=!1,H=[],N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
835 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=
836 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":O=!0;u=0;break;case ">":O=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var q=0;q<l.width;q++)A[n][q]=A[n-1][q],z[n][q]=z[n-1][q];for(n=E[0]+1-1;n>E[0]-1;n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;u=0;break;
837 +default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,q=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==q&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==q&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==q&&(0==
838 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==q&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==q&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==q&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==q&&(p=n[0]);for(J=D;J<l.width-p;J++)A[m][J]=A[m][J+p],z[m][J]=z[m][J+p];for(J=l.width-p;J<l.width;J++)A[m][J]=" ",z[m][J]=448;break;case "L":J=1;1==q&&(J=n[0]);0==J&&(J=1);for(n=E[1];n>=m+J;n--)A[n]=A[n-J],z[n]=z[n-J];for(n=m;n<m+J;n++)for(A[n]=[],
839 +z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==q&&2==n[0])l.TermClear((C<<12)+(g<<6)),m=D=0,H=[];else if(0==q||1==q&&0==n[0])for(e(),J=m+1;J<l.height;J++)v(J);else if(1==q&&1==n[0])for(e(),J=0;J<m-1;J++)v(J);break;case "H":2==q?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<q;J++)n[J]&&0!=n[J]?1==n[J]?8>g&&(g+=8):2==n[J]||22==n[J]?8<=g&&(g-=8):7==n[J]?r=2:27==n[J]?r=0:30<=n[J]&&
840 +37>=n[J]?(p=8<=g,g=n[J]-30,p&&8>=g&&(g+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?g=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,g=7,r=0);break;case "K":if(0!=q&&(1!=q||n[0]&&0!=n[0])){if(1==q)if(1==n[0])for(n=(g<<6)+(C<<12)+r,q=0;q<D;q++)A[m][q]=" ",z[m][q]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==q&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
841 +E[1]);break;case "S":p=1;1==q&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "M":p=1;1==q&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "T":p=1;1==q&&(p=n[0]);for(n=E[1];n>E[0]+p;n--)for(q=0;q<l.width;q++)A[n][q]=A[n-p][q],z[n][q]=z[n-p][q];for(n=
842 +E[0]+p;n>E[0];n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "X":p=1;J=D;R=m;for(1==q&&(p=n[0]);0<p&&R<l.height;)A[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(q=parseInt(n[0]),(0==q||2==q)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=
843 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var q=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
844 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
845 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;H=[]};l.TermResetScreen=function(){r=0;g=7;C=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
846 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
847 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
848 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
849 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
850 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
851 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
852 break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<H.length&&(H=H.slice(H.length-800));c=H.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
853 l.Init();return l},ZLIB=ZLIB||{};
854 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
855 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
856 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,x,A,B,D,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=A=1;15>=p;p++)if(A<<=1,A-=M[p],0>A)return-1;if(0<A&&(0==
857 -b||1!=v))return a.next=c,-1;x[1]=0;for(p=1;15>p;p++)x[p+1]=x[p]+M[p];for(q=0;q<n;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=r,fa=K,ga=ca=0,U=-1}q=D=0;p=d;S=c;n=w;x=0;W=-1;B=1<<w;I=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){G={op:0,bits:p-x,val:0};e[q]<U?G.val=e[q]:e[q]>U?(G.op=fa[ga+e[q]],G.val=Z[ca+e[q]]):G.op=96;A=1<<p-x;d=C=1<<n;do C-=A,m[S+(D>>>x)+C]=G;while(0!=C);for(A=1<<p-1;D&A;)A>>>=1;
858 -0!=A?(D&=A-1,D+=A):D=0;q++;if(0==--M[p]){if(p==v)break;p=g[l+e[q]]}if(p>w&&(D&I)!=W){0==x&&(x=w);S+=d;n=p-x;for(A=1<<n;n+x<v;){A-=M[n+x];if(0>=A)break;n++;A<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=D&I;m[c+W]={op:n,bits:w,val:S-c}}}0!=D&&(m[S+D]={op:64,bits:p-x,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function g(){var a;this.total=this.check=
856 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,p;p=1==b?a.nlen:2==b?a.ndist:19;var n,r,v,w,x,z,D,B,C,W,I,G,S,Z,ca,fa,ga,U,M=Array(16);x=Array(16);for(n=0;15>=n;n++)M[n]=0;for(r=0;r<p;r++)M[g[l+r]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return G={op:64,bits:1,val:0},m[c++]=G,m[c++]=G,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(n=z=1;15>=n;n++)if(z<<=1,z-=M[n],0>z)return-1;if(0<z&&(0==
857 +b||1!=v))return a.next=c,-1;x[1]=0;for(n=1;15>n;n++)x[n+1]=x[n]+M[n];for(r=0;r<p;r++)0!=g[l+r]&&(e[x[g[l+r]]++]=r);switch(b){case 0:Z=fa=e;ga=ca=0;U=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;U=256;break;default:Z=u,fa=K,ga=ca=0,U=-1}r=B=0;n=d;S=c;p=w;x=0;W=-1;D=1<<w;I=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){G={op:0,bits:n-x,val:0};e[r]<U?G.val=e[r]:e[r]>U?(G.op=fa[ga+e[r]],G.val=Z[ca+e[r]]):G.op=96;z=1<<n-x;d=C=1<<p;do C-=z,m[S+(B>>>x)+C]=G;while(0!=C);for(z=1<<n-1;B&z;)z>>>=1;
858 +0!=z?(B&=z-1,B+=z):B=0;r++;if(0==--M[n]){if(n==v)break;n=g[l+e[r]]}if(n>w&&(B&I)!=W){0==x&&(x=w);S+=d;p=n-x;for(z=1<<p;p+x<v;){z-=M[p+x];if(0>=z)break;p++;z<<=1}D+=1<<p;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&I;m[c+W]={op:p,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:n-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
859 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
860 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function e(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function C(a,b){return a.hold&
861 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
860 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function r(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!r(a))return!1;return!0}function C(a,b){return a.hold&
861 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],K=[16,16,16,
862 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
863 -e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new g;ZLIB.inflateReset(b,
864 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,g,h,k,r,u=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);g={};n(a,g);h=g.have;k=g.left;
865 -P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!e(g,16))break a;if(d.wrap&2&&35615==g.hold){d.check=a.checksum_function(0,null,0,0);v(a,g.hold);p(g);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(g,8)<<8)+(g.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(g,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(g,4);u=C(g,4)+8;if(0==d.wbits)d.wbits=u;else if(u>d.wbits){a.msg="invalid window size";d.mode=
866 -29;break}d.dmax=1<<u;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=g.hold&512?9:11;p(g);break;case 1:if(!e(g,16))break a;d.flags=g.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=g.hold>>>8&1);d.flags&512&&v(a,g.hold);p(g);d.mode=2;case 2:if(!e(g,32))break a;null!==d.head&&(d.head.time=g.hold);d.flags&512&&(r=g.hold,a.state.check=a.checksum_function(a.state.check,
867 -[r&255,r>>>8&255,r>>>16&255,r>>>24&255],0,4));p(g);d.mode=3;case 3:if(!e(g,16))break a;null!==d.head&&(d.head.xflags=g.hold&255,d.head.os=g.hold>>>8);d.flags&512&&v(a,g.hold);p(g);d.mode=4;case 4:if(d.flags&1024){if(!e(g,16))break a;d.length=g.hold;null!==d.head&&(d.head.extra_len=g.hold);d.flags&512&&v(a,g.hold);p(g);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(r=d.length,r>g.have&&(r=g.have),r&&(null!==d.head&&null!==d.head.extra&&(u=d.head.extra_len-
868 -d.length,d.head.extra+=a.input_data.substring(g.next,g.next+(u+r>d.head.extra_max?d.head.extra_max-u:r))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r)),g.have-=r,g.next+=r,d.length-=r),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==g.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");r=0;do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=u,d.length++)}while(r<g.have);d.flags&
869 -512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==g.have)break a;r=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{u=a.input_data.charAt(g.next+r);r++;if("\x00"===u)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=u,d.length++)}while(r<g.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,g.next,r));g.have-=
870 -r;g.next+=r;if("\x00"!==u)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!e(g,16))break a;if(g.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(g)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!e(g,32))break a;a.adler=d.check=m(g.hold);p(g);d.mode=10;case 10:if(0==d.havedict)return l(g),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
871 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(g);d.mode=26;break}if(!e(g,3))break a;d.last=C(g,1);w(g,1);switch(C(g,2)){case 0:d.mode=13;break;case 1:r=d;u=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
863 +e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
864 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var B=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,q=-1,K=-1,P;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
865 +P=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((C(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(C(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);q=C(e,4)+8;if(0==d.wbits)d.wbits=q;else if(q>d.wbits){a.msg="invalid window size";d.mode=
866 +29;break}d.dmax=1<<q;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
867 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(q=d.head.extra_len-
868 +d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(q+u>d.head.extra_max?d.head.extra_max-q:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=q,d.length++)}while(u<e.have);d.flags&
869 +512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{q=a.input_data.charAt(e.next+u);u++;if("\x00"===q)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=q,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
870 +u;e.next+=u;if("\x00"!==q)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
871 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=C(e,1);w(e,1);switch(C(e,2)){case 0:d.mode=13;break;case 1:u=d;q=void 0;B||(B=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
872 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
873 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
874 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -891,28 +891,28 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
891 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
892 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
893 {op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
894 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);r.lencode=0;r.distcode=512;for(u=0;512>u;u++)r.codes[u]=B[u];for(u=0;32>u;u++)r.codes[u+512]=x[u];r.lenbits=9;r.distbits=5;
895 -d.mode=19;if(c==ZLIB.Z_TREES){w(g,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(g,2);break;case 13:D(g);if(!e(g,32))break a;if((g.hold&65535)!=(g.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=g.hold&65535;p(g);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(r=d.length){r>g.have&&(r=g.have);r>g.left&&(r=g.left);if(0==r)break a;a.output_data+=a.input_data.substring(g.next,g.next+r);a.next_out+=r;g.have-=
896 -r;g.next+=r;g.left-=r;d.length-=r;break}d.mode=11;break;case 16:if(!e(g,14))break a;d.nlen=C(g,5)+257;w(g,5);d.ndist=C(g,5)+1;w(g,5);d.ncode=C(g,4)+4;w(g,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!e(g,3))break a;r=C(g,3);d.lens[A[d.have++]]=r;w(g,3)}for(;19>d.have;)d.lens[A[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
897 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(16>r.val)w(g,r.bits),d.lens[d.have++]=r.val;else{if(16==r.val){if(!e(g,r.bits+2))break a;w(g,r.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}u=d.lens[d.have-1];r=3+C(g,2);w(g,2)}else if(17==r.val){if(!e(g,r.bits+3))break a;w(g,r.bits);u=0;r=3+C(g,3);w(g,3)}else{if(!e(g,r.bits+7))break a;w(g,r.bits);u=0;r=11+C(g,7);w(g,7)}if(d.have+r>d.nlen+d.ndist){a.msg=
898 -"invalid bit length repeat";d.mode=29;break}for(;r--;)d.lens[d.have++]=u}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=g.have&&258<=g.left){l(g);r=a;var F=K=u=void 0,Y=void 0,L=void 0,
899 -ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,u=r.state,K=r.input_data,F=r.next_in,Y=F+r.avail_in-5,L=r.next_out,ea=L-(k-r.avail_out),V=L+(r.avail_out-257),J=u.wsize,aa=u.whave,ba=u.wnext,W=u.window,I=u.hold,G=u.bits,S=u.codes,Z=u.lencode,ca=u.distcode,fa=(1<<u.lenbits)-1,ga=(1<<u.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
900 -G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)r.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
901 -u.sane){r.msg="invalid distance too far back";u.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,r.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)r.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);r.output_data+=r.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),X-=3;X&&(r.output_data+=r.output_data.charAt(U++),
902 -1<X&&(r.output_data+=r.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{r.msg="invalid distance code";u.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?u.mode=11:(r.msg="invalid literal/length code",u.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;r.next_in=F;r.next_out=L;r.avail_in=F<Y?5+(Y-F):5-(F-Y);r.avail_out=L<V?257+(V-L):257-(L-V);u.hold=I;u.bits=G;n(a,g);11==d.mode&&(d.back=-1);
903 -break}for(d.back=0;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(r.op&&0==(r.op&240)){for(u=r;;){r=d.codes[d.lencode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;d.length=r.val;if(0==r.op){d.mode=25;break}if(r.op&32){d.back=-1;d.mode=11;break}if(r.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=r.op&15;d.mode=21;case 21:if(d.extra){if(!e(g,d.extra))break a;
904 -d.length+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){r=d.codes[d.distcode+C(g,d.distbits)];if(r.bits<=g.bits)break;if(!q(g))break a}if(0==(r.op&240)){for(u=r;;){r=d.codes[d.distcode+u.val+(C(g,u.bits+u.op)>>>u.bits)];if(u.bits+r.bits<=g.bits)break;if(!q(g))break a}w(g,u.bits);d.back+=u.bits}w(g,r.bits);d.back+=r.bits;if(r.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=r.val;d.extra=r.op&15;d.mode=23;case 23:if(d.extra){if(!e(g,d.extra))break a;
905 -d.offset+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==g.left)break a;r=k-g.left;if(d.offset>r){r=d.offset-r;if(r>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}r>d.wnext?(r-=d.wnext,u=d.wsize-r):u=d.wnext-r;K=-1;r>d.length&&(r=d.length)}else u=-1,K=a.next_out-d.offset,r=d.length;r>g.left&&(r=g.left);g.left-=r;d.length-=r;if(0<=u)a.output_data+=d.window.substring(u,u+r),a.next_out+=r;else{a.next_out+=r;do a.output_data+=a.output_data.charAt(K++);while(--r)}0==
906 -d.length&&(d.mode=20);break;case 25:if(0==g.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;g.left--;d.mode=20;break;case 26:if(d.wrap){if(!e(g,32))break a;k-=g.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=g.left;if((d.flags?g.hold:m(g.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(g)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!e(g,32))break a;if(g.hold!=(d.total&4294967295)){a.msg="incorrect length check";
907 -d.mode=29;break}p(g)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(g);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))g=a.state,r=a.output_data.length,null===g.window&&(g.window=""),0==g.wsize&&(g.wsize=1<<g.wbits),g.window=r>=g.wsize?a.output_data.substring(r-g.wsize):g.whave+r<g.wsize?g.window+a.output_data:g.window.substring(g.whave-(g.wsize-r))+a.output_data,g.whave=g.window.length,
908 -g.wnext=g.whave<g.wsize?g.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
894 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(q=0;512>q;q++)u.codes[q]=B[q];for(q=0;32>q;q++)u.codes[q+512]=x[q];u.lenbits=9;u.distbits=5;
895 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
896 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=C(e,5)+257;w(e,5);d.ndist=C(e,5)+1;w(e,5);d.ncode=C(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=C(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
897 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}q=d.lens[d.have-1];u=3+C(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);q=0;u=3+C(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);q=0;u=11+C(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
898 +"invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=q}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(P=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(P=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var F=K=q=void 0,Y=void 0,L=void 0,
899 +ea=void 0,V=void 0,J=void 0,aa=void 0,ba=void 0,W=void 0,I=void 0,G=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,U=void 0,M=void 0,X=void 0,ha=void 0,da=-1,U=-1,q=u.state,K=u.input_data,F=u.next_in,Y=F+u.avail_in-5,L=u.next_out,ea=L-(k-u.avail_out),V=L+(u.avail_out-257),J=q.wsize,aa=q.whave,ba=q.wnext,W=q.window,I=q.hold,G=q.bits,S=q.codes,Z=q.lencode,ca=q.distcode,fa=(1<<q.lenbits)-1,ga=(1<<q.distbits)-1;b:do c:for(15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,
900 +G+=8),U=S[Z+(I&fa)];;){M=U.bits;I>>>=M;G-=M;M=U.op;if(0==M)u.output_data+=String.fromCharCode(U.val),L++;else if(M&16){X=U.val;if(M&=15)G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8),X+=I&(1<<M)-1,I>>>=M,G-=M;15>G&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,I+=(K.charCodeAt(F++)&255)<<G,G+=8);U=S[ca+(I&ga)];d:for(;;){M=U.bits;I>>>=M;G-=M;M=U.op;if(M&16){ha=U.val;M&=15;G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8,G<M&&(I+=(K.charCodeAt(F++)&255)<<G,G+=8));ha+=I&(1<<M)-1;I>>>=M;G-=M;M=L-ea;if(ha>M){M=ha-M;if(M>aa&&
901 +q.sane){u.msg="invalid distance too far back";q.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}else da=-1,U=L-ha;if(0<=da)u.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);u.output_data+=u.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),u.output_data+=u.output_data.charAt(U++),X-=3;X&&(u.output_data+=u.output_data.charAt(U++),
902 +1<X&&(u.output_data+=u.output_data.charAt(U++)))}}else if(0==(M&64)){U=S[ca+(U.val+(I&(1<<M)-1))];continue d}else{u.msg="invalid distance code";q.mode=29;break b}break d}}else if(0==(M&64)){U=S[Z+(U.val+(I&(1<<M)-1))];continue c}else{M&32?q.mode=11:(u.msg="invalid literal/length code",q.mode=29);break b}break c}while(F<Y&&L<V);X=G>>>3;F-=X;G-=X<<3;I&=(1<<G)-1;u.next_in=F;u.next_out=L;u.avail_in=F<Y?5+(Y-F):5-(F-Y);u.avail_out=L<V?257+(V-L):257-(L-V);q.hold=I;q.bits=G;n(a,e);11==d.mode&&(d.back=-1);
903 +break}for(d.back=0;;){u=d.codes[d.lencode+C(e,d.lenbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(u.op&&0==(u.op&240)){for(q=u;;){u=d.codes[d.lencode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
904 +d.length+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+C(e,d.distbits)];if(u.bits<=e.bits)break;if(!r(e))break a}if(0==(u.op&240)){for(q=u;;){u=d.codes[d.distcode+q.val+(C(e,q.bits+q.op)>>>q.bits)];if(q.bits+u.bits<=e.bits)break;if(!r(e))break a}w(e,q.bits);d.back+=q.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
905 +d.offset+=C(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,q=d.wsize-u):q=d.wnext-u;K=-1;u>d.length&&(u=d.length)}else q=-1,K=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=q)a.output_data+=d.window.substring(q,q+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(K++);while(--u)}0==
906 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
907 +d.mode=29;break}p(e)}d.mode=28;case 28:P=ZLIB.Z_STREAM_END;break a;case 29:P=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
908 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&P==ZLIB.Z_OK&&(P=ZLIB.Z_BUF_ERROR);return P};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
909 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
910 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
911 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
912 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
913 255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a;for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;a%=65521;n%=65521}return a|n<<16}function c(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b[c],65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),
914 a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b[c++],n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;while(--l);a%=65521;n%=65521}if(v){for(;16<=v;)v-=16,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=
915 -a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,g,v){return"string"===typeof d?b(a,d,g,v):c(a,d,g,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
915 +a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a;for(;v--;)a+=b[c++],n+=a;a%=65521;n%=65521}return a|n<<16}ZLIB.adler32=function(a,d,e,v){return"string"===typeof d?b(a,d,e,v):c(a,d,e,v)};ZLIB.adler32_combine=function(a,b,c){var v,n;if(0>c)return 4294967295;n=c%65521;c=a&65535;v=n*c%65521;c+=(b&65535)+65521-1;v+=(a>>16&65535)+(b>>16&65535)+65521-n;65521<=c&&(c-=65521);65521<=c&&(c-=
916 65521);131042<=v&&(v-=131042);65521<=v&&(v-=65521);return c|v<<16}})();"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-crc32.js");
917 (function(){function b(a,b){var c,n=0;for(c=0;b;)b&1&&(c^=a[n]),b>>=1,n++;return c}function c(a,c){var v;for(v=0;32>v;v++)a[v]=b(c,c[v])}var a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,
918 3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,
@@ -921,32 +921,32 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
921 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
922 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
923 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
924 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,g,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^g}})();
925 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),g=b.webkitRequestFileSystem,v=b.requestFileSystem||g||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
926 -b.chrome?c():setTimeout(c,500)},q=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(g){n(g)}}},e=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},C=function(n,m,k){k||(n=e(n));var h=this;k=n.type;var r=!1,w,B,x=function(){q(h,["writestart","progress","write","writeend"])},A=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
927 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(r||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},y=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},z;h.readyState=h.INIT;m||(m="download");if(a)w=
928 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(z=n.slice||n.webkitSlice,n=z.call(n,0,n.size,"application/octet-stream"),r=!0);g&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||g)B=b;v?(l+=n.size,v(b.TEMPORARY,l,y(function(a){a.root.getDirectory("saved",C,y(function(a){var b=function(){a.getFile(m,C,y(function(a){a.createWriter(y(function(b){b.onwriteend=
929 -function(b){B.location.href=a.toURL();h.readyState=h.DONE;q(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&A()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),A)}),A)};a.getFile(m,{create:!1},y(function(a){a.remove();b()}),y(function(a){a.code===a.NOT_FOUND_ERR?b():A()}))}),A)}),A)):A()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
930 -b,c){c||(a=e(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
924 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,r;if(0>=v)return a;p=Array(32);r=Array(32);r[0]=3988292384;for(n=l=1;32>n;n++)r[n]=l,l<<=1;c(p,r);c(r,p);do{c(p,r);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(r,p);v&1&&(a=b(r,a));v>>=1}while(0!=v);return a^e}})();
925 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
926 +b.chrome?c():setTimeout(c,500)},r=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(g){n(g)}}},g=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},C=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){r(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
927 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();p(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},C={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
928 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();p(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",C,A(function(a){var b=function(){a.getFile(m,C,A(function(a){a.createWriter(A(function(b){b.onwriteend=
929 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;r(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
930 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;r(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
931 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
932 -var version="0.9.3",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
932 +var version="0.9.7",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
933 null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>\u8f7d\u5165\u4e2d...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetAuth NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
934 StatusStrs=["\u65ad\u7ebf","\u6b63\u5728\u8fde\u7ebf...","\u8bbe\u5b9a...","\u8fde\u63a5\u7684"],t,t2,rsepass=null;
935 -function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
936 -applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR +\u4f4e\u9891":"\u5982\u679c";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
937 -haltEvent,!1);document.addEventListener("dragleave",haltEvent,!1);document.addEventListener("drop",documentFileSelectHandler,!1);Q("p16").addEventListener("dragover",haltEvent,!1);Q("p16").addEventListener("dragleave",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||QV("c6",!1);document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",
938 -p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
935 +function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(23).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
936 +urlvars.kvmenc&&(c=parseInt(urlvars.kvmenc),"number"==typeof c&&(desktopsettings.encflags=c));urlvars.kvmdec&&(c=parseInt(urlvars.kvmdec),"number"==typeof c&&(desktopsettings.decimationMode=c));applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(34).value=terminalEmulations[terminal.m.terminalEmulation];Q(31).value="\r\n"==terminal.m.lineFeed?"CR +\u4f4e\u9891":"\u5982\u679c";QE("c4",
937 +!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);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",haltEvent,!1);Q("p16").addEventListener("drop",cert_FileSelectHandler,!1);Q("Desk").toBlob||
938 +QV("c6",!1);document.onkeyup=handleKeyUp;document.onkeydown=handleKeyDown;document.onkeypress=handleKeyPress;window.onresize=center;center();Q("p24filetable").addEventListener("drop",p24fileDragDrop,!1);Q("p24filetable").addEventListener("dragover",p24fileDragOver,!1);Q("p24filetable").addEventListener("dragleave",p24fileDragLeave,!1)}
939 function documentFileSelectHandler(b){haltEvent(b);for(var c=!0,a=0;a<b.dataTransfer.files.length;a++)0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".img")&&0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".iso")&&(c=!1);1==c&&null!=b.dataTransfer&&0<currentView&&100>currentView&&(1==b.dataTransfer.files.length||2==b.dataTransfer.files.length)?(a=c=null,b.dataTransfer.files[0].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[0]),b.dataTransfer.files[0].name.toLowerCase().endsWith(".img")&&
940 (c=b.dataTransfer.files[0]),2==b.dataTransfer.files.length&&(b.dataTransfer.files[1].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[1]),b.dataTransfer.files[1].name.toLowerCase().endsWith(".img")&&(c=b.dataTransfer.files[1])),null==c&&null==a||iderStart3(c,a,1)):null!=b.dataTransfer&&1==b.dataTransfer.files.length&&(c=b.dataTransfer.files[0].name.toLowerCase(),21==currentView&&UploadToStorage(b.dataTransfer.files[0],c))}
941 function connectButtonfunction(){wsstack&&0!=wsstack.socketState?disconnect():meshcentral2credCallback()}function connectButtonfunctionEx(){currentMeshNode=parent.getCurrentNode();connect(currentMeshNode._id,16992,null,null,0);Q("xconnectbutton1").value="\u65ad\u5f00"}function getCurrentMeshNode(){return currentMeshNode}function setConnectionState(b){QE("xconnectbutton1",b);0==b&&disconnect()}function setFrameHeight(b){}function setAuthCallback(b){meshcentral2credCallback=b}
942 function setUrlVar(b,c){urlvars||(urlvars={});urlvars[b]=c}function cleanup(){c3.value="\u5f00\u59cb\u6355\u6349";terminal.m.capture&&delete terminal.m.capture;terminal.Stop();desktop.disconnectCode=0;desktop.Stop()}
943 -function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
944 -function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
945 -function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
946 -function connect(b,c,a,d,g,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,g);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(28,"");QH(39,"");amtversion=amtversionmin=amtFirstPull=
947 -0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(21,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(49,"");
948 -QH(50,LoadingHtml);xxCertificates=null;QH(51,LoadingHtml);QH(24,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(52,LoadingHtml);QH(54,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
949 -!1;QH(53,LoadingHtml);QE(43,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(48,!1),Q(48).checked=!0);QE(44,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
943 +function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
944 +function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
945 +function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(49).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
946 +function connect(b,c,a,d,e,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,e);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(29,"");QH(40,"");amtversion=amtversionmin=amtFirstPull=
947 +0;amtsysstate=amtdeltatime=amtlogicalelements=HardwareInventory=void 0;amtPowerBootCapabilities=null;xxAccountFetch=999;QH(15,LoadingHtml);QH(19,LoadingHtml);amtwirelessif=-1;xxWireless=void 0;QH(20,"");QH(16,LoadingHtml);xxAccountAdminName=null;xxAccountRealmInfo={};QH(22,LoadingHtml);eventmessages=null;QH(17,"");QH(18,LoadingHtml);auditLog=null;QH(50,"");
948 +QH(51,LoadingHtml);xxCertificates=null;QH(52,LoadingHtml);QH(25,"");iderStop();xxPolicies=xxMPSUserPass=xxRemoteAccessCredentiaLinks=xxUserInitiatedCira=xxCiraServers=xxEnvironementDetection=xxRemoteAccess=null;QH(53,LoadingHtml);QH(55,LoadingHtml);xxSystemDefense=null;xxSystemDefenceLinkedPolicy={};xxUpdatingDefenseStats=!1;xxFilterStatistics=[{},{}];xxFilterStatisticsTimer=null;xxFilterStatisticsTimerActive=
949 +!1;QH(54,LoadingHtml);QE(44,!1);QE("DeskWD",!1);QE("deskkeys",!1);urlvars.kvmviewonly&&(QE(49,!1),Q(49).checked=!0);QE(45,!1);desktopScreenInfo=null;amtstack.BatchEnum("",["CIM_SoftwareIdentity","*AMT_SetupAndConfigurationService"],processSystemVersion);QV(11,!1)}
950 function disconnect(){null!=desktopPollTimer&&(clearInterval(desktopPollTimer),desktopPollTimer=null);fullscreen&&deskToggleFull();iderStop();StopDefenseStatsTimer();dialogclose(0);amtstack&&(amtstack.onProcessChanged=null,amtstack.CancelAllQueries(999),amtstack=null);cleanup();wsstack=null;delete amtstack;onProcessChanged(0,1);go(101);Q("xconnectbutton1").value="\u8fde\u63a5";QH(5,"\u65ad\u7ebf");go(100)}
951 function onProcessChanged(b,c){QS(3).width=100*b/c+"%";0==b&&refreshButtons(!0);0==b&&amtstack&&(0<amtversion&&0==(amtFirstPull&64)?(amtFirstPull|=64,PullPowerPolicy(),subscriptionsFilters=null,PullEventSubscriptions(),PullWatchdog(),5<amtversion&&(PullCertificates(),PullRemoteAccess())):0==(amtFirstPull&1)?PullHardware():0==(amtFirstPull&16)?PullEventLog():0==(amtFirstPull&32)&&PullAuditLog())}
952 function checkAmtVersion(b){var c=b.split(".");b=parseInt(c[0]);var a=parseInt(c[1]),c=parseInt(c[2]),c=1E3*a+c,d=0;5>=b||12<=b?d=1:6==b&&2061<=c?d=1:7==b&&1091<=c?d=1:8==b&&1071<=c?d=1:9==b?5>a&&1041<=c?d=1:5061<=c&&(d=1):10==b&&55<=c?d=1:11==b&&(5>a&&25<=c?d=1:6027<=c&&(d=1));return 0==d}
@@ -955,37 +955,38 @@ function processSystemVersion(b,c,a,d){if(200==d||400==d){if(200==d){amtlogicale
955 1==urlvars.sol&&(go(13),connectTerminal())}else errcheck(d,b)}var refreshButtonsState=!0;function refreshButtons(b){if(refreshButtonsState!=b){refreshButtonsState=b;for(var c=0,a=document.getElementsByTagName("input");c<a.length;c++)"refreshbtn"==a[c].name&&(a[c].disabled=!b)}}
956 function PullPowerState(){amtstack&&0==amtstack.GetPendingActions()&&amtsysstate&&amtsysstate.CIM_ServiceAvailableToElement&&amtstack.Enum("CIM_ServiceAvailableToElement",function(b,c,a,d){200==d&&(amtsysstate.CIM_ServiceAvailableToElement.responses=a,9<amtversion&&null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?
957 amtstack.Get("IPS_PowerManagementService",function(a,b,c,d){200==d&&(amtsysstate.IPS_PowerManagementService.response=c.Body,updateSystemStatus())}):updateSystemStatus())})}
958 -function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c=["CIM_ServiceAvailableToElement","*AMT_GeneralSettings","AMT_EthernetPortSettings","*AMT_RedirectionService","CIM_ElementSettingData"];5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");15<amtversion&&1==amtstack.wsman.comm.xtls&&
959 -c.push("*CIM_BootService");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
958 +function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c="CIM_ServiceAvailableToElement *AMT_GeneralSettings AMT_EthernetPortSettings *AMT_RedirectionService CIM_ElementSettingData *AMT_BootCapabilities".split(" ");5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");
959 +15<amtversion&&c.push("*CIM_BootService");2<amtversion&&c.push("*AMT_8021XProfile");amtstack.BatchEnum("",c,processSystemStatus,!0);1==b&&PullWireless()}function processSystemTime(b,c,a,d){errcheck(d,b)||200!=d||(b=new Date,c=new Date,b.setTime(1E3*a.Body.Ta0),amtdeltatime=b-c,updateSystemStatus())}var amtdeltatime,amtsysstate,amtlogicalelements,amtfeatures={};
960 function processSystemStatus(b,c,a,d){if(void 0==a.IPS_ScreenConfigurationService||400==a.IPS_ScreenConfigurationService.status)a.IPS_ScreenConfigurationService=null;if(void 0==a.IPS_KVMRedirectionSettingData||400==a.IPS_KVMRedirectionSettingData.status)a.IPS_KVMRedirectionSettingData=null;if(void 0==a.CIM_KVMRedirectionSAP||400==a.CIM_KVMRedirectionSAP.status)a.CIM_KVMRedirectionSAP=null;if(void 0==a.IPS_OptInService||400==a.IPS_OptInService.status)a.IPS_OptInService=null;void 0!=a.AMT_RedirectionService&&
961 -200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var g in a)null!=a[g]&&a[g].status>d&&(d=a[g].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"\u540c\u6b65\u65f6\u949f",3,syncClockEx,"\u5c06Intel AMT\u65f6\u949f\u4e0e\u6b64\u8ba1\u7b97\u673a\u540c\u6b65\uff1f")}
961 +200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var e in a)null!=a[e]&&a[e].status>d&&(d=a[e].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"\u540c\u6b65\u65f6\u949f",3,syncClockEx,"\u5c06Intel AMT\u65f6\u949f\u4e0e\u6b64\u8ba1\u7b97\u673a\u540c\u6b65\uff1f")}
962 function syncClockEx(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(b,c,a,d){200!=d?messagebox("","\u8bbe\u7f6e\u65f6\u95f4\u5931\u8d25\uff0c\u72b6\u6001="+d):0!=a.Body.ReturnValue?messagebox("","\u8bbe\u7f6e\u65f6\u95f4\u5931\u8d25\uff0c\u9519\u8bef\uff1a"+a.Body.ReturnValueStr):(b=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(a.Body.Ta0,b,b,function(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}))})}
963 var DMTFPowerStates=" \u6253\u5f00 \u6d45\u7761\u7720 \u6c89\u7761 \u5173\u673a\u540e\u518d\u5f00\u673a\uff08\u8f6f\u5173\u673a\uff09 \u5173-\u786c \u4f11\u7720\uff08\u8f6f\u5173\u95ed\uff09 \u8f6f\u5173\u95ed \u5173\u673a\u540e\u518d\u5f00\u673a \u4e3b\u603b\u7ebf\u590d\u4f4d \u8bca\u65ad\u4e2d\u65ad\uff08NMI\uff09 \u4e0d\u9002\u7528 \u5173-\u67d4\u8f6f\u4f18\u7f8e \u5173-\u786c\u6717 \u4e3b\u603b\u7ebf\u590d\u4f4d\u6b63\u5e38 \u5173\u673a\u540e\u518d\u5f00\u673a\uff08\u8f6f\u5173\u95ed\uff09 \u5173\u673a\u540e\u518d\u5f00\u673a\uff08\u5173\u95ed-\u786c\u542f\u52a8\uff09 \u8bca\u65ad\u4e2d\u65ad\uff08INIT\uff09".split(" ");
964 -function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),g="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>\u672a\u77e5</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"\u6253\u5f00"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
965 -3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=["\uff0c \u63d2\u5165","\uff0c \u7535\u6c60"][v.PowerSource]);d+=TableEntry("\u529f\u7387",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>\u6ca1\u6709</i>":EscapeHtml(c);d+=TableEntry("\u540d\u79f0\u548c\u57df\u540d",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));
964 +function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>\u672a\u77e5</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"\u6253\u5f00"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
965 +3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(29,n),QH(40,n));v.PowerSource&&(n+=["\uff0c \u63d2\u5165","\uff0c \u7535\u6c60"][v.PowerSource]);d+=TableEntry("\u529f\u7387",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>\u6ca1\u6709</i>":EscapeHtml(c);d+=TableEntry("\u540d\u79f0\u548c\u57df\u540d",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));
966 amtstack.amtauth&&amtstack.amtauth.uuidStr?d+=TableEntry("\u7cfb\u7edf\u7f16\u53f7",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("\u7cfb\u7edf\u7f16\u53f7",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" \u5728\u7ba1\u7406\u5458\u63a7\u5236\u6a21\u5f0f\uff08ACM\uff09\u4e2d\u6fc0\u6d3b",
967 -4==l.ProvisioningMode&&(n=" \u5728\u5ba2\u6237\u7aef\u63a7\u5236\u6a21\u5f0f\uff08CCM\uff09\u4e2d\u6fc0\u6d3b",b=9));d+=TableEntry("\u82f1\u7279\u5c14&reg;ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,
968 -2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),e=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),e=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&
969 -2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(g+="\uff0c\u91cd\u5b9a\u5411\u7aef\u53e3");q&&(g+="\uff0cLAN\u4e0a\u4e32\u884c");n&&(g+="\uff0cIDE\u91cd\u5b9a\u5411");e&&(g+="\uff0cKVM");""==g&&(g=" \u6ca1\u6709");d+=TableEntry("\u6d3b\u52a8\u529f\u80fd",addLinkConditional(g.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&
970 -amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,g="\u4e3b\u8981\u5c55\u793a",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(g=["\u4e3b\u8981\u5c55\u793a","\u8f85\u52a9\u663e\u793a","\u7b2c\u4e09\u663e\u793a"][n.DefaultScreen]),g='<span title="'+format("\u9ed8\u8ba4\u8fdc\u7a0b\u663e\u793a\u4e3a{0}",g.toLowerCase())+'">'+g+"</span>",1==n.Is5900PortEnabled&&(g+="\uff0c\u542f\u7528\u7aef\u53e35900"),1==n.OptInPolicy&&(g+="\uff0c"+
971 -n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"\u52a0\u5165\u79d2\u6570":"\u4e8c\u6b21\u9009\u62e9")),g+="\uff0c"+n.SessionTimeout+" \u5206\u949f"+(0<n.SessionTimeout?"s":"")+" \u4f1a\u8bdd\u8d85\u65f6",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(g+="\uff0c\u5141\u8bb8\u4e0b\u6599"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("\u8fdc\u7a0b\u684c\u9762",addLinkConditional(g,
972 -"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!e);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(g="\u672a\u77e5\u72b6\u6001",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(g="\u4e0d\u9700\u8981"),1==p&&(g="\u4ec5KVM\u9700\u8981"),4294967295==p&&(g="\u59cb\u7ec8\u9700\u8981"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&
973 -(g=addLinkConditional(g,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("\u7528\u6237\u540c\u610f",g));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(g={0:"\u672a\u77e5",1:"\u5176\u4ed6",2:"\u5df2\u542f\u7528",3:"\u6b8b\u969c\u4eba\u58eb",4:"\u5173\u673a",5:"\u4e0d\u9002\u7528",6:"\u5df2\u542f\u7528\u4f46\u79bb\u7ebf",7:"\u6d4b\u8bd5\u4e2d",8:"\u9012\u5ef6",9:"\u505c\u987f",10:"\u5f00\u59cb",32768:"OCR Disabled",32769:"OCR Enabled",
974 -32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(g[32768]="OCR & RPE Disabled",g[32769]="OCR Enabled, RPE Disabled"),n=g[amtsysstate.CIM_BootService.response.EnabledState]?g[amtsysstate.CIM_BootService.response.EnabledState]:"\u672a\u77e5",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)if(g[C].SettingData&&1==g[C].IsCurrent&&
975 -"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==g[C].SettingData.ReferenceParameters.ResourceURI)for(p=g[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("\u7535\u6e90\u653f\u7b56",addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\u7ea6\u4f1a\u65f6\u95f4",addLinkConditional((new Date((new Date).getTime()+
976 -amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));g=AddRefreshButton("PullSystemStatus()")+" ";g+=AddButton("\u7535\u6e90\u52a8\u4f5c...","showPowerActionDlg()")+" ";g+=AddButton("\u4fdd\u5b58\u72b6\u6001...","saveEntireAmtState()")+" ";d+=TableEnd(g);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+
977 -TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" \u66f4\u6539\u7f51\u7edc\u8bbe\u7f6e\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6b64\u9875\u9762\u4e0d\u53ef\u7528\u3002");d=d+"<br><h2>\u5e38\u89c4\u8bbe\u7f6e</h2>"+TableStart();g="";"<i>\u6ca1\u6709</i>"!=c&&(1==v.SharedFQDN&&(g="\uff0c\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u5171\u4eab"),0==v.SharedFQDN&&(g="\uff0c\u4e0d\u540c\u4e8eOS"));d+=TableEntry("\u540d\u79f0\u548c\u57df\u540d",addLinkConditional(c+g,"showEditNameDlg(1)",xxAccountAdminName));c=
978 -"\u6b8b\u969c\u4eba\u58eb";1==v.DDNSUpdateEnabled?c="\u6bcf\u4e2a\u542f\u7528"+v.DDNSPeriodicUpdateInterval+" \u5206\u949f\uff0cTTL\u4e3a"+v.DDNSTTL+" \u5206\u949f":1==v.DDNSUpdateByDHCPServerEnabled&&(c="\u901a\u8fc7DHCP\u670d\u52a1\u5668\u66f4\u65b0");d+=TableEntry("\u52a8\u6001DNS",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==
979 -a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"\u65e0\u7ebf\u4ecb\u9762":"\u6709\u7ebf\u63a5\u53e3")+"</h2>";d+=TableStart();d+=TableEntry("\u94fe\u63a5\u72b6\u6001",1==c.LinkIsUp?"\u94fe\u63a5\u5df2\u5efa\u7acb":"\u94fe\u63a5\u5df2\u65ad\u5f00");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);g=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&g.push("S0 /\u4ea4\u6d41"),14==c.LinkPolicy[C]&&g.push("Sx /\u4ea4\u6d41"),
980 -16==c.LinkPolicy[C]&&g.push("S0 /\u76f4\u6d41"),224==c.LinkPolicy[C]&&g.push("Sx /\u76f4\u6d41");0==g.length&&g.push("");d+=TableEntry("\u8fde\u7ed3\u653f\u7b56",addLinkConditional(0==g.length?"\u65e0\u6cd5\u4f7f\u7528":"\u9002\u7528\u4e8e\uff1a"+g.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("MAC\u5730\u5740",c.MACAddress));amtwirelessif==a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("\u5dde",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],
981 -"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("\u65e0\u7ebf\u7535\u72b6\u6001",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+"\uff0cSSID\uff1a"+(s?s:"<i>\u6ca1\u6709</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==
982 -xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"\u5df2\u542f\u7528":"\u6b8b\u969c\u4eba\u58eb","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==
983 -xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"\u5df2\u542f\u7528":"\u6b8b\u969c\u4eba\u58eb","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("\u56de\u5e94ping",addLinkConditional(["\u6b8b\u969c\u4eba\u58eb","ICMP\u56de\u5e94","RMCP\u54cd\u5e94","ICMP\u548cRMCP\u54cd\u5e94"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),g=
984 -1==c.DHCPEnabled?"\u81ea\u52a8\u4f7f\u7528DHCP\u670d\u52a1\u5668":"\u9759\u6001IP\u5730\u5740",1==c.IpSyncEnabled&&(g+=", IP sync with OS"),d+=TableEntry("IPv4\u72b6\u6001",addLinkConditional(g,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("IPv4\u5730\u5740",isIpAddress(c.IPAddress,"\u6ca1\u6709"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4\u7f51\u5173/\u63a9\u7801",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"\u6ca1\u6709")));g=c.PrimaryDNS;isIpAddress(g)&&(c.SecondaryDNS&&
985 -(g+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4\u57df\u540d\u670d\u52a1\u5668",g));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="\u6b8b\u969c\u4eba\u58eb",w,g=amtsysstate.CIM_ElementSettingData.responses,C=0;C<g.length;C++)g[C].SettingData&&g[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==g[C].IsCurrent);1==w&&(p=(g=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||
986 -isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"\u542f\u7528\u7684\u81ea\u52a8\u548c\u624b\u52a8\u5730\u5740":"\u542f\u7528\u7684\u81ea\u52a8\u5730\u5740");d+=TableEntry("IPv6\u72b6\u6001",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+="\uff0c"),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];
987 -d+=TableEntry("IPv6\u5730\u5740",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6\u5730\u5740","\u6ca1\u6709");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6\u9ed8\u8ba4\u8def\u7531\u5668",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(g=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(g+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6\u57df\u540d\u670d\u52a1\u5668",g))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&
988 -(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
967 +4==l.ProvisioningMode&&(n=" \u5728\u5ba2\u6237\u7aef\u63a7\u5236\u6a21\u5f0f\uff08CCM\uff09\u4e2d\u6fc0\u6d3b",b=9));d+=TableEntry("\u82f1\u7279\u5c14&reg;ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(28,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(39,
968 +2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,r=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&
969 +2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(e+="\uff0c\u91cd\u5b9a\u5411\u7aef\u53e3");r&&(e+="\uff0cLAN\u4e0a\u4e32\u884c");n&&(e+="\uff0cIDE\u91cd\u5b9a\u5411");g&&(e+="\uff0cKVM");""==e&&(e=" \u6ca1\u6709");d+=TableEntry("\u6d3b\u52a8\u529f\u80fd",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&
970 +amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="\u4e3b\u8981\u5c55\u793a",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["\u4e3b\u8981\u5c55\u793a","\u8f85\u52a9\u663e\u793a","\u7b2c\u4e09\u663e\u793a"][n.DefaultScreen]),e='<span title="'+format("\u9ed8\u8ba4\u8fdc\u7a0b\u663e\u793a\u4e3a{0}",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+="\uff0c\u542f\u7528\u7aef\u53e35900"),1==n.OptInPolicy&&(e+="\uff0c"+
971 +n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"\u52a0\u5165\u79d2\u6570":"\u4e8c\u6b21\u9009\u62e9")),e+="\uff0c"+n.SessionTimeout+" \u5206\u949f"+(0<n.SessionTimeout?"s":"")+" \u4f1a\u8bdd\u8d85\u65f6",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+="\uff0c\u5141\u8bb8\u4e0b\u6599"),QV(46,n),Q(47).checked=!1):QV(46,!1),d+=TableEntry("\u8fdc\u7a0b\u684c\u9762",addLinkConditional(e,
972 +"showDesktopSettingsDlg()",xxAccountAdminName)));QV(26,!p||!r);QV(27,xxAccountAdminName);QV(37,!p||!g);QV(38,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="\u672a\u77e5\u72b6\u6001",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(e="\u4e0d\u9700\u8981"),1==p&&(e="\u4ec5KVM\u9700\u8981"),4294967295==p&&(e="\u59cb\u7ec8\u9700\u8981"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&
973 +(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("\u7528\u6237\u540c\u610f",e));null!=amtsysstate.AMT_BootCapabilities.response.PlatformErase&&0<amtsysstate.AMT_BootCapabilities.response.PlatformErase&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"\u672a\u77e5",1:"\u5176\u4ed6",2:"\u5df2\u542f\u7528",3:"\u6b8b\u969c\u4eba\u58eb",4:"\u5173\u673a",5:"\u4e0d\u9002\u7528",6:"\u5df2\u542f\u7528\u4f46\u79bb\u7ebf",7:"\u6d4b\u8bd5\u4e2d",
974 +8:"\u9012\u5ef6",9:"\u505c\u987f",10:"\u5f00\u59cb",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:"\u672a\u77e5",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=
975 +amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)if(e[C].SettingData&&1==e[C].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[C].SettingData.ReferenceParameters.ResourceURI)for(p=e[C].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,r=0;r<AmtSystemPowerSchemes.length;r++)AmtSystemPowerSchemes[r].SchemeGUID==p&&(d+=TableEntry("\u7535\u6e90\u653f\u7b56",addLinkConditional(AmtSystemPowerSchemes[r].Description.split(":")[1],'showPowerPolicyDlg("'+
976 +p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\u7ea6\u4f1a\u65f6\u95f4",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("\u7535\u6e90\u52a8\u4f5c...","showPowerActionDlg()")+" ";e+=AddButton("\u4fdd\u5b58\u72b6\u6001...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
977 +QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" \u66f4\u6539\u7f51\u7edc\u8bbe\u7f6e\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6b64\u9875\u9762\u4e0d\u53ef\u7528\u3002");d=d+"<br><h2>\u5e38\u89c4\u8bbe\u7f6e</h2>"+TableStart();e="";"<i>\u6ca1\u6709</i>"!=c&&(1==v.SharedFQDN&&(e="\uff0c\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u5171\u4eab"),0==v.SharedFQDN&&(e="\uff0c\u4e0d\u540c\u4e8eOS"));d+=
978 +TableEntry("\u540d\u79f0\u548c\u57df\u540d",addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));c="\u6b8b\u969c\u4eba\u58eb";1==v.DDNSUpdateEnabled?c="\u6bcf\u4e2a\u542f\u7528"+v.DDNSPeriodicUpdateInterval+" \u5206\u949f\uff0cTTL\u4e3a"+v.DDNSTTL+" \u5206\u949f":1==v.DDNSUpdateByDHCPServerEnabled&&(c="\u901a\u8fc7DHCP\u670d\u52a1\u5668\u66f4\u65b0");d+=TableEntry("\u52a8\u6001DNS",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=
979 +amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"\u65e0\u7ebf\u4ecb\u9762":"\u6709\u7ebf\u63a5\u53e3")+"</h2>";d+=TableStart();d+=TableEntry("\u94fe\u63a5\u72b6\u6001",1==c.LinkIsUp?"\u94fe\u63a5\u5df2\u5efa\u7acb":"\u94fe\u63a5\u5df2\u65ad\u5f00");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);e=[];for(C in c.LinkPolicy)1==c.LinkPolicy[C]&&
980 +e.push("S0 /\u4ea4\u6d41"),14==c.LinkPolicy[C]&&e.push("Sx /\u4ea4\u6d41"),16==c.LinkPolicy[C]&&e.push("S0 /\u76f4\u6d41"),224==c.LinkPolicy[C]&&e.push("Sx /\u76f4\u6d41");0==e.length&&e.push("");d+=TableEntry("\u8fde\u7ed3\u653f\u7b56",addLinkConditional(0==e.length?"\u65e0\u6cd5\u4f7f\u7528":"\u9002\u7528\u4e8e\uff1a"+e.join(", "),"showLinkPolicyDlg("+a+")",xxAccountAdminName))}"00-00-00-00-00-00"!=c.MACAddress&&(d+=TableEntry("MAC\u5730\u5740",c.MACAddress));amtwirelessif==a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&
981 +(d+=TableEntry("\u5dde",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("\u65e0\u7ebf\u7535\u72b6\u6001",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+"\uff0cSSID\uff1a"+(s?s:"<i>\u6ca1\u6709</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&
982 +(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"\u5df2\u542f\u7528":"\u6b8b\u969c\u4eba\u58eb","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+
983 +TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"\u5df2\u542f\u7528":"\u6b8b\u969c\u4eba\u58eb","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("\u56de\u5e94ping",addLinkConditional(["\u6b8b\u969c\u4eba\u58eb","ICMP\u56de\u5e94","RMCP\u54cd\u5e94","ICMP\u548cRMCP\u54cd\u5e94"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<
984 +1)],"showPingActionDlg()",xxAccountAdminName)),e="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-FAST/TLS".split(" "),p="\u6b8b\u969c\u4eba\u58eb",amtsysstate.AMT_8021XProfile.responses.Body.Enabled&&(p="\u5df2\u542f\u7528"+e[amtsysstate.AMT_8021XProfile.responses.Body.AuthenticationProtocol]),d+=TableEntry("802.1x",addLinkConditional(p,"editNetAuthProfile()",xxAccountAdminName)),e=1==c.DHCPEnabled?"\u81ea\u52a8\u4f7f\u7528DHCP\u670d\u52a1\u5668":"\u9759\u6001IP\u5730\u5740",
985 +1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("IPv4\u72b6\u6001",addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("IPv4\u5730\u5740",isIpAddress(c.IPAddress,"\u6ca1\u6709"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4\u7f51\u5173/\u63a9\u7801",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"\u6ca1\u6709")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4\u57df\u540d\u670d\u52a1\u5668",e));if(5<amtversion&&
986 +200==amtsysstate.IPS_IPv6PortSettings.status){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="\u6b8b\u969c\u4eba\u58eb",w,e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)e[C].SettingData&&e[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[C].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"\u542f\u7528\u7684\u81ea\u52a8\u548c\u624b\u52a8\u5730\u5740":
987 +"\u542f\u7528\u7684\u81ea\u52a8\u5730\u5740");d+=TableEntry("IPv6\u72b6\u6001",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+="\uff0c"),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("IPv6\u5730\u5740",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+
988 +'")'))}else d+=TableEntry("IPv6\u5730\u5740","\u6ca1\u6709");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6\u9ed8\u8ba4\u8def\u7531\u5668",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6\u57df\u540d\u670d\u52a1\u5668",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),
989 +1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
990 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
991 "")+">Available in S0/DC - Powered on & on battery</label><br>";a+="<label><input type=checkbox id=d11p4 value=224 "+(0<=c.LinkPolicy.indexOf(224)?"checked":"")+">Available in Sx/DC - Sleeping & on battery</label><br>";setDialogMode(11,"\u8fde\u7ed3\u653f\u7b56",3,showLinkPolicyDlgEx,a,b)}}
992 function showLinkPolicyDlgEx(b,c){var a=Clone(amtsysstate.AMT_EthernetPortSettings.responses[c]);a.DHCPEnabled&&(delete a.IPAddress,delete a.SubnetMask,delete a.DefaultGateway,delete a.PrimaryDNS,delete a.SecondaryDNS);a.LinkPolicy=[];Q("d11p1").checked&&a.LinkPolicy.push(1);Q("d11p2").checked&&a.LinkPolicy.push(14);Q("d11p3").checked&&a.LinkPolicy.push(16);Q("d11p4").checked&&a.LinkPolicy.push(224);amtstack.Put("AMT_EthernetPortSettings",a,showLinkPolicyDlgExDone,0,1,a)}
@@ -994,30 +995,30 @@ function showAuthCsme(){if(!xxdialogMode){var b;b="<div style=margin-top:8px>Int
995 for(var c in amtstack.amtauth.Certificates){var a=amtstack.amtauth.Certificates[c];b+="<tr><td style=width:32px;vertical-align:top><img src=images-commander/cert1.png height=32 width=32 />";b+="<td style=padding-bottom:6px><b>"+EscapeHtml(a.subject.getField("CN").value)+(!0===a.xTrusted?", <span style=color:#080>\u503c\u5f97\u4fe1\u8d56</span>":"")+"</b><br />";a.subject.getField("OU")&&(b+=EscapeHtml(a.subject.getField("OU").value)+"<br />");b+=amtstack.amtauth.CertificatesDer[c].length+" \u5b57\u8282<a style=cursor:pointer;color:blue onclick=downloadAuthCert("+
996 c+")>\u4e0b\u8f7d</a>";a.xCrl&&(b+="<br />CRL "+a.xCrl.length+" \u5b57\u8282<a style=cursor:pointer;color:blue onclick=downloadCertCrl("+c+")>\u4e0b\u8f7d</a>")}setDialogMode(11,"Authentic CSME",1,null,b+"</table><div>")}}function downloadCertCrl(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.Certificates[b].xCrl),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".crl")}
997 function downloadAuthCert(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.CertificatesDer[b]),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".cer")}var IntelAmtEntireState,IntelAmtEntireStateCalls;
997 -function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c30.value="amtstate"+b+".json";setDialogMode(19,"\u4fdd\u5b58\u6574\u4e2a\u82f1\u7279\u5c14&reg;AMT\u72b6\u6001",3,saveEntireAmtStateOk)}}
998 -function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(60,"Fetching entire state, please wait...");setDialogMode(1,"\u4fdd\u5b58\u6574\u4e2a\u82f1\u7279\u5c14&reg;AMT\u72b6\u6001",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
999 -function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c30.value))}
998 +function saveEntireAmtState(){if(!xxdialogMode){var b="",c=new Date;amtsysstate&&(b="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);c55.value="amtstate"+b+".json";setDialogMode(19,"\u4fdd\u5b58\u6574\u4e2a\u82f1\u7279\u5c14&reg;AMT\u72b6\u6001",3,saveEntireAmtStateOk)}}
999 +function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(61,"Fetching entire state, please wait...");setDialogMode(1,"\u4fdd\u5b58\u6574\u4e2a\u82f1\u7279\u5c14&reg;AMT\u72b6\u6001",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
1000 +function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c55.value))}
1001 function showDesktopSettingsDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_KVMRedirectionSettingData.response,c;c="<div style=text-align:left><div style=height:26px;margin-top:4px><select id=subddisplay style=float:right;width:200px><option value=0>\u4e3b\u8981\u5c55\u793a</option><option value=1>\u8f85\u52a9\u663e\u793a</option>";9<amtversion&&(c+="<option value=2>\u7b2c\u4e09\u663e\u793a</option>");c+='</select><div style=padding-top:4px>\u9ed8\u8ba4\u663e\u793a</div></div><div style=height:26px;margin-top:4px><input id=subsessiontimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>\u4f1a\u8bdd\u8d85\u65f6\uff08\u5206\u949f\uff09</div></div>';
1002 1==b.OptInPolicy&&(c+='<div style=height:26px;margin-top:4px><input id=suboptintimeout style=float:right;width:200px maxlength=5 onkeypress="return numbersOnly(event)"><div style=padding-top:4px>\u9009\u62e9\u52a0\u5165\u8d85\u65f6\uff08\u79d2\uff09</div></div>');c+="<div style=height:26px;margin-top:4px><select id=subdlegacy style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>\u7981\u7528\uff0c\u63a8\u8350</option><option value=1>\u5df2\u542f\u7528\u7684\u65e7\u7248KVM\u67e5\u770b\u5668</option></select><div style=padding-top:4px>5900\u7aef\u53e3</div></div>";
1003 c+="<div style=height:26px;margin-top:4px id=subspassx><input id=subspass type=password autocomplete=off style=float:right;width:200px maxlength=8 onkeyup=showDesktopSettingsDlgUpdate()><div style=padding-top:4px>5900\u5bc6\u7801\uff088\u4e2a\u5b57\u7b26\uff09</div></div>";9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(c+='<div style=height:26px;margin-top:4px><select id=subsb style=float:right;width:200px onchange=showDesktopSettingsDlgUpdate()><option value=0>\u6b8b\u969c\u4eba\u58eb</option><option value=1>\u5df2\u542f\u7528</option></select><div style=padding-top:4px title="\u7ecf\u5e38\u4e0d\u652f\u6301\u6b64\u529f\u80fd">\u5c4f\u5e55\u6d88\u9690</div></div>');
1004 c+="</div>";setDialogMode(11,"\u8fdc\u7a0b\u684c\u9762\u8bbe\u7f6e",3,showDesktopSettingsDlgOk,c);Q("subddisplay").value=b.DefaultScreen;Q("subsessiontimeout").value=b.SessionTimeout;1==b.OptInPolicy&&(Q("suboptintimeout").value=b.OptInPolicyTimeout);Q("subdlegacy").value=1==b.Is5900PortEnabled?1:0;9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(Q("subsb").value=amtsysstate.IPS_ScreenConfigurationService.response.EnabledState);showDesktopSettingsDlgUpdate()}}
1004 -function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c54",b)}
1005 +function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c106",b)}
1006 function showDesktopSettingsDlgOk(){var b=Clone(amtsysstate.IPS_KVMRedirectionSettingData.response);b.DefaultScreen=Q("subddisplay").value;b.SessionTimeout=Q("subsessiontimeout").value;b.Is5900PortEnabled=1==Q("subdlegacy").value;1==b.OptInPolicy&&(b.OptInPolicyTimeout=Q("suboptintimeout").value);1==b.Is5900PortEnabled&&(b.RFBPassword=Q("subspass").value);amtstack.Put("IPS_KVMRedirectionSettingData",b,showDesktopSettingsDlgOk2);b=Clone(amtsysstate.IPS_ScreenConfigurationService.response);b.EnabledState=
1007 parseInt(Q("subsb").value);amtstack.Put("IPS_ScreenConfigurationService",b,showDesktopSettingsDlgOk3)}function showDesktopSettingsDlgOk2(b,c,a,d){200==d?PullSystemStatus():messagebox("\u8fdc\u7a0b\u684c\u9762\u8bbe\u7f6e",format("\u9519\u8bef{0}\uff0c\u65e0\u6cd5\u8bbe\u7f6e\u503c\u3002",d))}
1008 function showDesktopSettingsDlgOk3(b,c,a,d){200!=d?messagebox("\u9519\u8bef",format("\u65e0\u6cd5\u8bbe\u7f6e\u5c4f\u5e55\u6d88\u9690\uff0c\u8be5\u7cfb\u7edf\u53ef\u80fd\u4e0d\u652f\u6301\u6d88\u9690\uff08{0}\uff09\u3002",d)):amtstack.Get("IPS_ScreenConfigurationService",function(a,b,c,d){200==d&&(amtsysstate.IPS_ScreenConfigurationService.response=c.Body,updateSystemStatus())},0,1)}
1009 function PullEventLog(b){1==b&&xxdialogMode||(amtFirstPull|=16,amtstack.Enum("AMT_MessageLog",processMessageLog0),amtstack.GetMessageLog(processMessageLog1))}var processMessageLog0responses=null;
1010 function processMessageLog0(b,c,a,d){200==d&&(d&&QV("go6",!0),a&&(processMessageLog0responses=a),b="",c="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>",null!=processMessageLog0responses&&(b=1==processMessageLog0responses[0].IsFrozen?AddButton("\u53d6\u6d88\u51bb\u7ed3\u65e5\u5fd7","FreezeLog(0)"):AddButton("\u51bb\u7ed3\u65e5\u5fd7","FreezeLog(1)")),c+=TableEnd('<div style=float:right><input id=eventFilter placeholder="\u8fc7\u6ee4" style=margin:4px onkeyup=eventFilter()>&nbsp;</div><div>&nbsp;'+
1011 AddRefreshButton("PullEventLog(1)")+AddButton("\u6e05\u9664\u65e5\u5fd7","ClearLog()")+AddButton("\u6551...","SaveEventLog()")+b),QH(17,c+"<br>"))}function SaveEventLog(){xxdialogMode||null==eventmessages||SaveJsonFile("IntelAmtEventlog","events","Intel AMT Event Log",eventmessages)}var eventmessages=null;
1011 -function processMessageLog1(b,c){eventmessages=c;var a,d=0,g;g="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>\u8d44\u6e90</b><td class=r1><b>\u63cf\u8ff0</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);g+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1012 -a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}g+=TableEnd(0==d?"&nbsp;":"");QH(18,g+"<br>");processMessageLog0()}
1013 -function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(60,"\u6e05\u9664\u4e8b\u4ef6\u65e5\u5fd7\uff1f"),setDialogMode(1,"\u4e8b\u4ef6\u7c3f",3,ClearLogEx))}function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("\u4e8b\u4ef6\u7c3f","\u65e0\u6cd5\u6e05\u9664\uff0c\u9519\u8bef\uff1a"+d):PullEventLog()})}
1014 -function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("\u65f6\u95f4",c.Time.toLocaleString());a+=addHtmlValue("\u8d44\u6e90",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("\u63cf\u8ff0",c.Desc);a+=MoreStart();a+=addHtmlValue("\u8bbe\u5907\u5730\u5740",c.DeviceAddress);a+=addHtmlValue("\u5b9e\u4f53",c.Entity);a+=addHtmlValue("\u5b9e\u4f53\u5b9e\u4f8b",c.EntityInstance);var d="",g;for(g in c.EventData)0<d.length&&(d+=","),d+=c.EventData[g];
1012 +function processMessageLog1(b,c){eventmessages=c;var a,d=0,e;e="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:90px><b>&nbsp;&nbsp;Event</b><td class=r1 style=width:110px><b>Time</b><td class=r1 style=width:160px><b>\u8d44\u6e90</b><td class=r1><b>\u63cf\u8ff0</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);e+="<tr id=xamtevent"+a+" class=r3 onclick=showEventDetails("+
1013 +a+")><td class=r1><p><div class=icon"+v+" style=display:block;float:left;margin-left:5px;margin-right:5px></div>"+(parseInt(a)+1)+'<td class=r1 title="'+n.Time.toLocaleString()+'">'+n.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>"+n.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+n.EntityStr.replace("(r)","&reg;")+"<td class=r1>"+n.Desc}e+=TableEnd(0==d?"&nbsp;":"");QH(18,e+"<br>");processMessageLog0()}
1014 +function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(61,"\u6e05\u9664\u4e8b\u4ef6\u65e5\u5fd7\uff1f"),setDialogMode(1,"\u4e8b\u4ef6\u7c3f",3,ClearLogEx))}function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("\u4e8b\u4ef6\u7c3f","\u65e0\u6cd5\u6e05\u9664\uff0c\u9519\u8bef\uff1a"+d):PullEventLog()})}
1015 +function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<div style=text-align:left>"+addHtmlValue("\u65f6\u95f4",c.Time.toLocaleString());a+=addHtmlValue("\u8d44\u6e90",c.EntityStr.replace("(r)","&reg;"));a+=addHtmlValue("\u63cf\u8ff0",c.Desc);a+=MoreStart();a+=addHtmlValue("\u8bbe\u5907\u5730\u5740",c.DeviceAddress);a+=addHtmlValue("\u5b9e\u4f53",c.Entity);a+=addHtmlValue("\u5b9e\u4f53\u5b9e\u4f8b",c.EntityInstance);var d="",e;for(e in c.EventData)0<d.length&&(d+=","),d+=c.EventData[e];
1016 a+=addHtmlValue("\u6570\u636e",d);a+=addHtmlValue("\u504f\u79fb\u91cf",c.EventOffset);a+=addHtmlValue("\u4f20\u611f\u5668\u7c7b\u578b",c.EventSensorType);a+=addHtmlValue("\u4e25\u91cd\u7a0b\u5ea6",c.EventSeverity);a+=addHtmlValue("\u6765\u6e90\u7c7b\u578b",c.EventSourceType);a+=addHtmlValue("\u7c7b\u578b",c.EventType);a+=addHtmlValue("\u4f20\u611f\u5668\u7f16\u53f7",c.SensorNumber);a+=MoreEnd();a+="</div>";messagebox(format("\u4e8b\u4ef6\uff03{0}\u8be6\u7ec6\u4fe1\u606f",b+1),a)}}
1017 function eventFilter(){var b=Q("eventFilter").value.toLowerCase(),c;for(c in eventmessages)QV("xamtevent"+c,""==b||0<=eventmessages[c].Desc.toLowerCase().indexOf(b)||0<=eventmessages[c].EntityStr.toLowerCase().indexOf(b))}var subscriptionsFilters=null,subscriptionsListeners=null;
1018 function PullEventSubscriptions(){null==subscriptionsFilters&&amtstack.Enum("CIM_FilterCollection",processEventSubscriptions0);amtstack.BatchEnum(null,["CIM_ListenerDestination","CIM_FilterCollectionSubscription"],processEventSubscriptions1)}function processEventSubscriptions0(b,c,a,d){408!=d&&400!=d&&(d&&errcheck(d,b)||(subscriptionsFilters=a))}
1018 -function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u4e8b\u4ef6\u8ba2\u9605\u8005\u3002<br><br>";for(var g in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[g].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[g],
1019 -b+='<div class=itemBar onclick="showSubscriptionDetails('+g+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>\u627e\u4e0d\u5230\u8ba2\u9605\u3002</i></div><br>");g="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(g+=AddButton("\u65b0\u8ba2\u9605","newSubscriptionButton()"));b+=
1020 -"<br><td class=r1>"+TableEnd(g+"</div>");QH(56,b)}}var subscriptionDeliveryModes={2:"\u63a8",3:"\u63a8\u9001\u786e\u8ba4",4:"\u5927\u4e8b\u8bb0",5:"\u62c9"};
1019 +function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u4e8b\u4ef6\u8ba2\u9605\u8005\u3002<br><br>";for(var e in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[e].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),d=subscriptionsListeners.CIM_ListenerDestination.responses[e],
1020 +b+='<div class=itemBar onclick="showSubscriptionDetails('+e+')"><div style=float:right></div><div style=padding-top:3px;overflow-x:hidden title="'+a+" - "+d.Destination+'"><b>'+a+"</b> - "+d.Destination+"</div><div style=padding-top:3px></div></div>",c++;0==c&&(b+="<div style=padding-left:15px><br><i>\u627e\u4e0d\u5230\u8ba2\u9605\u3002</i></div><br>");e="<div>&nbsp;"+AddRefreshButton("PullEventSubscriptions()");xxAccountAdminName&&(e+=AddButton("\u65b0\u8ba2\u9605","newSubscriptionButton()"));b+=
1021 +"<br><td class=r1>"+TableEnd(e+"</div>");QH(57,b)}}var subscriptionDeliveryModes={2:"\u63a8",3:"\u63a8\u9001\u786e\u8ba4",4:"\u5927\u4e8b\u8bb0",5:"\u62c9"};
1022 function showSubscriptionDetails(b){if(!xxdialogMode){var c=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[b].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","&reg;"),a=subscriptionsListeners.CIM_ListenerDestination.responses[b],d;d="<div style=text-align:left>"+addHtmlValue("\u76ee\u7684\u5730",a.Destination);d+=addHtmlValue("\u8fc7\u6ee4",c);d+=addHtmlValue("\u6295\u653e\u65b9\u5f0f",subscriptionDeliveryModes[a.DeliveryMode]);setDialogMode(11,"\u8ba2\u9605"+
1023 (b+1),xxAccountAdminName?5:1,deleteSubscriptionButton,d+"</div>",b)}}
1024 function deleteSubscriptionButton(b,c){2==b&&amtstack.UnSubscribe("CIM_FilterCollectionSubscription",PullEventSubscriptions,null,1,{Filter:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_FilterCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+subscriptionsListeners.CIM_FilterCollectionSubscription.responses[c].Filter.ReferenceParameters.SelectorSet.Selector.Value+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference>",
@@ -1025,26 +1026,26 @@ Handler:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/a
1026 function newSubscriptionButton(){if(!xxdialogMode&&null!=subscriptionsFilters){var b;b="<div style=height:26px;margin-top:4px><select id=subtype style=float:right;width:260px><option value=Push>\u63a8</option><option value=PushWithAck>\u63a8\u9001\u786e\u8ba4</option></select><div style=padding-top:4px>\u7c7b\u578b</div></div><div style=height:26px;margin-top:4px><select id=subfilter style=float:right;width:260px>";for(var c in subscriptionsFilters)b+='<option value="'+subscriptionsFilters[c].InstanceID+
1027 '">'+subscriptionsFilters[c].CollectionName.substring(13)+"</option>";b+="</select><div style=padding-top:4px>\u8fc7\u6ee4</div></div>";b+='<div style=height:26px;margin-top:4px><input id=suburl style=float:right;width:260px maxlength=253 onkeyup=newSubscriptionUpdate() value="http://"><div style=padding-top:4px>\u7f51\u5740</div></div>';b+="<div style=height:26px;margin-top:4px><select id=subauth style=float:right;width:260px onchange=newSubscriptionUpdate()><option value=0>\u6ca1\u6709</option><option value=1>\u6d88\u5316</option></select><div style=padding-top:4px>\u8ba4\u8bc1\u65b9\u5f0f</div></div>";
1028 b+="<div style=height:26px;margin-top:4px id=subxuser><input id=subuser style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>\u7528\u6237\u540d</div></div>";b+="<div style=height:26px;margin-top:4px id=subxpass><input id=subpass style=float:right;width:260px maxlength=32 onkeyup=newSubscriptionUpdate()><div style=padding-top:4px>\u5bc6\u7801</div></div>";b+="<div style=height:26px;margin-top:4px><input id=subargs style=float:right;width:260px maxlength=128><div style=padding-top:4px>\u4e89\u8bba</div></div>";
1028 -setDialogMode(11,"\u6dfb\u52a0\u4e8b\u4ef6\u8ba2\u9605",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c54",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1029 +setDialogMode(11,"\u6dfb\u52a0\u4e8b\u4ef6\u8ba2\u9605",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c106",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1030 function newSubscriptionButtonOk(){var b=0==Q("subuser").value.length?void 0:Q("subuser").value,c=0==Q("subpass").value.length?void 0:Q("subpass").value;amtstack.Subscribe("CIM_FilterCollection",Q("subtype").value,Q("suburl").value,newSubscriptionButtonOk2,null,1,{InstanceID:Q("subfilter").value},0<Q("subargs").value.length?Q("subargs").value:null,b,c)}function newSubscriptionButtonOk2(b,c,a,d){200==d&&PullEventSubscriptions()}
1031 function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AMT_AuditLog",processAuditLog0))}var auditLog=null,auditLogEnabledStates="\u672a\u77e5 \u5176\u4ed6 \u5df2\u542f\u7528 \u6b8b\u969c\u4eba\u58eb \u5173\u673a \u4e0d\u9002\u7528 \u5df2\u542f\u7528\u4f46\u79bb\u7ebf \u6d4b\u8bd5\u4e2d \u9012\u5ef6 \u505c\u987f \u5f00\u59cb".split(" ");
1031 -function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"\u6b8b\u969c\u4eba\u58eb":"\u5df2\u542f\u7528",c&2&&(b+="\uff0c\u5df2\u9501\u5b9a"),c&4&&(b+="\uff0c \u51e0\u4e4e\u6ee1"),c&8&&(b+="\u6ee1"),c&16&&(b+="\uff0cNoKey"),c="<h1>\u5ba1\u6838\u65e5\u5fd7\u8bbe\u7f6e</h1>"+TableStart(),c+=TableEntry("\u5dde",b),c+=TableEntry("\u5b58\u50a8",a[0].CurrentNumberOfRecords+" \u8bb0\u5f55\uff09\uff0c"+a[0].PercentageFree+"\uff05 \u81ea\u7531"),c+=TableEntry("\u8986\u5199\u653f\u7b56",
1032 -2==a[0].OverwritePolicy?"\u88c5\u6ee1\u65f6\u81ea\u52a8\u5305\u88c5":"\u6c38\u4e0d\u8986\u76d6"),c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1033 -function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="\u8fc7\u6ee4" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("\u6551...","SaveAuditLog()")+AddButton("\u6e05\u9664\u65e5\u5fd7","ClearAuditLog()"))+"<br>");if(0==c.length)d="\u627e\u4e0d\u5230\u5ba1\u6838\u65e5\u5fd7\u4e8b\u4ef6\u3002";else{var g=
1034 -0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>\u65f6\u95f4</b><td class=r1 style=width:260px><b>\u53d1\u8d77\u4eba</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;g++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+="\uff0c"+v.Event);null!=v.ExStr&&(n+="\uff0c"+v.ExStr);""!=
1035 -l&&""!=p&&(l+="\uff0c");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==g?"&nbsp;":"")+"<br>"}QH(50,d)}
1036 -function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","\u82f1\u7279\u5c14AMT\u5ba1\u6838\u65e5\u5fd7",auditLog)}function ClearAuditLog(b){QH(60,"\u6e05\u9664\u5ba1\u6838\u65e5\u5fd7\uff1f");setDialogMode(1,"\u5ba1\u6838\u65e5\u5fd7",3,ClearAuditLogEx)}
1032 +function processAuditLog0(b,c,a,d){200==d&&a&&0<a.length&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"\u6b8b\u969c\u4eba\u58eb":"\u5df2\u542f\u7528",c&2&&(b+="\uff0c\u5df2\u9501\u5b9a"),c&4&&(b+="\uff0c \u51e0\u4e4e\u6ee1"),c&8&&(b+="\u6ee1"),c&16&&(b+="\uff0cNoKey"),c="<h1>\u5ba1\u6838\u65e5\u5fd7\u8bbe\u7f6e</h1>"+TableStart(),c+=TableEntry("\u5dde",b),c+=TableEntry("\u5b58\u50a8",a[0].CurrentNumberOfRecords+" \u8bb0\u5f55\uff09\uff0c"+a[0].PercentageFree+"\uff05 \u81ea\u7531"),c+=TableEntry("\u8986\u5199\u653f\u7b56",
1033 +2==a[0].OverwritePolicy?"\u88c5\u6ee1\u65f6\u81ea\u52a8\u5305\u88c5":"\u6c38\u4e0d\u8986\u76d6"),c+=TableEnd(),QH(50,c),amtstack.GetAuditLog(processAuditLog1))}
1034 +function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="\u8fc7\u6ee4" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("\u6551...","SaveAuditLog()")+AddButton("\u6e05\u9664\u65e5\u5fd7","ClearAuditLog()"))+"<br>");if(0==c.length)d="\u627e\u4e0d\u5230\u5ba1\u6838\u65e5\u5fd7\u4e8b\u4ef6\u3002";else{var e=
1035 +0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>\u65f6\u95f4</b><td class=r1 style=width:260px><b>\u53d1\u8d77\u4eba</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+="\uff0c"+v.Event);null!=v.ExStr&&(n+="\uff0c"+v.ExStr);""!=
1036 +l&&""!=p&&(l+="\uff0c");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(51,d)}
1037 +function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","\u82f1\u7279\u5c14AMT\u5ba1\u6838\u65e5\u5fd7",auditLog)}function ClearAuditLog(b){QH(61,"\u6e05\u9664\u5ba1\u6838\u65e5\u5fd7\uff1f");setDialogMode(1,"\u5ba1\u6838\u65e5\u5fd7",3,ClearAuditLogEx)}
1038 function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("\u5ba1\u6838\u65e5\u5fd7","\u9519\u8bef\uff1a"+d)}
1038 -function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("\u65f6\u95f4",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("\u53d1\u8d77\u4eba",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("\u5730\u5740",a.NetAddress));d+=addHtmlValue("\u5e94\u7528",a.AuditApp);d+=addHtmlValue("\u4e8b\u4ef6",a.Event);if(null!=a.ExStr)d+=addHtmlValue("\u6269\u5c55\u6570\u636e",a.ExStr);else if(0<a.Ex.length){var g="";for(c in a.Ex)0<g.length&&(g+=
1039 -","),g+=a.Ex.charCodeAt(c);""!=g&&(d+=addHtmlValue("\u6570\u636e\u503c",g));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("\u8d44\u6599\u5b57\u4e32",a.Ex.substring(2)))}messagebox("\u5ba1\u6838\u4e8b\u4ef6\u7f16\u53f7"+(b+1)+" \u7ec6\u8282",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1039 +function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("\u65f6\u95f4",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("\u53d1\u8d77\u4eba",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("\u5730\u5740",a.NetAddress));d+=addHtmlValue("\u5e94\u7528",a.AuditApp);d+=addHtmlValue("\u4e8b\u4ef6",a.Event);if(null!=a.ExStr)d+=addHtmlValue("\u6269\u5c55\u6570\u636e",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=
1040 +","),e+=a.Ex.charCodeAt(c);""!=e&&(d+=addHtmlValue("\u6570\u636e\u503c",e));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("\u8d44\u6599\u5b57\u4e32",a.Ex.substring(2)))}messagebox("\u5ba1\u6838\u4e8b\u4ef6\u7f16\u53f7"+(b+1)+" \u7ec6\u8282",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
1041 function PullCertificates(){amtstack.BatchEnum(null,["AMT_PublicKeyCertificate","AMT_PublicPrivateKeyPair","AMT_TLSSettingData","AMT_TLSCredentialContext"],processCerts1)}
1041 -function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var g in xxCertificates)xxCertificates[g].InstanceID==b&&(xxTlsCurrentCert=
1042 -g)}for(g in xxCertificates)xxCertificates[g].TrustedRootCertficate=1==xxCertificates[g].TrustedRootCertficate,xxCertificates[g].X509Certificate=window.atob(xxCertificates[g].X509Certificate),xxCertificates[g].XIssuer=parseCertName(xxCertificates[g].Issuer),xxCertificates[g].XSubject=parseCertName(xxCertificates[g].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1042 +function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(var e in xxCertificates)xxCertificates[e].InstanceID==b&&(xxTlsCurrentCert=
1043 +e)}for(e in xxCertificates)xxCertificates[e].TrustedRootCertficate=1==xxCertificates[e].TrustedRootCertficate,xxCertificates[e].X509Certificate=window.atob(xxCertificates[e].X509Certificate),xxCertificates[e].XIssuer=parseCertName(xxCertificates[e].Issuer),xxCertificates[e].XSubject=parseCertName(xxCertificates[e].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
1044 function parseCertName(b){var c={},a=b.split(","),d;for(d in a)b=a[d].indexOf("="),c[a[d].substring(0,b)]=a[d].substring(b+1);return c}
1045 function getTlsSecurityState(b){if(0==xxTlsSettings[b].Enabled)return"\u6b8b\u969c\u4eba\u58eb";var c=(1==xxTlsSettings[b].MutualAuthentication?"\u76f8\u4e92\u8ba4\u8bc1TLS":"\u670d\u52a1\u5668\u8eab\u4efd\u9a8c\u8bc1TLS")+(1==xxTlsSettings[b].AcceptNonSecureConnections?" \u548c\u975eTLS":"");1==xxTlsSettings[b].MutualAuthentication&&xxTlsSettings[b].TrustedCN&&(b=MakeToArray(xxTlsSettings[b].TrustedCN),0<b.length&&(c+=", "+(1<b.length?"Trusted names":"Trusted name")+": "+b.join(", ")+"."));return c}
1046 function updateCertificates(){if(null!=xxCertificates){var b="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,c=1-b,a=TableStart(),a=a+TableEntry("\u8fdc\u7a0bTLS\u5b89\u5168",addLinkConditional(getTlsSecurityState(c),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEntry("\u672c\u5730TLS\u5b89\u5168",addLinkConditional(getTlsSecurityState(b),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEnd(),a=a+("<br>"+TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u6b64\u8ba1\u7b97\u673a\u7684\u82f1\u7279\u5c14&reg;AMT\u8bc1\u4e66\u3002<br><br>");
1047 if(0==xxCertificates.length&&0==xxCertPrivateKeys.length)a+="<div style=padding-left:15px><br><i>\u627e\u4e0d\u5230\u8bc1\u4e66\u3002</i></div><br>";else{for(var d in xxCertificates)b="",xxCertificates[d].TrustedRootCertficate&&(b="\uff0c\u53d7\u4fe1\u4efb\u7684\u6839"),xxCertificates[d].XPrivateKey&&(b="\uff0c\u79c1\u94a5"),d==xxTlsCurrentCert&&(b+="\uff0cTLS\u8bc1\u4e66"),a+="<div class=itemBar onclick=showCertDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(xxCertificates[d].XSubject.CN)+
1047 -"</b><i>"+b+"</i></div></div>";for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>\u672a\u5206\u914d\u7684\u79c1\u94a5\u5bf9\uff03"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("\u6dfb\u52a0\u8bc1\u4e66...","addCertButton()")+AddButton("\u7b7e\u53d1\u8bc1\u4e66...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(51,a)}}
1048 +"</b><i>"+b+"</i></div></div>";for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<div class=itemBar onclick=showKeyPairDetails("+d+")><div style=padding-top:3px><i>\u672a\u5206\u914d\u7684\u79c1\u94a5\u5bf9\uff03"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("\u6dfb\u52a0\u8bc1\u4e66...","addCertButton()")+AddButton("\u7b7e\u53d1\u8bc1\u4e66...","issueCertButton()"));a+="<br><td class=r1>"+TableEnd(d);QH(52,a)}}
1049 function showKeyPairDetails(b){setDialogMode(11,"\u5bc6\u94a5\u5bf9\uff03"+b,5,function(c){2==c&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertPrivateKeys[b].InstanceID},PullCertificates,0,1)},"\u8fd9\u662f\u4e0d\u5c5e\u4e8e\u4efb\u4f55\u8bc1\u4e66\u7684\u516c\u7528/\u4e13\u7528\u8bc1\u4e66\u5bc6\u94a5\u5bf9\u3002\u8be5\u6761\u76ee\u5e94\u8be5\u662f\u4e34\u65f6\u7684\u3002")}
1050 var xxCertSubjectNames={CN:"\u901a\u7528\u540d",O:"\u7ec4\u7ec7",OU:"\u7ec4\u7ec7\u5355\u4f4d",S:"\u5dde/\u7701",ST:"\u5dde/\u7701",L:"\u5730\u533a\u6027",C:"\u56fd\u5bb6",SN:"\u59d3",GN:"\u7ed9\u5b9a\u7684\u540d\u79f0"};
1051 function showCertDetails(b){if(!xxdialogMode){var c=xxCertificates[b],a;a="<br>"+addHtmlValue("\u8bc1\u4e66",c.X509Certificate.length+" \u5b57\u8282<a style=cursor:pointer;color:blue onclick=downloadCert("+b+")>\u4e0b\u8f7d</a>");a+=addHtmlValue("\u53d7\u4fe1\u4efb\u7684\u6839",c.TrustedRootCertficate?"\u662f":"\u6ca1\u6709");0==c.TrustedRootCertficate&&c.XPrivateKey&&(a+=addHtmlValue("\u79c1\u94a5","\u5f53\u4e0b"));a+='<br><div style="border-bottom:1px solid gray"><i>\u8bc1\u4e66\u79d1\u76ee</i></div><br>';
@@ -1052,67 +1053,67 @@ for(var d in c.XSubject)c.XSubject[d]&&(a+=addHtmlValue(xxCertSubjectNames[d]?xx
1053 {InstanceID:xxCertificates[b].XPrivateKey.InstanceID},function(){},0,1),amtstack.Delete("AMT_PublicKeyCertificate",xxCertificates[b],certificateRemoved,0,1))},a)}}function downloadCert(b){saveAs(data2blob(xxCertificates[b].X509Certificate),xxCertificates[b].XSubject.CN+".cer")}function cert_FileSelectHandler(b){haltEvent(b);1==b.dataTransfer.files.length&&(b.dataTransfer.files[0].name.toLowerCase().endsWith(".p12")?issueCertButton(b.dataTransfer.files):addCertButton(b.dataTransfer.files))}
1054 var xxDragDropCertFiles=null;
1055 function addCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen onchange=addCertButtonUpdate() type=file style=float:right;width:260px accept=".cer,.pem">',xxDragDropCertFiles&&(b='<input style=float:right;width:260px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b="<div style=height:10px></div>"+("<div style=height:26px;margin-top:4px>"+b+"<div style=padding-top:4px>\u8bc1\u4e66\u6587\u4ef6</div></div>")+"<div style=height:26px;margin-top:4px><select id=certtype style=float:right;width:260px><option value=1>\u53d7\u4fe1\u4efb\u7684\u6839\u8bc1\u4e66</option><option value=0>\u8fde\u9501\u8bc1\u4e66</option></select><div style=padding-top:4px>\u8bc1\u4e66\u7c7b\u522b</div></div>",setDialogMode(11,
1055 -"\u6dfb\u52a0\u8bc1\u4e66",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c54",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1056 +"\u6dfb\u52a0\u8bc1\u4e66",3,addCertButtonOk,b),addCertButtonUpdate())}function addCertButtonUpdate(){var b=getInputElement("certopen");QE("c106",!b||1==b.files.length||2==Q("certoptype").value)}function addCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length&&(b=new FileReader,b.onload=addCertButtonOk2,b.readAsBinaryString(c[0]))}
1057 function addCertButtonOk2(b){b=b.target.result;var c=b.indexOf("-----BEGIN CERTIFICATE-----");0<=c?(b=b.substring(c+27),c=b.indexOf("-----END CERTIFICATE-----"),0<=c&&(b=b.substring(0,c)),b=b.replace(/\r\n/g,"")):b=btoa(b);1==getSelectElement("certtype").value?amtstack.AMT_PublicKeyManagementService_AddTrustedRootCertificate(b,certificateAdded):amtstack.AMT_PublicKeyManagementService_AddCertificate(b,certificateAdded)}
1058 function issueCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<input id=certopen type=file style=float:right;width:230px onchange=issueCertButtonUpdate() accept=".p12">',xxDragDropCertFiles&&(b='<input style=float:right;width:230px readonly disabled value="'+xxDragDropCertFiles[0].name+'">'),b=""+("<div styleheight:26px;margin-top:14px>"+b+"<div style=padding-top:4px>Certificate file</div></div>")+"<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certopenpass type=password autocomplete=off style=float:right;width:230px><div style=padding-top:4px>\u8bc1\u4e66\u5bc6\u7801</div></div>",
1059 b+='<br><div style="border-bottom:1px solid gray"><i>\u82f1\u7279\u5c14&reg;AMT\u8bc1\u4e66</i></div>',b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certcn style=float:right;width:230px><div style=padding-top:4px>\u901a\u7528\u540d</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certo style=float:right;width:230px><div style=padding-top:4px>\u7ec4\u7ec7</div></div>",b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certst style=float:right;width:230px><div style=padding-top:4px>\u5dde/\u7701</div></div>",
1060 b+="<div style=height:26px;margin-top:4px><input onkeyup=issueCertButtonUpdate() id=certc style=float:right;width:230px><div style=padding-top:4px>\u56fd\u5bb6</div></div>",b+='<div>\u8bc1\u4e66\u7528\u6cd5</div><ul 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">',b+="<li><label><input type=checkbox id=d11_cu4 checked>TLS\u670d\u52a1\u5668\uff08HTTPS\uff09</label></li>",b+="<li><label><input type=checkbox id=d11_cu5>TLS\u5ba2\u6237\u7aef\uff08HTTPS\uff09</label></li>",
1061 b+="<li><label><input type=checkbox id=d11_cu6>\u90ae\u4ef6\u4fdd\u62a4</label></li>",b+="<li><label><input type=checkbox id=d11_cu7>\u4ee3\u7801\u7b7e\u540d</label></li>",b+="<li><label><input type=checkbox id=d11_cu8>\u65f6\u6807</label></li>",b+="</ul>",setDialogMode(11,"\u7b7e\u53d1\u8bc1\u4e66",3,issueCertButtonOk,b),issueCertButtonUpdate())}
1061 -function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c54",c)}
1062 +function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c106",c)}
1063 function issueCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length?(b=new FileReader,b.onload=issueCertButtonOk2,b.readAsBinaryString(c[0])):issueCertButtonOk3(null)}function issueCertButtonOk2(b){0==amtcert_loadP12File(b.target.result,Q("certopenpass").value,issueCertButtonOk3)&&messagebox("\u7b7e\u53d1\u8bc1\u4e66","\u65e0\u6cd5\u89e3\u5bc6/\u89e3\u7801\u8bc1\u4e66\u3002")}
1064 function issueCertButtonOk3(b,c,a){xxCaPrivateKey=b;xxCaSubjectAttributes=c;amtstack.AMT_PublicKeyManagementService_GenerateKeyPair(0,2048,GenerateKeyPairResponse)}
1065 function GenerateKeyPairResponse(b,c,a,d){200!=d?messagebox("\u7b7e\u53d1\u8bc1\u4e66","\u65e0\u6cd5\u751f\u6210\u5bc6\u94a5\u5bf9\u3002\u72b6\u6001\uff1a"+d):0!=a.Body.ReturnValue?messagebox("\u7b7e\u53d1\u8bc1\u4e66","\u65e0\u6cd5\u751f\u6210\u5bc6\u94a5\u5bf9\uff0c"+a.Body.ReturnValueStr):amtstack.Enum("AMT_PublicPrivateKeyPair",GenerateKeyPairResponse2,a.Body.KeyPair.ReferenceParameters.SelectorSet.Selector.Value)}
1065 -function GenerateKeyPairResponse2(b,c,a,d,g){if(200!=d)messagebox("\u7b7e\u53d1\u8bc1\u4e66","\u65e0\u6cd5\u751f\u6210\u5bc6\u94a5\u5bf9\u3002\u72b6\u6001\uff1a"+d);else{b=null;for(var v in a)a[v].InstanceID==g&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};g={CN:"\u4e0d\u53d7\u4fe1\u4efb\u7684\u6839\u8bc1\u4e66"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in g={},xxCaSubjectAttributes)g[xxCaSubjectAttributes[v].shortName]=
1066 -xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,g,v);null==v?messagebox("\u7b7e\u53d1\u8bc1\u4e66","\u65e0\u6cd5\u7b7e\u7f72\u8bc1\u4e66\u3002"):(v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,
1066 +function GenerateKeyPairResponse2(b,c,a,d,e){if(200!=d)messagebox("\u7b7e\u53d1\u8bc1\u4e66","\u65e0\u6cd5\u751f\u6210\u5bc6\u94a5\u5bf9\u3002\u72b6\u6001\uff1a"+d);else{b=null;for(var v in a)a[v].InstanceID==e&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};e={CN:"\u4e0d\u53d7\u4fe1\u4efb\u7684\u6839\u8bc1\u4e66"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in e={},xxCaSubjectAttributes)e[xxCaSubjectAttributes[v].shortName]=
1067 +xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,e,v);null==v?messagebox("\u7b7e\u53d1\u8bc1\u4e66","\u65e0\u6cd5\u7b7e\u7f72\u8bc1\u4e66\u3002"):(v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,
1068 v.length-25),GenerateKeyPairResponse4))}}function GenerateKeyPairResponse4(b,c,a,d){200!=d?messagebox("\u7b7e\u53d1\u8bc1\u4e66","\u65e0\u6cd5\u751f\u6210\u5bc6\u94a5\u5bf9\u3002\u72b6\u6001\uff1a"+d):PullCertificates()}function certificateAdded(b,c,a,d){200!=d||0!=a.Body.ReturnValue?messagebox("\u6dfb\u52a0\u8bc1\u4e66","\u65e0\u6cd5\u6dfb\u52a0\u8bc1\u4e66\uff0c\u9519\u8bef"+(200!=d?d:a.Body.ReturnValueStr)):PullCertificates()}
1069 function certificateRemoved(b,c,a,d){200!=d?messagebox("\u5220\u9664\u8bc1\u4e66","\u65e0\u6cd5\u5220\u9664\u8bc1\u4e66\uff0c\u9519\u8bef"+d):PullCertificates()}function getInputElement(b){var c=document.getElementsByTagName("input");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}function getSelectElement(b){var c=document.getElementsByTagName("select");for(t=0;t<c.length;t++)if(c[t].id==b)return c[t]}
1069 -function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>\u65e0\u8bc1\u4e66\uff0c\u7981\u7528TLS</option>";for(var c in xxCertificates)0!=xxCertificates[c].TrustedRootCertficate||!xxCertificates[c].XPrivateKey||null!=xxTlsCurrentCert&&xxTlsCurrentCert!=c||(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>\u8bc1\u4e66</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1070 +function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<div style=height:26px;margin-top:4px><select onchange=showSetTlsSecurityDlgUpdate() id=tlscert style=float:right;width:260px><option value=-1>\u65e0\u8bc1\u4e66\uff0c\u7981\u7528TLS</option>";for(var c in xxCertificates)0==xxCertificates[c].TrustedRootCertficate&&xxCertificates[c].XPrivateKey&&(b+="<option value="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><div style=padding-top:4px>\u8bc1\u4e66</div></div><div style=height:26px;margin-top:4px><select id=tlsremote style=float:right;width:260px onchange=showSetTlsSecurityDlgUpdate()><option value=0>Server-auth TLS only</option><option value=1>Server-auth, non-TLS allowed</option>";
1071 b+="<option value=2>Mutual-auth TLS only</option><option value=3>Mutual-auth, non-TLS allowed</option>";b+='</select><div style=padding-top:4px>Security</div></div><div style=height:26px id=d11rcn title="\u9017\u53f7\u5206\u9694\u7684\u8bc1\u4e66\u901a\u7528\u540d\u79f0\u5217\u8868\uff0c\u5c06\u5141\u8bb8\u5b83\u4eec\u8fdc\u7a0b\u8fde\u63a5\u3002"><input id=d11_rcn style=float:right;width:260px onkeyup=showSetTlsSecurityDlgUpdate() placeholder="\u540d\u79f01\uff0c\u540d\u79f02"><div style=padding-top:4px>\u8fdc\u7a0bCN</div></div>';
1072 setDialogMode(11,"TLS\u8bbe\u7f6e",3,showSetTlsSecurityDlgOk,b);if(0==xxTLSCredentialContext.length||0==xxTlsSettings[0].Enabled||0==xxTlsSettings[1].Enabled)getSelectElement("tlscert").value=-1;else for(c in b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value,xxCertificates)xxCertificates[c].InstanceID==b&&(getSelectElement("tlscert").value=c);c=1-("Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1);getSelectElement("tlsremote").value=(1==xxTlsSettings[c].MutualAuthentication?
1072 -2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c54",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1073 +2:0)+(1==xxTlsSettings[c].AcceptNonSecureConnections?1:0);xxTlsSettings[c].TrustedCN&&(Q("d11_rcn").value=MakeToArray(xxTlsSettings[c].TrustedCN).join(", "));showSetTlsSecurityDlgUpdate()}}function showSetTlsSecurityDlgUpdate(){var b=getSelectElement("tlscert").value;QE("tlsremote",-1!=b);QV("d11rcn",-1!=b&&1<getSelectElement("tlsremote").value);b=!0;1<getSelectElement("tlsremote").value&&!splitDomains(Q("d11_rcn").value)&&(b=!1);QE("c106",b)}var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
1074 function showSetTlsSecurityDlgOk(){var b=getSelectElement("tlscert").value,c=getSelectElement("tlsremote").value,a=Clone(xxTlsSettings);setTlsSecurityPendingCalls=0;setTlsSecurityDeleteCredentialContext=null;if(-1!=b){if(0<xxTLSCredentialContext.length){var d=Clone(xxTLSCredentialContext[0]);d.ElementInContext.ReferenceParameters.SelectorSet.Selector.Value=xxCertificates[b].InstanceID;amtstack.Put("AMT_TLSCredentialContext",d,setTlsSecurityResponse,0,1)}else amtstack.Create("AMT_TLSCredentialContext",
1075 {ElementInContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[b].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",ElementProvidingContext:"<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_TLSProtocolEndpointCollection")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters>'},
1075 -setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,g=1-d;a[g].Enabled=-1!=b;a[g].MutualAuthentication=2<=c;a[g].AcceptNonSecureConnections=1==c%2;a[g].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1076 +setTlsSecurityResponse);setTlsSecurityPendingCalls++}else 0<xxTLSCredentialContext.length&&(setTlsSecurityDeleteCredentialContext=Clone(xxTLSCredentialContext[0]));var d="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,e=1-d;a[e].Enabled=-1!=b;a[e].MutualAuthentication=2<=c;a[e].AcceptNonSecureConnections=1==c%2;a[e].TrustedCN=splitDomains(Q("d11_rcn").value);a[d].Enabled=-1!=b;a[d].TrustedCN=splitDomains(Q("d11_rcn").value);2<=c&&(setTlsSecurityPendingCalls++,amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(a,
1077 b,c,d){200!=d?messagebox("","\u8bbe\u7f6e\u65f6\u95f4\u5931\u8d25\uff0c\u72b6\u6001="+d):0!=c.Body.ReturnValue?messagebox("","\u8bbe\u7f6e\u65f6\u95f4\u5931\u8d25\uff0c\u9519\u8bef\uff1a"+c.Body.ReturnValueStr):(a=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(c.Body.Ta0,a,a,function(){setTlsSecurityResponse()}))}));setTlsSecurityPendingCalls+=2;amtstack.Put("AMT_TLSSettingData",a[0],setTlsSecurityResponse,0,1,a[0]);amtstack.Put("AMT_TLSSettingData",
1078 a[1],setTlsSecurityResponse,0,1,a[1]);statusbox("TLS\u8bbe\u7f6e","\u6b63\u5728\u5e94\u7528\u65b0\u7684\u5b89\u5168\u8bbe\u7f6e...")}function splitDomains(b){b=b.split(",");if(0!=b.length){for(var c in b)if(b[c]=b[c].trim(),0<=b[c].indexOf(" ")||0==b[c].length)return;if(!(4<b.length))return b}}
1079 function setTlsSecurityResponse(b,c,a,d){if(b){if(200!=d){messagebox("","\u65e0\u6cd5\u8bbe\u7f6eTLS\u5b89\u5168\u6027\uff0c\u72b6\u6001="+d);return}if(a.Body.ReturnValueStr&&!methodcheck(a))return}0==--setTlsSecurityPendingCalls&&amtstack.AMT_SetupAndConfigurationService_CommitChanges(null,setTlsSecurityResponse2)}
1080 function setTlsSecurityResponse2(b,c,a,d){200!=d?messagebox("","\u65e0\u6cd5\u8bbe\u7f6eTLS\u5b89\u5168\u6027\uff0c\u72b6\u6001="+d):0!=a.Body.ReturnValue?messagebox("","\u65e0\u6cd5\u8bbe\u7f6eTLS\u5b89\u5168\u6027\uff0c\u9519\u8bef\uff1a"+a.Body.ReturnValueStr):setTimeout(setTlsSecurityResponse3,2E3)}
1081 function setTlsSecurityResponse3(){null!=setTlsSecurityDeleteCredentialContext&&amtstack.Delete("AMT_TLSCredentialContext",setTlsSecurityDeleteCredentialContext,function(){});PullCertificates();setDialogMode();amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}var xxWatchdog=null;
1082 function PullWatchdog(){amtstack.BatchEnum(null,["*AMT_AgentPresenceCapabilities","AMT_AgentPresenceWatchdog","AMT_AgentPresenceWatchdogAction","AMT_StateTransitionCondition","CIM_ConcreteDependency"],PullWatchdogResponse)}
1082 -function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var g in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[g],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1083 +function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var e in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[e],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
1084 "@Name","PolicyConditionName").Value,d=getItem(xxWatchdog.AMT_AgentPresenceWatchdog.responses,"DeviceID",d),a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,"PolicyConditionName",a),d.transitions||(d.transitions=[]),d.transitions.push(a)),c&&"AMT_StateTransitionCondition"==c.Value&&(a=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyConditionName").Value,b=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyActionName").Value,a=getItem(xxWatchdog.AMT_StateTransitionCondition.responses,
1085 "PolicyConditionName",a),b=getItem(xxWatchdog.AMT_AgentPresenceWatchdogAction.responses,"PolicyActionName",b),a.actions||(a.actions=[]),a.actions.push(b));updateWatchdog();QV("go19",!0)}}var watchdogEnabledStates="\u672a\u77e5 \u5176\u4ed6 \u5df2\u542f\u7528 \u6b8b\u969c\u4eba\u58eb \u5173\u673a \u4e0d\u9002\u7528 \u5df2\u542f\u7528\u4f46\u79bb\u7ebf \u6d4b\u8bd5\u4e2d \u9012\u5ef6 \u505c\u987f \u5f00\u59cb".split(" "),watchdogMonitoredEntity="\u672a\u77e5 \u5176\u4ed6 \u64cd\u4f5c\u7cfb\u7edf \u64cd\u4f5c\u7cfb\u7edf\u542f\u52a8\u8fc7\u7a0b \u64cd\u4f5c\u7cfb\u7edf\u5173\u95ed\u8fc7\u7a0b \u56fa\u4ef6\u542f\u52a8\u8fc7\u7a0b BIOS\u5f15\u5bfc\u8fc7\u7a0b \u5e94\u7528 \u670d\u52a1\u5904\u7406\u5668".split(" ");
1086 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("\u6700\u5927\u770b\u95e8\u72d7",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" \u76d1\u5bdf\u8005");b+=TableEntry("\u6700\u5927\u603b\u52a8\u4f5c",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" \u884c\u52a8");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u82f1\u7279\u5c14&reg;AMT\u4ee3\u7406\u72b6\u6001\u76d1\u89c6\u7a0b\u5e8f\u3002<br><br>";
1087 if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>\u627e\u4e0d\u5230\u4ee3\u7406\u4eba\u72b6\u6001\u76d1\u89c6\u7a0b\u5e8f\u3002</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));
1087 -b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="\u6dfb\u52a0\u52a8\u4f5c..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="\u5220\u9664\u52a8\u4f5c..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",g;for(g in a.transitions){var v=a.transitions[g];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+
1088 -" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" \uff1a\u8981\u8bb0\u5f55\u7684\u4e8b\u4ef6")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("\u6dfb\u52a0\u770b\u95e8\u72d7...","AddWatchdog()"));b+="<br>";QH(54,b)}}
1088 +b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="\u6dfb\u52a0\u52a8\u4f5c..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="\u5220\u9664\u52a8\u4f5c..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+
1089 +" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" \uff1a\u8981\u8bb0\u5f55\u7684\u4e8b\u4ef6")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("\u6dfb\u52a0\u770b\u95e8\u72d7...","AddWatchdog()"));b+="<br>";QH(55,b)}}
1090 function getWatchdogTransitionStr(b){if(31==b)return"\u4efb\u4f55\u56fd\u5bb6";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1091 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("\u63cf\u8ff0",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("\u53d7\u76d1\u63a7\u5b9e\u4f53",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("\u5f53\u524d\u72b6\u6001",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("\u542f\u7528\u72b6\u6001",watchdogEnabledStates[b.EnabledState]);c+=
1092 addHtmlValue("\u542f\u52a8\u95f4\u9694",b.StartupInterval+" \u79d2");c+=addHtmlValue("\u8d85\u65f6\u95f4\u9694",b.TimeoutInterval+" \u79d2");setDialogMode(11,format("\u770b\u95e8\u72d7{0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
1093 function AddWatchdog(){var b;b="<div style=height:26px;margin-top:4px><input id=wgname style=float:right;width:240px maxlength=16 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>\u540d\u79f0</div></div>"+('<div style=height:26px;margin-top:4px><input id=wgguid style=float:right;width:240px maxlength=36 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px title="\u4ea7\u751f\u968f\u673a\u7684DeviceID">'+addLink("\u8bbe\u5907ID","GenerateWatchdogGuid()")+"</div></div>");b+="<div style=height:26px;margin-top:4px><input id=wgstart style=float:right;width:240px maxlength=8 placeholder=3600 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>\u542f\u52a8\uff08\u79d2\uff09</div></div>";
1094 b+="<div style=height:26px;margin-top:4px><input id=wgtimeout style=float:right;width:240px maxlength=8 placeholder=60 onkeyup=AddWatchdogUpdate()><div style=padding-top:4px>\u8d85\u65f6\uff08\u79d2\uff09</div></div>";setDialogMode(11,"\u6dfb\u52a0\u770b\u95e8\u72d7",3,AddWatchdogOk,b);AddWatchdogUpdate()}function GenerateWatchdogGuid(){var b,c="";for(b=0;16>b;b++)c+=String.fromCharCode(random(255));Q("wgguid").value=guidToStr(rstr2hex(c));AddWatchdogUpdate()}
1094 -function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var g=a.charCodeAt(d);45!=g&&(48<=g&&57>=g||97<=g&&102>=g?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1095 +function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){var e=a.charCodeAt(d);45!=e&&(48<=e&&57>=e||97<=e&&102>=e?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
1096 function AddWatchdogOk(){var b=Q("wgtimeout").value,c=Q("wgstart").value;""==b&&(b=60);""==c&&(c=3600);b={CreationClassName:0,DeviceID:btoa(hex2rstr(guidToStr(Q("wgguid").value.replace(/-/g,"")).replace(/-/g,""))),StartupInterval:c,SystemCreationClassName:0,SystemName:0,TimeoutInterval:b,MonitoredEntityDescription:Q("wgname").value};amtstack.Create("AMT_AgentPresenceWatchdog",b,AddWatchdogOk2)}
1097 function AddWatchdogOk2(b,c,a,d){200!=d?messagebox("\u770b\u95e8\u72d7","\u65e0\u6cd5\u6dfb\u52a0\u770b\u95e8\u72d7\uff0c\u9519\u8bef\uff03"+d):PullWatchdog()}
1098 function addWatchdogAction(b,c){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d;d="<table><td style=width:180px>\u4ece<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsa"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";d+="<td>\u81f3<br>";for(c in amtstack.WatchdogCurrentStates)d+="<input id=wgsb"+c+" type=checkbox onclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br />";setDialogMode(11,"\u6dfb\u52a0\u770b\u95e8\u72d7\u52a8\u4f5c",
1099 3,addWatchdogActionOk,d+"</table><br>\u6267\u884c\u52a8\u4f5c<br><input id=wgsevent type=checkbox checked onclick=addWatchdogActionUpdate()>\u5199\u5165\u4e8b\u4ef6\u65e5\u5fd7<br />",a);addWatchdogActionUpdate();haltEvent(b)}function addWatchdogActionUpdate(){var b=0,c=0,a;for(a in amtstack.WatchdogCurrentStates)1==Q("wgsa"+a).checked&&(b+=parseInt(a)),1==Q("wgsb"+a).checked&&(c+=parseInt(a));QE("dlgOkButton",0<b&&0<c&&1==Q("wgsevent").checked)}
1099 -function addWatchdogActionOk(b,c){var a=0,d=0,g;for(g in amtstack.WatchdogCurrentStates)1==Q("wgsa"+g).checked&&(a+=parseInt(g)),1==Q("wgsb"+g).checked&&(d+=parseInt(g));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
1100 +function addWatchdogActionOk(b,c){var a=0,d=0,e;for(e in amtstack.WatchdogCurrentStates)1==Q("wgsa"+e).checked&&(a+=parseInt(e)),1==Q("wgsb"+e).checked&&(d+=parseInt(e));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
1101 function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("\u770b\u95e8\u72d7\u52a8\u4f5c","\u65e0\u6cd5\u6dfb\u52a0\u770b\u95e8\u72d7\u64cd\u4f5c\uff0c\u9519\u8bef\uff03"+d):PullWatchdog()}function deleteWatchdogActions(b,c){setDialogMode(11,"\u5220\u9664\u770b\u95e8\u72d7\u52a8\u4f5c",3,deleteWatchdogActionsOk,"\u5220\u9664\u6b64\u770b\u95e8\u72d7\u7684\u6240\u6709\u64cd\u4f5c\uff1f",xxWatchdog.AMT_AgentPresenceWatchdog.responses[c]);haltEvent(b)}
1102 function deleteWatchdogActionsOk(b,c){amtstack.AMT_AgentPresenceWatchdog_DeleteAllActions(deleteWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}function deleteWatchdogActionResponse(b,c,a,d){200!=d?messagebox("\u770b\u95e8\u72d7\u52a8\u4f5c","\u65e0\u6cd5\u5220\u9664\u770b\u95e8\u72d7\u64cd\u4f5c\uff0c\u9519\u8bef\uff03"+d):PullWatchdog()}
1103 var xxSystemDefense=null,xxSystemDefenceLinkedPolicy={},xxUpdatingDefenseStats=!1,xxFilterStatistics=[{},{}],xxFilterStatisticsTimer=null,xxFilterStatisticsTimerActive=!1,xxSystemDefenceFilterEthernetTypes={2048:"\u6240\u6709IP\u6570\u636e\u5305",2054:"\u6240\u6709ARP\u6570\u636e\u5305"},xxSystemDefenceFilterIPTypes={4:"IPv4",6:"IPv6"},xxSystemDefenceFilterDesc={0:"\u5141\u8bb8\uff0c\u8ba1\u6570",1:"\u6389\u843d\uff0c\u8ba1\u6570",2:"\u901f\u7387\u9650\u5236",3:"\u5141\u8bb8",4:"\u4e0b\u964d"},xxSystemDefenceFilters=
1104 {HdrProtocolID:1,HdrDestAddress:2,HdrDestMask:2,HdrSrcAddress:2,HdrSrcMask:2,HdrSrcPortStart:1,HdrSrcPortEnd:1,HdrDestPortStart:1,HdrDestPortEnd:1,HdrSrcAddressEndOfRange:2,"HdrDestAddressEndOfRange ":2,TCPFlagsOn:3,TCPFlagsOff:3};function PullSystemDefense(){amtFirstPull|=4;amtstack.BatchEnum(null,["AMT_SystemDefensePolicy","AMT_NetworkPortSystemDefensePolicy","AMT_Hdr8021Filter","AMT_IPHeadersFilter","AMT_NetworkFilter"],PullSystemDefenseResponse)}
1105 function PullSystemDefenseResponse(b,c,a,d){200==d&&(xxSystemDefense=a,updateSystemDefense(),QV("go18",!0),urlvars.norefresh&&UpdateDefenseStats())}
1106 function updateSystemDefense(){if(null!=xxSystemDefense){var b="";xxSystemDefenceLinkedPolicy={};for(var c in xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses){var a=xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses[c],d=+getItem(a.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value.substring(27),a=getItem(xxSystemDefense.AMT_SystemDefensePolicy.responses,"InstanceID",a.Dependent.ReferenceParameters.SelectorSet.Selector.Value);xxSystemDefenceLinkedPolicy[d]=
1106 -a}b+=TableStart();c="<i>\u6ca1\u6709</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("\u9ed8\u8ba4\u6709\u7ebf\u7b56\u7565",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],g;for(g in a)d=a[g],d+=" \u5305",b+=TableEntry((0==c?"\u6709\u7ebf":"\u65e0\u7ebf")+g,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>\u7ba1\u7406\u82f1\u7279\u5c14&reg;AMT\u7cfb\u7edf\u9632\u5fa1\u7b56\u7565\u3002<br><br>";
1107 +a}b+=TableStart();c="<i>\u6ca1\u6709</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("\u9ed8\u8ba4\u6709\u7ebf\u7b56\u7565",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],e;for(e in a)d=a[e],d+=" \u5305",b+=TableEntry((0==c?"\u6709\u7ebf":"\u65e0\u7ebf")+e,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px;border:0><br>\u7ba1\u7406\u82f1\u7279\u5c14&reg;AMT\u7cfb\u7edf\u9632\u5fa1\u7b56\u7565\u3002<br><br>";
1108 if(0==xxSystemDefense.AMT_SystemDefensePolicy.responses.length)b+="<div style=padding-left:15px><i>\u627e\u4e0d\u5230\u7cfb\u7edf\u9632\u5fa1\u7b56\u7565\u3002</i></div><br>";else for(c in xxSystemDefense.AMT_SystemDefensePolicy.responses)a=xxSystemDefense.AMT_SystemDefensePolicy.responses[c],d="",a.FilterCreationHandles&&(a.FilterCreationHandles=MakeToArray(a.FilterCreationHandles),d=a.FilterCreationHandles.length,d=", "+d+" filter"+(1<d?"s":"")),b+="<div class=itemBar onclick=showPolicyDetails("+
1109 c+")><div style=padding-top:3px><b>"+EscapeHtml(a.PolicyName)+"</b>"+d+"</div></div>";b+="<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u82f1\u7279\u5c14&reg;AMT\u7cfb\u7edf\u9632\u5fa1\u8fc7\u6ee4\u5668\u3002<br><br>";if(0==xxSystemDefense.AMT_Hdr8021Filter.responses.length&&0==xxSystemDefense.AMT_IPHeadersFilter.responses.length)b+="<div style=padding-left:15px><i>\u627e\u4e0d\u5230\u7cfb\u7edf\u9632\u5fa1\u8fc7\u6ee4\u5668\u3002</i></div><br>";else{for(c in xxSystemDefense.AMT_Hdr8021Filter.responses)a=
1110 xxSystemDefense.AMT_Hdr8021Filter.responses[c],(d=xxSystemDefenceFilterEthernetTypes[a.HdrProtocolID8021])||(d="\u6240\u6709\u4ee5\u592a\u7f51\u534f\u8bae"+a.HdrProtocolID8021),d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile],2==a.FilterProfile&&(d+=" \u5728"+a.FilterProfileData+" \u5305/\u79d2"),1==a.ActionEventOnMatch&&(d+="\uff0c\u6bd4\u8d5b\u8fdb\u884c\u4e2d"),b+="<div class=itemBar onclick=showFilterDetails(0,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+
1110 -EscapeHtml(a.Name)+"</b>, "+d+"</div></div>";for(c in xxSystemDefense.AMT_IPHeadersFilter.responses){a=xxSystemDefense.AMT_IPHeadersFilter.responses[c];(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="\u6240\u6709\u4ee5\u592a\u7f51\u534f\u8bae"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" \u5728"+a.FilterProfileData+" \u5305/\u79d2");1==a.ActionEventOnMatch&&(d+="\uff0c\u6bd4\u8d5b\u8fdb\u884c\u4e2d");var v=0;for(g in xxSystemDefenceFilters)a[g]&&
1111 -v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("\u6dfb\u52a0\u8fc7\u6ee4\u5668...","AddDefenseFilter()")+AddButton("\u65b0\u589e\u653f\u7b56...","AddDefensePolicy()"));QH(53,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=
1111 +EscapeHtml(a.Name)+"</b>, "+d+"</div></div>";for(c in xxSystemDefense.AMT_IPHeadersFilter.responses){a=xxSystemDefense.AMT_IPHeadersFilter.responses[c];(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="\u6240\u6709\u4ee5\u592a\u7f51\u534f\u8bae"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" \u5728"+a.FilterProfileData+" \u5305/\u79d2");1==a.ActionEventOnMatch&&(d+="\uff0c\u6bd4\u8d5b\u8fdb\u884c\u4e2d");var v=0;for(e in xxSystemDefenceFilters)a[e]&&
1112 +v++;0<v&&(d+=", "+v+" filter"+(1<v?"s":""));b+="<div class=itemBar onclick=showFilterDetails(1,"+c+")><div style=padding-top:3px><b>"+(0==a.FilterDirection?"&#8592; ":"&#8594; ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>"}}b+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("\u6dfb\u52a0\u8fc7\u6ee4\u5668...","AddDefenseFilter()")+AddButton("\u65b0\u589e\u653f\u7b56...","AddDefensePolicy()"));QH(54,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=
1113 !1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,5E3)))}}function StopDefenseStatsTimer(){null!=xxFilterStatisticsTimer&&(clearInterval(xxFilterStatisticsTimer),xxFilterStatisticsTimer=null);xxFilterStatisticsTimerActive=!1}
1114 function UpdateDefenseStats(b){if(b||1!=xxFilterStatisticsTimerActive)xxFilterStatisticsTimerActive=!0,b=b?b:0,xxSystemDefenceLinkedPolicy[b]?amtstack.AMT_SystemDefensePolicy_UpdateStatistics('<a:Address></a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+b+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",!1,UpdateDefenseStats2,b,0,{InstanceID:xxSystemDefenceLinkedPolicy[b].InstanceID}):
1114 -(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,g){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,g):StopDefenseStatsTimer()}
1115 -function UpdateDefenseStats3(b,c,a,d,g){b=0;if(200==d){xxFilterStatistics[g]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[g][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1115 +(xxFilterStatistics[b]={},StopDefenseStatsTimer())}function UpdateDefenseStats2(b,c,a,d,e){200==d?amtstack.Enum("AMT_ActiveFilterStatistics",UpdateDefenseStats3,e):StopDefenseStatsTimer()}
1116 +function UpdateDefenseStats3(b,c,a,d,e){b=0;if(200==d){xxFilterStatistics[e]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[e][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
1117 function changeDefaultPolicy(b){if(!xxdialogMode){var c;c="<div style=height:26px;margin-top:4px><select id=policySelection style=float:right;width:266px><option value=-1>\u6ca1\u6709";for(var a in xxSystemDefense.AMT_SystemDefensePolicy.responses)c+="<option value="+a+(xxSystemDefenceLinkedPolicy[b]&&xxSystemDefense.AMT_SystemDefensePolicy.responses[a].InstanceID==xxSystemDefenceLinkedPolicy[b].InstanceID?" selected":"")+">"+xxSystemDefense.AMT_SystemDefensePolicy.responses[a].PolicyName;setDialogMode(11,
1118 "\u9ed8\u8ba4\u7cfb\u7edf\u9632\u5fa1\u7b56\u7565",3,changeDefaultPolicyOk,c+"</select><div style=padding-top:4px>\u9ed8\u8ba4\u7b56\u7565</div></div>",b)}}
1119 function changeDefaultPolicyOk(b,c){var a=Q("policySelection").value,d=xxSystemDefenceLinkedPolicy[c];d&&amtstack.Delete("AMT_NetworkPortSystemDefensePolicy",'<w:SelectorSet><w:Selector Name="Antecedent"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">CIM_EthernetPort</w:Selector><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port '+c+
@@ -1125,122 +1126,140 @@ function AddDefenseFilter(){if(!xxdialogMode){var b;b="<div style=height:26px;ma
1126 b+="<div style=height:26px;margin-top:4px><select id=filterprofile style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=0>\u5141\u8bb8\uff0c\u8ba1\u6570<option value=1>\u6389\u843d\uff0c\u8ba1\u6570<option value=2>\u901f\u7387\u9650\u5236<option value=3>\u5141\u8bb8<option value=4>\u4e0b\u964d</select><div style=padding-top:4px>\u884c\u52a8</div></div>";b+="<div style=height:26px;margin-top:4px id=filterdatadiv><input id=filterdata style=float:right;width:260px maxlength=8 onkeyup=AddDefenseFilterUpdate()><div style=padding-top:4px>\u5305/\u79d2</div></div>";
1127 b+="<div style=height:26px;margin-top:4px><select id=filteraction style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=false>\u6ca1\u505a\u4ec0\u4e48<option value=1>\u6bd4\u8d5b\u4e2d\u7684\u8d5b\u4e8b</select><div style=padding-top:4px>\u4e8b\u4ef6\u7c3f</div></div>";setDialogMode(11,"\u6dfb\u52a0\u7cfb\u7edf\u9632\u5fa1\u8fc7\u6ee4\u5668",3,AddDefenseFilterOk,b);AddDefenseFilterUpdate()}}
1128 function AddDefenseFilterOk(){if(1>=Q("filtertype").value){var b=0==Q("filtertype").value?2048:2054,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrProtocolID8021:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value};2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_Hdr8021Filter",c,AddDefenseFilterOk2)}else{var b=2==Q("filtertype").value?
1128 -4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var g=a[d].indexOf("="),v=a[d].substring(0,g),g=a[d].substring(g+1),n=xxSystemDefenceFilters[v];n||(v="\u4eba\u7c7b\u53d1\u5c55\u62a5\u544a"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(g=g.split("."),4==g.length&&
1129 -(c[v]=rstr2hex(String.fromCharCode(parseInt(g[0]),parseInt(g[1]),parseInt(g[2]),parseInt(g[3]))))):c[v]=g)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}
1130 -function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c54",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}function AddDefenseFilterOk2(b,c,a,d){200!=d?messagebox("\u6dfb\u52a0\u7cfb\u7edf\u9632\u5fa1\u8fc7\u6ee4\u5668","\u65e0\u6cd5\u6dfb\u52a0\u8fc7\u6ee4\u5668\uff0c\u9519\u8bef\uff03"+d):PullSystemDefense()}
1131 -function showFilterDetails(b,c){if(!xxdialogMode){var a,d,g,v;0==b?(v="AMT_Hdr8021Filter",g="\u4ee5\u592a\u7f51\u6d41\u91cf",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="\u6240\u6709\u4ee5\u592a\u7f51\u534f\u8bae"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",g="IP\u6d41\u91cf",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="\u5168IP\u534f\u8bae"+d.HdrIPVersion));var n;n=""+addHtmlValue("\u540d\u79f0",EscapeHtml(d.Name));
1132 -n+=addHtmlValue("\u7c7b\u578b",g);n+=addHtmlValue("\u5339\u914d\u6d41\u91cf",a);n+=addHtmlValue("\u65b9\u5411",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,g=d[l],b=xxSystemDefenceFilters[l],2==b&&4==g.length&&(g=hex2rstr(g),g=g.charCodeAt(0)+"."+g.charCodeAt(1)+"."+g.charCodeAt(2)+"."+g.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("\u8fc7\u6ee4"+a,g));n+=addHtmlValue("\u6bd4\u8d5b\u4e2d\u7684\u8d5b\u4e8b",
1129 +4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var e=a[d].indexOf("="),v=a[d].substring(0,e),e=a[d].substring(e+1),n=xxSystemDefenceFilters[v];n||(v="\u4eba\u7c7b\u53d1\u5c55\u62a5\u544a"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(e=e.split("."),4==e.length&&
1130 +(c[v]=rstr2hex(String.fromCharCode(parseInt(e[0]),parseInt(e[1]),parseInt(e[2]),parseInt(e[3]))))):c[v]=e)}2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_IPHeadersFilter",c,AddDefenseFilterOk2)}}
1131 +function AddDefenseFilterUpdate(){var b=0<Q("filtername").value.length;b&&2==Q("filterprofile").value&&(b=parseInt(Q("filterdata").value),b=0<b&&4294967295>b);QE("c106",b);QV("filterdatadiv",2==Q("filterprofile").value);QV("ipfilterdiv",2<=Q("filtertype").value)}function AddDefenseFilterOk2(b,c,a,d){200!=d?messagebox("\u6dfb\u52a0\u7cfb\u7edf\u9632\u5fa1\u8fc7\u6ee4\u5668","\u65e0\u6cd5\u6dfb\u52a0\u8fc7\u6ee4\u5668\uff0c\u9519\u8bef\uff03"+d):PullSystemDefense()}
1132 +function showFilterDetails(b,c){if(!xxdialogMode){var a,d,e,v;0==b?(v="AMT_Hdr8021Filter",e="\u4ee5\u592a\u7f51\u6d41\u91cf",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="\u6240\u6709\u4ee5\u592a\u7f51\u534f\u8bae"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",e="IP\u6d41\u91cf",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="\u5168IP\u534f\u8bae"+d.HdrIPVersion));var n;n=""+addHtmlValue("\u540d\u79f0",EscapeHtml(d.Name));
1133 +n+=addHtmlValue("\u7c7b\u578b",e);n+=addHtmlValue("\u5339\u914d\u6d41\u91cf",a);n+=addHtmlValue("\u65b9\u5411",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,e=d[l],b=xxSystemDefenceFilters[l],2==b&&4==e.length&&(e=hex2rstr(e),e=e.charCodeAt(0)+"."+e.charCodeAt(1)+"."+e.charCodeAt(2)+"."+e.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("\u8fc7\u6ee4"+a,e));n+=addHtmlValue("\u6bd4\u8d5b\u4e2d\u7684\u8d5b\u4e8b",
1134 1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,"\u4ee5\u592a\u7f51\u8fc7\u6ee4\u5668"+d.InstanceID,5,showFilterDetailsOk,n,[v,d])}}function showFilterDetailsOk(b,c){2==b&&amtstack.Delete(c[0],c[1],deleteDefenseFilter)}function deleteDefenseFilter(b,c,a,d){200!=d?messagebox("\u5220\u9664\u8fc7\u6ee4\u5668","\u65e0\u6cd5\u5220\u9664\u8fc7\u6ee4\u5668\uff0c\u8bf7\u786e\u4fdd\u672a\u4f7f\u7528\u5b83\u3002"):PullSystemDefense()}var xxAddDefensePolicyFilters;
1135 function AddDefensePolicy(){if(!xxdialogMode){xxAddDefensePolicyFilters=[];var b;b='<div style=height:26px;margin-top:4px><input id=policyname title="<policy name>:<policy precedence number>" style=float:right;width:260px maxlength=16 onkeyup=AddDefensePolicyUpdate()><div style=padding-top:4px>\u540d\u79f0</div></div><div style=height:26px;margin-top:4px><select id=policytx title="\u5bf9\u51fa\u7ad9\u6d41\u91cf\u91c7\u53d6\u7684\u9ed8\u8ba4\u64cd\u4f5c" style=float:right;width:133px><option value=0>Allow<option value=1>\u4e0b\u964d<option value=2>\u5141\u8bb8\u8ba1\u6570<option value=3>\u843d\u6570<option value=4>\u5141\u8bb8\uff0c\u8ba1\u6570\uff0c\u4e8b\u4ef6<option value=5>\u6389\u843d\uff0c\u8ba1\u6570\uff0c\u4e8b\u4ef6</select><select id=policyrx style=float:right;width:133px title="\u5bf9\u5165\u7ad9\u6d41\u91cf\u91c7\u53d6\u7684\u9ed8\u8ba4\u64cd\u4f5c"><option value=0>\u5141\u8bb8<option value=1>\u4e0b\u964d<option value=2>\u5141\u8bb8\u8ba1\u6570<option value=3>\u843d\u6570<option value=4>\u5141\u8bb8\uff0c\u8ba1\u6570\uff0c\u4e8b\u4ef6<option value=5>\u6389\u843d\uff0c\u8ba1\u6570\uff0c\u4e8b\u4ef6</select><div style=padding-top:4px>\u9ed8\u8ba4\u53d1\u9001/\u63a5\u6536</div></div>';
1136 b+="<div id=policyFilters></div>";if(0<xxSystemDefense.AMT_Hdr8021Filter.responses.length||0<xxSystemDefense.AMT_IPHeadersFilter.responses.length){b+="<div style=height:26px;margin-top:4px><div style=float:right><select id=xfilter style=width:186px>";for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];b+="<option value="+a.InstanceID+">"+a.Name}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],
1137 b+="<option value="+a.InstanceID+">"+a.Name;b+="</select><input id=addFilterButton type=button value=Add style=width:80px onclick=addFilterButton()></div><div style=padding-top:4px>\u6dfb\u52a0\u8fc7\u6ee4\u5668</div></div>"}setDialogMode(11,"\u6dfb\u52a0\u7cfb\u7edf\u9632\u5fa1\u7b56\u7565",3,AddDefensePolicyOk,b);AddDefensePolicyUpdate()}}
1138 function addFilterButton(){0<=xxAddDefensePolicyFilters.indexOf(Q("xfilter").value)||(xxAddDefensePolicyFilters.push(Q("xfilter").value),AddDefensePolicyUpdate())}function removeFilterButton(b){xxAddDefensePolicyFilters.splice(b,1);AddDefensePolicyUpdate()}
1138 -function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c54",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>\u6b64\u7b56\u7565\u4e0d\u5305\u542b\u4efb\u4f55\u8fc7\u6ee4\u5668\u3002</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("\u53bb\u6389","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+
1139 +function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c106",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>\u6b64\u7b56\u7565\u4e0d\u5305\u542b\u4efb\u4f55\u8fc7\u6ee4\u5668\u3002</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("\u53bb\u6389","removeFilterButton("+c+")")+"</div><div style=padding-top:3px;max-width:260px;overflow:hidden><b>"+
1140 GetFilterById(xxAddDefensePolicyFilters[c]).Name+"</b></div></div>";QH("policyFilters",b)}}function GetFilterById(b){for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];if(a.InstanceID==b)return a}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)if(a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],a.InstanceID==b)return a}
1141 function AddDefensePolicyOk(){var b=Q("policytx").value,c=Q("policyrx").value,a=0,d=Q("policyname").value.split(":");2==d.length&&(a=parseInt(d[1]));b={"InstanceID ":0,PolicyName:d[0],PolicyPrecedence:a,TxDefaultCount:1<b,TxDefaultDrop:1==b%2,TxDefaultMatchEvent:3<b,RxDefaultCount:1<c,RxDefaultDrop:1==c%2,RxDefaultMatchEvent:3<c};0<xxAddDefensePolicyFilters.length&&(b.FilterCreationHandles=xxAddDefensePolicyFilters);amtstack.Create("AMT_SystemDefensePolicy",b,AddDefensePolicyOk2)}
1142 function AddDefensePolicyOk2(b,c,a,d){200!=d?messagebox("\u6dfb\u52a0\u7cfb\u7edf\u9632\u5fa1\u7b56\u7565","\u65e0\u6cd5\u6dfb\u52a0\u7b56\u7565\uff0c\u9519\u8bef\u7f16\u53f7"+d):PullSystemDefense()}
1143 function showPolicyDetails(b){if(!xxdialogMode){var c=xxSystemDefense.AMT_SystemDefensePolicy.responses[b],a;a=""+addHtmlValue("\u540d\u79f0",EscapeHtml(c.PolicyName));0!=c.PolicyPrecedence&&(a+=addHtmlValue("\u4f18\u5148\u987a\u5e8f",c.PolicyPrecedence));var d=1==c.TxDefaultDrop?"\u4e0b\u964d":"\u5141\u8bb8";1==c.TxDefaultCount&&(d+="\uff0c\u8ba1\u6570");1==c.TxDefaultMatchEvent&&(d+="\uff0c\u6d3b\u52a8");a+=addHtmlValue("\u9ed8\u8ba4\u53d1\u9001\u52a8\u4f5c",d);d=1==c.RxDefaultDrop?"Drop":"Allow";
1144 1==c.RxDefaultCount&&(d+=", Count");1==c.RxDefaultMatchEvent&&(d+=", Event");a+=addHtmlValue("\u9ed8\u8ba4\u63a5\u6536\u52a8\u4f5c",d);if(c.FilterCreationHandles)for(b in c.FilterCreationHandles)a+=addHtmlValue("\u8fc7\u6ee4\u5668\u7f16\u53f7"+(+b+1),GetFilterById(c.FilterCreationHandles[b]).Name);setDialogMode(11,format("\u653f\u7b56\u7f16\u53f7",c.InstanceID.substring(20)),5,showPolicyDetailsOk,a,c)}}
1145 function showPolicyDetailsOk(b,c){2==b&&amtstack.Delete("AMT_SystemDefensePolicy",c,deleteDefensePolicy)}function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("\u5220\u9664\u653f\u7b56","\u65e0\u6cd5\u5220\u9664\u653f\u7b56\uff0c\u8bf7\u786e\u4fdd\u8be5\u653f\u7b56\u672a\u88ab\u4f7f\u7528\u3002"):PullSystemDefense()}var xxWireless;
1145 -function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService *AMT_BootCapabilities".split(" "),processWireless)}function wifiRefresh(){xxdialogMode||PullWireless()}
1146 -var xxWifiState={3:"\u6b8b\u969c\u4eba\u58eb",32768:"\u5728S0\u4e2d\u542f\u7528",32769:"\u5728S0\uff0cSx / AC\u4e2d\u542f\u7528"},xxRadioState={2:"\u5f00\u542f\uff0c\u5df2\u8fde\u63a5",3:"\u5173",6:"\u5f00\u542f\uff0c\u5df2\u65ad\u5f00"},xxWifiAuthenticationMethod={1:"\u5176\u4ed6",2:"\u6253\u5f00",3:"\u5171\u7528\u91d1\u94a5",4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE"},xxWifiEncryptionMethod={1:"\u5176\u4ed6",2:"WEP",3:"TKIP-RC4",4:"\u8ba4\u8bc1\u534f\u8bae",
1147 -5:"\u6ca1\u6709"};function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1148 -function showWirelessInfo(){if(xxWireless){var b,c,a="",d,g;if(xxWireless.CIM_WiFiPortCapabilities.response){g="<br><h2>\u65e0\u7ebf\u914d\u7f6e\u6587\u4ef6</h2>"+TableStart2();g+="<tr><td class=r2 style=padding-left:15px><br>\u82f1\u7279\u5c14&reg;AMT\u5c06\u7528\u4e8e\u7f51\u7edc\u8fde\u63a5\u7684\u65e0\u7ebf\u914d\u7f6e\u6587\u4ef6\u3002<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&
1149 -d.Priority==b&&(g+="<div class=itemBar onclick=showWifiDetails("+c+")><div style=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+" &nbsp; ",xxAccountAdminName&&(g+=AddButton2("\u53bb\u6389",'wifiRemoveButton("'+c+'")')),g+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>",a++);0==a&&(g+="<i>\u6ca1\u6709\u65e0\u7ebf\u914d\u7f6e\u6587\u4ef6</i><br>");g+="<br><td class=r2>";g=xxAccountAdminName?
1150 -g+TableEnd(AddButton("\u65b0\u7684\u914d\u7f6e\u6587\u4ef6","showWifiNewProfile()")):g+TableEnd("");QH(20,g+"<br>")}}}function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"\u65e0\u7ebf\u72b6\u6001",3,wifiStateDlg,b)}}
1146 +function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService CIM_IEEE8021xSettings".split(" "),processWireless)}function wifiRefresh(){xxdialogMode||PullWireless()}
1147 +var xxWifiState={3:"\u6b8b\u969c\u4eba\u58eb",32768:"\u5728S0\u4e2d\u542f\u7528",32769:"\u5728S0\uff0cSx / AC\u4e2d\u542f\u7528"},xxRadioState={2:"\u5f00\u542f\uff0c\u5df2\u8fde\u63a5",3:"\u5173",6:"\u5f00\u542f\uff0c\u5df2\u65ad\u5f00"},xxWifiAuthenticationMethod={1:"\u5176\u4ed6",2:"\u6253\u5f00",3:"\u5171\u7528\u91d1\u94a5",4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE IEEE 802.1x",32769:"WPA3 OWE IEEE 802.1x"},xxWifiEncryptionMethod={1:"\u5176\u4ed6",2:"WEP",
1148 +3:"TKIP-RC4",4:"\u8ba4\u8bc1\u534f\u8bae",5:"\u6ca1\u6709"};function processWireless(b,c,a,d){xxWireless=200==d?a:void 0;updateSystemStatus();showWirelessInfo()}
1149 +function showWirelessInfo(){if(xxWireless){var b,c,a="",d,e;if(xxWireless.CIM_WiFiPortCapabilities.response){e="<br><h2>\u65e0\u7ebf\u914d\u7f6e\u6587\u4ef6</h2>"+TableStart2();e+="<tr><td class=r2 style=padding-left:15px><br>\u82f1\u7279\u5c14&reg;AMT\u5c06\u7528\u4e8e\u7f51\u7edc\u8fde\u63a5\u7684\u65e0\u7ebf\u914d\u7f6e\u6587\u4ef6\u3002<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)if(d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&
1150 +d.Priority==b){var v="",n=null,l="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");if(xxWireless.CIM_IEEE8021xSettings.responses)for(var p in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[p].ElementName==d.ElementName&&(n=xxWireless.CIM_IEEE8021xSettings.responses[p]);n&&(v=", "+l[n.AuthenticationProtocol]);e+="<div class=itemBar onclick=showWifiDetails("+c+")><div style=float:right>"+
1151 +EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+v+" &nbsp; ";xxAccountAdminName&&(e+=AddButton2("\u53bb\u6389",'wifiRemoveButton("'+c+'")'));e+="</div><div style=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>";a++}0==a&&(e+="<i>\u6ca1\u6709\u65e0\u7ebf\u914d\u7f6e\u6587\u4ef6</i><br>");e+="<br><td class=r2>";e=xxAccountAdminName?e+TableEnd(AddButton("\u65b0\u7684\u914d\u7f6e\u6587\u4ef6","showWifiNewProfile()")):
1152 +e+TableEnd("");QH(20,e+"<br>")}}}function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><input type=radio name=d11 id=wl"+c+" value="+c+" "+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"\u65e0\u7ebf\u72b6\u6001",3,wifiStateDlg,b)}}
1153 function wifiStateDlg(){amtstack.CIM_WiFiPort_RequestStateChange(document.querySelector("input[name=d11]:checked").value,null,function(){amtstack.Get("CIM_WiFiPort",function(b,c,a,d){200==d&&(xxWireless.CIM_WiFiPort.response=a.Body,showWirelessInfo())})})}
1154 function showWifiSyncDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d11 id=wl0 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">\u6b8b\u969c\u4eba\u58eb</label><br>");b+="<label><input type=radio name=d11 id=wl0 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">\u5df2\u542f\u7528</label><br>";setDialogMode(11,"Local Profile Sync",3,showWifiSyncDlgEx,
1153 -b)}}function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,g){200==g&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1155 +b)}}function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,e){200==e&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
1156 function showUefiWifiCoExDlg(){if(!xxdialogMode){var b;b=""+("<label><input type=radio name=d12 value=0 "+(0==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Disabled</label><br>");b+="<label><input type=radio name=d12 value=1 "+(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"checked":"")+">Enabled</label><br>";setDialogMode(11,"UEFI Wifi CoEx Profile Sharing",3,UefiWifiCoExDlg,b)}}
1155 -function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,g){200==g&&PullWireless()})}
1156 -function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("\u4e2a\u4eba\u8d44\u6599\u540d\u79f0",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",b.SSID);c+=addHtmlValue("\u8ba4\u8bc1\u65b9\u5f0f",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("\u52a0\u5bc6",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("\u4f18\u5148",b.Priority);messagebox("\u65e0\u7ebf\u914d\u7f6e\u6587\u4ef6",
1157 -c+"</div>")}}function wifiRemoveButton(b){xxdialogMode||(QH(60,format("\u5220\u9664\u65e0\u7ebf\u914d\u7f6e\u6587\u4ef6\u201c {0} \u201d\uff1f",xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"\u65e0\u7ebf\u914d\u7f6e\u6587\u4ef6",3,function(){removeWifiButtonEx(b)}))}function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1158 -function removeWifiEntryResponse(b,c,a,d,g){methodcheck(a)||amtstack.Enum("CIM_WiFiEndpointSettings",function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c,showWirelessInfo())})}
1159 -function showWifiNewProfile(){if(!xxdialogMode){var b="";for(i=1;256>i;i++){var c=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==i&&(c=0);c&&(b+="<option value="+i+">"+i)}QH("c24",b);QV("c26",13<amtversion);c25.value=6;c27.value=4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"\u6dfb\u52a0\u65e0\u7ebf\u914d\u7f6e\u6587\u4ef6",3,function(){addWifiProfile()});
1160 -updateWifiDialog()}}
1161 -function addWifiProfile(){amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},{__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c27.value,SSID:c23.value,Priority:c24.value,PSKPassPhrase:c28.value},
1162 -null,null,null,removeWifiEntryResponse)}
1163 -function updateWifiDialog(){var b=!0,c=c25.value,a=c27.value;QV(66,4>c);QV(65,3<c);QV(64,3<c);QV(67,4>c);4>c&&(3==a||4==a)&&(c27.value=2);3<c&&(2==a||5==a)&&(c27.value=3);32768==c&&(c27.value=4);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);QE("c54",1==b&&0<c22.value.length&&0<c23.value.length&&7<c28.value.length&&
1164 -c28.value==c29.value)}function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1165 -var DMTFCPUStatus="\u672a\u77e5 \u5df2\u542f\u7528 \u88ab\u7528\u6237\u7981\u7528 \u88abBIOS\u7981\u7528\uff08POST\u9519\u8bef\uff09 \u95f2 \u5176\u4ed6".split(" "),DMTFMemType="\u672a\u77e5 \u5176\u4ed6 \u8bb0\u5fc6\u4f53 \u540c\u6b65DRAM \u7f13\u5b58DRAM \u57c3\u591a \u5185\u5b58 \u865a\u62dfRAM SRAM \u5185\u5b58 \u53ea\u8bfb\u5b58\u50a8\u5668 \u95ea EEPROM \u524d\u9762\u677f \u53ea\u8bfb\u5b58\u50a8\u5668 \u8bb0\u5fc6\u4f53 3DRAM \u5185\u5b58 SGRAM \u5185\u5b58 DDR DDR-2 \u5185\u5b58 FB-DIMM DDR3 FBD2 DDR4 \u4f4e\u529f\u8017DDR LPDDR2 LPDDR3 LPDDR4".split(" "),
1166 -DMTFMemFormFactor=" \u5176\u4ed6 \u672a\u77e5 SIMM \u555c \u82af\u7247 \u8638 \u538b\u7f29 \u4e13\u6709\u5361 \u5185\u5b58\u6761 TSOP \u6392\u85af\u6761 RIMM SODIMM \u65af\u91cc\u59c6 FB-DIM".split(" "),DMTFProcFamilly={191:"\u82f1\u7279\u5c14&reg;\u9177\u777f&trade;2\u53cc\u6838\u5904\u7406\u5668",192:"\u82f1\u7279\u5c14&reg;\u9177\u777f&trade;2 Solo\u5904\u7406\u5668",193:"\u82f1\u7279\u5c14&reg;\u9177\u777f&trade;2\u81f3\u5c0a\u5904\u7406\u5668",194:"\u82f1\u7279\u5c14&reg;\u9177\u777f&trade;2\u56db\u6838\u5904\u7406\u5668",
1157 +function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,e){200==e&&PullWireless()})}
1158 +function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<div style=text-align:left>"+addHtmlValue("\u4e2a\u4eba\u8d44\u6599\u540d\u79f0",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",EscapeHtml(b.SSID));c+=addHtmlValue("\u8ba4\u8bc1\u65b9\u5f0f",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("\u52a0\u5bc6",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("\u4f18\u5148",b.Priority);var a=null,d="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-MD5 EAP-PSK EAP-SIM EAP-AKA EAP-FAST/TLS".split(" ");
1159 +if(xxWireless.CIM_IEEE8021xSettings.responses)for(var e in xxWireless.CIM_IEEE8021xSettings.responses)xxWireless.CIM_IEEE8021xSettings.responses[e].ElementName==b.ElementName&&(a=xxWireless.CIM_IEEE8021xSettings.responses[e]);a&&(c=c+'<div style="width:100%;border-bottom:1px solid #000;margin-bottom:5px;margin-top:5px">802.11x</div>'+addHtmlValue("\u8ba4\u8bc1\u65b9\u5f0f",d[a.AuthenticationProtocol]),a.Domain&&(c+=addHtmlValue("Domain",EscapeHtml(a.Domain))),a.Username&&(c+=addHtmlValue("\u7528\u6237\u540d",
1160 +EscapeHtml(a.Username))));c+="</div>";messagebox("\u65e0\u7ebf\u914d\u7f6e\u6587\u4ef6",c)}}function wifiRemoveButton(b){xxdialogMode||(QH(61,format("\u5220\u9664\u65e0\u7ebf\u914d\u7f6e\u6587\u4ef6\u201c {0} \u201d\uff1f",xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"\u65e0\u7ebf\u914d\u7f6e\u6587\u4ef6",3,function(){removeWifiButtonEx(b)}))}
1161 +function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
1162 +function removeWifiEntryResponse(b,c,a,d,e){methodcheck(a)||amtstack.BatchEnum("",["CIM_WiFiEndpointSettings","CIM_IEEE8021xSettings"],function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c.CIM_WiFiEndpointSettings.responses,xxWireless.CIM_IEEE8021xSettings.responses=c.CIM_IEEE8021xSettings.responses,showWirelessInfo())})}
1163 +function showWifiNewProfile(){if(!xxdialogMode){for(var b="",c=1;256>c;c++){var a=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==c&&(a=0);a&&(b+="<option value="+c+">"+c)}QH("c24",b);var b="<option value=-1>"+EscapeHtml("\u6ca1\u6709")+"</option>",a="<option value=-1>"+EscapeHtml("\u6ca1\u6709")+"</option>",c;for(c in xxCertificates)xxCertificates[c].TrustedRootCertficate?a+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+
1164 +"</option>":xxCertificates[c].XPrivateKey&&(b+='<option value="'+c+'">'+EscapeHtml(xxCertificates[c].XSubject.CN)+"</option>");QH("c50",b);QH("c52",a);c="<option value=32769>WPA3 OWE IEEE 802.1x</option><option value=32768>WPA3 SAE IEEE 802.1x</option>";c+="<option value=7>WPA2 IEEE 802.1x</option>";c+="<option value=5>WPA IEEE 802.1x</option>";c+="<option value=6>WPA2 PSK</option>";c+="<option value=4>WPA PSK</option>";QH("c25",c);c25.value=6;c26.value=
1165 +4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"\u6dfb\u52a0\u65e0\u7ebf\u914d\u7f6e\u6587\u4ef6",3,function(){addWifiProfile()});updateWifiDialog()}}
1166 +function addWifiProfile(){var b,c,a,d={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c26.value,SSID:c23.value,Priority:c24.value};if(4==c25.value||6==c25.value)d.PSKPassPhrase=c28.value;if(5==c25.value||7==c25.value||32768==c25.value||
1167 +32769==c25.value)b={__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_IEEE8021xSettings"),ElementName:"8021x-"+c22.value,InstanceID:"8021x-"+c22.value,ActiveInS0:1==Q("c54").value,AuthenticationProtocol:Q("c32").value},""!=Q("c44").value&&(b.RoamingIdentity=Q("c44").value),""!=Q("c34").value&&(b.ServerCertificateName=Q("c34").value,b.ServerCertificateNameComparison=Q("c36").value),
1168 +""!=Q("c40").value&&(b.Username=Q("c40").value),""!=Q("c42").value&&(b.Password=Q("c42").value),""!=Q("c38").value&&(b.Domain=Q("c38").value),3<Q("c32").value&&(b.ProtectedAccessCredential=Q("c46").value,b.PACPassword=Q("c48").value),0<=parseInt(Q("c50").value)&&(c='<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">'+
1169 +xxCertificates[parseInt(Q("c50").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>"),0<=parseInt(Q("c52").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">'+
1170 +xxCertificates[parseInt(Q("c52").value)].InstanceID+"</Selector></SelectorSet></ReferenceParameters>");console.log("wifiepsettinginput",JSON.stringify(d,null,2));console.log("netAuthProfile",JSON.stringify(b,null,2));console.log("netAuthSettingsClientCert",c);console.log("netAuthSettingsServerCaCert",a);amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},d,b,c,a,removeWifiEntryResponse)}
1171 +function updateWifiDialog(){var b=!0,c=c25.value,a=c26.value;4>c&&(3==a||4==a)&&(c26.value=2);3<c&&(2==a||5==a)&&(c26.value=3);if(32768==c||32769==c)c26.value=4;QV("c27",4==c||6==c);QV("c30",5==c||7==c||32768==c||32769==c);for(var d in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);0==c22.value.length&&0==c23.value.length&&(b=!1);4!=c&&6!=c||
1172 +!(8>c28.value.length||63<c28.value.length||c28.value!=c29.value)||(b=!1);QE("c106",b);updateNetAuthDialog()}function updateNetAuth2Dialog(){QV("c35",""!=Q("c33").value);QV("c45",3<Q("c32").value);QV("c47",3<Q("c32").value)}
1173 +function editNetAuthProfile(){if(!xxdialogMode){var b="<option value=-1>"+EscapeHtml("\u6ca1\u6709")+"</option>",c="<option value=-1>"+EscapeHtml("\u6ca1\u6709")+"</option>",a;for(a in xxCertificates)xxCertificates[a].TrustedRootCertficate?c+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>":xxCertificates[a].XPrivateKey&&(b+='<option value="'+a+'">'+EscapeHtml(xxCertificates[a].XSubject.CN)+"</option>");QH("c98",b);QH("c100",c);b=amtsysstate.AMT_8021XProfile.responses.Body;
1174 +Q("c78").value=b.Enabled?1:0;Q("c102").value=b.ActiveInS0?1:0;Q("c104").value=b.PxeTimeout;if(b.Enabled){Q("c80").value=b.AuthenticationProtocol;Q("c92").value=b.RoamingIdentity?b.RoamingIdentity:"";Q("c82").value=b.ServerCertificateName?b.ServerCertificateName:"";Q("c84").value=b.ServerCertificateNameComparison?b.ServerCertificateNameComparison:0;Q("c88").value=b.Username?b.Username:
1175 +"";Q("c90").value=b.Password?b.Password:"";Q("c86").value=b.Domain?b.Domain:"";Q("c94").value=b.ProtectedAccessCredential?b.ProtectedAccessCredential:"";Q("c96").value=b.PACPassword?b.PACPassword:"";var d=c=-1;b.ServerCertificateIssuer&&(c=b.ServerCertificateIssuer.ReferenceParameters.SelectorSet.Selector.Value);b.ClientCertificate&&(d=b.ClientCertificate.ReferenceParameters.SelectorSet.Selector.Value);for(a in xxCertificates)xxCertificates[a].InstanceID==
1176 +c&&(Q("c100").value=a),xxCertificates[a].InstanceID==d&&(Q("c98").value=a)}setDialogMode(27,"802.1x Profile",3,function(){setNetAuthProfile()});updateNetAuthDialog()}}
1177 +function updateNetAuthDialog(){QV("c79",1==Q("c78").value);QV("c81",1==Q("c78").value);QV("c83",1==Q("c78").value&&""!=Q("c82").value);QV("c85",1==Q("c78").value);QV("c87",1==Q("c78").value);QV("c89",1==Q("c78").value);QV("c91",1==Q("c78").value);QV("c93",1==Q("c78").value&&
1178 +3<Q("c80").value);QV("c95",1==Q("c78").value&&3<Q("c80").value);QV("c97",1==Q("c78").value);QV("c99",1==Q("c78").value);QV("c101",1==Q("c78").value);QV("c103",1==Q("c78").value)}
1179 +function setNetAuthProfile(){var b=Clone(amtsysstate.AMT_8021XProfile.responses.Body);b.Enabled=1==Q("c78").value;b.Enabled&&(b.ActiveInS0=1==Q("c102").value,b.AuthenticationProtocol=Q("c80").value,""!=Q("c92").value?b.RoamingIdentity=Q("c92").value:delete b.RoamingIdentity,""!=Q("c82").value?(b.ServerCertificateName=Q("c82").value,b.ServerCertificateNameComparison=Q("c84").value):
1180 +(delete b.ServerCertificateName,delete b.ServerCertificateNameComparison),""!=Q("c88").value?b.Username=Q("c88").value:delete b.Username,""!=Q("c90").value?b.Password=Q("c90").value:delete b.Password,""!=Q("c86").value?b.Domain=Q("c86").value:delete b.Domain,3<Q("c80").value?(b.ProtectedAccessCredential=Q("c94").value,b.PACPassword=Q("c96").value):(delete b.ProtectedAccessCredential,delete b.PACPassword),
1181 +0<=parseInt(Q("c98").value)?b.ClientCertificate="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c98").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ClientCertificate,0<=parseInt(Q("c100").value)?b.ServerCertificateIssuer="<a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+
1182 +amtstack.CompleteName("AMT_PublicKeyCertificate")+'</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">'+xxCertificates[parseInt(Q("c100").value)].InstanceID+"</w:Selector></w:SelectorSet></a:ReferenceParameters>":delete b.ServerCertificateIssuer,b.PxeTimeout=Q("c104").value);amtstack.Put("AMT_8021XProfile",b,setNetAuthProfileEx)}
1183 +function setNetAuthProfileEx(b,c,a,d){200==d?(amtsysstate.AMT_8021XProfile.responses.Body=amtsysstate.AMT_8021XProfile.response=a.Body,updateSystemStatus()):a.Header.WsmanError?messagebox("802.1x Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("802.1x Error","Error, Status = "+d)}
1184 +function PullHardware(){amtstack.BatchEnum("","*CIM_ComputerSystemPackage CIM_SystemPackaging *CIM_Chassis CIM_Chip *CIM_Card *CIM_BIOSElement CIM_Processor CIM_PhysicalMemory CIM_MediaAccessDevice CIM_PhysicalPackage *CIM_Battery".split(" "),processHardware);amtFirstPull|=1}
1185 +var DMTFCPUStatus="\u672a\u77e5 \u5df2\u542f\u7528 \u88ab\u7528\u6237\u7981\u7528 \u88abBIOS\u7981\u7528\uff08POST\u9519\u8bef\uff09 \u95f2 \u5176\u4ed6".split(" "),DMTFMemType="\u672a\u77e5 \u5176\u4ed6 \u8bb0\u5fc6\u4f53 \u540c\u6b65DRAM \u7f13\u5b58DRAM \u57c3\u591a \u5185\u5b58 \u865a\u62dfRAM SRAM \u5185\u5b58 \u53ea\u8bfb\u5b58\u50a8\u5668 \u95ea EEPROM \u524d\u9762\u677f \u53ea\u8bfb\u5b58\u50a8\u5668 \u8bb0\u5fc6\u4f53 3DRAM \u5185\u5b58 SGRAM \u5185\u5b58 DDR DDR-2 \u5185\u5b58 FB-DIMM DDR3 FBD2 DDR4 \u4f4e\u529f\u8017DDR LPDDR2 LPDDR3 LPDDR4".split(" "),DMTFMemFormFactor=
1186 +" \u5176\u4ed6 \u672a\u77e5 SIMM \u555c \u82af\u7247 \u8638 \u538b\u7f29 \u4e13\u6709\u5361 \u5185\u5b58\u6761 TSOP \u6392\u85af\u6761 RIMM SODIMM \u65af\u91cc\u59c6 FB-DIM".split(" "),DMTFProcFamilly={191:"\u82f1\u7279\u5c14&reg;\u9177\u777f&trade;2\u53cc\u6838\u5904\u7406\u5668",192:"\u82f1\u7279\u5c14&reg;\u9177\u777f&trade;2 Solo\u5904\u7406\u5668",193:"\u82f1\u7279\u5c14&reg;\u9177\u777f&trade;2\u81f3\u5c0a\u5904\u7406\u5668",194:"\u82f1\u7279\u5c14&reg;\u9177\u777f&trade;2\u56db\u6838\u5904\u7406\u5668",
1187 195:"\u82f1\u7279\u5c14&reg;\u9177\u777f&trade;2\u81f3\u5c0a\u79fb\u52a8\u5904\u7406\u5668",196:"\u82f1\u7279\u5c14&reg;\u9177\u777f&trade;2\u53cc\u6838\u79fb\u52a8\u5904\u7406\u5668",197:"\u82f1\u7279\u5c14&reg;\u9177\u777f&trade;2 Solo\u79fb\u52a8\u5904\u7406\u5668",198:"\u82f1\u7279\u5c14&reg;\u9177\u777f&trade;i7\u5904\u7406\u5668",199:"\u53cc\u6838Intel&reg;Celeron&reg;\u5904\u7406\u5668"},HardwareInventory;
1168 -function processHardware(b,c,a,d){if(200==d){var g;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("\u6551...","SaveHardwareLog()")+" \u786c\u4ef6\u4fe1\u606f\u5728\u7cfb\u7edf\u542f\u52a8\u65f6\u6536\u96c6\u3002");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>\u5e73\u53f0</h2>"+FullTable({"\u7535\u8111\u578b\u53f7":c.Model,
1188 +function processHardware(b,c,a,d){if(200==d){var e;b="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div>&nbsp;"+AddRefreshButton("PullHardware(1)")+AddButton("\u6551...","SaveHardwareLog()")+" \u786c\u4ef6\u4fe1\u606f\u5728\u7cfb\u7edf\u542f\u52a8\u65f6\u6536\u96c6\u3002");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>\u5e73\u53f0</h2>"+FullTable({"\u7535\u8111\u578b\u53f7":c.Model,
1189 "\u5236\u9020\u5546":c.Manufacturer,"\u7248":c.Version,"\u5e8f\u5217\u53f7":c.SerialNumber,"\u7cfb\u7edf\u7f16\u53f7":guidToStr(a.CIM_SystemPackaging.responses[0].PlatformGUID).toLowerCase()},"");b+="<br><h2>\u8e22\u811a\u7ebf</h2>";b+=FullTable({"\u5236\u9020\u5546":d.Manufacturer,"\u4ea7\u54c1\u540d\u79f0":d.Model,"\u7248":d.Version,"\u5e8f\u5217\u53f7":d.SerialNumber,"\u8d44\u4ea7\u6807\u7b7e":d.Tag,"\u53ef\u66f4\u6362\uff1f":1==d.CanBeFRUed?"Yes":"No"},"");b+="<br><h2>\u7684BIOS</h2>";b+=FullTable({"\u4f9b\u5e94\u5546":a.CIM_BIOSElement.response.Manufacturer,
1170 -"\u7248":v,"\u53d1\u5e03\u65e5\u671f":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",{timeZone:"UTC"})},"");b+="<br>";for(g in a.CIM_Processor.responses)c=a.CIM_Processor.responses[g],d=a.CIM_Chip.responses[g],b+="<h2>\u5904\u7406\u5668 "+(parseInt(g)+1)+"</h2>",b+=FullTable({"\u5236\u9020\u5546":trademarks(d.Manufacturer),"\u5bb6\u5ead":DMTFProcFamilly[c.Family],"\u7248":trademarks(d.Version),"\u6700\u5927\u63d2\u5ea7\u901f\u5ea6":c.MaxClockSpeed+" \u5146\u8d6b",
1171 -"\u72b6\u6001":DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(g in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[g],b+="<h2>\u8bb0\u5fc6\u4f53\u6a21\u7ec4 "+(+g+1)+"</h2>",b+=FullTable({"\u94f6\u884c\u6807\u7b7e":c.BankLabel,"\u5236\u9020\u5546":c.Manufacturer,"\u5e8f\u5217\u53f7":c.SerialNumber,"\u5c3a\u5bf8":parseInt(c.Capacity/1048576)+" \u5146\u5b57\u8282","\u6784\u6210\u56e0\u7d20":DMTFMemFormFactor[c.FormFactor],"\u7c7b\u578b":DMTFMemType[c.MemoryType],"\u8d44\u4ea7\u6807\u7b7e":c.Tag,
1172 -"\u96f6\u4ef6\u53f7":c.PartNumber},"");b+="<br>";for(g in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[g],d=a.CIM_PhysicalPackage.responses[+g+1],b+="<h2>\u5b58\u50a8\u4ecb\u8d28 "+(parseInt(g)+1)+"</h2>",b+=FullTable({"\u6a21\u578b":d.Model,"\u5e8f\u5217\u53f7":""==d.SerialNumber?"Unknown":d.SerialNumber,"\u5c3a\u5bf8":parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" \u5146\u5b57\u8282"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(g in a.CIM_PhysicalPackage.responses)11==
1173 -a.CIM_PhysicalPackage.responses[g].PackageType&&(c=a.CIM_PhysicalPackage.responses[g]);null!=c&&(b+="<h2>Battery</h2>",g=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,"\u5236\u9020\u5546":c.Manufacturer,"Manufacture date":g,"\u5e8f\u5217\u53f7":c.SerialNumber,"\u7c7b\u578b":"\u5176\u4ed6;\u672a\u77e5;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],"Design capacity":a.CIM_Battery.response.DesignCapacity+
1190 +"\u7248":v,"\u53d1\u5e03\u65e5\u671f":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",{timeZone:"UTC"})},"");b+="<br>";for(e in a.CIM_Processor.responses)c=a.CIM_Processor.responses[e],d=a.CIM_Chip.responses[e],b+="<h2>\u5904\u7406\u5668 "+(parseInt(e)+1)+"</h2>",b+=FullTable({"\u5236\u9020\u5546":trademarks(d.Manufacturer),"\u5bb6\u5ead":DMTFProcFamilly[c.Family],"\u7248":trademarks(d.Version),"\u6700\u5927\u63d2\u5ea7\u901f\u5ea6":c.MaxClockSpeed+" \u5146\u8d6b",
1191 +"\u72b6\u6001":DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(e in a.CIM_PhysicalMemory.responses)c=a.CIM_PhysicalMemory.responses[e],b+="<h2>\u8bb0\u5fc6\u4f53\u6a21\u7ec4 "+(+e+1)+"</h2>",b+=FullTable({"\u94f6\u884c\u6807\u7b7e":c.BankLabel,"\u5236\u9020\u5546":c.Manufacturer,"\u5e8f\u5217\u53f7":c.SerialNumber,"\u5c3a\u5bf8":parseInt(c.Capacity/1048576)+" \u5146\u5b57\u8282","\u6784\u6210\u56e0\u7d20":DMTFMemFormFactor[c.FormFactor],"\u7c7b\u578b":DMTFMemType[c.MemoryType],"\u8d44\u4ea7\u6807\u7b7e":c.Tag,
1192 +"\u96f6\u4ef6\u53f7":c.PartNumber},"");b+="<br>";for(e in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[e],d=a.CIM_PhysicalPackage.responses[+e+1],b+="<h2>\u5b58\u50a8\u4ecb\u8d28 "+(parseInt(e)+1)+"</h2>",b+=FullTable({"\u6a21\u578b":d.Model,"\u5e8f\u5217\u53f7":""==d.SerialNumber?"Unknown":d.SerialNumber,"\u5c3a\u5bf8":parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" \u5146\u5b57\u8282"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(e in a.CIM_PhysicalPackage.responses)11==
1193 +a.CIM_PhysicalPackage.responses[e].PackageType&&(c=a.CIM_PhysicalPackage.responses[e]);null!=c&&(b+="<h2>Battery</h2>",e=(new Date(c.ManufactureDate.Datetime)).toDateString(),a={"Device name":a.CIM_Battery.response.DeviceID,"\u5236\u9020\u5546":c.Manufacturer,"Manufacture date":e,"\u5e8f\u5217\u53f7":c.SerialNumber,"\u7c7b\u578b":"\u5176\u4ed6;\u672a\u77e5;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],"Design capacity":a.CIM_Battery.response.DesignCapacity+
1194 " mWatt-hours","Design voltage":a.CIM_Battery.response.DesignVoltage+" mVolts"},c.OtherIdentifyingInfo&&(a["Other Info"]=c.OtherIdentifyingInfo),b+=FullTable(a,""))}b+="<br>";QH(16,b);updateSystemStatus()}}function SaveHardwareLog(){!xxdialogMode&&HardwareInventory&&SaveJsonFile("IntelAmtHardware","hardware","\u82f1\u7279\u5c14AMT\u786c\u4ef6\u4fe1\u606f",HardwareInventory)}var AmtSystemPowerSchemes=null;
1195 function PullPowerPolicy(){amtstack.Enum("AMT_SystemPowerScheme",powerPolicyResponse)}function powerPolicyResponse(b,c,a,d){AmtSystemPowerSchemes=a;updateSystemStatus()}
1196 function showPowerPolicyDlg(b){if(!xxdialogMode){for(var c="",a=0;a<AmtSystemPowerSchemes.length;a++)c+='<input type=radio name=powerpolicy value="'+AmtSystemPowerSchemes[a].InstanceID+'" '+(AmtSystemPowerSchemes[a].SchemeGUID==b?" checked":"")+">"+AmtSystemPowerSchemes[a].Description+"<br>";setDialogMode(11,"\u82f1\u7279\u5c14&reg;AMT\u7535\u6e90\u7b56\u7565",3,showPowerPolicyDlgOk,c)}}
1197 function showPowerPolicyDlgOk(){for(var b=null,c=0,a=document.getElementsByTagName("input");c<a.length;c++)"powerpolicy"==a[c].name&&a[c].checked&&(b=a[c].value);amtstack.AMT_SystemPowerScheme_SetPowerScheme(showPowerPolicyDlgOkDone,b)}function showPowerPolicyDlgOkDone(b,c,a,d){200==d&&PullSystemStatus()}var xxAccountAdminName,xxAccountRealmInfo,xxAccountEnabledInfo={},xxAccountFetch,showHiddenAccounts=!1;
1198 function PullUserInfo(){xxAccountFetch=1;delete xxAccountAdminName;xxAccountRealmInfo={};amtstack.AMT_AuthorizationService_GetAdminAclEntry(getAdminAclEntryResponse);amtstack.AMT_AuthorizationService_EnumerateUserAclEntries(1,enumerateUserAclEntriesResponse)}function getAdminAclEntryResponse(b,c,a,d){200==d&&(xxAccountRealmInfo[-1]={AccessPermission:999,DigestUsername:a.Body.Username,Realms:null},xxAccountAdminName=a.Body.Username,updateAccounts())}
1179 -function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var g in a.Body.Handles)b=a.Body.Handles[g],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1180 -function getUserAclEntryExResponse(b,c,a,d,g){xxAccountFetch--;200==d&&(a.Body.Handle=g,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[g]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,g){200==d&&(xxAccountEnabledInfo[g]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,g){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(g,getAclEnabledStateResponse,g))}
1181 -function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u6b64\u8ba1\u7b97\u673a\u7684\u82f1\u7279\u5c14&reg;AMT\u7528\u6237\u5e10\u6237\u3002<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,g=!1,v=0;a.DigestUsername?(d=a.DigestUsername,g="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||
1182 -!g){var n="";if(999!=a.AccessPermission){2==v&&(n+="\u6b8b\u75be\u4eba");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a["\u5883\u754c"][c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="\u5ba1\u6838\u5458");n=0<=a.Realms.indexOf(3)?n+"\u7ba1\u7406\u5458":1==l?n+"1\u4e2a\u5883\u754c":n+(l+" \u9886\u57df")}else n+="\u7ba1\u7406\u5458",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+
1183 -a.Handle+","+v+")"));!g&&xxAccountAdminName&&(b+=" "+AddButton2("\u7f16\u8f91...","changeAccountButton(event,"+a.Handle+")"));b+='</div><div style=padding-top:3px;width:330px;float:left;overflow-x:hidden title="'+d+'"><b>'+d+"</b></div><div style=padding-top:3px>"+n+"</div></div>"}}c='<div style=float:right;margin-right:8px><a title="\u5207\u6362\u9690\u85cf\u7684\u5e10\u6237" style=color:gray;cursor:pointer onclick=toggleAccountButton()>'+(showHiddenAccounts?"&#x25B2;":"&#x25BC;")+"</a></div><div>&nbsp;"+
1184 -AddRefreshButton("xxAccountFetch=999;PullUserInfo()");xxAccountAdminName&&(c+=AddButton("\u65b0\u8d26\u6237","newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}
1199 +function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var e in a.Body.Handles)b=a.Body.Handles[e],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
1200 +function getUserAclEntryExResponse(b,c,a,d,e){xxAccountFetch--;200==d&&(a.Body.Handle=e,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[e]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,e){200==d&&(xxAccountEnabledInfo[e]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,e){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(e,getAclEnabledStateResponse,e))}
1201 +function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u6b64\u8ba1\u7b97\u673a\u7684\u82f1\u7279\u5c14&reg;AMT\u7528\u6237\u5e10\u6237\u3002<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,e=!1,v=0;a.DigestUsername?(d=a.DigestUsername,e="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||
1202 +!e){var n="";if(999!=a.AccessPermission){2==v&&(n+="\u6b8b\u75be\u4eba");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a["\u5883\u754c"][c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="\u5ba1\u6838\u5458");n=0<=a.Realms.indexOf(3)?n+"\u7ba1\u7406\u5458":1==l?n+"1\u4e2a\u5883\u754c":n+(l+" \u9886\u57df")}else n+="\u7ba1\u7406\u5458",a.Handle=-1;b+="<div class=itemBar onclick=showUserDetails("+a.Handle+")><div style=float:right>";0<v&&xxAccountAdminName&&(b+=" "+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+
1203 +a.Handle+","+v+")"));!e&&xxAccountAdminName&&(b+=" "+AddButton2("\u7f16\u8f91...","changeAccountButton(event,"+a.Handle+")"));b+='</div><div style=padding-top:3px;width:330px;float:left;overflow-x:hidden title="'+d+'"><b>'+d+"</b></div><div style=padding-top:3px>"+n+"</div></div>"}}c='<div style=float:right;margin-right:8px><a title="\u5207\u6362\u9690\u85cf\u7684\u5e10\u6237" style=color:gray;cursor:pointer onclick=toggleAccountButton()>'+(showHiddenAccounts?"&#x25B2;":"&#x25BC;")+"</a></div><div>&nbsp;"+
1204 +AddRefreshButton("xxAccountFetch=999;PullUserInfo()");xxAccountAdminName&&(c+=AddButton("\u65b0\u8d26\u6237","newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(22,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1205 function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1206 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"\u7f16\u8f91\u8d26\u6237",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1207 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"\u65b0\u8d26\u6237",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1188 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,g=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("\u5e10\u6237\u9519\u8bef","\u65e0\u6548\u7684\u53c2\u6570");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==
1189 -b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,l,n,g,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,g,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,g){methodcheck(a)||PullUserInfo()}
1190 -function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">\u7ba1\u7406\u5458</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1191 -function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["\u4ec5\u672c\u5730","\u4ec5\u7f51\u7edc","\u5168\u90e8\uff08\u672c\u5730\u548c\u7f51\u7edc\uff09"];
1192 -function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,g=c.DigestUsername;g||(g=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("\u540d\u79f0",g);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("\u5dde",1==xxAccountEnabledInfo[b].Enabled?"\u5df2\u542f\u7528":"\u6b8b\u969c\u4eba\u58eb"));if(g==xxAccountAdminName)a+=addHtmlValue("\u5141\u8bb8","\u7ba1\u7406\u5458");else{var a=a+addHtmlValue("\u5141\u8bb8",xxUserPermissions[c.AccessPermission]),v=
1193 -"";if(0<=c.Realms.indexOf(3))v="\u7ba1\u7406\u5458",0<=c.Realms.indexOf(20)&&(v+="\u5ba1\u8ba1\u5458");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+="\uff0c"),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="\u6ca1\u6709");a+=addHtmlValue("\u5883\u754c","")+"<b>"+v+"</b>"}messagebox("\u5e10\u6237"+g,a+"</div>")}}
1194 -function wsmanQuery(){QH(24,"");var b=getSelectedOptions(Q(22)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(23,!1),c&&0<c.length&&amtstack.BatchEnum("\u6d4f\u89c8\u5668",c,browserResponse,null,!0))}
1195 -function browserResponse(b,c,a,d){QE(23,!0);b="";for(var g in a)c=a[g],b+="<h2>"+g+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>\uff08\u7a7a\uff09":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>\u9519\u8bef\u7f16\u53f7"+c.status+"</div>"),b+="</div><br>";QH(24,b)}
1208 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("\u5e10\u6237\u9519\u8bef","\u65e0\u6548\u7684\u53c2\u6570");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==
1209 +b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1210 +function updateRealms(b){QV(62,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">\u7ba1\u7406\u5458</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(63,c)}}
1211 +function updateAccountDialog(){var b=!0;if("none"!=Q(62).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c106",b)}var xxUserPermissions=["\u4ec5\u672c\u5730","\u4ec5\u7f51\u7edc","\u5168\u90e8\uff08\u672c\u5730\u548c\u7f51\u7edc\uff09"];
1212 +function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,e=c.DigestUsername;e||(e=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("\u540d\u79f0",e);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("\u5dde",1==xxAccountEnabledInfo[b].Enabled?"\u5df2\u542f\u7528":"\u6b8b\u969c\u4eba\u58eb"));if(e==xxAccountAdminName)a+=addHtmlValue("\u5141\u8bb8","\u7ba1\u7406\u5458");else{var a=a+addHtmlValue("\u5141\u8bb8",xxUserPermissions[c.AccessPermission]),v=
1213 +"";if(0<=c.Realms.indexOf(3))v="\u7ba1\u7406\u5458",0<=c.Realms.indexOf(20)&&(v+="\u5ba1\u8ba1\u5458");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+="\uff0c"),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="\u6ca1\u6709");a+=addHtmlValue("\u5883\u754c","")+"<b>"+v+"</b>"}messagebox("\u5e10\u6237"+e,a+"</div>")}}
1214 +function wsmanQuery(){QH(25,"");var b=getSelectedOptions(Q(23)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(24,!1),c&&0<c.length&&amtstack.BatchEnum("\u6d4f\u89c8\u5668",c,browserResponse,null,!0))}
1215 +function browserResponse(b,c,a,d){QE(24,!0);b="";for(var e in a)c=a[e],b+="<h2>"+e+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>\uff08\u7a7a\uff09":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>\u9519\u8bef\u7f16\u53f7"+c.status+"</div>"),b+="</div><br>";QH(25,b)}
1216 function wsmanFilter(){var b=c0.value.toLowerCase(),c;for(c in AllWsman)QV("WSB-"+AllWsman[c],""==b||0<=AllWsman[c].toLowerCase().indexOf(b))}function connectTerminal(){terminal&&(0==terminal.State?(terminal.tlsv1only=amtstack.wsman.comm.tlsv1only,terminal.Start(currentMeshNode._id,16994,"*","*",0)):terminal.Stop())}
1197 -function onTerminalStateChange(b,c){c4.value=0==c?"\u8fde\u63a5":"\u65ad\u5f00";Q(29).textContent=StatusStrs[c];QE(34,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection of not supported.");
1198 -break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(31).value="100x30",terminal.m.Init(100,30)):(Q(31).value="80x25",terminal.m.Init(80,25))}
1199 -var terminalEmulations=["UTF8\u7ec8\u7aef","\u6269\u5c55ASCII","\u82f1\u7279\u5c14ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(33).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(32).value=["\u82f1\u7279\u5c14\uff08F10 = ESC + [OM\uff09","\u5907\u7528\uff08F10 = ESC + 0\uff09","VT100 +\uff08F10 = ESC + [OY\uff09"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1200 -function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(30).value="\u5982\u679c",terminal.m.lineFeed="\n"):(Q(30).value="CR +\u4f4e\u9891",terminal.m.lineFeed="\r\n")}
1217 +function onTerminalStateChange(b,c){c4.value=0==c?"\u8fde\u63a5":"\u65ad\u5f00";Q(30).textContent=StatusStrs[c];QE(35,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection is not supported.");
1218 +break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(32).value="100x30",terminal.m.Init(100,30)):(Q(32).value="80x25",terminal.m.Init(80,25))}
1219 +var terminalEmulations=["UTF8\u7ec8\u7aef","\u6269\u5c55ASCII","\u82f1\u7279\u5c14ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(34).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(33).value=["\u82f1\u7279\u5c14\uff08F10 = ESC + [OM\uff09","\u5907\u7528\uff08F10 = ESC + 0\uff09","VT100 +\uff08F10 = ESC + [OY\uff09"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1220 +function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(31).value="\u5982\u679c",terminal.m.lineFeed="\n"):(Q(31).value="CR +\u4f4e\u9891",terminal.m.lineFeed="\r\n")}
1221 function terminalCaptureToggle(b){if(!xxdialogMode)if(void 0==terminal.m.capture)terminal.m.capture="",c3.value="\u505c\u6b62\u6355\u6349";else{if(0<terminal.m.capture.length){b="TerminalCapture";var c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);saveAs(data2blob(terminal.m.capture),
1222 b+".txt")}delete terminal.m.capture;c3.value="\u5f00\u59cb\u6355\u6349"}}function terminal_FileSelectHandler(b){haltEvent(b);if(3==terminal.State&&null!=b.dataTransfer&&1==b.dataTransfer.files.length){var c=new FileReader;c.onload=terminal_onSetupBinRead;c.readAsText(b.dataTransfer.files[0])}}function terminal_onSetupBinRead(b){d3pastetextarea.value=b.target.result;setDialogMode(3,"\u7cca",3,termPaste)}var desktopScreenInfo=null,desktopPollTimer=null,webRtcDesktop=null;
1223 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1224 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1205 -function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1206 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1225 +function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&(null==amtsysstate||null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&null!=amtsysstate.IPS_OptInService.response&&0!=amtsysstate.IPS_OptInService.response.OptInRequired)?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&
1226 +null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1227 0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1228 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("\u6570\u636e\u901a\u9053",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=
1229 !0;webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1230 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
1231 "\r\n"},webRtcDesktop.webrtc.oniceconnectionstatechange=function(){null==webRtcDesktop||null==webRtcDesktop.webrtc||"disconnected"!=webRtcDesktop.webrtc.iceConnectionState&&"failed"!=webRtcDesktop.webrtc.iceConnectionState||webRtcDesktopReset()},webRtcDesktop.webrtc.createOffer(function(a){webRtcDesktop.webrtcoffer=a;webRtcDesktop.webrtc.setLocalDescription(a,function(){},webRtcDesktopReset)},webRtcDesktopReset,{mandatory:{OfferToReceiveAudio:!1,OfferToReceiveVideo:!1}})):"answer"==a.action&&null!=
1212 -webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=
1213 -setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(42).innerHTML="")}
1232 +webRtcDesktop&&webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:a.sdp}),function(){},webRtcDesktopReset))},desktop.m.kvmExtChanged=15<amtversion||urlvars.kvmext?updateDesktopState:null,desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0,desktop.m.noMouseRotate=desktopsettings.noMouseRotate,desktop.m.ReverseMouseWheel=desktopsettings.reverseMouseWheel,desktop.tlsv1only=amtstack.wsman.comm.tlsv1only,desktop.Start(currentMeshNode._id,16994,"*","*",0),
1233 +PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=setInterval(PullDesktopDisplayInfo,5E3))):(desktop.Stop(),clearInterval(desktopPollTimer),desktopPollTimer=null,PullDesktopDisplayInfo(),webRtcDesktopReset()))}function PullDesktopDisplayInfo(){7<amtversion&&0<desktop.State?amtstack.BatchEnum("",["*IPS_ScreenSettingData","*IPS_KVMRedirectionSettingData"],ProcessDesktopDisplayInfo):(desktopScreenInfo=null,Q(43).innerHTML="")}
1234 function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(desktopScreenInfo=a.IPS_ScreenSettingData.responses.Body,desktopScreenInfo.KVMRSD=a.IPS_KVMRedirectionSettingData.responses.Body,UpdateDesktopDisplayInfo())}
1215 -function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1235 +function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(43).innerHTML=b+"&nbsp;":Q(43).innerHTML=""}
1236 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1217 -function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"\u8fde\u63a5":"\u65ad\u5f00";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("\u8fdc\u7a0b\u684c\u9762","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("\u8fdc\u7a0b\u684c\u9762","The device indicated that this type of connection of not supported."):
1218 -5E4==b.disconnectCode?messagebox("\u8fdc\u7a0b\u684c\u9762","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("\u8fdc\u7a0b\u684c\u9762","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
1219 -break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1220 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b="\uff0c\u8f6fKVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"\u8fdc\u7a0b\u684c\u9762\u8bbe\u7f6e",3,showDesktopSettingsChanged))}
1221 -function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1222 -1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1223 -function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1224 -15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1237 +function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"\u8fde\u63a5":"\u65ad\u5f00";var d=3==c&&!urlvars.kvmviewonly;QE(44,d);QE("deskkeys",d);QE("DeskWD",d);QE(45,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("\u8fdc\u7a0b\u684c\u9762","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("\u8fdc\u7a0b\u684c\u9762","The device indicated that this type of connection is not supported."):
1238 +5E4==b.disconnectCode?messagebox("\u8fdc\u7a0b\u684c\u9762","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?a=null!=b.connectTime&&b.connectTime+5E3<Date.now():50002==b.disconnectCode&&messagebox("\u8fdc\u7a0b\u684c\u9762","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;
1239 +case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1240 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b="\uff0c\u8f6fKVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(41).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"\u8fdc\u7a0b\u684c\u9762\u8bbe\u7f6e",3,showDesktopSettingsChanged))}
1241 +function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.reverseMouseWheel=d7kvmrmw.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();
1242 +desktop.m.frameRateDelay=1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1243 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;d7kvmrmw.checked=desktopsettings.reverseMouseWheel;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",
1244 +12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1245 c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1226 -QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1227 -function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1228 -"8px"),center()))}
1229 -function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"\u8fdc\u7a0b\u952e\u76d8\u8f93\u5165",3,showDeskTypeEx,'<div>\u8f93\u5165\u6587\u672c\uff0c\u7136\u540e\u5355\u51fb\u201c\u786e\u5b9a\u201d\u4ee5\u4f7f\u7528\u7f8e\u5f0f\u82f1\u8bed\u952e\u76d8\u8fdc\u7a0b\u8f93\u5165\u6587\u672c\u3002\u5728\u7ee7\u7eed\u64cd\u4f5c\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u5c06\u8fdc\u7a0b\u5149\u6807\u653e\u7f6e\u5728\u6b63\u786e\u7684\u4f4d\u7f6e\u3002<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1230 -var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
1231 -function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(48).checked||desktop.m.sendcad()}
1246 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(44,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1247 +function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1!=urlvars.kvmonly&&disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(36,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding="8px"),center()))}
1248 +function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(45).blur(),setDialogMode(11,"\u8fdc\u7a0b\u952e\u76d8\u8f93\u5165",3,showDeskTypeEx,'<div>\u8f93\u5165\u6587\u672c\uff0c\u7136\u540e\u5355\u51fb\u201c\u786e\u5b9a\u201d\u4ee5\u4f7f\u7528\u7f8e\u5f0f\u82f1\u8bed\u952e\u76d8\u8fdc\u7a0b\u8f93\u5165\u6587\u672c\u3002\u5728\u7ee7\u7eed\u64cd\u4f5c\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u5c06\u8fdc\u7a0b\u5149\u6807\u653e\u7f6e\u5728\u6b63\u786e\u7684\u4f4d\u7f6e\u3002<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),
1249 +Q("d2typeText").focus())}var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
1250 +function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(49).checked||desktop.m.sendcad()}
1251 var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511,0]],2:[[65511,1],[65362,1],[65362,0],[65511,0]],3:[[65511,1],[108,1],[108,0],[65511,0]],4:[[65511,1],[109,1],[109,0],[65511,0]],5:[[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]],6:[[65470,1],[65470,0]],7:[[65471,1],[65471,0]],8:[[65472,1],[65472,0]],9:[[65473,1],[65473,0]],10:[[65474,1],[65474,0]],11:[[65475,1],[65475,0]],12:[[65476,1],[65476,0]],13:[[65477,1],[65477,0]],14:[[65478,1],[65478,0]],15:[[65479,
1233 -1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]]};
1234 -function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1252 +1],[65479,0]],16:[[65480,1],[65480,0]],17:[[65481,1],[65481,0]],19:[[65513,1],[65289,1],[65289,0],[65513,0]],20:[[65511,1],[114,1],[114,0],[65511,0]],21:[[65513,1],[65473,1],[65473,0],[65513,0]],22:[[65507,1],[119,1],[119,0],[65507,0]],23:[[65511,1],[65361,1],[65361,0],[65511,0]],24:[[65511,1],[65363,1],[65363,0],[65511,0]],25:[[65293,1],[65293,0]]};
1253 +function deskSendKeys(){if(!Q(49).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1254 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1236 -function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1237 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1255 +function dmousedown(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1256 +function dmousemove(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(49).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1257 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1258 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1259 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1241 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\u6839</a>",g=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in g)""!=g[v]&&p24filetreelocation.push(g[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var g=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1242 -70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),e="";null!=l.d&&(e=new Date(l.d),e=e.getMonth()+1+"/"+e.getDate()+"/"+e.getFullYear()+" "+e.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1243 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(g+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+e+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1260 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\u6839</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,r;r=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1261 +70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var C="";null!=l.s&&(C=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1262 +encodeURIComponent(l.nx)+'")>'+r+"</a></span></div>":(w=r,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+r+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+C+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1263 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1264 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1265 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1250,8 +1269,8 @@ null!=p24clipboard&&0<p24clipboard.length)}}function p24getFileSelCount(b){for(v
1269 function p24createfolder(){setDialogMode(11,"\u65b0\u5efa\u6587\u4ef6\u5939",3,p24createfolderEx,"<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% />");focusTextBox("p24renameinput");p24fileNameCheck()}function p24createfolderEx(){p24files.sendCtrlMsg(JSON.stringify({action:"mkdir",reqid:1,path:p24filetreelocation.join("/")+"/"+Q("p24renameinput").value}));p24folderup(999)}
1270 function p24deletefile(){var b=p24getFileSelCount();setDialogMode(11,"\u5220\u9664",3,p24deletefileEx,1<b?"Delete "+b+" selected items?":"Delete selected item?")}function p24deletefileEx(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);p24files.sendCtrlMsg(JSON.stringify({action:"rm",reqid:1,path:p24filetreelocation.join("/"),delfiles:b}));p24folderup(999)}
1271 function p24renamefile(){for(var b,c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&(b=p24filetree.dir[c[a].value].n);setDialogMode(11,"\u6539\u540d",3,p24renamefileEx,'<input type=text id=p24renameinput maxlength=64 onkeyup=p24fileNameCheck(event) style=width:100% value="'+b+'" />',{action:"rename",path:p24filetreelocation.join("/"),oldname:b});focusTextBox("p24renameinput");p24fileNameCheck()}
1253 -function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c54",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1254 -function p24uploadFile(){setDialogMode(11,"\u4e0a\u4f20\u6587\u4ef6",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c54",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1272 +function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c106",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
1273 +function p24uploadFile(){setDialogMode(11,"\u4e0a\u4f20\u6587\u4ef6",3,p24uploadFileEx,"<input type=file name=files id=p24uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p24uploadinput')\" />");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c106",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
1274 function p24copyFile(b){var c=document.getElementsByName("fd");p24clipboard=[];p24clipboardCut=b;p24clipboardFolder=p24targetpath;for(b=0;b<c.length;b++)c[b].checked&&"3"==c[b].attributes.file.value&&p24clipboard.push(p24filetree.dir[c[b].value].n);p24updateClipview()}
1275 function p24pasteFile(){var b="";null!=p24clipboard&&0<p24clipboard.length&&(b="Confim "+(0==p24clipboardCut?"copy":"move")+" of "+p24clipboard.length+" entrie"+(1<p24clipboard.length?"s":"")+" to this location?");setDialogMode(11,"\u7cca",3,p24pasteFileEx,b)}
1276 function p24pasteFileEx(){p24files.sendCtrlMsg(JSON.stringify({action:0==p24clipboardCut?"copy":"move",reqid:1,scpath:p24clipboardFolder,dspath:p24targetpath,names:p24clipboard}));p24folderup(999);1==p24clipboardCut&&(p24clipboardFolder=p24clipboard=null,p24clipboardCut=0,p24updateClipview())}
@@ -1275,36 +1294,36 @@ function iderStart2(){if(1!=Q("floppyImageInput").files.length&&1!=Q("cdromImage
1294 function iderStart3(b,c,a){iderStop();ider=CreateAmtRedirect(CreateAmtRemoteIder());ider.onStateChanged=onIderStateChange;ider.m.floppy=b;ider.m.cdrom=c;ider.m.iderStart=a;ider.m.sectorStats=iderSectorStats;ider.tlsv1only=amtstack.wsman.comm.tlsv1only;ider.Start(currentMeshNode._id,16994,"*","*",0);QV("IDERDiskMapButton",!0)}
1295 function iderStop(){ider&&(ider.m.Stop(),ider.onStateChanged=null,ider.m.onDialogPrompt=null,delete ider);iderTimer&&(clearInterval(iderTimer),delete iderTimer);iderToggleDiskMap(!1)}function onIderStateChange(b,c){QE("c2",3!=c);QE("c8",3!=c);QE("c1",3!=c);QE("c7",3!=c);QV(9,3==c);center();3==c?(urlvars.norefresh||(iderTimer=setInterval(onIderTimer,500)),onIderTimer()):iderTimer&&(clearInterval(iderTimer),delete iderTimer)}
1296 function onIderTimer(){ider.m.Update&&ider.m.Update();-1==ider.m.bytesFromAmt?iderStop():QH(10,"<b>"+(ider.m.server?"\u670d\u52a1\u5668":"")+"IDE-R\u4f1a\u8bdd</ b>\uff0c\u5df2\u8fde\u63a5\uff0c"+ider.m.bytesFromAmt+" \u5728\uff0c"+ider.m.bytesToAmt+" \u51fa\u6765\u3002")}var heatMapWidth=600,heatMapDividor={};
1278 -function iderSectorStats(b,c,a,d,g){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </ b>\uff0c\u5757\u4e3a{0}\u5b57\u8282\u3002",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b>\u8f6f\u76d8</ b>\uff0c\u5757\u4e3a{0}\u5b57\u8282\u3002",512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;
1279 -d/=c;g/=c;if(0==b)v.height=6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+g;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1297 +function iderSectorStats(b,c,a,d,e){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </ b>\uff0c\u5757\u4e3a{0}\u5b57\u8282\u3002",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b>\u8f6f\u76d8</ b>\uff0c\u5757\u4e3a{0}\u5b57\u8282\u3002",512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;
1298 +d/=c;e/=c;if(0==b)v.height=6*(Math.floor(a/(heatMapWidth/6))+(a%heatMapWidth?1:0)),n.fillStyle="rgba(225,250,225,1)",n.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&n.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),n.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+e;b++)sectorHeat(n,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
1299 function iderToggleDiskMap(b){var c="none"!=QS("iderHeatmap").display;null==b&&(b=!c);xxdialogMode&&(b=!1);QS("iderHeatmap").display=b?"":"none"}function onIderDialogPrompt(b,c,a){iderCodeBlock&&(document.body.removeChild(iderCodeBlock),delete iderCodeBlock);c.js&&(b=document.createElement("script"),b.text=c.js,iderCodeBlock=document.body.appendChild(b));setDialogMode(11,"\u5b58\u50a8\u91cd\u5b9a\u5411",a?a:3,onIderDialogPromptOk,c.html)}
1300 function onIderDialogPromptOk(b){1==b?window.iderServerCall?ider.m.dialogPrompt(window.iderServerCall()):ider.m.dialogPrompt():iderStop()}function iderServerStart(){xxdialogMode||(iderStop(),ider=CreateAmtRemoteServerIder(),null!=ider&&(ider.onStateChanged=onIderStateChange,ider.m.sectorStats=iderSectorStats,ider.m.onDialogPrompt=onIderDialogPrompt,ider.tlsv1only=amtstack.wsman.comm.tlsv1only,ider.Start(currentMeshNode._id,16994,"*","*",0)))}
1301 var xxRemoteAccess=null,xxEnvironementDetection=null,xxCiraServers=null,xxUserInitiatedCira=null,xxUserInitiatedEnabledState={32768:"\u6b8b\u969c\u4eba\u58eb",32769:"\u542f\u7528BIOS",32770:"\u64cd\u4f5c\u7cfb\u7edf\u542f\u7528",32771:"\u542f\u7528BIOS\u548c\u64cd\u4f5c\u7cfb\u7edf"},xxRemoteAccessCredentiaLinks=null,xxMPSUserPass=null,xxPolicies=null;
1302 function PullRemoteAccess(){var b="*AMT_EnvironmentDetectionSettingData AMT_ManagementPresenceRemoteSAP AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule *AMT_UserInitiatedConnectionService AMT_MPSUsernamePassword".split(" ");11<amtversion&&b.push("*IPS_HTTPProxyService","IPS_HTTPProxyAccessPoint");amtstack.BatchEnum(null,b,processRemote1)}
1284 -function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var g in a)200!=a[g].status&&(d=a[g].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1285 -MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(g in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[g],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1303 +function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&delete a.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&delete a.IPS_HTTPProxyService;for(var e in a)200!=a[e].status&&(d=a[e].status)}if(400!=d&&!errcheck(d,b)&&void 0!=a.AMT_UserInitiatedConnectionService&&void 0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
1304 +MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(e in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[e],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
1305 "@Name","Name").Value)),b.MpsType=c.MpsType,c=getItem(c.PolicySet.ReferenceParameters.SelectorSet.Selector,"@Name","PolicyRuleName").Value.split(" ")[0],xxPolicies[c].push(b);updateRemoteAccess()}}
1306 function updateRemoteAccess(){if(null!=xxEnvironementDetection){var b,c="\u6b8b\u969c\u4eba\u58eb",a=xxRemoteAccess.IPS_HTTPProxyService&&xxRemoteAccess.IPS_HTTPProxyAccessPoint;xxEnvironementDetection.DetectionStrings&&0<xxEnvironementDetection.DetectionStrings.length&&(c="\u5df2\u542f\u7528"+xxEnvironementDetection.DetectionStrings.length+" "+(1<xxEnvironementDetection.DetectionStrings.length?"domains":"domain"));b=""+TableStart();b+=TableEntry("\u73af\u5883\u68c0\u6d4b",addLink(c,"editEnvironmentDetection()"));
1307 b+=TableEntry("\u7528\u6237\u542f\u52a8\u9009\u9879",addLinkConditional(xxUserInitiatedEnabledState[xxUserInitiatedCira.EnabledState],"editUserInitiatedCira()",xxAccountAdminName));c="<i>\u6ca1\u6709</i>";if(0<xxPolicies.User.length){var c="",d;for(d in xxPolicies.User)0<c.length&&(c+=", "),c+=xxPolicies.User[d].AccessInfo,1==xxPolicies.User[d].MpsType&&(c+=" (CILA)")}b+=TableEntry("\u7528\u6237\u53d1\u8d77\u7684\u8fde\u63a5",addLinkConditional(c,'editMpsPolicy("User")',xxAccountAdminName));c="<i>\u6ca1\u6709</i>";
1289 -if(0<xxPolicies.Alert.length)for(d in c="",xxPolicies.Alert)0<c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("\u8b66\u62a5\u542f\u52a8\u7684\u8fde\u63a5",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>\u6ca1\u6709</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var g=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,
1290 -"PolicyRuleName","\u5b9a\u671f\u7684");if(g){var v=atob(g.ExtendedData);0==ReadInt(v,0)&&(c+=format("\uff0c\u6bcf{0}\u79d2",ReadInt(v,4)));1==ReadInt(v,0)&&(g=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+g+":"+v+" daily")}b+=TableEntry("\u5b9a\u671f\u8fde\u63a5",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u82f1\u7279\u5c14&reg;AMT\u8fdc\u7a0b\u7ba1\u7406\u670d\u52a1\u5668\u3002<br><br>";
1308 +if(0<xxPolicies.Alert.length)for(d in c="",xxPolicies.Alert)0<c.length&&(c+=", "),c+=xxPolicies.Alert[d].AccessInfo,1==xxPolicies.Alert[d].MpsType&&(c+=" (CILA)");b+=TableEntry("\u8b66\u62a5\u542f\u52a8\u7684\u8fde\u63a5",addLinkConditional(c,'editMpsPolicy("Alert")',xxAccountAdminName));c="<i>\u6ca1\u6709</i>";if(0<xxPolicies.Periodic.length)for(d in c="",xxPolicies.Periodic)0<c.length&&(c+=", "),c+=xxPolicies.Periodic[d].AccessInfo,1==xxPolicies.Periodic[d].MpsType&&(c+=" (CILA)");var e=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,
1309 +"PolicyRuleName","\u5b9a\u671f\u7684");if(e){var v=atob(e.ExtendedData);0==ReadInt(v,0)&&(c+=format("\uff0c\u6bcf{0}\u79d2",ReadInt(v,4)));1==ReadInt(v,0)&&(e=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+e+":"+v+" daily")}b+=TableEntry("\u5b9a\u671f\u8fde\u63a5",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u82f1\u7279\u5c14&reg;AMT\u8fdc\u7a0b\u7ba1\u7406\u670d\u52a1\u5668\u3002<br><br>";
1310 if(0==xxCiraServers.length)b+="<div style=padding-left:15px><br><i>\u627e\u4e0d\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002</i></div><br>";else for(d in xxCiraServers)c=":"+xxCiraServers[d].Port,xxCiraServers[d].CN&&(c+=", "+xxCiraServers[d].CN),b+="<div class=itemBar onclick=showServerDetails("+d+")><div style=padding-top:3px><b>"+xxCiraServers[d].AccessInfo+"</b>"+EscapeHtml(c)+"</div></div>";if(a)if(b+="<br>\u7ba1\u7406\u7528\u4e8e\u7ba1\u7406\u8fde\u63a5\u7684HTTP\u4ee3\u7406\u3002<br><br>",c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses,
1311 0==c.length)b+="<div style=padding-left:15px><br><i>\u672a\u914d\u7f6e\u4ee3\u7406\u3002</i></div><br>";else for(d in c)b+="<div class=itemBar onclick=showProxyDetails("+d+")><div style=padding-top:3px><b>"+EscapeHtml(c[d].AccessInfo)+":"+c[d].Port+"</b> / "+EscapeHtml(c[d].NetworkDnsSuffix)+"</div></div>";d="";xxAccountAdminName&&(d=AddButton("\u6dfb\u52a0\u670d\u52a1\u5668...","AddRemoteAccessServer()"),a&&(d+=AddButton("\u6dfb\u52a0\u4ee3\u7406...","AddRemoteAccessProxy()")));b+="<br><td class=r1>"+
1293 -TableEnd(AddRefreshButton("PullRemoteAccess()")+d);QH(52,b)}}var xxEditMpsPolicyType;
1294 -function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="\u7528\u6237\u542f\u52a8");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>\uff08\u6ca1\u6709\uff09",g;for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[g].Name?
1295 -" selected":"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>\u4e3b\u670d\u52a1\u5668</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA-\u5916\u90e8<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA-\u5185\u90e8</select><div>\u4e3b\u8981MPS\u7c7b\u578b</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";
1296 -c+="<option value=-1>\uff08\u6ca1\u6709\uff09";for(g in xxCiraServers)c+="<option value="+g+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[g].Name?" selected":"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>\u8f85\u52a9\u670d\u52a1\u5668</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA-\u5916\u90e8<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA-\u5185\u90e8</select><div>\u6b21\u8981MPS\u7c7b\u578b</div></div>")}g=
1297 -0;d&&(g=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+g+">";c+="<div>\u96a7\u9053\u5bff\u547d\uff08\u79d2\uff09</div></div>";"Periodic"==b&&(a=0,g=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),g=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),g+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">\u5b9a\u671f\uff0c\u65f6\u95f4\u95f4\u9694<option value=1"+
1298 -(1==a?" selected":"")+">\u4e00\u5929\u4e2d\u7684\u65f6\u95f4\uff0c\u4e00\u5929\u4e00\u6b21",c+="</select><div>\u89e6\u53d1\u7c7b\u578b</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+g+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0}\u8fde\u63a5",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1299 -function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c54",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1312 +TableEnd(AddRefreshButton("PullRemoteAccess()")+d);QH(53,b)}}var xxEditMpsPolicyType;
1313 +function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="\u7528\u6237\u542f\u52a8");var d=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<div style=height:26px><select id=d2server1 style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=-1>\uff08\u6ca1\u6709\uff09",e;for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[e].Name?
1314 +" selected":"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>\u4e3b\u670d\u52a1\u5668</div></div>";a&&(c+="<div style=height:26px><select id=d2server1cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA-\u5916\u90e8<option value=1"+(xxPolicies[b][0]&&1==xxPolicies[b][0].MpsType?" selected":"")+">CILA-\u5185\u90e8</select><div>\u4e3b\u8981MPS\u7c7b\u578b</div></div>");if(1<xxCiraServers.length){c+="<div style=height:26px><select id=d2server2 style=float:right;width:206px onchange=editMpsPolicyUpdate()>";
1315 +c+="<option value=-1>\uff08\u6ca1\u6709\uff09";for(e in xxCiraServers)c+="<option value="+e+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[e].Name?" selected":"")+">"+xxCiraServers[e].AccessInfo;c+="</select><div>\u8f85\u52a9\u670d\u52a1\u5668</div></div>";a&&(c+="<div style=height:26px><select id=d2server2cira style=float:right;width:206px onchange=editMpsPolicyUpdate()><option value=0>CIRA-\u5916\u90e8<option value=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?" selected":"")+">CILA-\u5185\u90e8</select><div>\u6b21\u8981MPS\u7c7b\u578b</div></div>")}e=
1316 +0;d&&(e=d.TunnelLifeTime);c+="<div style=height:26px><input id=d2lifetime style=float:right;width:200px onchange=editMpsPolicyUpdate() value="+e+">";c+="<div>\u96a7\u9053\u5bff\u547d\uff08\u79d2\uff09</div></div>";"Periodic"==b&&(a=0,e=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),e=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),e+=":"+d)),c+="<div style=height:26px><select id=d2ttype style=float:right;width:206px onchange=editMpsPolicyUpdate()>",c+="<option value=0"+(0==a?" selected":"")+">\u5b9a\u671f\uff0c\u65f6\u95f4\u95f4\u9694<option value=1"+
1317 +(1==a?" selected":"")+">\u4e00\u5929\u4e2d\u7684\u65f6\u95f4\uff0c\u4e00\u5929\u4e00\u6b21",c+="</select><div>\u89e6\u53d1\u7c7b\u578b</div></div><div style=height:26px><input id=d2timer style=float:right;width:200px onkeyup=editMpsPolicyUpdate() value="+e+"><div id=ttypelabel></div></div>");setDialogMode(11,format("{0}\u8fde\u63a5",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
1318 +function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c106",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
1319 -1!=Q("d2server1").value),QH("ttypelabel",0==Q("d2ttype").value?"\u89e6\u53d1\u95f4\u9694\uff08\u79d2\uff09":"\u65f6\u95f4\uff08HH\uff1aMM\uff09"),QE("d2ttype",-1!=Q("d2server1").value));QE("d2lifetime",-1!=Q("d2server1").value);b&&(QE("d2server1cira",-1<Q("d2server1").value),1<xxCiraServers.length&&QE("d2server2cira",-1<Q("d2server1").value&&-1<Q("d2server2").value))}
1320 function editMpsPolicyOk(){var b=xxEditMpsPolicyType;"User"==b&&(b="User Initiated");getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",b)?amtstack.Delete("AMT_RemoteAccessPolicyRule",{PolicyRuleName:b},editMpsPolicyOk2):editMpsPolicyOk2()}
1302 -function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var g,v;0<=Q("d2server1").value&&(g='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1321 +function editMpsPolicyOk2(b,c,a,d){b=11<amtversion||11==amtversion&&6<=amtversionmin;if(-1==Q("d2server1").value)PullRemoteAccess();else{c=0;"Alert"==xxEditMpsPolicyType&&(c=1);"Periodic"==xxEditMpsPolicyType&&(c=2);a=null;2==c&&(a=Q("d2ttype").value,d=IntToStr(Q("d2timer").value),1==a&&(d=Q("d2timer").value.split(":"),d=IntToStr(parseInt(d[0]))+IntToStr(parseInt(d[1]))),a=btoa(IntToStr(a)+d));var e,v;0<=Q("d2server1").value&&(e='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1322 xxCiraServers[Q("d2server1").value].Name+"</Selector></SelectorSet></ReferenceParameters>");0<=Q("d2server1").value&&1<xxCiraServers.length&&0<=Q("d2server2").value&&(v='<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</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_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="Name">'+
1304 -xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?g&&(0==Q("d2server1cira").value?d.push(g):n.push(g),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):g&&(d.push(g),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1323 +xxCiraServers[Q("d2server2").value].Name+"</Selector></SelectorSet></ReferenceParameters>");d=[];var n=[];b?e&&(0==Q("d2server1cira").value?d.push(e):n.push(e),v&&(0==Q("d2server2cira").value?d.push(v):n.push(v))):e&&(d.push(e),v&&d.push(v));amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(c,Q("d2lifetime").value,a,d,n,PullRemoteAccess)}}var editEnvironmentDetectionTmp;
1324 function editEnvironmentDetection(b){1!=b&&(editEnvironmentDetectionTmp=xxEnvironementDetection.DetectionStrings?Clone(xxEnvironementDetection.DetectionStrings):[]);var c="";xxAccountAdminName&&(c+="\u8f93\u5165\u6700\u591a5\u4e2aIntranet\u57df\u540e\u7f00\u3002\u5982\u679c\u8ba1\u7b97\u673a\u4e0d\u5728\u8fd9\u4e9b\u57df\u4e2d\uff0c\u5219\u82f1\u7279\u5c14&reg;AMT\u672c\u5730\u7aef\u53e3\u5c06\u5173\u95ed\uff0c\u5e76\u4e14\u8fdc\u7a0b\u670d\u52a1\u5668\u8fde\u63a5\u5c06\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001\u3002<br><br>");
1325 0==editEnvironmentDetectionTmp.length&&(c+="<i>\u6ca1\u6709Intranet\u57df\uff0c\u7981\u7528\u73af\u5883\u68c0\u6d4b\u3002</i><br>");for(var a in editEnvironmentDetectionTmp)c+="<div class=itemBar style=margin-right:0><div style=float:right>"+AddButton2("\u53bb\u6389","editEnvironmentDetectionRemove("+a+")")+'</div><div style=padding-top:3px;max-width:260px;overflow:hidden title="'+editEnvironmentDetectionTmp[a]+'"><b>'+editEnvironmentDetectionTmp[a]+"</b></div></div>";xxAccountAdminName&&5>editEnvironmentDetectionTmp.length&&
1307 -(c+="<br><input id=edInput placeholder=intranet.org style=width:276px onkeyup=edInputChg() maxlength=63><input type=button id=edAdd value=Add style=width:80px;margin-left:5px onclick=editEnvironmentDetectionAdd()>");1==b?QH(63,c):setDialogMode(11,"\u73af\u5883\u68c0\u6d4b",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}
1326 +(c+="<br><input id=edInput placeholder=intranet.org style=width:276px onkeyup=edInputChg() maxlength=63><input type=button id=edAdd value=Add style=width:80px;margin-left:5px onclick=editEnvironmentDetectionAdd()>");1==b?QH(64,c):setDialogMode(11,"\u73af\u5883\u68c0\u6d4b",xxAccountAdminName?3:1,editEnvironmentDetectionDlg,c);edInputChg()}
1327 function editEnvironmentDetectionDlg(){if(xxAccountAdminName){var b=Clone(xxEnvironementDetection);b.DetectionStrings=editEnvironmentDetectionTmp;amtstack.Put("AMT_EnvironmentDetectionSettingData",b,editEnvironmentDetectionDlg2,0,1)}}
1328 function editEnvironmentDetectionDlg2(b,c,a,d){200!=d?messagebox("\u73af\u5883\u68c0\u6d4b",format("\u65e0\u6cd5\u6dfb\u52a0\u670d\u52a1\u5668\uff0c\u72b6\u6001\u4e3a{0}",d)):a.Body.ReturnValue&&0!=a.Body.ReturnValue?messagebox("\u73af\u5883\u68c0\u6d4b",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}function edInputChg(){5>editEnvironmentDetectionTmp.length&&QE("edAdd",0<Q("edInput").value.length)}
1329 function editEnvironmentDetectionAdd(){editEnvironmentDetectionTmp.push(Q("edInput").value);editEnvironmentDetection(1)}function editEnvironmentDetectionRemove(b){editEnvironmentDetectionTmp.splice(b,1);editEnvironmentDetection(1)}
@@ -1319,7 +1338,7 @@ function showProxyDetails(b){var c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.respo
1338 function showProxyDetailsOk(b,c){var a=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses[c];2==b&&amtstack.Delete("IPS_HTTPProxyAccessPoint",{Name:a.Name},showProxyDetailsOk2)}function showProxyDetailsOk2(b,c,a,d){408==d?messagebox("HTTP\u4ee3\u7406\u5220\u9664","\u65e0\u6cd5\u5220\u9664HTTP\u4ee3\u7406\uff0c\u8bbf\u95ee\u88ab\u62d2\u7edd\u3002"):PullRemoteAccess()}
1339 function AddRemoteAccessProxy(){var b;b='<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessProxyUpdate()><option value=2>\u4e3b\u673a\u540dFQDN<option value=3>IPv4\u5730\u5740<option value=4>IPv6\u5730\u5740</select><div>\u8fde\u63a5\u7c7b\u578b</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>\u6e2f\u53e3</div></div>';b+=
1340 "<div style=height:26px><input id=d2domain style=float:right;width:200px maxlength=191 onkeyup=AddRemoteAccessProxyUpdate()><div>DNS\u540e\u7f00</div></div>";setDialogMode(11,"\u6dfb\u52a0HTTP\u4ee3\u7406",3,AddRemoteAccessProxyOk,b);AddRemoteAccessProxyUpdate()}
1322 -function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c54",b);QH("d2typespan",["","","FQDN /\u4e3b\u673a\u540d","IPv4\u5730\u5740","IPv6\u5730\u5740"][Q("d2type").value])}function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
1341 +function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c106",b);QH("d2typespan",["","","FQDN /\u4e3b\u673a\u540d","IPv4\u5730\u5740","IPv6\u5730\u5740"][Q("d2type").value])}function AddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
1342 function AddRemoteAccessProxyOk2(b,c,a,d){200!=d?messagebox("\u6dfb\u52a0\u4ee3\u7406\u670d\u52a1\u5668","\u65e0\u6cd5\u6dfb\u52a0\u4ee3\u7406\uff0c\u72b6\u6001"+d):0!=a.Body.ReturnValue?messagebox("\u6dfb\u52a0\u4ee3\u7406\u670d\u52a1\u5668",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1343 function AddRemoteAccessServer(){var b=[],c;for(c in xxCertificates)xxCertificates[c].XPrivateKey&&b.push(xxCertificates[c]);var a;a="<div style=height:26px><select id=d2type style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()><option value=201>\u4e3b\u673a\u540dFQDN<option value=3>IPv4\u5730\u5740</select><div>\u8fde\u63a5\u7c7b\u578b</div></div><div style=height:26px><input id=d2name style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div id=d2lname></div></div>";a+=
1344 '<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>\u670d\u52a1\u5668\u7aef\u53e3</div></div>';a+="<div style=height:26px id=d2ucn><input id=d2cn style=float:right;width:200px onkeyup=AddRemoteAccessServerUpdate()><div>\u670d\u52a1\u5668\u901a\u7528\u540d\u79f0</div></div>";a+="<div style=height:26px><select id=d2auth style=float:right;width:206px onchange=AddRemoteAccessServerUpdate()>";
@@ -1329,89 +1348,92 @@ function AddRemoteAccessServerOk(){var b,c,a,d;1==Q("d2auth").value?b='<Address
1348 "</Selector></SelectorSet></ReferenceParameters>":(c=Q("d2user").value,a=Q("d2pass").value);0<Q("d2cn").value.length&&(d=Q("d2cn").value);amtstack.AMT_RemoteAccessService_AddMpServer(Q("d2name").value,Q("d2type").value,Q("d2port").value,Q("d2auth").value,b,c,a,d,AddRemoteAccessServerOk2)}
1349 function AddRemoteAccessServerOk2(b,c,a,d){200!=d?messagebox("\u6dfb\u52a0Internet\u670d\u52a1\u5668",format("\u65e0\u6cd5\u6dfb\u52a0\u670d\u52a1\u5668\uff0c\u72b6\u6001\u4e3a{0}",d)):0!=a.Body.ReturnValue?messagebox("\u6dfb\u52a0Internet\u670d\u52a1\u5668",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
1350 function AddRemoteAccessServerUpdate(){var b=0!=Q("d2name").value.length;3==Q("d2type").value&&1==b&&(b=0!=Q("d2cn").value.length);2==Q("d2auth").value&&1==b&&(b=0!=Q("d2user").value.length&&passwordcheck(Q("d2pass").value));if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;if(-1!=Q("d2name").value.indexOf(":")||3==Q("d2type").value&&-1!=Q("d2cn").value.indexOf(":"))b=!1;QH("d2lname",201==Q("d2type").value?"\u4e3b\u673a\u540d":"IPv4\u5730\u5740");QV("d2utype",2==Q("d2auth").value);
1332 -QV("d2ucn",3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c54",b)}
1351 +QV("d2ucn",3==Q("d2type").value);QV("d2ctype",1==Q("d2auth").value);QE("c106",b)}
1352 function showEditNameDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_GeneralSettings.response.HostName,a=amtsysstate.AMT_GeneralSettings.response.DomainName;null!=a&&0<a.length&&(c+="."+a);c='<br><div style=height:26px><input id=d11name value="'+c+'" style=float:right;width:200px><div>\u540d\u79f0\u548c\u57df\u540d</div></div>';1==b&&(b=1==amtsysstate.AMT_GeneralSettings.response.SharedFQDN,c+="<div style=height:26px><select id=d11fqdn style=float:right;width:200px><option value=true "+(b?"selected":
1353 "")+'>\u5171\u4eab\uff0c\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u76f8\u540c<option value="false" '+(b?"":"selected")+">\u4e13\u7528\uff0c\u4e0d\u540c\u4e8eOS</select><div>\u59d3\u540d\u5206\u4eab</div></div>");setDialogMode(11,"\u7535\u8111\u540d\u79f0",3,editNameDlgOk,c)}}
1354 function editNameDlgOk(){var b=Q("d11name").value,c=b.indexOf("."),a="";0<=c&&(a=b.substring(c+1),b=b.substring(0,c));c=Clone(amtsysstate.AMT_GeneralSettings.response);c.HostName=b;c.DomainName=a;Q("d11fqdn")&&(c.SharedFQDN=d11fqdn.value);amtstack.Put("AMT_GeneralSettings",c,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}function computerNameGet(b,c,a,d){200==d&&(amtsysstate.AMT_GeneralSettings.response=a.Body,updateSystemStatus())}
1336 -function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c36.value=c;c37.value=b.DDNSPeriodicUpdateInterval;c38.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"\u52a8\u6001DNS\u5ba2\u6237\u7aef",3,showEditDnsDlgOk)}}
1337 -function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c36.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c36.value?!0:!1;2==c36.value&&(b.DDNSPeriodicUpdateInterval=c37.value,b.DDNSTTL=c38.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1338 -function showEditDnsDlgChange(){QE("c37",2==c36.value);QE("c38",2==c36.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"\u82f1\u7279\u5c14&reg;AMT\u529f\u80fd",3,featuresDlgOk))}
1339 -function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,g){200!=g?messagebox("\u9519\u8bef","RedirectionService\uff0cRequestStateChange\u9519\u8bef"+g):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,g){200!=g?messagebox("\u9519\u8bef",
1340 -"KVMRedirectionSAP\uff0cRequestStateChange\u9519\u8bef"+g):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("\u9519\u8bef","RedirectionService PUT\u9519\u8bef"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}
1355 +function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c61.value=c;c62.value=b.DDNSPeriodicUpdateInterval;c63.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"\u52a8\u6001DNS\u5ba2\u6237\u7aef",3,showEditDnsDlgOk)}}
1356 +function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c61.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c61.value?!0:!1;2==c61.value&&(b.DDNSPeriodicUpdateInterval=c62.value,b.DDNSTTL=c63.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
1357 +function showEditDnsDlgChange(){QE("c62",2==c61.value);QE("c63",2==c61.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"\u82f1\u7279\u5c14&reg;AMT\u529f\u80fd",3,featuresDlgOk))}
1358 +function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,e){200!=e?messagebox("\u9519\u8bef","RedirectionService\uff0cRequestStateChange\u9519\u8bef"+e):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,e){200!=e?messagebox("\u9519\u8bef",
1359 +"KVMRedirectionSAP\uff0cRequestStateChange\u9519\u8bef"+e):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("\u9519\u8bef","RedirectionService PUT\u9519\u8bef"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}
1360 function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
1342 -function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c49.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c50.checked=!c49.checked),c51.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c52.checked=!c51.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1361 +function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c74.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c75.checked=!c74.checked),c76.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c77.checked=!c76.checked),setDialogMode(26,"Boot Features",3,showEnableBootServiceDlgOk))}
1362 function showEnableBootServiceDlgOk(){var b=32768+parseInt(document.querySelector("input[name=d26a]:checked").value);15<amtversion&&(b+=parseInt(document.querySelector("input[name=d26b]:checked").value));amtstack.CIM_BootService_RequestStateChange(b,null,showEnableBootServiceDlgResponse,b)}
1344 -function showEnableBootServiceDlgResponse(b,c,a,d,g){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,g),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1345 -function showEnableBootServiceDlgResponse2(b,c,a,d,g){200==d&&a.Body.EnabledState!=g&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"\u7528\u6237\u540c\u610f",3,consentDlgOk)}}
1363 +function showEnableBootServiceDlgResponse(b,c,a,d,e){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,e),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
1364 +function showEnableBootServiceDlgResponse2(b,c,a,d,e){200==d&&a.Body.EnabledState!=e&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"\u7528\u6237\u540c\u610f",3,consentDlgOk)}}
1365 function consentDlgOk(){amtsysstate.IPS_OptInService.response.OptInRequired=document.querySelector("input[name=d10]:checked").value;amtstack.Put("IPS_OptInService",amtsysstate.IPS_OptInService.response,function(){amtstack.Get("IPS_OptInService",consentGet,0,1)},0,1)}function consentGet(b,c,a,d){200==d&&PullSystemStatus()}var ipv6addrtype="\u94fe\u63a5\u672c\u5730\u5730\u5740 \u7f51\u7edc\u672c\u5730\u5730\u5740 \u5168\u7403\u5730\u5740 \u7528\u6237\u914d\u7f6e \u4e0d\u5141\u8bb8 DAD\u6b63\u5728\u8fdb\u884c\u4e2d \u6709\u6548 \u4e0d\u63a8\u8350\u4f7f\u7528 \u9996\u9009/\u5df2\u5f03\u7528 \u5df2\u8fc7\u671f \u78b0\u649e \u4e0d\u5141\u8bb8".split(" ");
1366 function showIPv6AddrDlg(b,c){if(!xxdialogMode){var a=TableStart();t=c.split(",");for(var d=0;d<t.length;d+=3)a+=TableEntry("<b>"+t[d]+"</b><br><span style=font-size:10px>"+ipv6addrtype[t[d+1]]+"\uff0c"+ipv6addrtype[+t[d+2]+5]+"</span>","");setDialogMode(11,0==b?"\u6709\u7ebf\u63a5\u53e3\u7684IPv6\u5730\u5740":"\u65e0\u7ebf\u63a5\u53e3\u7684IPv6\u5730\u5740",1,null,a+TableEnd())}}
1348 -function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(69,0==b);QV(70,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","\u7981\u7528IPv6");QH("d21l1","\u542f\u7528IPv6\uff0c\u81ea\u52a8");QH("d21l2","\u5df2\u542f\u7528IPv6\uff0c\u81ea\u52a8+\u624b\u52a8\u5730\u5740");d21o0.checked=
1349 -!c;d21o1.checked=c&&!ipv6manual;d21o2.checked=c&&ipv6manual;c31.value=isIpAddress(a.IPv6Address,"");c33.value=isIpAddress(a.DefaultRouter,"");c34.value=isIpAddress(a.PrimaryDNS,"");c35.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"\u6709\u7ebf\u63a5\u53e3\u7684IPv6\u652f\u6301":"\u65e0\u7ebf\u63a5\u53e3\u7684IPv6\u652f\u6301",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1350 -function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c31.value?"::":c31.value.toLocaleLowerCase(),a.DefaultRouter=""==c33.value?"::":c33.value.toLocaleLowerCase(),
1351 -a.PrimaryDNS=""==c34.value?"::":c34.value.toLocaleLowerCase(),a.SecondaryDNS=""==c35.value?"::":c35.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1352 -"CreationClassName").Value,g=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1353 -d+'</w:Selector><w:Selector Name="DeviceID">'+g+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1354 -b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",g=Clone(c[a]);g.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",g,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv6\u652f\u6301",format("\u65e0\u6cd5\u8bbe\u7f6eIPv6\u72b6\u6001\uff0c\u9519\u8bef{0}",d))}
1367 +function showIPv6StateDlg(b,c){if(!xxdialogMode&&amtsysstate){var a=amtsysstate.IPS_IPv6PortSettings.responses[b];ipv6manual=0==b&&(isIpAddress(a.IPv6Address)||isIpAddress(a.DefaultRouter)||isIpAddress(a.PrimaryDNS)||isIpAddress(a.SecondaryDNS));QV(68,0==b);QV(69,!1);QV("d21o0",!0);QV("d21l0",!0);QH("d21l0","\u7981\u7528IPv6");QH("d21l1","\u542f\u7528IPv6\uff0c\u81ea\u52a8");QH("d21l2","\u5df2\u542f\u7528IPv6\uff0c\u81ea\u52a8+\u624b\u52a8\u5730\u5740");d21o0.checked=
1368 +!c;d21o1.checked=c&&!ipv6manual;d21o2.checked=c&&ipv6manual;c56.value=isIpAddress(a.IPv6Address,"");c58.value=isIpAddress(a.DefaultRouter,"");c59.value=isIpAddress(a.PrimaryDNS,"");c60.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"\u6709\u7ebf\u63a5\u53e3\u7684IPv6\u652f\u6301":"\u65e0\u7ebf\u63a5\u53e3\u7684IPv6\u652f\u6301",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
1369 +function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c56.value?"::":c56.value.toLocaleLowerCase(),a.DefaultRouter=""==c58.value?"::":c58.value.toLocaleLowerCase(),
1370 +a.PrimaryDNS=""==c59.value?"::":c59.value.toLocaleLowerCase(),a.SecondaryDNS=""==c60.value?"::":c60.value.toLocaleLowerCase(),amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)));c=amtsysstate.CIM_ElementSettingData.responses;for(a=0;a<c.length;a++)if(c[a].SettingData&&c[a].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+b){var d=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name",
1371 +"CreationClassName").Value,e=getItem(c[a].ManagedElement.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,d='<w:SelectorSet><w:Selector Name="ManagedElement"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/'+d+'</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">'+
1372 +d+'</w:Selector><w:Selector Name="DeviceID">'+e+'</w:Selector><w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector><w:Selector Name="SystemName">Intel(r) AMT</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector><w:Selector Name="SettingData"><a:EndpointReference xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://intel.com/wbem/wscim/1/ips-schema/1/IPS_IPv6PortSettings</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">Intel(r) IPS IPv6 Settings '+
1373 +b+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference></w:Selector></w:SelectorSet>",e=Clone(c[a]);e.IsCurrent=d21o0.checked?2:1;amtstack.Put("CIM_ElementSettingData",e,showIPv6StateDlgDone,null,0,d)}}function showIPv6StateDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv6\u652f\u6301",format("\u65e0\u6cd5\u8bbe\u7f6eIPv6\u72b6\u6001\uff0c\u9519\u8bef{0}",d))}
1374 function showPingActionDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,b=(1==b.PingResponseEnabled)+((1==b.RmcpPingResponseEnabled)<<1);d20a.checked=0==b;d20b.checked=1==b;d20c.checked=2==b;d20d.checked=3==b;setDialogMode(20,"\u82f1\u7279\u5c14&reg;AMT Ping\u54cd\u5e94",3,showPingActionDlgOk)}}
1375 function showPingActionDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response),c=document.querySelector("input[name=d20]:checked").value;b.PingResponseEnabled=0!=(c&1);b.RmcpPingResponseEnabled=0!=(c&2);amtstack.Put("AMT_GeneralSettings",b,PullSystemStatus,0,1)}
1357 -function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(68,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(69,!0);QV(70,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","\u4f7f\u7528DHCP\u670d\u52a1\u5668\u81ea\u52a8\u914d\u7f6e");QH("d21l2","\u4f7f\u7528\u4e0b\u9762\u7684IPv4\u8bbe\u7f6e\u8fdb\u884c\u9759\u6001\u914d\u7f6e");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=
1358 -!d21o1.checked;c31.value=isIpAddress(b.IPAddress,"");c32.value=isIpAddress(b.SubnetMask,"");c33.value=isIpAddress(b.DefaultGateway,"");c34.value=isIpAddress(b.PrimaryDNS,"");c35.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"IPv4\u8bbe\u7f6e",3,showIPSetupDlgOk)}}
1359 -function updateIPSetupDlg(){var b=!0;d21o2.checked&&"\u5df2\u542f\u7528IPv6\uff0c\u81ea\u52a8+\u624b\u52a8\u5730\u5740"==Q("d21l2").innerHTML&&2>c31.value.split(":").length&&(b=!1);QE("c54",b);c31.disabled=c32.disabled=c33.disabled=c34.disabled=c35.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1360 -function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c31.value,b.SubnetMask=c32.value,b.DefaultGateway=c33.value,""!=c34.value&&(b.PrimaryDNS=c34.value),""!=c35.value&&
1361 -(b.SecondaryDNS=c35.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv4\u8bbe\u7f6e",format("\u65e0\u6cd5\u8bbe\u7f6e\u7f51\u7edc\u53c2\u6570\uff0c\u9519\u8bef{0}",d))}amtPowerBootCapabilities=null;
1376 +function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(67,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(68,!0);QV(69,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","\u4f7f\u7528DHCP\u670d\u52a1\u5668\u81ea\u52a8\u914d\u7f6e");QH("d21l2","\u4f7f\u7528\u4e0b\u9762\u7684IPv4\u8bbe\u7f6e\u8fdb\u884c\u9759\u6001\u914d\u7f6e");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=
1377 +!d21o1.checked;c56.value=isIpAddress(b.IPAddress,"");c57.value=isIpAddress(b.SubnetMask,"");c58.value=isIpAddress(b.DefaultGateway,"");c59.value=isIpAddress(b.PrimaryDNS,"");c60.value=isIpAddress(b.SecondaryDNS,"");updateIPSetupDlg();setDialogMode(21,"IPv4\u8bbe\u7f6e",3,showIPSetupDlgOk)}}
1378 +function updateIPSetupDlg(){var b=!0;d21o2.checked&&"\u5df2\u542f\u7528IPv6\uff0c\u81ea\u52a8+\u624b\u52a8\u5730\u5740"==Q("d21l2").innerHTML&&2>c56.value.split(":").length&&(b=!1);QE("c106",b);c56.disabled=c57.disabled=c58.disabled=c59.disabled=c60.disabled=!(d21o2.checked&&(7>amtversion||0==Q("d21ipsync").checked))}
1379 +function showIPSetupDlgOk(){var b=Clone(amtsysstate.AMT_EthernetPortSettings.responses[0]);b.DHCPEnabled=d21o1.checked;delete b.IPAddress;delete b.SubnetMask;delete b.DefaultGateway;delete b.PrimaryDNS;delete b.SecondaryDNS;6<amtversion&&(b.IpSyncEnabled=Q("d21ipsync").checked);0==d21o1.checked&&0==Q("d21ipsync").checked&&(b.IPAddress=c56.value,b.SubnetMask=c57.value,b.DefaultGateway=c58.value,""!=c59.value&&(b.PrimaryDNS=c59.value),""!=c60.value&&
1380 +(b.SecondaryDNS=c60.value));amtstack.Put("AMT_EthernetPortSettings",b,showIPSetupDlgDone,0,1,b)}function showIPSetupDlgDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("IPv4\u8bbe\u7f6e",format("\u65e0\u6cd5\u8bbe\u7f6e\u7f51\u7edc\u53c2\u6570\uff0c\u9519\u8bef{0}",d))}amtPowerBootCapabilities=null;
1381 function showPowerActionDlg(){xxdialogMode||(statusbox("\u6743\u529b\u884c\u52a8","\u6b63\u5728\u68c0\u67e5\u529f\u80fd..."),amtstack.Get("AMT_BootCapabilities",powerActionResponse00,0,1))}
1363 -function powerActionResponse00(b,c,a,d){if(200==d){b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(g){}amtPowerBootCapabilities=a.Body;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","\u5145\u7535",2);b&1&&(addOption("d5actionSelect","\u91cd\u542f",10),addOption("d5actionSelect","\u7535\u6e90\u5468\u671f",5),addOption("d5actionSelect","\u6389\u7535",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect","\u5f00\u673a\u8fdb\u884c\u8bca\u65ad",
1364 -300),b&1&&addOption("d5actionSelect","\u91cd\u7f6e\u4e3a\u8bca\u65ad",301));9<amtversion&&b&1&&(addOption("d5actionSelect","\u64cd\u4f5c\u7cfb\u7edf\u4ece\u5f85\u673a\u72b6\u6001\u5524\u9192",500),addOption("d5actionSelect","\u64cd\u4f5c\u7cfb\u7edf\u7701\u7535",501),addOption("d5actionSelect","\u8f6f\u8131",12),addOption("d5actionSelect","\u8f6f\u590d\u4f4d",14),addOption("d5actionSelect","\u7761\u89c9",4),addOption("d5actionSelect","\u51ac\u7720",7));1==amtPowerBootCapabilities.BIOSSetup&&(b&2&&
1365 -addOption("d5actionSelect","\u542f\u52a8BIOS",100),b&1&&addOption("d5actionSelect","\u91cd\u7f6e\u4e3aBIOS",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","\u4e0a\u7535\u4ee5\u5b89\u5168\u64e6\u9664",104),b&1&&addOption("d5actionSelect","\u91cd\u7f6e\u4e3a\u5b89\u5168\u64e6\u9664",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&
1382 +function showPowerActionDlg(){if(!xxdialogMode){var b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(c){}amtPowerBootCapabilities=amtsysstate.AMT_BootCapabilities.response;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","\u5145\u7535",2);b&1&&(addOption("d5actionSelect","\u91cd\u542f",10),addOption("d5actionSelect","\u7535\u6e90\u5468\u671f",5),addOption("d5actionSelect","\u6389\u7535",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect",
1383 +"\u5f00\u673a\u8fdb\u884c\u8bca\u65ad",300),b&1&&addOption("d5actionSelect","\u91cd\u7f6e\u4e3a\u8bca\u65ad",301));9<amtversion&&b&1&&(addOption("d5actionSelect","\u64cd\u4f5c\u7cfb\u7edf\u4ece\u5f85\u673a\u72b6\u6001\u5524\u9192",500),addOption("d5actionSelect","\u64cd\u4f5c\u7cfb\u7edf\u7701\u7535",501),addOption("d5actionSelect","\u8f6f\u8131",12),addOption("d5actionSelect","\u8f6f\u590d\u4f4d",14),addOption("d5actionSelect","\u7761\u89c9",4),addOption("d5actionSelect","\u51ac\u7720",7));1==amtPowerBootCapabilities.BIOSSetup&&
1384 +(b&2&&addOption("d5actionSelect","\u542f\u52a8BIOS",100),b&1&&addOption("d5actionSelect","\u91cd\u7f6e\u4e3aBIOS",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","\u4e0a\u7535\u4ee5\u5b89\u5168\u64e6\u9664",104),b&1&&addOption("d5actionSelect","\u91cd\u7f6e\u4e3a\u5b89\u5168\u64e6\u9664",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&
1385 2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",106),b&1&&addOption("d5actionSelect","Reset to Platform Erase",107));b&1&&addOption("d5actionSelect","\u91cd\u7f6e\u4e3aIDE-R\u8f6f\u76d8",200);b&2&&addOption("d5actionSelect","\u6253\u5f00IDE-R\u8f6f\u76d8",201);b&1&&addOption("d5actionSelect","\u91cd\u7f6e\u4e3aIDE-R CDROM",202);b&2&&addOption("d5actionSelect","\u5f00\u542fIDE-R CDROM",203);b&1&&addOption("d5actionSelect","\u91cd\u7f6e\u4e3aPXE",400);b&2&&addOption("d5actionSelect",
1367 -"\u5f00\u542fPXE",401);addOption("d5actionSelect","\u81ea\u5b9a\u4e49\u52a8\u4f5c...",999);5<amtversion&&addOption("d5actionSelect","\u7528\u6237\u540c\u610f...",998);setDialogMode(5,"\u6743\u529b\u884c\u52a8",3,powerActionDlgCheck)}else messagebox("\u6743\u529b\u884c\u52a8",format("\u65e0\u6cd5\u83b7\u5f97\u7cfb\u7edf\u529f\u80fd\uff0c\u9519\u8bef{0}",d))}
1368 -function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"\u7535\u6e90\u64cd\u4f5c\u5df2\u5b8c\u6210\u3002"):QH(60,format("\u7535\u6e90\u64cd\u4f5c\u9519\u8bef\uff03{0}\u3002",g));setDialogMode(1,"\u6743\u529b\u884c\u52a8",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="\u786e\u8ba4\u6267\u884cIntel&reg;\u8fdc\u7a0b\u5b89\u5168\u64e6\u9664\uff1f<br>\u5982\u679c\u9700\u8981\uff0c\u8f93\u5165\u5b89\u5168\u64e6\u9664\u5bc6\u7801\u3002<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>\u5bc6\u7801</div></div><br><div style=color:red><b>\u8b66\u544a</ b>\uff1a\u8fd9\u5c06\u64e6\u9664\u8fdc\u7a0b\u7cfb\u7edf\u4e0a\u7684\u6570\u636e\u3002</div>",
1386 +"\u5f00\u542fPXE",401);addOption("d5actionSelect","\u81ea\u5b9a\u4e49\u52a8\u4f5c...",999);5<amtversion&&addOption("d5actionSelect","\u7528\u6237\u540c\u610f...",998);setDialogMode(5,"\u6743\u529b\u884c\u52a8",3,powerActionDlgCheck)}}
1387 +function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"\u7535\u6e90\u64cd\u4f5c\u5df2\u5b8c\u6210\u3002"):QH(61,format("\u7535\u6e90\u64cd\u4f5c\u9519\u8bef\uff03{0}\u3002",e));setDialogMode(1,"\u6743\u529b\u884c\u52a8",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="\u786e\u8ba4\u6267\u884cIntel&reg;\u8fdc\u7a0b\u5b89\u5168\u64e6\u9664\uff1f<br>\u5982\u679c\u9700\u8981\uff0c\u8f93\u5165\u5b89\u5168\u64e6\u9664\u5bc6\u7801\u3002<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>\u5bc6\u7801</div></div><br><div style=color:red><b>\u8b66\u544a</ b>\uff1a\u8fd9\u5c06\u64e6\u9664\u8fdc\u7a0b\u7cfb\u7edf\u4e0a\u7684\u6570\u636e\u3002</div>",
1388 rsepass=1,setDialogMode(11,"\u6743\u529b\u884c\u52a8",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1370 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b>\u8b66\u544a</ b>\uff1a\u8fd9\u5c06\u64e6\u9664\u8fdc\u7a0b\u7cfb\u7edf\u4e0a\u7684\u6570\u636e\u3002</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");
1371 -d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",
1372 -a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"\u6743\u529b\u884c\u52a8",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}
1373 -function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1374 -function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,g=[1,2,6,25,26,31],v;for(v in g)d&1<<g[v]&&Q("rpef"+g[v]).checked&&(a+=1<<g[v]);d=makeUefiBootParam(1,a,4);g=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),g++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),g++);platfromEraseTLV={tlv:btoa(d),tlvlen:g};c?(statusbox("\u6743\u529b\u884c\u52a8","\u6b63\u5728\u68c0\u67e5\u72b6\u6001..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1389 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b>\u8b66\u544a</ b>\uff1a\u8fd9\u5c06\u64e6\u9664\u8fdc\u7a0b\u7cfb\u7edf\u4e0a\u7684\u6570\u636e\u3002</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");
1390 +d&8&&a.push("<label><input id=rpef3 type=checkbox onchange=powerActionDlgRPEValidate()>Verify Storage Erase</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&65536&&a.push("<label><input id=rpef16 type=checkbox onchange=powerActionDlgRPEValidate()>OEM Custom Action</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");
1391 +d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");0<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+
1392 +addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpeeomdata style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("OEM Data (HEX)","<input id=rpeoemdatax style=width:210px maxlength=256 type=input>")+"</div>";setDialogMode(11,"\u6743\u529b\u884c\u52a8",3,powerActionDlgRPEEx,c,b);QE("c106",!1)}
1393 +function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,3,6,16,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QV("rpeeomdata",b&65536);QE("c106",b)}var platfromEraseTLV=null;
1394 +function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,3,6,16,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);a&65536&&""!=Q("rpeoemdatax").value&&(d+=makeUefiBootParam(20,hex2rstr(Q("rpeoemdatax").value),null,11),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("\u6743\u529b\u884c\u52a8",
1395 +"\u6b63\u5728\u68c0\u67e5\u72b6\u6001..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1396 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("\u6743\u529b\u884c\u52a8","\u6b63\u5728\u68c0\u67e5\u72b6\u6001...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&
1397 8==b&&(c=!1);13!=currentView&&10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
1377 -function showAdvPowerDlg(){try{Q("c39").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1398 +function showAdvPowerDlg(){try{Q("c64").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1399 QV("ForceHDBootOption",1==amtPowerBootCapabilities.ForceHardDriveBoot);QV("ForcePXEBootOption",1==amtPowerBootCapabilities.ForcePXEBoot);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);QV("d24dSerialOverLan",1==amtPowerBootCapabilities.SOL);
1400 QV("d24dSecureErase",1==amtPowerBootCapabilities.SecureErase);QV("d24dPlatformErase",null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&0!=(amtsysstate.CIM_BootService.response.EnabledState&2));QV("d24dFirmwareReset",1==amtPowerBootCapabilities.ConfigurationDataReset);QV("d24dLockSleepButton",1==amtPowerBootCapabilities.SleepButtonLock);QV("d24dUserPasswordBypass",1==amtPowerBootCapabilities.UserPasswordBypass);
1380 -QV("c46",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c47",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c48",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);setDialogMode(24,"\u81ea\u5b9a\u4e49\u7535\u6e90\u52a8\u4f5c",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}
1381 -function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c39").value&&600>Q("c39").value;QE("c41",!b);QE("c43",!b);QE("idd_d24IDERBootDevice",!b);QE("c45",!b);QE("idd_d24RSEPass",!b);QE("c54",!0)}
1382 -function showAdvPowerDlgOk(){var b=Q("c39").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"\u7535\u6e90\u64cd\u4f5c\u5df2\u5b8c\u6210\u3002"):QH(60,format("\u7535\u6e90\u64cd\u4f5c\u9519\u8bef\uff03{0}\u3002",g));setDialogMode(1,"\u6743\u529b\u884c\u52a8",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c39").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,
1383 -AvdPowerDlg.BIOSSecureBoot=Q("d24BiosSecureBoot").checked,AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c43").value,AvdPowerDlg.FirmwareVerbosity=Q("c45").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c44").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked,
1401 +QV("c71",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c72",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c73",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);QH("c66",'<option value=0>None</option><option id="ForceDVDBootOption" value=1>Force CD/DVD Boot</option><option id="ForcePXEBootOption" value=2>Force PXE Boot</option><option id="ForceHDBootOption" value=3>Force Hard Disk Boot</option><option id="ForceDiagBootOption" value=4>Force Diagnostic Boot</option>');
1402 +setDialogMode(24,"\u81ea\u5b9a\u4e49\u7535\u6e90\u52a8\u4f5c",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}
1403 +function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c64").value&&600>Q("c64").value;QE("c66",!b);QE("c68",!b);QE("idd_d24IDERBootDevice",!b);QE("c70",!b);QE("idd_d24RSEPass",!b);QE("c106",!0)}
1404 +function showAdvPowerDlgOk(){var b=Q("c64").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"\u7535\u6e90\u64cd\u4f5c\u5df2\u5b8c\u6210\u3002"):QH(61,format("\u7535\u6e90\u64cd\u4f5c\u9519\u8bef\uff03{0}\u3002",e));setDialogMode(1,"\u6743\u529b\u884c\u52a8",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c64").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,
1405 +AvdPowerDlg.BIOSSecureBoot=Q("d24BiosSecureBoot").checked,AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c68").value,AvdPowerDlg.FirmwareVerbosity=Q("c70").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c69").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked,
1406 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,AvdPowerDlg.PlatformErase=Q("d24PlatformErase").checked,AvdPowerDlg.FirmwareReset=Q("d24FirmwareReset").checked,!0===AvdPowerDlg.SecureErase&&
1407 0<Q("d24rsepass").value.length&&(AvdPowerDlg.RSEPassword=Q("d24rsepass").value),!0===AvdPowerDlg.PlatformErase?powerActionDlgRPE(!0):(statusbox("\u6743\u529b\u884c\u52a8","\u6b63\u5728\u68c0\u67e5\u72b6\u6001..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)))}
1386 -function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("\u6743\u529b\u884c\u52a8",format("\u9519\u8bef\uff03{0}",d)):4294967295==a.Body.OptInRequired&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(d6ConsentText.value="",setDialogMode(6,"\u7528\u6237\u540c\u610f",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("\u6743\u529b\u884c\u52a8","\u5f00\u59cb\u9009\u62e9\u52a0\u5165..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,
1387 -0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("\u7528\u6237\u540c\u610f","\u65e0\u9700\u7528\u6237\u540c\u610f\u3002"):(statusbox("\u6743\u529b\u884c\u52a8","\u83b7\u53d6\u542f\u52a8\u8bbe\u7f6e..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1408 +function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("\u6743\u529b\u884c\u52a8",format("\u9519\u8bef\uff03{0}",d)):(4294967295==a.Body.OptInRequired||connectDesktopConsent&&0!=a.Body.OptInRequired)&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(amtstack.IPS_OptInService_CancelOptIn(null),d6ConsentText.value="",setDialogMode(6,"\u7528\u6237\u540c\u610f",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("\u6743\u529b\u884c\u52a8",
1409 +"\u5f00\u59cb\u9009\u62e9\u52a0\u5165..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("\u7528\u6237\u540c\u610f","\u65e0\u9700\u7528\u6237\u540c\u610f\u3002"):(statusbox("\u6743\u529b\u884c\u52a8","\u83b7\u53d6\u542f\u52a8\u8bbe\u7f6e..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1410 function powerActionResponseC1(b,c,a,d){200!=d?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("\u6743\u529b\u884c\u52a8",format("\u9519\u8bef\u7f16\u53f7",d)):0!=a.Body.ReturnValue?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("\u7528\u6237\u540c\u610f\u9519\u8bef",a.Body.ReturnValueStr.replace(/_/g," ")):(d6ConsentText.value="",setDialogMode(6,"\u7528\u6237\u540c\u610f",11,powerActionSendConsent),checkConsentDisplay(),consentChanged(),amtstack.Enum("CIM_ServiceAvailableToElement",
1411 function(a,b,c,d){errcheck(d,a)||(amtsysstate.CIM_ServiceAvailableToElement.responses=c,updateSystemStatus(),null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState&&amtstack.RequestPowerStateChange(2,function(a,b,c,d){}))}))}
1390 -function powerActionSendConsent(b){0==b?amtstack.IPS_OptInService_CancelOptIn(function(){}):(statusbox("\u6743\u529b\u884c\u52a8","\u6b63\u5728\u4f20\u9001\u4f7f\u7528\u8005\u540c\u610f..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1412 +function powerActionSendConsent(b){console.log("powerActionSendConsent",b);0==b?(amtstack.IPS_OptInService_CancelOptIn(function(){}),connectDesktopConsent=!1,desktop.Stop()):(statusbox("\u6743\u529b\u884c\u52a8","\u6b63\u5728\u4f20\u9001\u4f7f\u7528\u8005\u540c\u610f..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
1413 function powerActionResponseC2(b,c,a,d){200!=d?messagebox("\u6743\u529b\u884c\u52a8",format("\u9519\u8bef\uff03{0}",d)):0!=a.Body.ReturnValue?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("\u7528\u6237\u540c\u610f","\u7528\u6237\u540c\u610f\u6210\u529f\u3002"):(statusbox("\u6743\u529b\u884c\u52a8","\u6b63\u5728\u68c0\u67e5\u72b6\u6001..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,
1414 0,1))}
1393 -function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("\u6743\u529b\u884c\u52a8",format("\u9519\u8bef\uff03{0}",d));else{b=d5actionSelect.value;var g=a.Body;g.ConfigurationDataReset=!1;delete g.WinREBootEnabled;delete g.UEFILocalPBABootEnabled;delete g.UEFIHTTPSBootEnabled;delete g.SecureBootControlEnabled;delete g.BootguardStatus;delete g.OptionsCleared;delete g.BIOSLastStatus;delete g.UefiBootParametersArray;delete g.RPEEnabled;999==b?(g.BIOSPause=AvdPowerDlg.BIOSPause,g.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1394 -g.BIOSSetup=AvdPowerDlg.BIOSSetup,g.BootMediaIndex=AvdPowerDlg.BootMediaIndex,g.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,g.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,g.IDERBootDevice=AvdPowerDlg.IDERBootDevice,g.LockKeyboard=AvdPowerDlg.LockKeyboard,g.LockPowerButton=AvdPowerDlg.LockPowerButton,g.LockResetButton=AvdPowerDlg.LockResetButton,g.LockSleepButton=AvdPowerDlg.LockSleepButton,g.ReflashBIOS=AvdPowerDlg.ReflashBIOS,g.UseIDER=AvdPowerDlg.UseIDER,g.UseSOL=AvdPowerDlg.UseSOL,
1395 -g.UseSafeMode=AvdPowerDlg.UseSafeMode,g.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=g.SecureErase&&(g.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==g.SecureErase&&AvdPowerDlg.RSEPassword&&(g.RSEPassword=AvdPowerDlg.RSEPassword)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1396 -0!=(amtPowerBootCapabilities.PlatformErase&1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(g.BIOSPause=!1,g.EnforceSecureBoot=!1,g.BIOSSetup=99<b&&104>b,g.BootMediaIndex=0,g.FirmwareVerbosity=0,g.ForcedProgressEvents=!1,g.IDERBootDevice=202==b||203==b?1:0,g.LockKeyboard=!1,g.LockPowerButton=!1,g.LockResetButton=!1,g.LockSleepButton=!1,g.ReflashBIOS=
1397 -!1,g.UseIDER=199<b&&300>b,g.UseSOL=13==currentView&&8!=b&&300>b,g.UseSafeMode=!1,g.UserPasswordBypass=!1,null!=g.SecureErase&&(g.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===g.SecureErase&&0<rsepass.length&&(g.RSEPassword=rsepass)),null!=g.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&0!=(amtPowerBootCapabilities.PlatformErase&
1398 -1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=!1),rsepass=null);console.log("\u5f00\u673a\u52a8\u4f5c\uff1a"+b);console.log("\u8bbe\u7f6e\u542f\u52a8\u8bbe\u7f6e\uff1a"+ObjectToString2(g));statusbox("\u6743\u529b\u884c\u52a8","\u8bbe\u7f6e\u542f\u52a8\u8bbe\u7f6e...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,b,c,d){200!=d?messagebox("\u6743\u529b\u884c\u52a8",
1399 -format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",g,powerActionResponse2,0,1)},0,1)}}
1400 -function powerActionResponse2(b,c,a,d,g){200!=d?messagebox("\u6743\u529b\u884c\u52a8",format("PUT AMT_BootSettingData\uff0c\u9519\u8bef\uff03{0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("\u6743\u529b\u884c\u52a8","\u8bbe\u7f6e\u4e0b\u4e00\u6b21\u542f\u52a8..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1401 -function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c41.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c41.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c41").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1415 +function powerActionResponse1(b,c,a,d){if(200!=d)messagebox("\u6743\u529b\u884c\u52a8",format("\u9519\u8bef\uff03{0}",d));else{b=d5actionSelect.value;var e=a.Body;e.ConfigurationDataReset=!1;delete e.WinREBootEnabled;delete e.UEFILocalPBABootEnabled;delete e.UEFIHTTPSBootEnabled;delete e.SecureBootControlEnabled;delete e.BootguardStatus;delete e.OptionsCleared;delete e.BIOSLastStatus;delete e.UefiBootParametersArray;delete e.RPEEnabled;999==b?(e.BIOSPause=AvdPowerDlg.BIOSPause,e.EnforceSecureBoot=AvdPowerDlg.BIOSSecureBoot,
1416 +e.BIOSSetup=AvdPowerDlg.BIOSSetup,e.BootMediaIndex=AvdPowerDlg.BootMediaIndex,e.FirmwareVerbosity=AvdPowerDlg.FirmwareVerbosity,e.ForcedProgressEvents=AvdPowerDlg.ForcedProgressEvents,e.IDERBootDevice=AvdPowerDlg.IDERBootDevice,e.LockKeyboard=AvdPowerDlg.LockKeyboard,e.LockPowerButton=AvdPowerDlg.LockPowerButton,e.LockResetButton=AvdPowerDlg.LockResetButton,e.LockSleepButton=AvdPowerDlg.LockSleepButton,e.ReflashBIOS=AvdPowerDlg.ReflashBIOS,e.UseIDER=AvdPowerDlg.UseIDER,e.UseSOL=AvdPowerDlg.UseSOL,
1417 +e.UseSafeMode=AvdPowerDlg.UseSafeMode,e.UserPasswordBypass=AvdPowerDlg.UserPasswordBypass,null!=e.SecureErase&&(e.SecureErase=AvdPowerDlg.SecureErase&&1==amtPowerBootCapabilities.SecureErase,1==e.SecureErase&&AvdPowerDlg.RSEPassword&&(e.RSEPassword=AvdPowerDlg.RSEPassword)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&AvdPowerDlg.PlatformErase&&null!=amtPowerBootCapabilities.PlatformErase&&
1418 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=AvdPowerDlg.FirmwareReset)):(e.BIOSPause=!1,e.EnforceSecureBoot=!1,e.BIOSSetup=99<b&&104>b,e.BootMediaIndex=0,e.FirmwareVerbosity=0,e.ForcedProgressEvents=!1,e.IDERBootDevice=202==b||203==b?1:0,e.LockKeyboard=!1,e.LockPowerButton=!1,e.LockResetButton=!1,e.LockSleepButton=
1419 +!1,e.ReflashBIOS=!1,e.UseIDER=199<b&&300>b,e.UseSOL=13==currentView&&8!=b&&300>b,e.UseSafeMode=!1,e.UserPasswordBypass=!1,null!=e.SecureErase&&(e.SecureErase=(104==b||105==b)&&1==amtPowerBootCapabilities.SecureErase,!0===e.SecureErase&&0<rsepass.length&&(e.RSEPassword=rsepass)),null!=e.PlatformErase&&(null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&2&&(106==b||107==b)&&null!=amtPowerBootCapabilities.PlatformErase&&
1420 +0!=(amtPowerBootCapabilities.PlatformErase&1)?(e.PlatformErase=!0,e.UefiBootParametersArray=platfromEraseTLV.tlv,e.UefiBootNumberOfParams=platfromEraseTLV.tlvlen):e.PlatformErase=!1),null!=e.ConfigurationDataReset&&(e.ConfigurationDataReset=!1),rsepass=null);console.log("\u5f00\u673a\u52a8\u4f5c\uff1a"+b);console.log("\u8bbe\u7f6e\u542f\u52a8\u8bbe\u7f6e\uff1a"+ObjectToString2(e));statusbox("\u6743\u529b\u884c\u52a8","\u8bbe\u7f6e\u542f\u52a8\u8bbe\u7f6e...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,
1421 +function(a,b,c,d){200!=d?messagebox("\u6743\u529b\u884c\u52a8",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",e,powerActionResponse2,0,1)},0,1)}}
1422 +function powerActionResponse2(b,c,a,d,e){200!=d?messagebox("\u6743\u529b\u884c\u52a8",format("PUT AMT_BootSettingData\uff0c\u9519\u8bef\uff03{0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("\u6743\u529b\u884c\u52a8","\u8bbe\u7f6e\u4e0b\u4e00\u6b21\u542f\u52a8..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
1423 +function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c66.value&&(c=["Force CD/DVD Boot","Force PXE Boot","Force Hard-drive Boot","Force Diagnostic Boot"][c66.value-1]);else{if(300==b||301==b)c="Force Diagnostic Boot";if(400==b||401==b)c="Force PXE Boot";if(600==b||601==b)c="Force OCR UEFI HTTPS Boot"}Q("c66").value=0;console.log("ChangeBootOrder: "+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<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: '+
1424 c+"</Selector></SelectorSet></ReferenceParameters>",powerActionResponse3)}var targetPowerAction=0;
1403 -function powerActionResponse3(b,c,a,d){console.log("powerActionResponse3("+c+","+a+","+d+")");if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("\u6743\u529b\u884c\u52a8","\u6b63\u5728\u6267\u884c\u7535\u6e90\u64cd\u4f5c...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==
1404 -b&&(b=10);999==b&&(b=AvdPowerDlg.Action);targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("\u6743\u529b\u884c\u52a8","\u4e0b\u4e00\u4e2a\u542f\u52a8\u64cd\u4f5c\u96c6\u3002")}}
1405 -function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"\u7535\u6e90\u64cd\u4f5c\u5df2\u5b8c\u6210\u3002"),setDialogMode(1,"\u6743\u529b\u884c\u52a8",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c54",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}
1425 +function powerActionResponse3(b,c,a,d){if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("\u6743\u529b\u884c\u52a8","\u6b63\u5728\u6267\u884c\u7535\u6e90\u64cd\u4f5c...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==b&&(b=AvdPowerDlg.Action);targetPowerAction=
1426 +b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("\u6743\u529b\u884c\u52a8","\u4e0b\u4e00\u4e2a\u542f\u52a8\u64cd\u4f5c\u96c6\u3002")}}
1427 +function powerActionResponse4(b,c,a,d){200==d&&(QH(61,"\u7535\u6e90\u64cd\u4f5c\u5df2\u5b8c\u6210\u3002"),setDialogMode(1,"\u6743\u529b\u884c\u52a8",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c106",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}
1428 function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1429 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1430 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1409 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var g=b[c].app?b[c].app:"";a[d][g]||(a[d][g]={});b[c].name&&(a[d][g][b[c].name]=b[c])}xxStorage.content=
1410 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u6b64\u8ba1\u7b97\u673a\u7684\u82f1\u7279\u5c14&reg;AMT\u5b58\u50a8\u3002<br><br>";var v,n,g="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,e;for(e in b[c][p]){q++;if(c!=v||p!=n)""!=g&&(a+=g,g="<br>"),v=c,
1411 -n=p,g=""!=c?g+EscapeHtml(c+" / "+p):g+"\u6839";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+e+'"',g=g+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+e+'",'+C+")><div style=float:right>"),g=g+(" "+AddButton2("\u4e0b\u8f7d","DownloadFromStorage("+C+',"'+e+'",event)')),g=g+("</div><div style=padding-top:3px><b>"+EscapeHtml(e)+"</b>, <i>"+b[c][p][e].size+" \u4e2a\u5b57\u8282</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&
1412 -xxStorageApplications.push(p)}0==q&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=g&&(a+=g);0==d&&(a+="<div style=padding-left:15px><br><i>\u627e\u4e0d\u5230\u6587\u4ef6\u3002</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+
1413 -TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("\u4e0a\u8f7d...","UploadToStorage()"):""));QH(55,a)}else QH(55,"\u65e0\u6cd5\u52a0\u8f7d\u5b58\u50a8\u6570\u636e...<br/>"+AddButton("\u5237\u65b0","PullStorage()"))}
1414 -function showStorageDetails(b,c,a,d){if(!xxdialogMode){var g="",v=xxStorage.content[b][c][a];""!=b&&(g+=addHtmlValue("\u4f9b\u5e94\u5546",b));""!=c&&(g+=addHtmlValue("\u5e94\u7528",c));g+=addHtmlValue("\u540d\u79f0",a);g+=addHtmlValue("\u5c3a\u5bf8",v.size+" bytes");v.link&&(g+=addHtmlValue("\u94fe\u63a5",v.link));setDialogMode(11,"\u50a8\u5b58\u7269\u54c1",5,showStorageDetailsEx,g,d)}}
1431 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1432 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u6b64\u8ba1\u7b97\u673a\u7684\u82f1\u7279\u5c14&reg;AMT\u5b58\u50a8\u3002<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var r=0,g;for(g in b[c][p]){r++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,
1433 +n=p,e=""!=c?e+EscapeHtml(c+" / "+p):e+"\u6839";var C='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+g+'",'+C+")><div style=float:right>"),e=e+(" "+AddButton2("\u4e0b\u8f7d","DownloadFromStorage("+C+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][p][g].size+" \u4e2a\u5b57\u8282</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&
1434 +xxStorageApplications.push(p)}0==r&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>\u627e\u4e0d\u5230\u6587\u4ef6\u3002</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+
1435 +TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("\u4e0a\u8f7d...","UploadToStorage()"):""));QH(56,a)}else QH(56,"\u65e0\u6cd5\u52a0\u8f7d\u5b58\u50a8\u6570\u636e...<br/>"+AddButton("\u5237\u65b0","PullStorage()"))}
1436 +function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("\u4f9b\u5e94\u5546",b));""!=c&&(e+=addHtmlValue("\u5e94\u7528",c));e+=addHtmlValue("\u540d\u79f0",a);e+=addHtmlValue("\u5c3a\u5bf8",v.size+" bytes");v.link&&(e+=addHtmlValue("\u94fe\u63a5",v.link));setDialogMode(11,"\u50a8\u5b58\u7269\u54c1",5,showStorageDetailsEx,e,d)}}
1437 function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}function storageDeleteResponse(b,c){200!=c?messagebox("\u5b58\u50a8",format("\u65e0\u6cd5\u5220\u9664\u6587\u4ef6\uff08ERR {0}\uff09\uff0c\u8bf7\u68c0\u67e5\u8ba1\u7b97\u673a\u662f\u5426\u5df2\u6253\u5f00\u7535\u6e90\u3002",c)):PullStorage()}
1438 function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}function DownloadFromStorageEx(b,c,a){200!=c||null==b?console.log(c,"Data = null"):saveAs(data2blob(b),a)}function OpenFromStorage(b,c){if(!xxdialogMode){haltEvent(c);var a=window.open("http://"+wsstack.comm.host+":"+wsstack.comm.port+"/amt-storage/"+b,"_blank","noopener,noreferrer");a.opener=null;a.focus()}}
1439 function PushToStorage(b,c,a){var d=null;7E3<c.length&&(d=[b,c.substring(7E3)],c=c.substring(0,7E3));wsstack.comm.PerformAjax(c,PushToStorageResponse,d,0,"/amt-storage/"+b+(1==a?"?append=":""),"PUT")}function PushToStorageResponse(b,c,a){200!=c?messagebox("\u5b58\u50a8",format("\u65e0\u6cd5\u63a8\u9001\u6587\u4ef6\uff08ERR {0}\uff09\uff0c\u8bf7\u68c0\u67e5\u8ba1\u7b97\u673a\u662f\u5426\u5df2\u6253\u5f00\u7535\u6e90\u3002",c)):null!=a?PushToStorage(a[0],a[1],!0):PullStorage()}
@@ -1422,37 +1444,37 @@ xxStorageVendors[d]+'">';a+="</datalist>";a+="<datalist id=mstorageapplicationli
1444 function UploadToStorageEx(b,c){if(c)d=new FileReader,d.onload=UploadToStorageEx2,d.filename=Q("mstoragefile").value,d.readAsBinaryString(c);else{var a=Q("mstoragefile");if(1==a.files.length){var d=new FileReader;d.onload=UploadToStorageEx2;d.filename=a.files[0].name;d.readAsBinaryString(a.files[0])}}}
1445 function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0].name:"");b=b.split(" ").join("");var c=b.split("-");3==c.length&&12>c[0].length&&12>c[1].length&&(Q("mstoragevendor").value=c[0],Q("mstorageapplication").value=c[1],b=c[2]);b=b.split("-").join("");b.endsWith(".gz")&&(b=b.substring(0,b.length-3));b.endsWith(".htm")||b.endsWith(".html")?Q("mstoragetype").value="text/html":b.endsWith(".txt")&&(Q("mstoragetype").value="text/plain");11<b.length&&(b=b.substring(0,11));Q("mstoragefilename").value=
1446 b}
1425 -function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var g=Q("mstoragetype").value;""==g&&(g="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1426 -"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+g+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1447 +function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1448 +"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1449 function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," \u5929").replace("H"," \u5c0f\u65f6").replace("M"," \u5206\u949f");b=b.replace(" 1\u5929"," 1\u5929").replace(" 1\u5c0f\u65f6"," 1\u5c0f\u65f6").replace(" 1\u5206\u949f "," 1\u5206\u949f ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1428 -function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u5524\u9192\u8b66\u62a5\u3002<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,g){if(200==g){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, \u9192\u6765 "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," \u5728"),void 0!=d[c].Interval&&(a+=" \u548c\u6bcf\u4e2a"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&
1450 +function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u5524\u9192\u8b66\u62a5\u3002<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, \u9192\u6765 "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," \u5728"),void 0!=d[c].Interval&&(a+=" \u548c\u6bcf\u4e2a"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&
1451 (a+="\uff0c\u5b8c\u6210\u540e\u5220\u9664"),b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("\u7f16\u8f91...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>\u6ca1\u6709\u6ce8\u518c\u5524\u9192\u8b66\u62a5\u3002</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&
1430 -(d+=AddButton("\u5220\u9664\u6240\u6709\u8b66\u62a5","RemoveAllAlarms()")+AddButton("\u52a0","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
1431 -function prepareAlarmOccurenceTemplate(b,c,a,d,g){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1432 -g+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"\u5220\u9664\u6240\u6709\u5524\u9192\u8b66\u62a5",3,RemoveAllAlarmsEx,"\u786e\u8ba4\u5220\u9664\u6240\u6709\u5524\u9192\u8b66\u62a5\uff1f")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,g,v){0==--b&&PullAlarms()})}
1452 +(d+=AddButton2("\u5220\u9664\u6240\u6709\u8b66\u62a5","RemoveAllAlarms()",xxAlarms?"":"disabled")+AddButton("\u52a0","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(58,b)}},null,!0)}
1453 +function prepareAlarmOccurenceTemplate(b,c,a,d,e){return'<d:AlarmTemplate xmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService" xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
1454 +e+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"\u5220\u9664\u6240\u6709\u5524\u9192\u8b66\u62a5",3,RemoveAllAlarmsEx,"\u786e\u8ba4\u5220\u9664\u6240\u6709\u5524\u9192\u8b66\u62a5\uff1f")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,e,v){0==--b&&PullAlarms()})}
1455 function showAddAlarm(b){if(!xxdialogMode){QE("d25alarm_name",!b);if(void 0!=b){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime);Q("d25alarm_name").value=c.ElementName;Q("d25alarm_sdate").value=a.getFullYear()+"-"+_fmttimepad(a.getMonth()+1)+"-"+_fmttimepad(a.getDate());Q("d25alarm_stime").value=a.getHours()+":"+_fmttimepad(a.getMinutes())+":"+_fmttimepad(a.getSeconds());if(c.Interval){var a=c.Interval.Interval.replace("P","").replace("T","").replace("D","D,").replace("H","H,").replace("M","M,").split(","),
1434 -d=[0,0,0],g;for(g in a){var v=a[g].length-1;"D"==a[g][v]&&(d[0]=parseInt(a[g].substring(0,v)));"H"==a[g][v]&&(d[1]=parseInt(a[g].substring(0,v)));"M"==a[g][v]&&(d[2]=parseInt(a[g].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1435 -Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"\u65b0\u589e\u8b66\u62a5",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c54",b)}
1436 -function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),g=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],g[0],g[1],g[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",g=Q("d25alarm_interval").value.split("-");3!=g.length&&(g=[0,0,0]);var g=
1437 -"P"+g[0]+"DT"+g[1]+"H"+g[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,g,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("\u6dfb\u52a0\u95f9\u949f",format("\u6dfb\u52a0\u544a\u8b66\u5931\u8d25\u3002\u72b6\u6001\uff1a{0}\u3002<br/>\u9a8c\u8bc1\u8b66\u62a5\u662f\u5426\u5c06\u6765\u3002",d)):0!=c.Body.ReturnValue?messagebox("\u6dfb\u52a0\u95f9\u949f",format("\u6dfb\u52a0\u8b66\u62a5{0}\u5931\u8d25\u3002<br/>\u9a8c\u8bc1\u8b66\u62a5\u662f\u5426\u5c06\u6765\u3002",
1438 -c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+g+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("\u7f16\u8f91\u95f9\u949f",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,
1456 +d=[0,0,0],e;for(e in a){var v=a[e].length-1;"D"==a[e][v]&&(d[0]=parseInt(a[e].substring(0,v)));"H"==a[e][v]&&(d[1]=parseInt(a[e].substring(0,v)));"M"==a[e][v]&&(d[2]=parseInt(a[e].substring(0,v)))}Q("d25alarm_interval").value=d.join("-")}else Q("d25alarm_interval").value="";Q("d25alarm_doc").value=1==c.DeleteOnCompletion?1:0}else c=new Date,c.setDate((new Date).getDate()+1),Q("d25alarm_name").value="",Q("d25alarm_sdate").value=c.getFullYear()+"-"+_fmttimepad(c.getMonth()+1)+"-"+_fmttimepad(c.getDate()),
1457 +Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"\u65b0\u589e\u8b66\u62a5",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c106",b)}
1458 +function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),e=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],e[0],e[1],e[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",e=Q("d25alarm_interval").value.split("-");3!=e.length&&(e=[0,0,0]);var e=
1459 +"P"+e[0]+"DT"+e[1]+"H"+e[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,e,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("\u6dfb\u52a0\u95f9\u949f",format("\u6dfb\u52a0\u544a\u8b66\u5931\u8d25\u3002\u72b6\u6001\uff1a{0}\u3002<br/>\u9a8c\u8bc1\u8b66\u62a5\u662f\u5426\u5c06\u6765\u3002",d)):0!=c.Body.ReturnValue?messagebox("\u6dfb\u52a0\u95f9\u949f",format("\u6dfb\u52a0\u8b66\u62a5{0}\u5931\u8d25\u3002<br/>\u9a8c\u8bc1\u8b66\u62a5\u662f\u5426\u5c06\u6765\u3002",
1460 +c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+e+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("\u7f16\u8f91\u95f9\u949f",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,
1461 {InstanceID:a.InstanceID}))}}
1462 function showAlertDetails(b){if(!xxdialogMode){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime),a="<div style=text-align:left>"+addHtmlValue("\u540d\u79f0",c.ElementName)+addHtmlValue("\u5524\u9192\u65f6\u95f4",a.toLocaleString().replace(", "," at "));void 0!=c.Interval&&(a+=addHtmlValue("\u5185\u90e8",_fmtinterval(c.Interval.Interval)));a+=addHtmlValue("\u9192\u540e",1==c.DeleteOnCompletion?"\u5220\u9664\u8b66\u62a5":"\u4fdd\u6301\u8b66\u60d5")+"</div>";messagebox(format("\u8b66\u62a5{0}",c.ElementName),
1463 a);setDialogMode(11,"\u62a5\u8b66"+c.ElementName,5,showAlertDetailsDelete,a,b)}}function showAlertDetailsDelete(b,c){2==b&&amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,b,c,v){PullAlarms()})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag;
1442 -function setDialogMode(b,c,a,d,g,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c54",!0);QV("c54",a&1);QV("c53",a&2);QV(58,a&2);QV("c55",a&4);c&&QH(59,c);for(c=1;27>c;c++)QV("dialog"+c,c==b);QV("dialog",b);g&&(11==b?QH(63,g):QH(60,g));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1464 +function setDialogMode(b,c,a,d,e,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c106",!0);QV("c106",a&1);QV("c105",a&2);QV(59,a&2);QV("c107",a&4);c&&QH(60,c);for(c=1;28>c;c++)QV("dialog"+c,c==b);QV("dialog",b);e&&(11==b?QH(64,e):QH(61,e));0!=xxdialogMode&&iderToggleDiskMap(!1)}
1465 function dialogclose(b){var c=xxdialogFunc,a=xxdialogButtons,d=xxdialogTag;setDialogMode();(a&8||b)&&c&&c(b,d)}
1444 -function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(41).offsetWidth&&(QS("Desk")["max-width"]=Q(41).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1445 -"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(60,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(60,c);setDialogMode(1,b)}
1446 -function SaveJsonFile(b,c,a,d){var g="",v={},n=new Date;amtsysstate&&(g="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));g+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1447 -n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+g+".json")}var httpErrorTable={200:"\u597d",401:"\u6388\u6743\u9519\u8bef",408:"\u8d85\u65f6\u9519\u8bef",601:"WSMAN\u89e3\u6790\u9519\u8bef",602:"\u65e0\u6cd5\u89e3\u6790HTTP\u54cd\u5e94\u6807\u5934",603:"\u610f\u5916\u7684HTTP\u679a\u4e3e\u54cd\u5e94",604:"\u610f\u5916\u7684HTTP\u62c9\u53d6\u54cd\u5e94",997:"\u65e0\u6548\u7684\u6458\u8981\u9886\u57df"};
1466 +function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(42).offsetWidth&&(QS("Desk")["max-width"]=Q(42).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
1467 +"hidden",b=(c-b-Q("Desk").offsetHeight)/2,QS("Desk")["margin-top"]=b+"px",QS("Desk")["margin-bottom"]=b+"px"):(QS(14)["overflow-y"]="scroll",QS("Desk")["margin-top"]="0",QS("Desk")["margin-bottom"]="0")}function messagebox(b,c){QH(61,c);setDialogMode(1,b,1)}function statusbox(b,c){QH(61,c);setDialogMode(1,b)}
1468 +function SaveJsonFile(b,c,a,d){var e="",v={},n=new Date;amtsysstate&&(e="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));e+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
1469 +n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+e+".json")}var httpErrorTable={200:"\u597d",401:"\u6388\u6743\u9519\u8bef",408:"\u8d85\u65f6\u9519\u8bef",601:"WSMAN\u89e3\u6790\u9519\u8bef",602:"\u65e0\u6cd5\u89e3\u6790HTTP\u54cd\u5e94\u6807\u5934",603:"\u610f\u5916\u7684HTTP\u679a\u4e3e\u54cd\u5e94",604:"\u610f\u5916\u7684HTTP\u62c9\u53d6\u54cd\u5e94",997:"\u65e0\u6548\u7684\u6458\u8981\u9886\u57df"};
1470 function errcheck(b,c){if(null==wsstack||amtstack!=c)return!0;200!=b&&9!=b&&(setDialogMode(),wsstack.comm.FailAllError=999,amtstack.CancelAllQueries(999),QH(5,httpErrorTable[b]?httpErrorTable[b]:format("\u9519\u8bef\uff03{0}",b)),401==b&&QH(5,'\u6388\u6743\u9519\u8bef<br /><br /><input type=button value="Set new credentials" onclick=meshcentral2credCallback(true)></input>'),go(100),QS(3).width=0);return 200!=b}
1471 function goiFrame(b,c,a){if(!xxdialogMode){go(c);if(1==b.shiftKey||0==Q(13).src.endsWith(a))Q(13).src=a;QV(14,!1);QV(12,!0)}}function go(b,c){if(!xxdialogMode||1==c){QV(12,!1);QV(14,!0);QV(4,100==b);QV(6,100>b);for(var a=0;80>a;a++){QV("p"+a,a==b);var d=QS("go"+a);d&&(d["background-color"]=a==b?"#abcae1":"");d&&(d["background-color"]=a==b?"gray":"")}currentView=b;center()}}
1450 -function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,g=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:g};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(g=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:g}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(g=parseInt(a[2]));return{host:a[0],http:d,redir:g}}
1472 +function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,e=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:e};if(1<a.length){var v=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(e=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:e}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(e=parseInt(a[2]));return{host:a[0],http:d,redir:e}}
1473 function addLink(b,c){return"<a style=cursor:pointer;color:blue onclick='"+c+"'>&diams; "+b+"</a>"}function addLinkConditional(b,c,a){return a?addLink(b,c):b}function haltEvent(b){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1}function addOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;Q(b).add(d)}function addDisabledOption(b,c,a){var d=document.createElement("option");d.text=c;d.value=a;d.disabled=1;Q(b).add(d)}
1452 -function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,g=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:g=1}return 4==c+a+d+g}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("\u901a\u8bdd\u9519\u8bef",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}
1474 +function passwordcheck(b){if(8>b.length)return!1;var c=0,a=0,d=0,e=0,v;for(v in b){var n=b.charCodeAt(v);64<n&&91>n?c=1:96<n&&123>n?a=1:47<n&&58>n?d=1:e=1}return 4==c+a+d+e}function methodcheck(b){return b&&null!=b&&b.Body&&0!=b.Body.ReturnValue?(messagebox("\u901a\u8bdd\u9519\u8bef",b.Header.Method+": "+(b.Body.ReturnValueStr+"").replace("_"," ")),!0):!1}
1475 function TableStart(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}function TableStart2(){return"<table class='log1 us' cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><p><td>"}function TableEntry(b,c){return"<tr><td class=r1><p>"+b+"<td class=r1>"+c}function FullTable(b,c){var a=TableStart();for(i in b)i&&b[i]&&(a+=TableEntry(i,b[i]));return a+TableEnd(c)}
1476 function TableEnd(b){return"<tr><td colspan=2><p>"+(b?b:"")+"</table>"}function AddButton(b,c){return"<input type=button value='"+b+"' onclick='"+c+"' style=margin:4px>"}function AddButton2(b,c,a){return"<input type=button value='"+b+"' onclick='"+c+"' "+a+">"}function AddRefreshButton(b){return'<input type=button name=refreshbtn value="\u5237\u65b0" onclick=\'refreshButtons(false);'+b+"' style=margin:4px "+(0==refreshButtonsState?"disabled":"")+">"}
1455 -function MoreStart(){return'<a style=cursor:pointer;color:blue id=morexxx1 onclick=QV("morexxx1",false);QV("morexxx2",true)>&#x25BC; More</a><div id=morexxx2 style=display:none><br><hr>'}function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,g=b.options.length;d<g;d++)a=b.options[d],a.selected&&c.push(a.value);return c}
1477 +function MoreStart(){return'<a style=cursor:pointer;color:blue id=morexxx1 onclick=QV("morexxx1",false);QV("morexxx2",true)>&#x25BC; More</a><div id=morexxx2 style=display:none><br><hr>'}function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,e=b.options.length;d<e;d++)a=b.options[d],a.selected&&c.push(a.value);return c}
1478 function getInstance(b,c){for(var a in b)if(b[a].InstanceID==c)return b[a];return null}function getItem(b,c,a){for(var d in b)if(b[d][c]==a)return b[d];return null}function guidToStr(b){return b.substring(6,8)+b.substring(4,6)+b.substring(2,4)+b.substring(0,2)+"-"+b.substring(10,12)+b.substring(8,10)+"-"+b.substring(14,16)+b.substring(12,14)+"-"+b.substring(16,20)+"-"+b.substring(20)}
1479 function getUrlVars(){for(var b,c=[],a=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),d=0;d<a.length;d++)b=a[d].indexOf("="),0<b&&(c[a[d].substring(0,b)]=a[d].substring(b+1,a[d].length));return c}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}
1480 function getDocHeight(){return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight&&0!=document.documentElement.clientHeight?document.documentElement.clientHeight:document.getElementsByTagName("body")[0].clientHeight}function addHtmlValue(b,c){return'<div style=height:20px><div style=float:right;width:220px;overflow:hidden><b title="'+c+'">'+c+"</b></div><div>"+b+"</div></div>"}
public/commander.htm
+75 -74
@@ -1,4 +1,4 @@
1 -<!DOCTYPE html><html lang="en" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</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=go14 class=nav1 onclick=go(14)><a>Remote Desktop</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Files</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</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=go12 class=nav1 onclick=go(12)><a>WSMAN Browser</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Disk Map" onclick=iderToggleDiskMap()><input type=button value="Stop IDE-R Session" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Floppy, blocks are 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, blocks are 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&languageid=en-fr" rel="noreferrer noopener" target="_blank"><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><span id=21></span></div><div id=p11 style=display:none><h1>User Accounts</h1><span id=22></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=23 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=24 type=button value=Query style=margin:4px onclick=wsmanQuery()><input type=button value=Clear style=margin:4px onclick="QH(25, '')"><input id=c0 placeholder=Filter style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=25></div></div><div id=p13 style=display:none;min-width:780px><h1>Serial-over-LAN Terminal</h1><br><div id=26 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel&reg; AMT Redirection port or Serial-over-LAN feature is disabled<span id=27>, click here to enable it.</span></div></div><div id=28 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Remote computer is not powered on, click here to issue a power command.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=29></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Power Actions..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Start remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Start Capture" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Connect onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=30>Disconnected.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value=CR+LF title="Toggle what the return key will send" onclick="termToggleCr();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Toggle terminal size" onclick="termToggleSize();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC+[OM)" title="Toggle F1 to F10 keys emulation type" onclick="termToggleFx();Q(33).blur()"><input id=34 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Extended Ascii" title="Toggle terminal emulation type" onclick="termToggleType();Q(34).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Send onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=35 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Paste disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=36><h1>Remote Desktop</h1><br></div><div id=37 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel&reg; AMT Redirection port or KVM feature is disabled<span id=38>, click here to enable it.</span></div></div><div id=39 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Remote computer is not powered on, click here to issue a power command.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=40></span>&nbsp;<div class=rb title="Rotate Left" onclick=drotate(-1)>&olarr;</div><div class=rb title="Rotate Right" onclick=drotate(1)>&orarr;</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Toggle full screen mode" onkeypress="return false" onkeydown="return false" value=Full onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Save a screenshot of the remote desktop" onkeypress="return false" onkeydown="return false" value=Save... onclick=deskSaveImage() style=margin-right:3px><input type=button value=Settings... title="Edit remote desktop settings" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Start remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Change the power state of the remote machine" onkeypress="return false" onkeydown="return false" value="Power Actions..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;&#x2716;</div>&nbsp;<input type=button id=c10 value=Connect onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=41>Disconnected.</span></div><tr><td id=42 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onwheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=43 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Win<option value=1>Win+Down<option value=2>Win+Up<option value=3>Win+L<option value=4>Win+M<option value=20>Win+R<option value=23>Win+Left<option value=24>Win+Right<option value=5>Shift+Win+M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12<option value=25>Enter</select><input id=DeskWD type=button value=Send onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=44 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=45 type=button value=Type onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=46><input id=47 type=checkbox>Blank Screen&nbsp;</span><span id=48><input id=49 type=checkbox>View only&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=50></span><h1>Audit Log</h1><span id=51></span></div><div id=p16 style=display:none><h1>Security Settings</h1><span id=52></span></div><div id=p17 style=display:none><h1>Internet Settings</h1><span id=53></span></div><div id=p18 style=display:none><h1>System Defense</h1><span id=54></span></div><div id=p19 style=display:none><h1>Agent Presence</h1><span id=55></span></div><div id=p21 style=display:none><h1>Storage</h1><span id=56></span></div><div id=p22 style=display:none><h1>Event Subscriptions</h1><span id=57></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=58></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Files</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Up>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Select All" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rename onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Delete onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="New Folder" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Upload onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Cut onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Copy onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Paste onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Refresh onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Sort by name<option value=2>Sort by size<option value=3>Sort by date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>&checkmark;</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>&#10007;</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=59 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>&#x2716;</div><div id=60 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=61 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=62><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=63 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=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></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="if (event.keyCode == 13) return dialogclose(1); else 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=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Image Encoding</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Disabled<option value=2>Automatic<option value=3>Enabled</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Show Local Mouse Cursor</label><br><label><input type=checkbox id=d7showcad>Show Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Limit Frame Rate</label><br><label><input type=checkbox id=d7noMouseRotate>Don't Rotate Mouse</label><br><label><input type=checkbox id=d7kvmrmw>Reverse Mouse Wheel</label><br></div><div>Other Settings</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Quality</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>Scaling</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=admin style=float:right;width:220px><div style=height:20px>Username</div></div><div style="margin:3px 0 3px 0"><input id=c13 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><label style=display:block><input type=checkbox id=c14>Redirection Port</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM Remote Desktop</label><label style=display:block><input type=checkbox id=c17>IDE-Redirection<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Not Required<br></label><label><input type=radio name=d10 id=c20 value=1>Required for KVM only<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Always Required<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=64></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 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=c23 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=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priority</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Authentication</div></div><div style=height:26px><select id=c26 style=float:right;width:200px onclick=updateWifiDialog()><option id=65 value=4>CCMP-AES<option id=66 value=3>TKIP-RC4</select><div>Encryption</div></div><div id=c27><div style=height:26px><input id=c28 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=c29 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=c30 style=display:none><div id=c31 style=height:26px><select id=c32 style=float:right;width:200px onchange=updateNetAuth2Dialog(event)><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protocol</div></div><div id=c33 style=height:26px><input id=c34 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 32 characters"><div title="Maximum 32 characters">Server Name</div></div><div id=c35 style=height:26px><select id=c36 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c37 style=height:26px><input id=c38 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c39 style=height:26px><input id=c40 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Username</div></div><div id=c41 style=height:26px><input id=c42 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuth2Dialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Password</div></div><div id=c43 style=height:26px><input id=c44 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuth2Dialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c45 style=height:26px><input id=c46 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c47 style=height:26px><input id=c48 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c49 style=height:26px><select id=c50 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Client Certificate</div></div><div id=c51 style=height:26px><select id=c52 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Server Issuer Cert</div></div><div id=c53 style=height:26px><select id=c54 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=1>Enabled<option value=0>Disabled</select><div>Active in S0</div></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=c55 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><div id=67><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Operating system IP address sync</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=68><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c56 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP address</div></div><div style=height:26px id=69><input id=c57 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Subnet mark</div></div><div style=height:26px><input id=c58 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Gateway</div></div><div style=height:26px><input id=c59 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Primary DNS</div></div><div style=height:26px><input id=c60 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=c61 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=c62 style=float:right;width:200px><div>Update Interval (minutes)</div></div><div style=height:26px><input id=c63 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=c64 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Power up<option value=10>Reset<option value=5>Power cycle<option value=8>Power down<option id=d24p500 value=500>OS Wake from Standby<option id=d24p501 value=501>OS Power Saving<option value=999>Set boot options</select><div>Remote Command</div></div><div style=height:80px><div id=c65 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS Pause</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Enforce Secure Boot</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS Setup</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Force progress events</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Lock power button</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Lock reset button</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Lock sleep button</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Lock keyboard</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS password bypass</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflash BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Safe mode</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Use IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel&reg; Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel&reg; ME Settings</label><br></div></div><div>Boot Settings</div></div><div style=height:26px><select id=c66 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>None<option id=ForceDVDBootOption value=1>Force CD/DVD Boot<option id=ForcePXEBootOption value=2>Force PXE Boot<option id=ForceHDBootOption value=3>Force Hard Disk Boot<option id=ForceDiagBootOption value=4>Force Diagnostic Boot</select><div>Boot Source</div></div><div id=c67 style=height:26px><select id=c68 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</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c69 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=c70 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>System Default<option id=c71 value=1>Quiet<option id=c72 value=2>Verbose<option id=c73 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 id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c74 value=2>Enabled<br></label><label><input type=radio name=d26b id=c75 value=0>Disabled<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c76 value=1>Enabled<br></label><label><input type=radio name=d26a id=c77 value=0>Disabled<br></label></div><div id=dialog27 style=margin:auto;margin:3px><br><div style=height:26px><select id=c78 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>Disabled<option value=1>Enabled</select><div>Enabled</div></div><div id=c79 style=height:26px><select id=c80 style=float:right;width:200px onclick=cleanup()><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protocol</div></div><div id=c81 style=height:26px><input id=c82 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 32 characters"><div title="Maximum 32 characters">Server Name</div></div><div id=c83 style=height:26px><select id=c84 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c85 style=height:26px><input id=c86 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c87 style=height:26px><input id=c88 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Username</div></div><div id=c89 style=height:26px><input id=c90 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuthDialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Password</div></div><div id=c91 style=height:26px><input id=c92 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c93 style=height:26px><input id=c94 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c95 style=height:26px><input id=c96 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c97 style=height:26px><select id=c98 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Client Certificate</div></div><div id=c99 style=height:26px><select id=c100 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Server Issuer Cert</div></div><div id=c101 style=height:26px><select id=c102 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>Enabled<option value=1>Disabled</select><div>Active in S0</div></div><div id=c103 style=height:26px><input id=c104 style=float:right;width:200px onkeyup=updateNetAuthDialog()><div>PXE Timeout</div></div></div></div><div style=padding:10px;margin-bottom:4px><input id=c105 type=button value=Cancel style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c106 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c107 type=button value=Delete style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="en" 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;} 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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.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,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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.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;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</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=go14 class=nav1 onclick=go(14)><a>Remote Desktop</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Files</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</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=go12 class=nav1 onclick=go(12)><a>WSMAN Browser</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Disk Map" onclick=iderToggleDiskMap()><input type=button value="Stop IDE-R Session" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Floppy, blocks are 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, blocks are 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></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,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&languageid=en-fr" rel="noreferrer noopener" target="_blank"><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><span id=21></span></div><div id=p11 style=display:none><h1>User Accounts</h1><span id=22></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=23 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=24 type=button value=Query style=margin:4px onclick=wsmanQuery()><input type=button value=Clear style=margin:4px onclick="QH(25, '')"><input id=c0 placeholder=Filter style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=25></div></div><div id=p13 style=display:none;min-width:780px><h1>Serial-over-LAN Terminal</h1><br><div id=26 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel&reg; AMT Redirection port or Serial-over-LAN feature is disabled<span id=27>, click here to enable it.</span></div></div><div id=28 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Remote computer is not powered on, click here to issue a power command.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=29></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Power Actions..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Start remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Start Capture" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Connect onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=30>Disconnected.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value=CR+LF title="Toggle what the return key will send" onclick="termToggleCr();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Toggle terminal size" onclick="termToggleSize();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC+[OM)" title="Toggle F1 to F10 keys emulation type" onclick="termToggleFx();Q(33).blur()"><input id=34 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Extended Ascii" title="Toggle terminal emulation type" onclick="termToggleType();Q(34).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Send onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=35 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Paste disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=36><h1>Remote Desktop</h1><br></div><div id=37 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel&reg; AMT Redirection port or KVM feature is disabled<span id=38>, click here to enable it.</span></div></div><div id=39 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Remote computer is not powered on, click here to issue a power command.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=40></span>&nbsp;<div class=rb title="Rotate Left" onclick=drotate(-1)>&olarr;</div><div class=rb title="Rotate Right" onclick=drotate(1)>&orarr;</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Toggle full screen mode" onkeypress="return false" onkeydown="return false" value=Full onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Save a screenshot of the remote desktop" onkeypress="return false" onkeydown="return false" value=Save... onclick=deskSaveImage() style=margin-right:3px><input type=button value=Settings... title="Edit remote desktop settings" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Start remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Change the power state of the remote machine" onkeypress="return false" onkeydown="return false" value="Power Actions..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;&#x2716;</div>&nbsp;<input type=button id=c10 value=Connect onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=41>Disconnected.</span></div><tr><td id=42 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onwheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=43 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Win<option value=1>Win+Down<option value=2>Win+Up<option value=3>Win+L<option value=4>Win+M<option value=20>Win+R<option value=23>Win+Left<option value=24>Win+Right<option value=5>Shift+Win+M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12<option value=25>Enter</select><input id=DeskWD type=button value=Send onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=44 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=45 type=button value=Type onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=46><input id=47 type=checkbox>Blank Screen&nbsp;</span><span id=48><input id=49 type=checkbox>View only&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=50></span><h1>Audit Log</h1><span id=51></span></div><div id=p16 style=display:none><h1>Security Settings</h1><span id=52></span></div><div id=p17 style=display:none><h1>Internet Settings</h1><span id=53></span></div><div id=p18 style=display:none><h1>System Defense</h1><span id=54></span></div><div id=p19 style=display:none><h1>Agent Presence</h1><span id=55></span></div><div id=p21 style=display:none><h1>Storage</h1><span id=56></span></div><div id=p22 style=display:none><h1>Event Subscriptions</h1><span id=57></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=58></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Files</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Up>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Select All" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rename onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Delete onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="New Folder" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Upload onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Cut onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Copy onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Paste onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Refresh onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Sort by name<option value=2>Sort by size<option value=3>Sort by date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>&checkmark;</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>&#10007;</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></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:hidden;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=59 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>&#x2716;</div><div id=60 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=61 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=62><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=63 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=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></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="if (event.keyCode == 13) return dialogclose(1); else 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=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Image Encoding</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Disabled<option value=2>Automatic<option value=3>Enabled</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Show Local Mouse Cursor</label><br><label><input type=checkbox id=d7showcad>Show Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Limit Frame Rate</label><br><label><input type=checkbox id=d7noMouseRotate>Don't Rotate Mouse</label><br><label><input type=checkbox id=d7kvmrmw>Reverse Mouse Wheel</label><br></div><div>Other Settings</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Quality</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>Scaling</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=admin style=float:right;width:220px><div style=height:20px>Username</div></div><div style="margin:3px 0 3px 0"><input id=c13 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><label style=display:block><input type=checkbox id=c14>Redirection Port</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM Remote Desktop</label><label style=display:block><input type=checkbox id=c17>IDE-Redirection<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Not Required<br></label><label><input type=radio name=d10 id=c20 value=1>Required for KVM only<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Always Required<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=64></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 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=c23 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=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priority</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Authentication</div></div><div style=height:26px><select id=c26 style=float:right;width:200px onclick=updateWifiDialog()><option id=65 value=4>CCMP-AES<option id=66 value=3>TKIP-RC4</select><div>Encryption</div></div><div id=c27><div style=height:26px><input id=c28 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=c29 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=c30 style=display:none><div id=c31 style=height:26px><select id=c32 style=float:right;width:200px onchange=updateNetAuth2Dialog(event)><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protocol</div></div><div id=c33 style=height:26px><input id=c34 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 32 characters"><div title="Maximum 32 characters">Server Name</div></div><div id=c35 style=height:26px><select id=c36 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c37 style=height:26px><input id=c38 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c39 style=height:26px><input id=c40 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuth2Dialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Username</div></div><div id=c41 style=height:26px><input id=c42 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuth2Dialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Password</div></div><div id=c43 style=height:26px><input id=c44 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuth2Dialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c45 style=height:26px><input id=c46 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c47 style=height:26px><input id=c48 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuth2Dialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c49 style=height:26px><select id=c50 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Client Certificate</div></div><div id=c51 style=height:26px><select id=c52 style=float:right;width:200px onclick=updateNetAuth2Dialog()></select><div>Server Issuer Cert</div></div><div id=c53 style=height:26px><select id=c54 style=float:right;width:200px onclick=updateNetAuth2Dialog()><option value=1>Enabled<option value=0>Disabled</select><div>Active in S0</div></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=c55 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><div id=67><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Operating system IP address sync</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=68><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c56 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP address</div></div><div style=height:26px id=69><input id=c57 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Subnet mark</div></div><div style=height:26px><input id=c58 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Gateway</div></div><div style=height:26px><input id=c59 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Primary DNS</div></div><div style=height:26px><input id=c60 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=c61 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=c62 style=float:right;width:200px><div>Update Interval (minutes)</div></div><div style=height:26px><input id=c63 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=c64 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Power up<option value=10>Reset<option value=5>Power cycle<option value=8>Power down<option id=d24p500 value=500>OS Wake from Standby<option id=d24p501 value=501>OS Power Saving<option value=999>Set boot options</select><div>Remote Command</div></div><div style=height:80px><div id=c65 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS Pause</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Enforce Secure Boot</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS Setup</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Force progress events</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Lock power button</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Lock reset button</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Lock sleep button</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Lock keyboard</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS password bypass</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflash BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Safe mode</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Use IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel&reg; Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel&reg; ME Settings</label><br></div></div><div>Boot Settings</div></div><div style=height:26px><select id=c66 style=float:right;width:200px onchange=showAdvPowerDlgChange()></select><div>Boot Source</div></div><div id=c67 style=height:26px><select id=c68 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</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c69 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=c70 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>System Default<option id=c71 value=1>Quiet<option id=c72 value=2>Verbose<option id=c73 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 id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c74 value=2>Enabled<br></label><label><input type=radio name=d26b id=c75 value=0>Disabled<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c76 value=1>Enabled<br></label><label><input type=radio name=d26a id=c77 value=0>Disabled<br></label></div><div id=dialog27 style=margin:auto;margin:3px><br><div style=height:26px><select id=c78 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>Disabled<option value=1>Enabled</select><div>Enabled</div></div><div id=c79 style=height:26px><select id=c80 style=float:right;width:200px onclick=cleanup()><option value=0 selected="selected">EAP-TLS<option value=1>EAP-TTLS/MSCHAPv2<option value=2>PEAPv0/EAP-MSCHAPv2<option value=3>PEAPv1/EAP-GTC<option value=4>EAP-FAST/MSCHAPv2<option value=5>EAP-FAST/GTC<option value=6>EAP-FAST/TLS</select><div>Protocol</div></div><div id=c81 style=height:26px><input id=c82 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 32 characters"><div title="Maximum 32 characters">Server Name</div></div><div id=c83 style=height:26px><select id=c84 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0 selected="selected">Full Name<option value=1>Domain Suffix</select><div>Server Name Compare</div></div><div id=c85 style=height:26px><input id=c86 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Domain</div></div><div id=c87 style=height:26px><input id=c88 style=float:right;width:200px maxlength="128" onkeyup=updateNetAuthDialog() title="Maximum 128 characters"><div title="Maximum 128 characters">Username</div></div><div id=c89 style=height:26px><input id=c90 type=password style=float:right;width:200px maxlength="32" onkeyup=updateNetAuthDialog() title="Maximum length is 32 characters"><div title="Maximum length is 32 characters">Password</div></div><div id=c91 style=height:26px><input id=c92 style=float:right;width:200px maxlength="80" onkeyup=updateNetAuthDialog() title="Maximum 80 characters"><div title="Maximum 80 characters">Roaming Identity</div></div><div id=c93 style=height:26px><input id=c94 style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum 256 characters"><div title="Maximum 256 characters">Protected Access Credentials</div></div><div id=c95 style=height:26px><input id=c96 type=password style=float:right;width:200px maxlength="256" onkeyup=updateNetAuthDialog() title="Maximum length is 256 characters"><div title="Maximum length is 256 characters">PAC Password</div></div><div id=c97 style=height:26px><select id=c98 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Client Certificate</div></div><div id=c99 style=height:26px><select id=c100 style=float:right;width:200px onclick=updateNetAuthDialog()></select><div>Server Issuer Cert</div></div><div id=c101 style=height:26px><select id=c102 style=float:right;width:200px onclick=updateNetAuthDialog()><option value=0>Enabled<option value=1>Disabled</select><div>Active in S0</div></div><div id=c103 style=height:26px><input id=c104 style=float:right;width:200px onkeyup=updateNetAuthDialog()><div>PXE Timeout</div></div></div></div><div style=padding:10px;margin-bottom:4px><input id=c105 type=button value=Cancel style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c106 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c107 type=button value=Delete style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
@@ -761,11 +761,11 @@ q++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1=
761 h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
762 b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
763 1]=e,h.spare.data[b+2]=a,b+=4}function r(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function C(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
764 -2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
765 -null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
766 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
767 -0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
768 -h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
764 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];null!=c&&h.sendkey(c,
765 +a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);173==c&&(d=45);186==c&&
766 +(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=0;h.spareh2=0;
767 +h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=h.rwidth=
768 +h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
769 h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
770 h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
771 0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
@@ -787,67 +787,67 @@ h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKey
787 0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){h.ReverseMouseWheel&&(b*=-1);var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/
788 Q(h.canvasid).offsetHeight,d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=r(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),
789 h.mNagleTimer=null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=
790 -0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;
791 -a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");
792 -a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&
793 -a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];
794 -if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&
795 -255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);
796 -a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();
797 -if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,r=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,
798 -4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),r=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+
799 -r+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,r,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(r,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,
800 -4));break;case 11:c=0;r={};g=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);r[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,r,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,
801 -4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton=
802 -{NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,
803 -Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?
804 -d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,
805 -a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,
806 -67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&
807 -delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-
808 -n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,
809 -a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",
810 -b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,
811 -a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&
812 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&
813 -b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&
814 -(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&
815 -a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};
816 -a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]=
817 -{x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
818 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<
819 -b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/
820 -a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=
821 -a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
822 -null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=
823 -null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;
824 -if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||
825 -3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,
826 -0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};
827 -a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;
828 -d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);
829 -0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=
830 -function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=
831 -a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");
832 -d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(q[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<
833 -b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(C<<12)+r}function e(){for(var a=(g<<6)+(C<<12)+r,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(C<<12)+r,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=
834 -E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),r=0,g=7,C=0,w=!0,D=0,m=0,k=0,h=0,u=0,K=[],B=0,x=0,z=[],A=[],R=!1,y=!0,E,O=!1,H=[],
835 -N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=
836 -decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":O=!0;u=0;break;case ">":O=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var q=0;q<l.width;q++)A[n][q]=A[n-1][q],z[n][q]=z[n-1][q];for(n=
837 -E[0]+1-1;n>E[0]-1;n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;u=0;break;default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,q=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==q&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==
838 -q&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==q&&(0==n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==q&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==q&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==q&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==q&&(p=n[0]);for(J=D;J<l.width-p;J++)A[m][J]=A[m][J+p],z[m][J]=z[m][J+p];for(J=l.width-p;J<l.width;J++)A[m][J]=" ",z[m][J]=448;break;case "L":J=1;1==q&&(J=n[0]);0==J&&(J=1);
839 -for(n=E[1];n>=m+J;n--)A[n]=A[n-J],z[n]=z[n-J];for(n=m;n<m+J;n++)for(A[n]=[],z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==q&&2==n[0])l.TermClear((C<<12)+(g<<6)),m=D=0,H=[];else if(0==q||1==q&&0==n[0])for(e(),J=m+1;J<l.height;J++)v(J);else if(1==q&&1==n[0])for(e(),J=0;J<m-1;J++)v(J);break;case "H":2==q?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<q;J++)n[J]&&0!=n[J]?1==n[J]?
840 -8>g&&(g+=8):2==n[J]||22==n[J]?8<=g&&(g-=8):7==n[J]?r=2:27==n[J]?r=0:30<=n[J]&&37>=n[J]?(p=8<=g,g=n[J]-30,p&&8>=g&&(g+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?g=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,g=7,r=0);break;case "K":if(0!=q&&(1!=q||n[0]&&0!=n[0])){if(1==q)if(1==n[0])for(n=(g<<6)+(C<<12)+r,q=0;q<D;q++)A[m][q]=" ",z[m][q]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==q&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-
841 -1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=E[1]);break;case "S":p=1;1==q&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "M":p=1;1==q&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "T":p=1;1==q&&(p=n[0]);for(n=E[1];n>E[0]+
842 -p;n--)for(q=0;q<l.width;q++)A[n][q]=A[n-p][q],z[n][q]=z[n-p][q];for(n=E[0]+p;n>E[0];n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "X":p=1;J=D;R=m;for(1==q&&(p=n[0]);0<p&&R<l.height;)A[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(q=parseInt(n[0]),(0==q||2==q)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,
843 -l.title=n[1]);u=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var q=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
844 -9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,
845 -9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;H=[]};l.TermResetScreen=function(){r=0;g=7;C=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);
846 -N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};
847 -l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,
848 -79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,
849 -91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;
850 -var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
790 +0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=
791 +700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
792 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
793 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
794 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
795 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
796 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
797 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,r=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
798 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),r=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+r+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
799 +a.ProcessPictureMsg(c,r,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(r,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;r={};g=((b.charCodeAt(4)&255)<<8)+
800 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);r[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,r,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
801 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
802 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
803 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&
804 +7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==
805 +a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&
806 +a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+
807 +a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
808 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
809 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
810 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
811 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
812 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
813 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
814 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
815 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
816 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
817 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
818 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
819 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
820 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
821 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
822 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
823 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
824 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
825 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
826 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
827 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
828 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
829 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
830 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
831 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
832 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(q[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(T[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
833 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(C<<12)+r}function e(){for(var a=(g<<6)+(C<<12)+r,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(C<<12)+r,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
834 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),r=0,g=7,C=0,w=!0,D=0,m=0,k=0,h=0,u=0,K=[],B=0,x=0,z=[],A=[],R=!1,y=!0,E,O=!1,H=[],N="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
835 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(N+b)}catch(c){N+=b;return}N="";for(var d=0;d<b.length;d++){var p=
836 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;K=[];x=B=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":O=!0;u=0;break;case ">":O=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var q=0;q<l.width;q++)A[n][q]=A[n-1][q],z[n][q]=z[n-1][q];for(n=E[0]+1-1;n>E[0]-1;n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;u=0;break;
837 +default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){K[B]=K[B]?10*K[B]+(p-0):p-0;break}else if(";"==p){B++;break}else if("?"==p){x=1;break}else{K[0]||(K[0]=0);var n=K,q=B+1,R=x;if(1==R)switch(p){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var J=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==q&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==q&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==q&&(0==
838 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==q&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==q&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==q&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":p=1;1==q&&(p=n[0]);for(J=D;J<l.width-p;J++)A[m][J]=A[m][J+p],z[m][J]=z[m][J+p];for(J=l.width-p;J<l.width;J++)A[m][J]=" ",z[m][J]=448;break;case "L":J=1;1==q&&(J=n[0]);0==J&&(J=1);for(n=E[1];n>=m+J;n--)A[n]=A[n-J],z[n]=z[n-J];for(n=m;n<m+J;n++)for(A[n]=[],
839 +z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==q&&2==n[0])l.TermClear((C<<12)+(g<<6)),m=D=0,H=[];else if(0==q||1==q&&0==n[0])for(e(),J=m+1;J<l.height;J++)v(J);else if(1==q&&1==n[0])for(e(),J=0;J<m-1;J++)v(J);break;case "H":2==q?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(J=0;J<q;J++)n[J]&&0!=n[J]?1==n[J]?8>g&&(g+=8):2==n[J]||22==n[J]?8<=g&&(g-=8):7==n[J]?r=2:27==n[J]?r=0:30<=n[J]&&
840 +37>=n[J]?(p=8<=g,g=n[J]-30,p&&8>=g&&(g+=8)):40<=n[J]&&47>=n[J]?C=n[J]-40:90<=n[J]&&99>=n[J]?g=n[J]-82:100<=n[J]&&109>=n[J]&&(C=n[J]-92):(C=0,g=7,r=0);break;case "K":if(0!=q&&(1!=q||n[0]&&0!=n[0])){if(1==q)if(1==n[0])for(n=(g<<6)+(C<<12)+r,q=0;q<D;q++)A[m][q]=" ",z[m][q]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==q&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
841 +E[1]);break;case "S":p=1;1==q&&(p=n[0]);for(n=E[0];n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "M":p=1;1==q&&(p=n[0]);for(n=m;n<=E[1]-p;n++)for(q=0;q<l.width;q++)A[n][q]=A[n+p][q],z[n][q]=z[n+p][q];for(n=E[1]-p+1;n<E[1];n++)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "T":p=1;1==q&&(p=n[0]);for(n=E[1];n>E[0]+p;n--)for(q=0;q<l.width;q++)A[n][q]=A[n-p][q],z[n][q]=z[n-p][q];for(n=
842 +E[0]+p;n>E[0];n--)for(q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "X":p=1;J=D;R=m;for(1==q&&(p=n[0]);0<p&&R<l.height;)A[R][J]=" ",J++,p--,J>=l.width&&(J=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)B++;else if(7==n){n=K;if(0!=n.length&&(q=parseInt(n[0]),(0==q||2==q)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else K[B]=K[B]?K[B]+p:p}}l.TermDraw()};l.ProcessVt100String=
843 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var q=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
844 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],T=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
845 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;H=[]};l.TermResetScreen=function(){r=0;g=7;C=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];O=!1;l.TermClear(448);N=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
846 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
847 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==O){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
848 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
849 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
850 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
851 a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];H.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
852 break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<H.length&&(H=H.slice(H.length-800));c=H.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
853 l.Init();return l},ZLIB=ZLIB||{};
@@ -929,7 +929,7 @@ new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attac
929 function(b){B.location.href=a.toURL();h.readyState=h.DONE;r(h,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=C.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
930 b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;r(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new C(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
931 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
932 -var version="0.9.6",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
932 +var version="0.9.7",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_Battery 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_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
933 null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Loading...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetAuth NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
934 StatusStrs=["Disconnected","Connecting...","Setup...","Connected"],t,t2,rsepass=null;
935 function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(23).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
@@ -980,7 +980,7 @@ a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Wireless Interface":"Wired Interface")+"
980 1==amtsysstate.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"Enabled":"Disabled","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Respond to ping",addLinkConditional(["Disabled",
981 "ICMP response","RMCP response","ICMP & RMCP response"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e="EAP-TLS EAP-TTLS/MSCHAPv2 PEAPv0/EAP-MSCHAPv2 PEAPv1/EAP-GTC EAP-FAST/MSCHAPv2 EAP-FAST/GTC EAP-FAST/TLS".split(" "),p="Disabled",amtsysstate.AMT_8021XProfile.responses.Body.Enabled&&(p="Enabled, "+e[amtsysstate.AMT_8021XProfile.responses.Body.AuthenticationProtocol]),d+=TableEntry("802.1x",addLinkConditional(p,"editNetAuthProfile()",xxAccountAdminName)),
982 e=1==c.DHCPEnabled?"Automatic using DHCP server":"Static IP address",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("IPv4 state",addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("IPv4 address",isIpAddress(c.IPAddress,"None"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4 gateway / Mask",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"None")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4 domain name server",
983 -e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="Disabled",w,e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)e[C].SettingData&&e[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[C].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Enabled, Automatic & manual addresses":
983 +e));if(5<amtversion&&200==amtsysstate.IPS_IPv6PortSettings.status){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="Disabled",w,e=amtsysstate.CIM_ElementSettingData.responses,C=0;C<e.length;C++)e[C].SettingData&&e[C].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[C].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Enabled, Automatic & manual addresses":
984 "Enabled, Automatic addresses");d+=TableEntry("IPv6 state",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(C=0;C<c.CurrentAddressInfo.length;C++)0<ipv6addr.length&&(ipv6addr+=", "),ipv6addr+=c.CurrentAddressInfo[C].split(",")[0];d+=TableEntry("IPv6 address",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6 address",
985 "None");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6 default router",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6 domain name server",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||
986 11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
@@ -1026,7 +1026,8 @@ b+="<div style=height:26px;margin-top:4px id=subxuser><input id=subuser style=fl
1026 setDialogMode(11,"Add Event Subscription",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c106",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
1027 function newSubscriptionButtonOk(){var b=0==Q("subuser").value.length?void 0:Q("subuser").value,c=0==Q("subpass").value.length?void 0:Q("subpass").value;amtstack.Subscribe("CIM_FilterCollection",Q("subtype").value,Q("suburl").value,newSubscriptionButtonOk2,null,1,{InstanceID:Q("subfilter").value},0<Q("subargs").value.length?Q("subargs").value:null,b,c)}function newSubscriptionButtonOk2(b,c,a,d){200==d&&PullEventSubscriptions()}
1028 function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AMT_AuditLog",processAuditLog0))}var auditLog=null,auditLogEnabledStates="Unknown;Other;Enabled;Disabled;Shutting Down;Not Applicable;Enabled but Offline;In Test;Deferred;Quiesce;Starting".split(";");
1029 -function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Disabled":"Enabled",c&2&&(b+=", Locked"),c&4&&(b+=", Almost Full"),c&8&&(b+=", Full"),c&16&&(b+=", NoKey"),c="<h1>Audit Log Settings</h1>"+TableStart(),c+=TableEntry("State",b),c+=TableEntry("Storage",a[0].CurrentNumberOfRecords+" record(s), "+a[0].PercentageFree+"% free"),c+=TableEntry("Overwrite policy",2==a[0].OverwritePolicy?"Wraps when full":"Never overwrites"),c+=TableEnd(),QH(50,c),amtstack.GetAuditLog(processAuditLog1))}
1029 +function processAuditLog0(b,c,a,d){200==d&&a&&0<a.length&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Disabled":"Enabled",c&2&&(b+=", Locked"),c&4&&(b+=", Almost Full"),c&8&&(b+=", Full"),c&16&&(b+=", NoKey"),c="<h1>Audit Log Settings</h1>"+TableStart(),c+=TableEntry("State",b),c+=TableEntry("Storage",a[0].CurrentNumberOfRecords+" record(s), "+a[0].PercentageFree+"% free"),c+=TableEntry("Overwrite policy",2==a[0].OverwritePolicy?"Wraps when full":"Never overwrites"),c+=TableEnd(),QH(50,
1030 +c),amtstack.GetAuditLog(processAuditLog1))}
1031 function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filter" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Save...","SaveAuditLog()")+AddButton("Clear Log","ClearAuditLog()"))+"<br>");if(0==c.length)d="No audit log events found.";else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Time</b><td class=r1 style=width:260px><b>Initiator</b><td class=r1><b>Action</b>";
1032 for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=", "+v.Event);null!=v.ExStr&&(n+=", "+v.ExStr);""!=l&&""!=p&&(l+=", ");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",
1033 {hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(51,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Intel AMT Audit Log",auditLog)}
@@ -1199,7 +1200,7 @@ function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<di
1200 function wsmanQuery(){QH(25,"");var b=getSelectedOptions(Q(23)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(24,!1),c&&0<c.length&&amtstack.BatchEnum("Browser",c,browserResponse,null,!0))}
1201 function browserResponse(b,c,a,d){QE(24,!0);b="";for(var e in a)c=a[e],b+="<h2>"+e+"</h2><div style=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(Empty)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel&reg"):b+("<br><div style=color:red>Error #"+c.status+"</div>"),b+="</div><br>";QH(25,b)}
1202 function wsmanFilter(){var b=c0.value.toLowerCase(),c;for(c in AllWsman)QV("WSB-"+AllWsman[c],""==b||0<=AllWsman[c].toLowerCase().indexOf(b))}function connectTerminal(){terminal&&(0==terminal.State?(terminal.tlsv1only=amtstack.wsman.comm.tlsv1only,terminal.Start(currentMeshNode._id,16994,"*","*",0)):terminal.Stop())}
1202 -function onTerminalStateChange(b,c){c4.value=0==c?"Connect":"Disconnect";Q(30).textContent=StatusStrs[c];QE(35,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection of not supported.");
1203 +function onTerminalStateChange(b,c){c4.value=0==c?"Connect":"Disconnect";Q(30).textContent=StatusStrs[c];QE(35,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection is not supported.");
1204 break;case 3:1==b.serverIsRecording&&QV("termRecordIcon",!0)}}function termPaste(){terminal.m.TermSendKeys(d3pastetextarea.value);return!1}function termSendKey(b){terminal.m.TermSendKey(b);return!1}function termSendKeys(){var b=Q("termkeys").value;1E3>b?termSendKey(b):terminal.m.TermHandleKeyDown({which:b-889,repeat:!1})}function termToggleSize(){80==terminal.m.width?(Q(32).value="100x30",terminal.m.Init(100,30)):(Q(32).value="80x25",terminal.m.Init(80,25))}
1205 var terminalEmulations=["UTF8 Terminal","Extended ASCII","Intel ASCII"];function termToggleType(){terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q(34).value=terminalEmulations[terminal.m.terminalEmulation]}function termToggleFx(){Q(33).value=["Intel (F10 = ESC+[OM)","Alternate (F10 = ESC+0)","VT100+ (F10 = ESC+[OY)"][terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3]}
1206 function termToggleCr(){"\r\n"==terminal.m.lineFeed?(Q(31).value="LF",terminal.m.lineFeed="\n"):(Q(31).value="CR+LF",terminal.m.lineFeed="\r\n")}
@@ -1219,7 +1220,7 @@ PullDesktopDisplayInfo(),urlvars.norefresh||(desktopPollTimer=setInterval(PullDe
1220 function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(desktopScreenInfo=a.IPS_ScreenSettingData.responses.Body,desktopScreenInfo.KVMRSD=a.IPS_KVMRedirectionSettingData.responses.Body,UpdateDesktopDisplayInfo())}
1221 function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(43).innerHTML=b+"&nbsp;":Q(43).innerHTML=""}
1222 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1222 -function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Connect":"Disconnect";var d=3==c&&!urlvars.kvmviewonly;QE(44,d);QE("deskkeys",d);QE("DeskWD",d);QE(45,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Desktop","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Remote Desktop","The device indicated that this type of connection of not supported."):5E4==b.disconnectCode?
1223 +function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Connect":"Disconnect";var d=3==c&&!urlvars.kvmviewonly;QE(44,d);QE("deskkeys",d);QE("DeskWD",d);QE(45,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Desktop","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Remote Desktop","The device indicated that this type of connection is not supported."):5E4==b.disconnectCode?
1224 messagebox("Remote Desktop","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?a=null!=b.connectTime&&b.connectTime+5E3<Date.now():50002==b.disconnectCode&&messagebox("Remote Desktop","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",
1225 ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(41).textContent=StatusStrs[desktop.State]+b}
1226 function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Remote Desktop Settings",3,showDesktopSettingsChanged))}
@@ -1375,8 +1376,8 @@ b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.G
1376 function showAdvPowerDlg(){try{Q("c64").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
1377 QV("ForceHDBootOption",1==amtPowerBootCapabilities.ForceHardDriveBoot);QV("ForcePXEBootOption",1==amtPowerBootCapabilities.ForcePXEBoot);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);QV("d24dSerialOverLan",1==amtPowerBootCapabilities.SOL);
1378 QV("d24dSecureErase",1==amtPowerBootCapabilities.SecureErase);QV("d24dPlatformErase",null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&0!=(amtsysstate.CIM_BootService.response.EnabledState&2));QV("d24dFirmwareReset",1==amtPowerBootCapabilities.ConfigurationDataReset);QV("d24dLockSleepButton",1==amtPowerBootCapabilities.SleepButtonLock);QV("d24dUserPasswordBypass",1==amtPowerBootCapabilities.UserPasswordBypass);
1378 -QV("c71",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c72",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c73",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);setDialogMode(24,"Custom Power Action",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}
1379 -function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c64").value&&600>Q("c64").value;QE("c66",!b);QE("c68",!b);QE("idd_d24IDERBootDevice",!b);QE("c70",!b);QE("idd_d24RSEPass",!b);QE("c106",!0)}
1379 +QV("c71",1==amtPowerBootCapabilities.VerbosityQuiet);QV("c72",1==amtPowerBootCapabilities.VerbosityVerbose);QV("c73",1==amtPowerBootCapabilities.VerbosityScreenBlank);QV("d24p500",9<amtversion);QV("d24p501",9<amtversion);QH("c66",'<option value=0>None</option><option id="ForceDVDBootOption" value=1>Force CD/DVD Boot</option><option id="ForcePXEBootOption" value=2>Force PXE Boot</option><option id="ForceHDBootOption" value=3>Force Hard Disk Boot</option><option id="ForceDiagBootOption" value=4>Force Diagnostic Boot</option>');
1380 +setDialogMode(24,"Custom Power Action",3,showAdvPowerDlgOk);showAdvPowerDlgChange()}function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c64").value&&600>Q("c64").value;QE("c66",!b);QE("c68",!b);QE("idd_d24IDERBootDevice",!b);QE("c70",!b);QE("idd_d24RSEPass",!b);QE("c106",!0)}
1381 function showAdvPowerDlgOk(){var b=Q("c64").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(61,"Power action completed."):QH(61,format("Power action error #{0}.",e));setDialogMode(1,"Power Action",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c64").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=Q("d24BiosSecureBoot").checked,
1382 AvdPowerDlg.BIOSSetup=Q("d24BiosSetup").checked,AvdPowerDlg.BootMediaIndex=Q("c68").value,AvdPowerDlg.FirmwareVerbosity=Q("c70").value,AvdPowerDlg.ForcedProgressEvents=Q("d24ForceProgressEvents").checked,AvdPowerDlg.IDERBootDevice=Q("c69").value,AvdPowerDlg.LockKeyboard=Q("d24LockKeyboard").checked,AvdPowerDlg.LockPowerButton=Q("d24LockPowerButton").checked,AvdPowerDlg.LockResetButton=Q("d24LockResetButton").checked,AvdPowerDlg.LockSleepButton=Q("d24LockSleepButton").checked,
1383 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,AvdPowerDlg.PlatformErase=Q("d24PlatformErase").checked,AvdPowerDlg.FirmwareReset=Q("d24FirmwareReset").checked,!0===AvdPowerDlg.SecureErase&&0<Q("d24rsepass").value.length&&(AvdPowerDlg.RSEPassword=